/// <summary> /// Tuto metodu volá interaktivní prvek (<see cref="ToolBar"/>) po změně stavu některého z jeho prvků, která má být persistována. /// Úkolem je vyvolat event <see cref="MainControl.ToolBarItemClicked"/>. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void _ToolBar_CurrentStatusChanged(object sender, GPropertyEventArgs <string> args) { if (this.ToolBarStatusChanged != null) { this.ToolBarStatusChanged(this, args); } }
/// <summary> /// Zavolá metodu <see cref="OnIsCheckedChanged(GPropertyEventArgs{bool})"/> a event <see cref="IsCheckedChanged"/>. /// </summary> protected void CallIsCheckedChanged(bool oldValue, bool newValue, Data.EventSourceType eventSource) { GPropertyEventArgs <bool> args = new GPropertyEventArgs <bool>(newValue, eventSource); OnIsCheckedChanged(args); IsCheckedChanged?.Invoke(this, args); }
/// <summary> /// Zajistí vyvolání háčku a eventu /// </summary> /// <param name="result"></param> private void _CallButtonClick(GUI.GuiDialogButtons result) { GPropertyEventArgs <GUI.GuiDialogButtons> args = new GPropertyEventArgs <GUI.GuiDialogButtons>(result); this.OnButtonClick(args); if (this.ButtonClick != null) { this.ButtonClick(this, args); } }
/// <summary> /// Háček volaný při událost ButtonClick /// </summary> /// <param name="args"></param> protected virtual void OnButtonClick(GPropertyEventArgs <GUI.GuiDialogButtons> args) { }
/// <summary> /// Bylo kliknuto na button. Je volána i po změně stavu Checked! /// </summary> /// <param name="args"></param> protected virtual void OnIsCheckedChanged(GPropertyEventArgs <bool> args) { }