コード例 #1
0
 public static void LevelChanged(string unparsed)
 {
     if (null == myLevelForm || myLevelForm.IsDisposed)
     {
         myLevelForm = new LevelChangedForm();
         myLevelForm.AttachAsTopLevelForm(MyAddin.s_addin, false);
         myLevelForm.Show(); myLevelChanged = new LevelChangedClass();
         Utilities.ComApp.AddLevelChangeEventsHandler(myLevelChanged); myNewDGNHandler = new AddIn.NewDesignFileEventHandler
                                                                                             (LevelChangedClass.MyAddin_NewDesignFileEvent);
         MyAddin.s_addin.NewDesignFileEvent += myNewDGNHandler;
     }
     else
     {
         myLevelForm.Activate();
     }
 }
コード例 #2
0
            private static void PopulateLevelList()
            {
                LevelChangedForm myLevelChangedForm = null;

                foreach (Form myForm in System.Windows.Forms.Application.OpenForms)
                {
                    if ("LevelChangedForm" == myForm.Name)
                    {
                        myLevelChangedForm = (LevelChangedForm)myForm;
                        break;
                    }
                }
                if (null != myLevelChangedForm)
                {
                    myLevelChangedForm.listBox1.Items.Clear();
                    foreach (Level myLvl in Utilities.ComApp.ActiveDesignFile.Levels)
                    {
                        myLevelChangedForm.listBox1.Items.Add(myLvl.Name);
                    }
                }
            }