public void DeleteGesture(string name) { MyomiGesture toRemove = null; //first, we need to find that gesture foreach (var gesture in this.Gestures) { if (gesture.Name == name) { gesture.ID = Guid.Empty; toRemove = gesture; } } if (toRemove != null) { Gestures.Remove(toRemove); } }
private void PopulateGestures() { //we will get another list of amazing guids which each contains a gesture, then we can let the gesture creator worry about that later //we are going to use the extention mygest for myomi gesture files var allGestures = FileHelper.GetAllFiles(Path.Combine("Profiles", this.ID.ToString()), ".mygest"); //first we will populate the gestures foreach (var gesturePath in allGestures) { var gesture = new MyomiGesture(new Guid(gesturePath), this.ID); //this one is broken, we will skip this gesture if (gesture.ID == Guid.Empty) { continue; } Gestures.Add(gesture); this._gestureCount++; } }
public void AddGesture(MyomiGesture gesture) { this.Gestures.Add(gesture); this.SaveProfile(); }