/// <summary> /// The btn add tree from file click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void BtnAddTreeFromFileClick(object sender, EventArgs e) { if (this.provider.NumericData.Count != 0 || this.provider.TextData.Count != 0) { var addTree = new AddTree(this.provider, true, this.Mode) { Owner = this }; addTree.ShowDialog(); } else { var mainForm = (MainForm)this.MdiParent; var toolStrip = (ToolStrip)mainForm.Controls["toolStrip"]; ToolStripItem toolStripBtnOpen = toolStrip.Items["toolStripBtnOpen"]; this.toolTipHelperCreate.ToolTipTitle = "No file loaded"; this.toolTipHelperCreate.Show( "No file loaded. Please load file first.", toolStrip, toolStripBtnOpen.Image.Width, toolStripBtnOpen.Image.Height / 2, 3000); } this.VerifyLayout(); }
/// <summary> /// The btn add tree click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void BtnAddTreeClick(object sender, EventArgs e) { var addTree = new AddTree(this.provider, false) { Owner = this }; addTree.ShowDialog(); this.VerifyLayout(); }
/// <summary> /// The btn create text trees click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void BtnCreateTextTreesClick(object sender, EventArgs e) { if (this.provider.BatchTextData.Count == 0) { return; } var addTree = new AddTree(this.provider, true, 0, true) { Owner = this }; addTree.ShowDialog(); this.VerifyLayout(); }