Exemple #1
0
 private void RemoveSubShortcutYes(bool isYes, SubShortcutControl control)
 {
     if (isYes)
     {
         SubShorcuts.Remove(control);
         MultiUi_ShortcutsParent.Children.Remove(control);
     }
 }
Exemple #2
0
        private SubShortcutControl CreateSubShorcut(Core.DataStructures.Action action, int index)
        {
            SubShortcutControl newControl = new SubShortcutControl(this);

            newControl.Shortcut.Actions[0] = action;
            newControl.ShortcutType        = action.ToShortcutType();
            MultiUi_ShortcutsParent.Children.Insert(index, newControl);
            SubShorcuts.Insert(index, newControl);
            newControl.UpdateUi();
            return(newControl);
        }
Exemple #3
0
        public void MoveDownChild(SubShortcutControl control)
        {
            int oldIndex = SubShorcuts.IndexOf(control);

            if (oldIndex < SubShorcuts.Count - 1)
            {
                SubShorcuts.Remove(control);
                MultiUi_ShortcutsParent.Children.Remove(control);
                SubShorcuts.Insert(oldIndex + 1, control);
                MultiUi_ShortcutsParent.Children.Insert(oldIndex + 1, control);
            }
        }
Exemple #4
0
        public void MoveUpChild(SubShortcutControl control)
        {
            int oldIndex = SubShorcuts.IndexOf(control);

            if (oldIndex > 0)
            {
                SubShorcuts.Remove(control);
                MultiUi_ShortcutsParent.Children.Remove(control);
                SubShorcuts.Insert(oldIndex - 1, control);
                MultiUi_ShortcutsParent.Children.Insert(oldIndex - 1, control);
            }
        }
Exemple #5
0
        // Multi shortcut changed events

        private void MultiUi_AddShorcutButtonPressed(object sender, RoutedEventArgs e)
        {
            if (SubShorcuts == null)
            {
                SubShorcuts = new List <SubShortcutControl>();
            }

            SubShortcutControl newControl = new SubShortcutControl(this);

            MultiUi_ShortcutsParent.Children.Add(newControl);
            SubShorcuts.Add(newControl);
        }
Exemple #6
0
 public void DuplicateChild(SubShortcutControl control)
 {
     int                insertIndex = SubShorcuts.IndexOf(control) + 1;
     Shortcut           newShortcut = control.Shortcut.Duplicate();
     SubShortcutControl newControl  = CreateSubShorcut(newShortcut.Actions[0], insertIndex);
 }