Exemplo n.º 1
0
 //启动时加载事件
 public Result OnStartup(UIControlledApplication application)
 {
     DrawGridNumber = true;
     ShowGridApplication.m_ThisApp            = this;
     ShowGridApplication.m_gridNumberShowForm = new GridNumberForm(ShowGridApplication.m_ThisApp);
     application.ViewActivated += this.OnRefreshGridsAndViewInfo;
     application.Idling        += this.OnIdlingEvent;
     if (this.m_hWndRevit == null)
     {
         Process currentProcess = Process.GetCurrentProcess();
         this.m_hRevitHandle = currentProcess.MainWindowHandle;
         this.m_hWndRevit    = new WindowHandle(this.m_hRevitHandle);
     }
     return(Result.Succeeded);
 }
 public GridNumberForm(ShowGridApplication application)
 {
     m_appShowGrid = application;
     InitializeComponent();
 }