private void bbiOpen_ItemClick(object sender, ItemClickEventArgs e) { Common.ConsoleLog("Open"); string filename = @"D:\Project1.db"; var gp = new GlobalProject(filename); foreach (var form in this.MdiChildren) { if (form is frmProject) { var f = (frmProject)form; if (f.GlobalProject.DbContext == gp.DbContext) { f.Activate(); return; } } } frmProject frm = new frmProject(gp); frm.MdiParent = this; frm.Text = gp.Project.XMMC; frm.Show(); Common.ConsoleLog("Open.Show"); }
public frmProject(GlobalProject gp) { InitializeComponent(); GlobalProject = gp; this.InitTab(); }
public zb(GlobalProject gp) { InitializeComponent(); GlobalProject = gp; }