Exemple #1
0
        private static void CutButton_Click(object sender, RoutedEventArgs e)
        {
            int index = Core.win.cueTable.SelectedIndex;


            if (CuelistCtrl.IsIndexInRange(index))
            {
                cueBuffer.Clear();

                for (int i = 0; i < Core.win.cueTable.SelectedItems.Count; ++i)
                {
                    if (Core.win.cueTable.SelectedItems[i] is Cue)
                    {
                        Cue cue = Core.win.cueTable.SelectedItems[i] as Cue;
                        cueBuffer.Add(cue);
                    }
                }

                foreach (Cue c in cueBuffer)
                {
                    CuelistCtrl.cues.Remove(c);
                }

                CuelistCtrl.SelectIndex(--index);
            }
        }
Exemple #2
0
        private static void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            int index = Core.win.cueTable.SelectedIndex;

            if (CuelistCtrl.IsIndexInRange(index))
            {
                List <Cue> deleteBuff = new List <Cue>();

                for (int i = 0; i < Core.win.cueTable.SelectedItems.Count; ++i)
                {
                    if (Core.win.cueTable.SelectedItems[i] is Cue)
                    {
                        Cue cue = Core.win.cueTable.SelectedItems[i] as Cue;
                        deleteBuff.Add(cue);
                    }
                }

                foreach (Cue c in deleteBuff)
                {
                    CuelistCtrl.cues.Remove(c);
                }

                CuelistCtrl.SelectIndex(--index);
            }
        }
Exemple #3
0
        private static void CopyButton_Click(object sender, RoutedEventArgs e)
        {
            if (CuelistCtrl.IsIndexInRange(Core.win.cueTable.SelectedIndex))
            {
                cueBuffer.Clear();

                for (int i = 0; i < Core.win.cueTable.SelectedItems.Count; ++i)
                {
                    if (Core.win.cueTable.SelectedItems[i] is Cue)
                    {
                        Cue cue = Core.win.cueTable.SelectedItems[i] as Cue;
                        cueBuffer.Add(cue);
                    }
                }
            }
        }