Exemplo n.º 1
0
 protected override void OnClick()
 {
     try
     {
         int lngWindow = 0;
         lngWindow = FindWindow(null, "Update MSD Database Passwords");
         if (lngWindow > 0)
         {
             BringWindowToTop(lngWindow);
         }
         else
         {
             analyzeForm   myform   = new analyzeForm();
             System.IntPtr myIntPtr = new IntPtr(ArcCatalog.Application.hWnd);
             MyWrapper     wrapper  = new MyWrapper(myIntPtr);
             myform.Show((System.Windows.Forms.IWin32Window)wrapper);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 protected override void OnClick()
 {
     try
     {
         int lngWindow = 0;
         lngWindow = FindWindow(null, "Update MSD Database Passwords");
         if (lngWindow > 0)
         {
             BringWindowToTop(lngWindow);
         }
         else
         {
             analyzeForm myform = new analyzeForm();
             System.IntPtr myIntPtr = new IntPtr(ArcCatalog.Application.hWnd);
             MyWrapper wrapper = new MyWrapper(myIntPtr);
             myform.Show((System.Windows.Forms.IWin32Window)wrapper);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }