protected override void Dispose(bool disposing) { try { if (disposing) { if (_objectWindowAction != null) { _objectWindowAction.Execute -= objectWindowAction_OnExecute; _objectWindowAction.CustomizePopupWindowParams -= objectWindowAction_OnCustomizePopupWindowParams; _objectWindowAction.Dispose(); _objectWindowAction = null; } if (_control != null) { _control.Buttons.Clear(); _control.Dispose(); _control = null; } } } finally { base.Dispose(disposing); } }
public void ShowObject() { OnViewShowing(EventArgs.Empty); try { showObjectAction.Application = _application; showObjectAction.IsModal = true; showObjectAction.CustomizePopupWindowParams += showObjectAction_CustomizePopupWindowParams; showObjectAction.Execute += ShowObjectActionOnExecute; ShowObjectCore(); } finally { showObjectAction.Dispose(); } }
private void showPopup() { var action = new PopupWindowShowAction(null, "MyShowObject", ""); try { action.Application = Properties.Helper.Application; action.IsModal = true; action.CustomizePopupWindowParams += showObjectAction_CustomizePopupWindowParams; action.Execute += showObjectAction_Execute; new PopupWindowShowActionHelper(action).ShowPopupWindow(); } finally { action.Dispose(); } }