Ejemplo n.º 1
0
        private void DownClick(object sender, RoutedEventArgs e)
        {
            FrameworkElement ele = sender as FrameworkElement;

            if (ele == null)
            {
                return;
            }

            var          alp   = (AlphabetItem)ele.DataContext;
            var          index = Alphabets.IndexOf(alp);
            AlphabetItem tmp   = null;

            if (ActiveAlphabet == alp)
            {
                tmp = alp;
            }
            index--;
            if (index > -1)
            {
                Alphabets.Remove(alp);
                Alphabets.Insert(index, alp);
                if (tmp != null)
                {
                    ActiveAlphabet = alp;
                }
            }


            AlphabetCollectionView.Refresh();
        }
Ejemplo n.º 2
0
 public bool RemoveAlphabet(char alphabet)
 {
     if (Alphabets.Contains(alphabet))
     {
         RemoveInstructionsInvolvingAlphabet(alphabet);
         Alphabets.Remove(alphabet);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 private void removeItem(AlphabetItem item)
 {
     item.PropertyChanged -= new PropertyChangedEventHandler(item_PropertyChanged);
     Alphabets.Remove(item);
     saveToSettings();
 }