private void treeViewControl_DoubleClick(object sender, EventArgs e)
        {
            EWSTreeNode node = (EWSTreeNode)treeViewControl.SelectedNode;

            //EWSTreeNode parentnode;
            if (node.Nodetype == TREE_NODE_TYPE.DISPLAY)
            {
                if (!mainEWSFrom.CheckDocIsOpen(TABPAGETYPE.DISPLAY, node.NodeID))
                {
                    TabDisplayPageControl tabpagecontrol = new TabDisplayPageControl(mainEWSFrom, node.NodeID);
                    tabpagecontrol.TitleText = node.Text;
                    foreach (tblDisplay tbldisplay in Global.EWS.m_tblSolution.m_tblDisplayCollection)
                    {
                        if (tbldisplay.DisplayID == node.NodeID)
                        {
                            mainEWSFrom.m_propertyGrid.SelectedObject = tabpagecontrol.drawarea;// tbldisplay;
                            //mainEWSForm.m_propertyGrid.HiddenProperties = o.PropertyGridFilterH();
                            //mainEWSForm.m_propertyGrid.BrowsableProperties = o.PropertyGridFilterS();
                            //mainEWSForm.m_propertyGrid.Refresh();

                            //
                            tabpagecontrol.drawarea.ID = tbldisplay.DisplayID;
                            tbldisplay.InitGraphic(tabpagecontrol.drawarea.Pages.GraphicPagesList[0]);
                            tabpagecontrol.drawarea.BackColor = tbldisplay.BackColor;
                            tabpagecontrol.drawarea.Size      = new System.Drawing.Size(1280, 830);
                            mainEWSFrom.ShowTabPage(tabpagecontrol);
                            break;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        private void treeViewControl_DoubleClick(object sender, EventArgs e)
        {
            EWSTreeNode node = (EWSTreeNode)treeViewControl.SelectedNode;

            if (node.Nodetype == TREE_NODE_TYPE.DISPLAY)
            {
                if (!MainForm.Instance().CheckDocIsOpen(TABPAGETYPE.DISPLAY, node.NodeID))
                {
                    foreach (tblDisplay tbldisplay in tblSolution.m_tblSolution().m_tblDisplayCollection)
                    {
                        if (tbldisplay.DisplayID == node.NodeID)
                        {
                            TabDisplayPageControl tabdisplaypagecontrol = new TabDisplayPageControl(node.NodeID);
                            tabdisplaypagecontrol.TitleText = node.Text;

                            //tabdisplaypagecontrol.ID = tbldisplay.DisplayID;

                            tabdisplaypagecontrol.LoadTabPage();
                            MainForm.Instance().m_propertyGrid.SelectedObject = tabdisplaypagecontrol.Displayobject;// tbldisplay;
                            tabdisplaypagecontrol.drawarea.SnapEnable = false;
                            tabdisplaypagecontrol.drawarea.Size       = new System.Drawing.Size(tbldisplay.Width, tbldisplay.Height);
                            tabdisplaypagecontrol.drawarea.Invalidate();

                            MainForm.Instance().ShowTabPage(tabdisplaypagecontrol);
                            tabdisplaypagecontrol.drawarea.Initialize();
                            tabdisplaypagecontrol.drawarea.Refresh();
                            MainForm.Instance().UpdateToolbox();
                            MainForm.Instance().UpdateLayer(tbldisplay);

                            //MainForm.Instance().m_propertyGrid.SelectedObject = tabdisplaypagecontrol.drawarea;// tbldisplay;
                            //mainEWSForm.m_propertyGrid.HiddenProperties = o.PropertyGridFilterH();
                            //mainEWSForm.m_propertyGrid.BrowsableProperties = o.PropertyGridFilterS();
                            //mainEWSForm.m_propertyGrid.Refresh();

                            break;
                        }
                    }
                }
            }
        }