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();
     }
 }
예제 #3
0
 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();
     }
 }
예제 #4
0
파일: LookupEdit.cs 프로젝트: xyyhqq/eXpand
        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();
            }
        }