Exemple #1
0
        private void NewTabToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InputTabNameForm lInputTabNameForm = new InputTabNameForm();

            if (lInputTabNameForm.ShowDialog(this) == DialogResult.OK)
            {
                try
                {
                    this.AddNewTab(lInputTabNameForm.mTabName);
                    this.ReloadForm();
                    this.mGlobalConfig.SaveAll();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemple #2
0
        private void RenameTabToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InputTabNameForm lInputTabNameForm = new InputTabNameForm();

            lInputTabNameForm.mTabName = this.mTabPageList[this.mSelectedTabIndex].Text;
            if (lInputTabNameForm.ShowDialog(this) == DialogResult.OK)
            {
                try
                {
                    this.mTabPageList[this.mSelectedTabIndex].Text          = lInputTabNameForm.mTabName;
                    this.mGlobalConfig.mTabNameList[this.mSelectedTabIndex] = lInputTabNameForm.mTabName;
                    this.mGlobalConfig.SaveAll();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }