예제 #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);
                }
            }
        }
예제 #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);
                }
            }
        }