示例#1
0
        /// <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();
        }
示例#2
0
        /// <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();
        }
示例#3
0
        /// <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();
        }
示例#4
0
        /// <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();
        }
示例#5
0
文件: Create.cs 项目: rosaskc/gptrees
        /// <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();
        }
示例#6
0
文件: Create.cs 项目: rosaskc/gptrees
 /// <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();
 }