示例#1
0
 public void sysvarChanged(object sender, SystemVariableChangedEventArgs e)
 {
     if (!e.Changed)
     {
         return;
     }
     if (CMNApplication.ESWCmn == null || string.CompareOrdinal(e.Name, "CleanScreenState") != 0)
     {
         if (string.CompareOrdinal(e.Name, "LUNITS") == 0 || string.CompareOrdinal(e.Name, "LUPREC") == 0)
         {
             if (CMNApplication.ESWCmn != null)
             {
                 CMNApplication.ESWCmn.CmnControl.RestoreFromCurrentData(false);
             }
             if (CMNApplication.ESWCmn != null)
             {
                 CMNApplication.ESWCmn.CmnControl.RestoreFromCurrentData(false);
             }
         }
     }
     else if (int.Parse(Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("CLEANSCREENSTATE").ToString()) == 1)
     {
         if (CMNApplication.ESWCmn.ESW.Visible)
         {
             CMNApplication.HideESWCmn(true);
             CMNApplication.ESWCmn.CmnControl.mbShouldRestore = true;
             return;
         }
     }
     else if (CMNApplication.ESWCmn.CmnControl.mbShouldRestore)
     {
         //CMNApplication.ShowESWCalculator();
         return;
     }
 }
示例#2
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.Escape)
     {
         this.mSearchTextBox.InitializeText(string.Empty);
         msg.Msg = 0;
     }
     if (keyData == Keys.F4)
     {
         CMNApplication.HideESWCmn(false);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }