/// <summary> /// 多B库合并 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void menuLibBMerge_Click(object sender, EventArgs e) { OpenFileDialog saveFileDialog = new OpenFileDialog(); saveFileDialog.Filter = "原油数据文件 (*.libB)|*.libB"; saveFileDialog.RestoreDirectory = true; if (saveFileDialog.ShowDialog() == DialogResult.OK) { this._outLib = Serialize.Read <OutLib>(saveFileDialog.FileName); this.Visible = true; FrmLibBIn tempFrmLibBIn = (FrmLibBIn)this.GetChildFrm("FrmLibBIn"); if (tempFrmLibBIn == null) //导入B库,只能存在一个窗口 { FrmLibBIn frmLibBIn = new FrmLibBIn(); frmLibBIn.Init(this._outLib); frmLibBIn.Name = "FrmLibBIn"; frmLibBIn.Show(); } else { tempFrmLibBIn.Init(this._outLib); } } }
/// <summary> /// 多B库合并 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void menuLibBMerge_Click(object sender, EventArgs e) { if (!this.IsExistChildFrm("FrmLibBIn")) //导入B库,只能存在一个窗口 { FrmLibBIn frmLibBIn = new FrmLibBIn(); //frmLibBIn.InputMainForm(this); frmLibBIn.Name = "FrmLibBIn"; if (frmLibBIn.Visible) { frmLibBIn.MdiParent = this; frmLibBIn.Show(); this.splitContainer1.Panel2.Controls.Add(frmLibBIn); } else { frmLibBIn.Close(); } } }