Ejemplo n.º 1
0
        /// <summary>
        /// When the user clicks the "Columns Settings",
        /// we display the suggestions window and save the changes.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void columnSettingsMenuItem_Click(object sender, EventArgs e)
        {
            // Update the settings from the current columns
            using (PlanColumnSelectWindow dialog = new PlanColumnSelectWindow(ExportColumnSettings()))
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                    return;

                ImportColumnSettings(dialog.Columns.Cast<PlanColumnSettings>());
                Settings.UI.PlanWindow.Columns.Clear();
                Settings.UI.PlanWindow.Columns.AddRange(ExportColumnSettings());
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// When the user clicks the "select columns" button,
 /// we display the suggestions window and save the changes.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void tsbSelectColumns_Click(object sender, EventArgs e)
 {
     // Update the settings from the current columns
     var columns = ExportColumnSettings();
     using (var dialog = new PlanColumnSelectWindow(columns))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             ImportColumnSettings(dialog.Columns.Cast<PlanColumnSettings>());
             Settings.UI.PlanWindow.Columns = ExportColumnSettings().ToArray();
         }
     }
 }