/// <summary> /// Initialisiert die Gesten, die direkt auf der Oberfläche durchgeführt werden /// </summary> public void InitializeGestures() { GestureManager.AddGesture(this, DefinedGestures.Hold, HoldGesture); GestureManager.AddGesture(this, DefinedGestures.TouchDown, TouchDownCallback); GestureManager.AddGesture(this, DefinedGestures.TouchUp, TouchUpCallback); GestureManager.AddGesture(this, DefinedGestures.DragAndDrop, MoveCallback); }
void AddGesture(string content, int[] data) { if (!_all.Contains(content)) { _all += content + " ___ "; } manager.AddGesture(content, data); }
private void OnTopicClientInput(Data data) { TopicClientData a_TopicClientData = (TopicClientData)data; if (a_TopicClientData == null || a_TopicClientData.TopicClient == null) { throw new WatsonException("TopicClient needs to be supported and can't be null."); } GestureManager = new GestureManager(a_TopicClientData.TopicClient); GestureManager.AddGesture(this, m_Override); }
public static int ImportGestures(this GestureManager gestureManager, IEnumerable <IGesture> gestures, IEnumerable <IApplication> relatedApplications) { int count = 0; if (gestures == null) { return(count); } foreach (IGesture newGesture in gestures) { string matchName = gestureManager.GetMostSimilarGestureName(newGesture); if (!string.IsNullOrEmpty(matchName)) { if (relatedApplications != null && newGesture.Name != matchName) { relatedApplications.RenameGestures(newGesture.Name, matchName); } } else { if (gestureManager.GestureExists(newGesture.Name)) { string newName = gestureManager.GetNewGestureName(); if (relatedApplications != null) { relatedApplications.RenameGestures(newGesture.Name, newName); } newGesture.Name = newName; } gestureManager.AddGesture(newGesture); count++; } } if (count != 0) { gestureManager.SaveGestures(); } return(count); }