Пример #1
0
        public void Initialize()
        {
            try
            {
                log.Add("Initialize");
                activeDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
                activeDoc.Editor.WriteMessage("\nEventManager.dll Loaded");

                Autodesk.AutoCAD.ApplicationServices.Core.Application.SystemVariableChanged += callback_SystemVariableChanged;

                //EM_DocActivated.DocumentActivated += callBack_DocumentActivated;

                EM_ContextMenuExtensions.AddMe();
                if (BaseObjs.userName.ToUpper() == "JOHN")
                {
                    EM_ContextMenuExtensions.showOutput();
                }

                EM_EventsWatcher eventWatcher = new EM_EventsWatcher();

                log.Add("EM_Startup");

                gPalette.showPalettes(false);

                try
                {
                    Grading.Grading_CommandDefaults.initializeCommandDefaults();
                }
                catch (System.Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show(ex.Message + "EM_Startup");
                }

                fGrading = gPalette.pGrading;
                fGrading.Initialize_Form();

                fGradeFloor = gPalette.pGradeFloor;
                fGradeFloor.Initialize_Form();
            }
            catch (System.Exception ex)
            {
                BaseObjs.writeDebug(ex.Message + " EM_Startup.cs: line: 77");
            }
        }
Пример #2
0
 public void Terminate()
 {
     EM_ContextMenuExtensions.RemoveMe();
 }