internal FormEditor(Gravity grav) : this() { this.grav = grav; userControlEdit.Gravity = grav; Text = ""; IUpdatableForm f = this; f.UpdateFormUI(); }
internal FormOrbital(Classes.Orbit orbit) : this() { this.orbit = orbit; userControlOrbit.Orbit = orbit; Text = ""; IUpdatableForm f = this; f.UpdateFormUI(); }
/// <summary> /// Constructor /// </summary> /// <param name="label">Label of object</param> /// <param name="field">Magnetic field</param> public FormSphericalMagnnetic(IObjectLabel label, SphericalFieldWrapper field) : this() { this.label = label; this.field = field; refresh(); Text = ""; IUpdatableForm f = this; f.UpdateFormUI(); }
void IObjectLabelUI.UpdateForm() { if (form != null) { if (!form.IsDisposed) { if (form is IUpdatableForm) { IUpdatableForm uf = form as IUpdatableForm; uf.UpdateFormUI(); } } } }
/// <summary> /// Updates property editor /// </summary> public void UpdateForm() { if (form == null) { return; } if (!(form is IUpdatableForm)) { return; } IUpdatableForm updatable = form as IUpdatableForm; updatable.UpdateFormUI(); }
/// <summary> /// Updates form UI /// </summary> /// <param name="updatableForm">Form</param> public static void UpdateFormUI(this IUpdatableForm updatableForm) { updatableForm.UpdateFormUI(); }