private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { OptionsControlBase page = e.Node.Tag as OptionsControlBase; if (mCurrent != null) { if (page != null) { if (mCurrent != page) { //if (mCurrent.Modified) //{ // if (MessageBox.Show(this, Strings.IDS_OPTIONS_PAGE_CHANGED, Strings.IDS_CONFIRM, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.OK) // ApplyChanges(); // else // mCurrent.Initialize(); // ApplyBtn.Enabled = false; //} } } } if (page != null) { //page.Initialize(); panel1.Controls.Clear(); panel1.Controls.Add(page); page.Dock = DockStyle.Fill; mCurrent = page; } }
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { OptionsControlBase page = e.Node.Tag as OptionsControlBase; if (mCurrent != null) { if (page != null) { if (mCurrent != page) { //if (mCurrent.Modified) //{ // if (MessageBox.Show(this, Strings.IDS_OPTIONS_PAGE_CHANGED, Strings.IDS_CONFIRM, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.OK) // ApplyChanges(); // else // mCurrent.Initialize(); // ApplyBtn.Enabled = false; //} } } } if (page != null) { //page.Initialize(); panel1.Controls.Clear(); panel1.Controls.Add(page); page.Dock = DockStyle.Fill; mCurrent = page; } }