protected virtual void OnClickedAtTime(RulerClickedEventArgs e) { if (ClickedAtTime != null) { ClickedAtTime(this, e); } }
protected virtual void OnClickedAtTime(RulerClickedEventArgs e) { if (ClickedAtTime != null) ClickedAtTime(this, e); }
private void timelineControl_RulerClicked(object sender, RulerClickedEventArgs e) { if (_context == null) { Logging.Error("TimedSequenceEditor: StartPointClicked to Play with null context!"); return; } if (e.Button == MouseButtons.Left) { bool autoPlay = e.ModifierKeys.HasFlag(Keys.Control); if (autoPlay) { // Save the times for later restoration m_prevPlaybackStart = TimelineControl.PlaybackStartTime; m_prevPlaybackEnd = TimelineControl.PlaybackEndTime; } else { m_prevPlaybackStart = e.Time; m_prevPlaybackEnd = null; } // Set the timeline control TimelineControl.PlaybackStartTime = e.Time; TimelineControl.PlaybackEndTime = null; if (autoPlay) { _PlaySequence(e.Time, TimeSpan.MaxValue); } else { TimelineControl.CursorPosition = e.Time; } } else if (e.Button == MouseButtons.Right) { MarkCollection mc = null; if (_sequence.MarkCollections.Count == 0) { if (MessageBox.Show("Marks are stored in Mark Collections. There are no mark collections available to store this mark. Would you like to create a new one?", "Creat a Mark Collection", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes) { mc = GetOrAddNewMarkCollection(Color.White, "Default Marks"); MarksForm.PopulateMarkCollectionsList(mc); } } else { mc = MarksForm.SelectedMarkCollection; if (mc == null) { MessageBox.Show("Please select a mark collection in the Mark Manager window before adding a new mark to the timeline.", "New Mark", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); } } if (mc != null) { mc.Marks.Add(e.Time); PopulateMarkSnapTimes(); sequenceModified(); } } }
private void timelineControl_RulerClicked(object sender, RulerClickedEventArgs e) { if (_context == null) { Logging.Error("TimedSequenceEditor: <timelineControl_RulerCLicked> - StartPointClicked with null context!"); return; } if (e.Button == MouseButtons.Left) { bool autoPlay = e.ModifierKeys.HasFlag(Keys.Control); if (autoPlay) { // Save the times for later restoration _mPrevPlaybackStart = TimelineControl.PlaybackStartTime; _mPrevPlaybackEnd = TimelineControl.PlaybackEndTime; } else { _mPrevPlaybackStart = e.Time; _mPrevPlaybackEnd = null; } // Set the timeline control TimelineControl.PlaybackStartTime = e.Time; TimelineControl.PlaybackEndTime = null; SequenceModified(); if (autoPlay) { _PlaySequence(e.Time, TimeSpan.MaxValue); } else { TimelineControl.CursorPosition = e.Time; } } else if (e.Button == MouseButtons.Right) { MarkCollection mc = null; if (_sequence.MarkCollections.Count == 0) { //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible) MessageBoxForm.msgIcon = SystemIcons.Question; //this is used if you want to add a system icon to the message form. var messageBox = new MessageBoxForm("Marks are stored in Mark Collections. There are no mark collections available to store this mark. Would you like to create a new one?", @"Create a Mark Collection", true, false); messageBox.ShowDialog(); if (messageBox.DialogResult == DialogResult.OK) { mc = GetOrAddNewMarkCollection(Color.White, "Default Marks"); MarksForm.PopulateMarkCollectionsList(mc); } } else { mc = MarksForm.SelectedMarkCollection; if (mc == null) { //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible) MessageBoxForm.msgIcon = SystemIcons.Error; //this is used if you want to add a system icon to the message form. var messageBox = new MessageBoxForm("Please select a mark collection in the Mark Manager window before adding a new mark to the timeline.", @"New Mark", false, false); messageBox.ShowDialog(); } } if (mc != null) { mc.Marks.Add(e.Time); PopulateMarkSnapTimes(); SequenceModified(); } } }
private void timelineControl_RulerClicked(object sender, RulerClickedEventArgs e) { if(_context == null) { VixenSystem.Logging.Error("TimedSequenceEditor: StartPointClicked to Play with null context!"); return; } bool autoPlay = e.ModifierKeys.HasFlag(Keys.Control); if(autoPlay) { // Save the times for later restoration m_prevPlaybackStart = timelineControl.PlaybackStartTime; m_prevPlaybackEnd = timelineControl.PlaybackEndTime; } // Set the timeline control timelineControl.PlaybackStartTime = e.Time; timelineControl.PlaybackEndTime = null; if(autoPlay) { _PlaySequence(e.Time, TimeSpan.MaxValue); } else { timelineControl.CursorPosition = e.Time; } }
private void timelineControl_RulerClicked(object sender, RulerClickedEventArgs e) { if (_context == null) { Logging.Error("TimedSequenceEditor: <timelineControl_RulerCLicked> - StartPointClicked with null context!"); return; } if (e.Button == MouseButtons.Left) { bool autoPlay = e.ModifierKeys.HasFlag(Keys.Control); if (autoPlay) { // Save the times for later restoration _mPrevPlaybackStart = TimelineControl.PlaybackStartTime; _mPrevPlaybackEnd = TimelineControl.PlaybackEndTime; } else { _mPrevPlaybackStart = e.Time; _mPrevPlaybackEnd = null; } // Set the timeline control TimelineControl.PlaybackStartTime = e.Time; TimelineControl.PlaybackEndTime = null; SequenceModified(); if (autoPlay) { _PlaySequence(e.Time, TimeSpan.MaxValue); } else { TimelineControl.CursorPosition = e.Time; } } else if (e.Button == MouseButtons.Right) { AddMarkAtTime(e.Time); } }