Exemple #1
0
        public PlaceForm(Sites sites, bool edit)
        {
            this.sites = sites;
            if (dd == null)
            {
                dd = new Teigha.Runtime.Services();
                SystemObjects.DynamicLinker.LoadApp("GripPoints", false, false);
                SystemObjects.DynamicLinker.LoadApp("PlotSettingsValidator", false, false);
            }
            InitializeComponent();
            splitContainer1.Panel2.MouseWheel += new MouseEventHandler(Form1_MouseWheel);

            //HostApplicationServices.Current = new HostAppServ(dd);
            //Environment.SetEnvironmentVariable("DDPLOTSTYLEPATHS", ((HostAppServ)HostApplicationServices.Current).FindConfigPath(String.Format("PrinterStyleSheetDir")));

            //    gripManager = new ExGripManager();
            this.bEdit = edit;
            if (!bEdit)
            {
                buttonImport.Visible              = false;
                buttonDel.Visible                 = false;
                listBoxPaper.Height              += 50;
                splitContainer1.Panel2.DragEnter -= splitContainer1_Panel2_DragEnter;
                splitContainer1.Panel2.DragDrop  -= splitContainer1_Panel2_DragDrop;
                treeViewSensors.MouseDown        -= treeViewSensors_MouseDown;
                //treeViewSensors.NodeMouseClick -= treeViewSensors_NodeMouseClick;
            }
            else
            {
                treeViewSensors.AfterSelect -= treeViewSensors_AfterSelect;
            }

            //DisableAero();
        }
Exemple #2
0
        public Form1()
        {
            dd = new Teigha.Runtime.Services();
            SystemObjects.DynamicLinker.LoadApp("GripPoints", false, false);
            SystemObjects.DynamicLinker.LoadApp("PlotSettingsValidator", false, false);
            InitializeComponent();
            this.MouseWheel += new MouseEventHandler(Form1_MouseWheel);

            HostApplicationServices.Current = new HostAppServ(dd);
            Environment.SetEnvironmentVariable("DDPLOTSTYLEPATHS", ((HostAppServ)HostApplicationServices.Current).FindConfigPath(String.Format("PrinterStyleSheetDir")));

            gripManager = new ExGripManager();
            mouseMode   = Mode.Quiescent;
            //DisableAero();
        }