private void GoToFrom(SystemMenu menu, object action) { if (menu != null) { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage(menu.URL); if (f == null) { return; } //if (menu.IsDialog) //{ // f.WindowState = FormWindowState.Normal; // //f.Size = this.Size; // f.StartPosition = FormStartPosition.CenterParent; // f.ShowDialog(); //} //else { f.MdiParent = this; //this.ActivateMdiChild(f); m_currentForm = menu; f.Show(); f.Activate(); if (action != null) { f.DoAction(action); } } } }
private void GoToFrom(SystemMenu menu, object action) { if (menu != null) { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage(menu.URL); if (f == null) { return; } //if (menu.IsDialog) //{ // f.WindowState = FormWindowState.Normal; // //f.Size = this.Size; // f.StartPosition = FormStartPosition.CenterParent; // f.ShowDialog(); //} //else { f.MdiParent = this; //this.ActivateMdiChild(f); labelX2.Text = "当前位置:" + menu.Title; m_currentForm = menu; f.Size = new Size(this.Width - panelEx4.Width, panelEx4.Height + 20); f.Show(); f.Activate(); if (action != null) { f.DoAction(action); } } //if (!string.IsNullOrEmpty(menu.ParentURL)) //{ // IVX.Live.MainForm.UILogics.FormBase f1 = c.GetContentPage(menu.ParentURL); // f1.MdiParent = this; // this.ActivateMdiChild(f1); // f1.Show(); // f1.UpdateUI(); //} string parentMenu = ""; Dictionary <string, List <SystemMenu> > dt = Framework.Environment.GetSystemMenu(); foreach (var item in dt) { foreach (SystemMenu it in item.Value) { if (it.URL == menu.URL) { parentMenu = item.Key; break; } } if (!string.IsNullOrEmpty(parentMenu)) { break; } } if (!string.IsNullOrEmpty(parentMenu)) { sideBar1.GetItem("sideBarPanelItem" + parentMenu).Expanded = true; } } }
private void buttonItem2_Click(object sender, EventArgs e) { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage("FormAddLocalTask"); f.WindowState = FormWindowState.Normal; f.Size = this.Size; f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); IVX.Live.MainForm.UILogics.FormBase f1 = c.GetContentPage("FormTaskManagement"); f1.MdiParent = this; this.ActivateMdiChild(f1); f1.Show(); }
private void DoLogin() { if (InvokeRequired) { this.Invoke(new Action(DoLogin)); } else { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage(Framework.Environment.DefaultLoginPage.URL); f.WindowState = FormWindowState.Normal; f.StartPosition = FormStartPosition.CenterParent; if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) { this.Close(); } else { logOutBtn.Visible = true; BuildMenu(); if (ocx_VodSdk_Init()) { Framework.Environment.VODPlayControler = axvodocx1; } if (ocx_BriefSdk_Init()) { Framework.Environment.BriefPlayControler = axbriefocx1; } IVX.Live.MainForm.UILogics.FormBase f1 = c.GetContentPage(Framework.Environment.DefaultViewPage.URL); m_viewModel.FormTree = new Stack <SystemMenu>(); m_currentForm = Framework.Environment.DefaultViewPage; f1.MdiParent = this; this.ActivateMdiChild(f1); labelX2.Text = "当前位置:" + Framework.Environment.DefaultViewPage.Title; f1.Size = new Size(this.Width - panelEx4.Width, panelEx4.Height + 20); f1.Show(); timer1.Start(); labelUser.Text = "您好," + Framework.Environment.CurUserInfo.UserName; } } }
private void buttonItem_Click(object sender, EventArgs e) { ButtonItem bt = sender as ButtonItem; if (bt == null) { return; } SystemMenu menu = bt.Tag as SystemMenu; if (bt != null) { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage(menu.URL); if (f == null) { return; } if (menu.IsDialog) { f.WindowState = FormWindowState.Normal; f.Size = this.Size; f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); } else { f.MdiParent = this; this.ActivateMdiChild(f); f.Show(); } if (!string.IsNullOrEmpty(menu.ParentURL)) { IVX.Live.MainForm.UILogics.FormBase f1 = c.GetContentPage(menu.ParentURL); f1.MdiParent = this; this.ActivateMdiChild(f1); f1.Show(); f1.UpdateUI(); } } }
private void buttonItem1_Click(object sender, EventArgs e) { IVX.Live.MainForm.UILogics.FormBase f = c.GetContentPage("FormTaskManagement"); f.MdiParent = this; f.Show(); }