/// <summary> /// This method allows closing forms and changing tabpages to query a user control to see if the action should be canceled. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public virtual void ControlLosingFocus(object sender, Syncfusion.Windows.Forms.Tools.SelectedIndexChangingEventArgs e) { if (Logger != null) { Logger.LogDebug($"ControlLosingFocus"); } }
private void tabOptions_SelectedIndexChanging(object sender, Syncfusion.Windows.Forms.Tools.SelectedIndexChangingEventArgs args) { if (this.tabOptions.SelectedTab == null) { return; } Logger.LogDebug($"tabOptions_SelectedIndexChanging - TabPageName: {this.tabOptions.SelectedTab.Name}"); switch (this.tabOptions.SelectedTab.Name) { case "tpSystem": this.ucSystem.ControlLosingFocus(sender, args); break; case "tpUserProfiles": this.ucUserProfiles.ControlLosingFocus(sender, args); break; case "tpSplits": this.ucSplits.ControlLosingFocus(sender, args); break; case "tpLaps": this.ucLaps.ControlLosingFocus(sender, args); break; case "tpGeneral": this.ucGeneral.ControlLosingFocus(sender, args); break; } }
public override void ControlLosingFocus(object sender, Syncfusion.Windows.Forms.Tools.SelectedIndexChangingEventArgs e) { base.ControlLosingFocus(sender, e); if (EditingSystemSettings) { MessageBox.Show("Please either Save or Cancel current work before proceeding.", "Pending Changes", MessageBoxButtons.OK, MessageBoxIcon.Warning); e.Cancel = true; } }
public virtual void ControlLosingFocus(object sender, Syncfusion.Windows.Forms.Tools.SelectedIndexChangingEventArgs e) { //Logger.LogDebug($"ControlLosingFocus - {this.Name}"); }