Esempio n. 1
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);
            }
        }
Esempio n. 2
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);
            }
        }
Esempio n. 3
0
        public static void Go(int index)
        {
            if (index >= 0 && index < CuelistCtrl.cues.Count)
            {
                Cue cue = CuelistCtrl.cues[index];
                ExecuteCueSend(cue);

                if (++index < CuelistCtrl.cues.Count)
                {
                    CuelistCtrl.SelectIndex(index);

                    cue = CuelistCtrl.cues[index];

                    if (cue.trigger != null && cue.trigger.type == TriggerType.FOLLOW)
                    {
                        if (cue.trigger.followTime <= 0)
                        {
                            Go(index);
                        }
                        else
                        {
                            FollowCtrl.Start(index, cue.trigger.followTime);
                        }
                    }
                }

                if (index < CuelistCtrl.cues.Count - 5)
                {
                    Core.win.cueTable.ScrollIntoView(CuelistCtrl.cues[index + 4]);
                }
                else
                {
                    Core.win.cueTable.ScrollIntoView(CuelistCtrl.cues[CuelistCtrl.cues.Count - 1]);
                }
            }
        }