RealTimeStylus.AddCustomStylusDataToQueue 方法
將自訂資料加入至 RealTimeStylus 物件的佇列。
命名空間: Microsoft.StylusInput
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public Sub AddCustomStylusDataToQueue ( _
queue As StylusQueues, _
guid As Guid, _
data As Object _
)
'用途
Dim instance As RealTimeStylus
Dim queue As StylusQueues
Dim guid As Guid
Dim data As Object
instance.AddCustomStylusDataToQueue(queue, _
guid, data)
public void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
Object data
)
public:
void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
Object^ data
)
public void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
Object data
)
public function AddCustomStylusDataToQueue(
queue : StylusQueues,
guid : Guid,
data : Object
)
參數
- queue
型別:Microsoft.StylusInput.StylusQueues
其中一個 StylusQueues 值,指定佇列以及佇列中用來加入自訂資料的位置。
- guid
型別:System.Guid
用來指定所加入自訂資料之型別的全域唯一識別項 (GUID)。
- data
型別:System.Object
要加入至佇列的自訂資料。
備註
這個方法可讓您將自訂資訊加入至 RealTimeStylus 物件的佇列,以擴充 RealTimeStylus 物件的功能。這類資訊是當做 CustomStylusData 物件加入。這個方法是藉由建立自訂資料以進入及結束選取和清除模式,在 RealTimeStylus 物件上實作選取和清除的方式之一。
您可以在下列三個位置,將自訂手寫筆資料加入至 RealTimeStylus 物件的佇列 StylusQueues。
當 queue 參數設定為 Input 時,自訂資料會加入至 RealTimeStylus 物件的輸入佇列,而且會在來自手寫板畫筆資料流的新資料之前,先傳送至同步外掛程式集合。
- 當 queue 參數設定為 Output 時,自訂資料會在同步外掛程式集合目前所處理的資料之後,加入至 RealTimeStylus 物件的輸出佇列。
當 queue 參數設定為 OutputImmediate 時,自訂資料會在同步外掛程式集合目前所處理的資料之前,加入至 RealTimeStylus 物件的輸出佇列。
在上述每個案例中,由同步外掛程式集合中後續外掛程式加入的資料,都會在先前外掛程式加入的資料之後加入。
自訂手寫筆資料是當做 CustomStylusData 物件加入至佇列,而且外掛程式會透過其 IStylusSyncPlugin.CustomStylusDataAdded 或 IStylusAsyncPlugin.CustomStylusDataAdded 方法接收此資料。
當不在 RealTimeStylus 物件之執行緒上的物件呼叫 AddCustomStylusDataToQueue 方法時,佇列中自訂資料與 RealTimeStylus 物件正在處理之封包間有不確定的關聯性。
警告
將自訂資料加入至輸入佇列,以回應實作 IStylusSyncPlugin 介面之物件所接收的自訂資料,可能會在 RealTimeStylus 物件的執行緒上造成無限迴圈。
如需將資料加入至佇列之順序的詳細資訊,包括插圖,請參閱Accessing and Manipulating Stylus Input中的概念性主題。
下列清單將說明在哪些狀況下,這個方法會擲回例外狀況。
RealTimeStylus 物件已經過處置。
data 參數為 null (在 Visual Basic .NET 中為 Nothing)。
RealTimeStylus 物件未啟用。
沒有適當的外掛程式附加至 RealTimeStylus 物件,以接收來自指定之佇列的資訊。
guid 參數設定為與 DynamicRenderer 或 GestureRecognizer 類別相關聯的 GUID。
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
Microsoft.StylusInput.PluginData.CustomStylusData