Exemplo n.º 1
0
        void helperForm_Load(object sender, EventArgs e)
        {
            // HelperViewModel model = new HelperViewModel(null,null,null);


            XUserControl xUserControl = new XUserControl();

            xUserControl.Init(Application.StartupPath + "\\modules\\iihci\\ui\\opordertemplate\\Helper.xml");
            xUserControl.Dock     = DockStyle.None;
            xUserControl.Location = this.Panel.Location;
            xUserControl.Size     = this.Panel.Size;
            this.Panel            = xUserControl;
            xUserControl.LoadData();
            Control content = xUserControl.GetControl();

            foreach (Control obj in content.Controls)
            {
                if (obj is XTabControl)
                {
                    tabControl = obj as XTabControl;
                    if (tabControl.XTabPages.Count > 2)
                    {
                        tabControl.SelectedIndex = SelectedIndex;
                    }
                    //foreach (XTabPage page in tabControl.XTabPages)
                    //{
                    //    if (page.TabIndex == 2)
                    //    {
                    //        page.IsSelected = FBoolean.True;
                    //    }
                    //    // Visible(page, tabControl);
                    //}
                }
            }
        }
Exemplo n.º 2
0
        void helperForm_Load(object sender, EventArgs e)
        {
            // HelperViewModel model = new HelperViewModel(null,null,null);


            XUserControl xUserControl = new XUserControl();

            xUserControl.Init(Application.StartupPath + "\\modules\\iihci\\ui\\opmedicaltechnology\\Helper.xml");
            xUserControl.Dock     = DockStyle.None;
            xUserControl.Location = this.Panel.Location;
            xUserControl.Size     = this.Panel.Size;
            this.Panel            = xUserControl;
            xUserControl.LoadData();
            Control content = xUserControl.GetControl();

            foreach (Control obj in content.Controls)
            {
                if (obj is XTabControl)
                {
                    tabControl = obj as XTabControl;
                    foreach (XTabPage page in tabControl.XTabPages)
                    {
                        // Visible(page, tabControl);
                    }
                }
            }
        }
Exemplo n.º 3
0
        void helperForm_Load(object sender, EventArgs e)
        {
            HelperViewModel model = new HelperViewModel(null, null, null);

            this.list = model.pageList.ToList();
            XUserControl xUserControl = new XUserControl();

            xUserControl.Init("modules\\iihci\\ui\\OrderHelper\\Helper.xml");
            xUserControl.Dock     = DockStyle.None;
            xUserControl.Location = this.Panel.Location;
            xUserControl.Padding  = new Padding(4);
            xUserControl.Size     = this.Panel.Size;
            List <XBaseControl> xBaseCtrlList = xUserControl.GetConfig().GetViews();

            foreach (XBaseControl xBaseCtrl in xBaseCtrlList)
            {
                BaseHelperView baseHelperView = xBaseCtrl as BaseHelperView;
                if (baseHelperView != null)
                {
                    baseHelperView.Ent4BannerDTO = Ent4BannerDTO;
                }
            }

            this.Panel = xUserControl;
            xUserControl.LoadData();
            Control content = xUserControl.GetControl();

            foreach (Control obj in content.Controls)
            {
                if (obj is XTabControl)
                {
                    tabControl = obj as XTabControl;
                    foreach (XTabPage page in tabControl.XTabPages)
                    {
                        Visible(page, tabControl);
                    }
                }
            }
        }
Exemplo n.º 4
0
        void OrdTplDialog_Load(object sender, EventArgs e)
        {
            XUserControl xUserControl = new XUserControl();

            xUserControl.Init(Application.StartupPath + "\\modules\\iihci\\ui\\OrderHelper\\Helper.xml");
            xUserControl.Dock     = DockStyle.None;
            xUserControl.Location = this.Panel.Location;
            xUserControl.Size     = this.Panel.Size;
            this.Panel            = xUserControl;
            xUserControl.LoadData();
            Control content = xUserControl.GetControl();

            foreach (Control obj in content.Controls)
            {
                if (obj is XTabControl)
                {
                    tabControl = obj as XTabControl;
                    foreach (XTabPage page in tabControl.XTabPages)
                    {
                        // Visible(page, tabControl);
                    }
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 加载助手窗体
        /// </summary>
        /// <param name="parentCtrl"></param>
        /// <param name="classId"></param>
        public void loadFrame(XBaseControl parentCtrl, XUserControl xUserControl, AssiBtnDTO btnDTO)
        {
            this.xUserControl = xUserControl;
            this.xapFormControl.AddRender(xUserControl);

            if (btnDTO.ButtonId == "btnOpTemplateFrame")
            {
                this.loadFramePithy(parentCtrl, xUserControl, btnDTO);
                return;
            }

            LayoutPanelManager layoutPanelManager = xUserControl.GetConfig().GetInstance("LayoutPanelManager") as LayoutPanelManager;

            for (int n = 0; n < layoutPanelManager.ManagedPanels.Count; n++)
            {
                LayoutManagedPanel layoutManaged = layoutPanelManager.ManagedPanels[n] as LayoutManagedPanel;
                if (btnDTO.PanelManagerId == layoutManaged.Id)
                {
                    if (layoutManaged.Controls.Count < 1)
                    {
                        XmlNode node = xUserControl.GetConfig().GetNode("ManagedPanel", layoutManaged.Id);
                        xUserControl.GetConfig().CreateManagedPanelControl(layoutManaged, node);
                    }
                    layoutPanelManager.SelectedIndex = n;

                    foreach (Control ctrTemp in layoutManaged.Controls)
                    {
                        if (ctrTemp is XLayoutPanel)
                        {
                            if ((ctrTemp as XLayoutPanel).ControlCenter is XTabControl)
                            {
                                //if (ctrTemp is XTabControl)
                                {
                                    var tabCtr = (ctrTemp as XLayoutPanel).ControlCenter as XTabControl;
                                    for (var j = 0; j < tabCtr.XTabPages.Count; j++)
                                    {
                                        if (btnDTO.XTabPageId.Equals(tabCtr.XTabPages[j].Id))
                                        {
                                            tabCtr.SelectedIndex = j;
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    break;
                }
            }

            int     i       = 0;
            Control control = xUserControl.GetControl();

            foreach (Control obj in control.Controls)
            {
                XTabPage xtabPage = obj as XTabPage;
                if (xtabPage != null)
                {
                    i++;
                    if (i == 3)
                    {
                        xtabPage.Select();
                    }
                }
            }

            //layoutPanelManager.SelectedIndex = 1;

            // 如果窗体已经打开,只进行切换tab页签
            if (!IsFrameOpened)
            {
                IsFrameOpened = true;

                if (this.FrameOpenModel == AssiFrameOpenModel.SHOW_DIALOG)
                {
                    this.ShowDialog(parentCtrl);
                }
                else
                {
                    this.Show(parentCtrl);
                }
            }
        }