예제 #1
0
 public void DownLevel(BindableLabelSet set)
 {
     var currentIndex = this.Levels.IndexOf(set);
     if (currentIndex < this.Levels.Count - 1)
     {
         var nextLevel = this.Levels[currentIndex + 1];
         this.Levels[currentIndex] = nextLevel;
         this.Levels[currentIndex + 1] = set;
     }
 }
예제 #2
0
 public void UpLevel(BindableLabelSet set)
 {
     var currentIndex = this.Levels.IndexOf(set);
     if (currentIndex > 0)
     {
         var previousLevel = this.Levels[currentIndex - 1];
         this.Levels[currentIndex] = previousLevel;
         this.Levels[currentIndex - 1] = set;
         this.NotifyOfPropertyChange(() => this.Levels);
     }
 }
 public void AddSet()
 {
     if (this.SelectedSet != null)
     {
         this.editingSet = false;
         this.SelectedSet.SetName = this.SetName;
         this.SelectedSet = null;
     }
     else
     {
         var newLevel = new BindableLabelSet(new LabelSet(this.SetName));
         this.Hierarchy.Levels.Add(newLevel);
         this.SelectedSet = null;
     }
     this.SetName = string.Empty;
     this.AddSetButtonText = AddText;
     this.changes = true;
 }