Ignore:
Timestamp:
03/23/09 17:53:14 (12 years ago)
Author:
epitzer
Message:

Deposit GUI-generated Configuration object at ConfigurationService. (#506)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.cs

    r1399 r1400  
    44using System.Linq;
    55using System.Windows.Forms;
     6using HeuristicLab.Persistence.Core;
    67using HeuristicLab.Persistence.Default.Xml;
    78using HeuristicLab.Persistence.Interfaces;
     
    2930    private void initializeFormatterPages() {
    3031      formatterTabs.TabPages.Clear();
    31       foreach ( var formats in ConfigurationService.Instance.AllFormatters ) {
     32      foreach ( var formats in ConfigurationService.Instance.Formatters ) {
    3233        TabPage page = new TabPage(formats.Key.Name) {Tag = formats.Key};
    3334        formatterTabs.TabPages.Add(page);
    3435        DataGridView gridView = new DataGridView {
    35                                                    Dock = DockStyle.Fill,
    36                                                    EditMode = DataGridViewEditMode.EditOnEnter,
    37                                                    AllowUserToAddRows = false,
    38                                                    AllowUserToDeleteRows = false,
    39                                                    AllowUserToResizeRows = false,
    40                                                    Name = "GridView",
    41                                                  };
     36          Dock = DockStyle.Fill,
     37          EditMode = DataGridViewEditMode.EditOnEnter,
     38          AllowUserToAddRows = false,
     39          AllowUserToDeleteRows = false,
     40          AllowUserToResizeRows = false,
     41          Name = "GridView",
     42        };
    4243        gridView.CellValueChanged += gridView_CellValueChanged;
    4344        gridView.Columns.Add(new DataGridViewTextBoxColumn {
     
    124125    private void initializeDecomposerList() {
    125126      decomposerList.Items.Clear();
    126       foreach ( IDecomposer decomposer in ConfigurationService.Instance.AllDecomposers ) {
     127      foreach ( IDecomposer decomposer in ConfigurationService.Instance.Decomposers ) {
    127128        var item = decomposerList.Items.Add(decomposer.GetType().Name);
    128129        item.Checked = true;
     
    219220      }
    220221      return new Configuration(formatters, GetDecomposers());
     222    }   
     223
     224    private void updateButton_Click(object sender, EventArgs e) {
     225      IFormat format = (IFormat)formatterTabs.SelectedTab.Tag;
     226      if (format != null)
     227        ConfigurationService.Instance.DefineConfiguration(
     228          format,
     229          GetCurrentConfiguration(format));
    221230    }
    222231   
Note: See TracChangeset for help on using the changeset viewer.