public VtrEditorFormBase(Vtr vtr) { InitializeComponent(); AddingNew = (vtr == null); if (vtr != null) { this.vtr = vtr; } }
protected override void loadData() { base.loadData(); Vtr vtr = (Vtr)EditedModel; if (vtr == null) { return; } }
protected override void writeFields() { base.writeFields(); Vtr vtr = (Vtr)EditedModel; if (vtr == null) { return; } }
public override void Init(object[] argumentObjects) { Vtr vtr = argumentObjects[0] as Vtr; if (vtr == null) { CurrentValue = "?"; return; } vtr.TitleChanged += vtrTitleChangedHandler; CurrentValue = vtr?.Title ?? ""; }
public override void Init(object[] argumentObjects) { Vtr vtr = argumentObjects[0] as Vtr; if (vtr == null) { CurrentValue = "?"; return; } vtr.StateChanged += vtrStateChangedHandler; CurrentValue = convertStateToString(vtr.State); }
public override void Init(object[] argumentObjects) { colonReplacementWithSpaces = string.Format("{0}:{0}", new string(' ', (int)argumentObjects[1])); vtr = argumentObjects[0] as Vtr; if (vtr == null) { CurrentValue = "??:??:??".Replace(":", colonReplacementWithSpaces); return; } vtr.SecondsElapsedChanged += vtrSecondsElapsedChangedHandler; updateValue(); }
private void vtrTitleChangedHandler(Vtr vtr, string oldTitle, string newTitle) => CurrentValue = newTitle ?? "";
public VtrEditorFormBase(Vtr vtr) : base(vtr) => InitializeComponent();
private void vtrStateChangedHandler(Vtr vtr, VTRs.VtrState oldState, VTRs.VtrState newState) => CurrentValue = convertStateToString(newState);
private void vtrSecondsElapsedChangedHandler(Vtr vtr, int oldValue, int newValue) => updateValue();
private void vtrSecondsRemainingChangedHandler(Vtr vtr, int oldValue, int newValue) => updateValue();