private void OnRenameButton_Click(object sender, EventArgs e) { LayoutNameForm layoutNameForm = new LayoutNameForm((string)m_SavedLayoutListBox.SelectedItem); layoutNameForm.StartPosition = FormStartPosition.CenterParent; layoutNameForm.Text = "重命名布局"; layoutNameForm.OnApply = OnRenameLayout; layoutNameForm.ShowDialog(); }
/// <summary> /// 布局 Save\Manager /// </summary> private void OnLayoutToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem item = (ToolStripMenuItem)sender; if (item == m_SaveLayoutToolStripMenuItem) { LayoutNameForm layoutNameForm = new LayoutNameForm(); layoutNameForm.StartPosition = FormStartPosition.CenterParent; layoutNameForm.Text = "保存布局"; layoutNameForm.OnApply = OnSaveLayout; layoutNameForm.ShowDialog(); } else if (item == m_ManagerLayoutToolStripMenuItem) { LayoutManagerForm layoutManagerForm = new LayoutManagerForm(); layoutManagerForm.StartPosition = FormStartPosition.CenterParent; layoutManagerForm.ShowDialog(); } }