/// <summary> /// Traverses the sub-controls of this MaxForm and automatically unbinds /// any that implement the CuiUpdatable interface from the application /// CUI system. /// /// </summary> /// <param name="sender">The object that generated the event this method handles.</param><param name="e">The args for this event.</param> private void UnbindFromMaxCui(object sender, FormClosedEventArgs e) { CuiUpdater.GetInstance().UnregisterForm((Form)this); this.GetMaxHookInterfaces().ForEach(new Action <CuiUpdatable>(MaxCuiBinder.GetInstance().UnregisterForNotification)); }
/// <summary> /// Traverses the sub-controls of this MaxForm and automatically binds /// any that implement the CuiUpdatable interface to the application /// CUI system. /// /// </summary> /// <param name="sender">The object that generated the event this method handles.</param><param name="e">The args for this event.</param> private void BindToMaxCui(object sender, EventArgs e) { CuiUpdater.GetInstance().RegisterForm((Form)this); this.GetMaxHookInterfaces().ForEach(new Action <CuiUpdatable>(MaxCuiBinder.GetInstance().RegisterForNotification)); }