Ejemplo n.º 1
0
 /// <summary>
 /// 技を追加します
 /// </summary>
 /// <param name="trick">技</param>
 public void AddTrick(Trick trick)
 {
     if (trick.End > this.Length)
     {
         trick.End = this.Length;
     }
     foreach (Trick t in this.trickList.ToArray())
     {
         //新規が覆う
         if (t.Start >= trick.Start && t.End <= trick.End)
         {
             this.trickList.Remove(t);
         }
         //新規が分割
         else if (t.Start < trick.Start && t.End > trick.End)
         {
             t.End = trick.Start;
         }
         //新規が右
         else if (t.End > start && t.End <= end && t.Start < start)
         {
             t.End = trick.Start;
         }
         //新規が左
         else if (end > t.Start && end <= t.End && start < t.Start)
         {
             t.Start = trick.End;
         }
     }
     this.trickList.Add(trick);
     this.trickList.Sort();
 }
Ejemplo n.º 2
0
 public void DeleteTrick(Combo combo, Trick trick)
 {
     if (this.playState != PlaybackState.Stopped)
     {
         throw new NotChangeException();
     }
     combo.DeleteTrick(trick);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 技を削除します
 /// </summary>
 /// <param name="trick">削除する技</param>
 public void DeleteTrick(Trick trick)
 {
     this.trickList.Remove(trick);
 }
Ejemplo n.º 4
0
 public void DeleteTrick(Combo combo, Trick trick)
 {
     this.DeleteTrick(combo, trick);
     RaisePropertyChanged(nameof(TrickList));
 }