///<summary> ///Raises the <see cref="E:System.Windows.Forms.Control.MouseMove"></see> event. ///</summary> /// ///<param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs"></see> that contains the event data. </param> protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); HitTestInfo test = HitTest(e.Location); if (test != null && test.Area != HitTestArea.None) { if (test.Area == HitTestArea.Item && !showing && autoToolTip) { showing = true; Point loc = new Point(this[test.Index].TextRect.X, this[test.Index].TextRect.Y + this[test.Index].Font.Height); ToolTipData data = new ToolTipData(this[test.Index].ToolTipText, test.Index, loc); GenericCancelEventArgs <ToolTipData> args = new GenericCancelEventArgs <ToolTipData>(data, false); OnBeforeToolTip(args); if (!args.Cancel) { ttMain.Show(args.Value.ToolTipText, this, data.Location); } } if (test.Area == HitTestArea.Item && this[test.Index].IsLink) { Cursor = CursorHelper.NormalCursor; } else { Cursor = Cursors.Default; if (showing && autoToolTip) { ttMain.Hide(this); showing = false; } } } }
/// <summary> /// Fires <see cref="ItemsInserting"/> event. /// </summary> /// <param name="index">Index of item</param> /// <param name="value">Object containing event data.</param> protected virtual void OnItemsInserting(int index, GenericCancelEventArgs <BarItem> value) { if (ItemsInserting != null) { ItemsInserting(index, value); } }
/// <summary> /// Fires event BeforeToolTip. /// </summary> /// <param name="args">Event data of <see cref="BeforeToolTip"/></param> protected virtual void OnBeforeToolTip(GenericCancelEventArgs <ToolTipData> args) { if (BeforeToolTip != null) { BeforeToolTip(this, args); } }
/// <summary> /// Fires <see cref="ItemsClearing"/> event. /// </summary> /// <param name="value">Object containing event data.</param> protected virtual void OnItemsClearing(GenericCancelEventArgs <GenericCollection <BarItem> > value) { if (ItemsClearing != null) { ItemsClearing(value); } }
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<WizardControl> tArgs) { if (wizardControl1.CurrentStepIndex == 1 && objList.SelectedObjectCount == 0) { MessageService.ShowError("You did not selected any objects."); tArgs.Cancel = true; } }
void Wizard_NextButtonClick(object sender, GenericCancelEventArgs <Wizard.Steps.WizardControl> tArgs) { if (Wizard.WizardSteps[Wizard.CurrentStepIndex].Name == startStep.Name) { Wizard.NextButtonEnabled = false; } if (Wizard.WizardSteps[Wizard.CurrentStepIndex].Name == licenceStep.Name) { Wizard.NextButtonEnabled = false; InstallerTimer.Start(); } }
///<summary> ///Performs additional custom processes when removing an element from the <see cref="T:System.Collections.CollectionBase"></see> instance. ///</summary> /// ///<param name="value">The value of the element to remove from index.</param> ///<param name="index">The zero-based index at which value can be found.</param> protected override void OnRemove(int index, object value) { GenericCancelEventArgs <T> e = new GenericCancelEventArgs <T>((T)value); if (this.Removing != null) { this.Removing(index, e); if (e.Cancel) { return; } } base.OnRemove(index, value); }
///<summary> ///Performs additional custom processes when clearing the contents of the <see cref="T:System.Collections.CollectionBase"></see> instance. ///</summary> /// protected override void OnClear() { GenericCancelEventArgs <GenericCollection <T> > e = new GenericCancelEventArgs <GenericCollection <T> >(this); if (this.Clearing != null) { this.Clearing(e); if (e.Cancel) { return; } } base.OnClear(); }
///<summary> ///Performs additional custom processes before inserting a new element into the <see cref="T:System.Collections.CollectionBase"></see> instance. ///</summary> /// ///<param name="value">The new value of the element at index.</param> ///<param name="index">The zero-based index at which to insert value.</param> protected override void OnInsert(int index, object value) { GenericCancelEventArgs <T> e = new GenericCancelEventArgs <T>((T)value); if (Inserting != null) { Inserting(index, e); if (e.Cancel) { return; } } base.OnInsert(index, value); }
///<summary> ///Raises the <see cref="E:System.Windows.Forms.Control.MouseMove"></see> event. ///</summary> /// ///<param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs"></see> that contains the event data. </param> protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); HitTestInfo test = HitTest(e.Location); if (test != null && test.Area != HitTestArea.None) { if (test.Area == HitTestArea.Item && !showing && autoToolTip) { showing = true; Point loc = new Point(this[test.Index].TextRect.X, this[test.Index].TextRect.Y + this[test.Index].Font.Height); ToolTipData data = new ToolTipData(this[test.Index].ToolTipText, test.Index, loc); GenericCancelEventArgs<ToolTipData> args = new GenericCancelEventArgs<ToolTipData>(data, false); OnBeforeToolTip(args); if (!args.Cancel) { ttMain.Show(args.Value.ToolTipText, this, data.Location); } } if (test.Area == HitTestArea.Item && this[test.Index].IsLink) { Cursor = CursorHelper.NormalCursor; } else { Cursor = Cursors.Default; if (showing && autoToolTip) { ttMain.Hide(this); showing = false; } } } }
protected virtual void OnNextButtonClick(object sender, EventArgs e) { int num; if (DesignMode) { CurrentStepIndex++; return; } else { num = 0; if (!(WizardSteps[CurrentStepIndex] is StartStep)) { if ((WizardSteps[CurrentStepIndex] is FinishStep)) { num = -1; } } else { num = 1; } } if (NextButtonClick == null) { bool noFinish = false; int num2 = 0; if (!(WizardSteps[CurrentStepIndex + 1] is StartStep)) { if (!(WizardSteps[CurrentStepIndex + 1] is FinishStep)) { noFinish = true; } else { num2 = -1; } } else { num2 = 1; } if (((indexer + num) + num2) >= 0) { if ((((indexer + num) + num2) != 0) || !noFinish) { WizardSteps[CurrentStepIndex + 1].BackStepIndex = CurrentStepIndex; CurrentStepIndex++; indexer += num; } } else { throw new InvalidOperationException("The steps must be well formed, so there cannot be an IntermediateStep without enclosing."); } } else { GenericCancelEventArgs<WizardControl> args = new GenericCancelEventArgs<WizardControl>(this); NextButtonClick(this, args); if (args.Cancel) { return; } int nextStep = GetNextStep(); if ( nextStep != -1) { WizardSteps[nextStep].BackStepIndex = CurrentStepIndex; CurrentStepIndex = nextStep; indexer += num; return; } WizardSteps[CurrentStepIndex + 1].BackStepIndex = CurrentStepIndex; CurrentStepIndex++; indexer += num; return; } }
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<WizardControl> e) { }
protected virtual void OnNextButtonClick(object sender, EventArgs e) { int num; if (this.DesignMode) { this.CurrentStepIndex++; return; } else { num = 0; if (!(this.WizardSteps[this.CurrentStepIndex] is StartStep)) { if ((this.WizardSteps[this.CurrentStepIndex] is FinishStep)) { num = -1; } } else { num = 1; } } if (this.NextButtonClick == null) { bool noFinish = false; int num2 = 0; if (!(this.WizardSteps[this.CurrentStepIndex + 1] is StartStep)) { if (!(this.WizardSteps[this.CurrentStepIndex + 1] is FinishStep)) { noFinish = true; } else { num2 = -1; } } else { num2 = 1; } if (((this.indexer + num) + num2) >= 0) { if ((((this.indexer + num) + num2) != 0) || !noFinish) { this.WizardSteps[this.CurrentStepIndex + 1].BackStepIndex = this.CurrentStepIndex; this.CurrentStepIndex++; this.indexer += num; } } else { throw new InvalidOperationException("The steps must be well formed, so there cannot be an IntermediateStep without enclosing."); } } else { GenericCancelEventArgs <WizardControl> args = new GenericCancelEventArgs <WizardControl>(this); this.NextButtonClick(this, args); if (args.Cancel) { return; } int nextStep = this.GetNextStep(); if (nextStep != -1) { this.WizardSteps[nextStep].BackStepIndex = this.CurrentStepIndex; this.CurrentStepIndex = nextStep; this.indexer += num; return; } this.WizardSteps[this.CurrentStepIndex + 1].BackStepIndex = this.CurrentStepIndex; this.CurrentStepIndex++; this.indexer += num; return; } }
/// <summary> /// Fires event BeforeToolTip. /// </summary> /// <param name="args">Event data of <see cref="BeforeToolTip"/></param> protected virtual void OnBeforeToolTip(GenericCancelEventArgs<ToolTipData> args) { if (BeforeToolTip != null) BeforeToolTip(this, args); }
/// <summary> /// Fires <see cref="ItemsClearing"/> event. /// </summary> /// <param name="value">Object containing event data.</param> protected virtual void OnItemsClearing(GenericCancelEventArgs<GenericCollection<BarItem>> value) { if (ItemsClearing != null) { ItemsClearing(value); } }
void Wizard_NextButtonClick(object sender, GenericCancelEventArgs<Wizard.Steps.WizardControl> tArgs) { if (Wizard.WizardSteps[Wizard.CurrentStepIndex].Name == startStep.Name) { Wizard.NextButtonEnabled = false; } if (Wizard.WizardSteps[Wizard.CurrentStepIndex].Name == licenceStep.Name) { Wizard.NextButtonEnabled = false; InstallerTimer.Start(); } }
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs <WizardControl> e) { }
/// <summary> /// Fires <see cref="ItemsRemoving"/> event. /// </summary> /// <param name="index">Index of item being removed.</param> /// <param name="value">Item collection from where item is being removed.</param> protected virtual void OnItemsRemoving(int index, GenericCancelEventArgs<BarItem> value) { if (ItemsRemoving != null) { ItemsRemoving(index, value); } }