Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1400


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

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

Location:
branches/New Persistence Exploration/Persistence
Files:
2 added
1 deleted
4 edited

Legend:

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

    r1399 r1400  
    2525    private void InitializeComponent() {
    2626      System.Windows.Forms.TabPage nullFormatterConfig;
    27       System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Bli");
    28       System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Bla");
    29       System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Blo");
    30       this.dataGridView1 = new System.Windows.Forms.DataGridView();
    31       this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
    32       this.Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
    33       this.Column3 = new System.Windows.Forms.DataGridViewComboBoxColumn();
     27      System.Windows.Forms.DataGridView dataGridView1;
     28      System.Windows.Forms.DataGridViewTextBoxColumn Column1;
     29      System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
     30      System.Windows.Forms.DataGridViewComboBoxColumn Column3;
     31      System.Windows.Forms.ListViewItem listViewItem16 = new System.Windows.Forms.ListViewItem("Bli");
     32      System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem("Bla");
     33      System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("Blo");
     34      System.Windows.Forms.SplitContainer splitContainer1;
     35      System.Windows.Forms.SplitContainer splitContainer2;
     36      System.Windows.Forms.Button updateButton;
     37      System.Windows.Forms.Label label1;
    3438      this.decomposerList = new System.Windows.Forms.ListView();
    3539      this.DecomposersColumn = new System.Windows.Forms.ColumnHeader();
    36       this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    37       this.splitContainer2 = new System.Windows.Forms.SplitContainer();
     40      this.checkBox = new System.Windows.Forms.ListBox();
    3841      this.formatterTabs = new System.Windows.Forms.TabControl();
    39       this.checkBox = new System.Windows.Forms.ListBox();
    4042      nullFormatterConfig = new System.Windows.Forms.TabPage();
     43      dataGridView1 = new System.Windows.Forms.DataGridView();
     44      Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     45      Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
     46      Column3 = new System.Windows.Forms.DataGridViewComboBoxColumn();
     47      splitContainer1 = new System.Windows.Forms.SplitContainer();
     48      splitContainer2 = new System.Windows.Forms.SplitContainer();
     49      updateButton = new System.Windows.Forms.Button();
     50      label1 = new System.Windows.Forms.Label();
    4151      nullFormatterConfig.SuspendLayout();
    42       ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
    43       this.splitContainer1.Panel1.SuspendLayout();
    44       this.splitContainer1.Panel2.SuspendLayout();
    45       this.splitContainer1.SuspendLayout();
    46       this.splitContainer2.Panel1.SuspendLayout();
    47       this.splitContainer2.Panel2.SuspendLayout();
    48       this.splitContainer2.SuspendLayout();
     52      ((System.ComponentModel.ISupportInitialize)(dataGridView1)).BeginInit();
     53      splitContainer1.Panel1.SuspendLayout();
     54      splitContainer1.Panel2.SuspendLayout();
     55      splitContainer1.SuspendLayout();
     56      splitContainer2.Panel1.SuspendLayout();
     57      splitContainer2.Panel2.SuspendLayout();
     58      splitContainer2.SuspendLayout();
    4959      this.formatterTabs.SuspendLayout();
    5060      this.SuspendLayout();
     
    5262      // nullFormatterConfig
    5363      //
    54       nullFormatterConfig.Controls.Add(this.dataGridView1);
     64      nullFormatterConfig.Controls.Add(dataGridView1);
    5565      nullFormatterConfig.Location = new System.Drawing.Point(4, 22);
    5666      nullFormatterConfig.Name = "nullFormatterConfig";
     
    6272      // dataGridView1
    6373      //
    64       this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    65       this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    66             this.Column1,
    67             this.Column2,
    68             this.Column3});
    69       this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
    70       this.dataGridView1.Location = new System.Drawing.Point(0, 0);
    71       this.dataGridView1.Name = "dataGridView1";
    72       this.dataGridView1.Size = new System.Drawing.Size(386, 554);
    73       this.dataGridView1.TabIndex = 0;
     74      dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     75      dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     76            Column1,
     77            Column2,
     78            Column3});
     79      dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
     80      dataGridView1.Location = new System.Drawing.Point(0, 0);
     81      dataGridView1.Name = "dataGridView1";
     82      dataGridView1.Size = new System.Drawing.Size(386, 554);
     83      dataGridView1.TabIndex = 0;
    7484      //
    7585      // Column1
    7686      //
    77       this.Column1.HeaderText = "Column1";
    78       this.Column1.Name = "Column1";
     87      Column1.HeaderText = "Column1";
     88      Column1.Name = "Column1";
    7989      //
    8090      // Column2
    8191      //
    82       this.Column2.HeaderText = "Column2";
    83       this.Column2.Name = "Column2";
     92      Column2.HeaderText = "Column2";
     93      Column2.Name = "Column2";
    8494      //
    8595      // Column3
    8696      //
    87       this.Column3.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox;
    88       this.Column3.HeaderText = "Column3";
    89       this.Column3.Name = "Column3";
     97      Column3.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox;
     98      Column3.HeaderText = "Column3";
     99      Column3.Name = "Column3";
    90100      //
    91101      // decomposerList
     
    100110      this.decomposerList.GridLines = true;
    101111      this.decomposerList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
    102       listViewItem1.Checked = true;
    103       listViewItem1.StateImageIndex = 1;
    104       listViewItem1.Tag = "";
    105       listViewItem2.Checked = true;
    106       listViewItem2.StateImageIndex = 1;
    107       listViewItem3.Checked = true;
    108       listViewItem3.StateImageIndex = 1;
     112      listViewItem16.Checked = true;
     113      listViewItem16.StateImageIndex = 1;
     114      listViewItem16.Tag = "";
     115      listViewItem17.Checked = true;
     116      listViewItem17.StateImageIndex = 1;
     117      listViewItem18.Checked = true;
     118      listViewItem18.StateImageIndex = 1;
    109119      this.decomposerList.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
    110             listViewItem1,
    111             listViewItem2,
    112             listViewItem3});
     120            listViewItem16,
     121            listViewItem17,
     122            listViewItem18});
    113123      this.decomposerList.Location = new System.Drawing.Point(0, 0);
    114124      this.decomposerList.Name = "decomposerList";
     
    131141      // splitContainer1
    132142      //
    133       this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
    134       this.splitContainer1.Location = new System.Drawing.Point(0, 0);
    135       this.splitContainer1.Name = "splitContainer1";
     143      splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     144      splitContainer1.Location = new System.Drawing.Point(0, 0);
     145      splitContainer1.Name = "splitContainer1";
    136146      //
    137147      // splitContainer1.Panel1
    138148      //
    139       this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
     149      splitContainer1.Panel1.Controls.Add(splitContainer2);
    140150      //
    141151      // splitContainer1.Panel2
    142152      //
    143       this.splitContainer1.Panel2.Controls.Add(this.formatterTabs);
    144       this.splitContainer1.Size = new System.Drawing.Size(597, 580);
    145       this.splitContainer1.SplitterDistance = 199;
    146       this.splitContainer1.TabIndex = 2;
     153      splitContainer1.Panel2.Controls.Add(updateButton);
     154      splitContainer1.Panel2.Controls.Add(this.formatterTabs);
     155      splitContainer1.Size = new System.Drawing.Size(597, 580);
     156      splitContainer1.SplitterDistance = 199;
     157      splitContainer1.TabIndex = 2;
    147158      //
    148159      // splitContainer2
    149160      //
    150       this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
    151       this.splitContainer2.Location = new System.Drawing.Point(0, 0);
    152       this.splitContainer2.Name = "splitContainer2";
    153       this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
     161      splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
     162      splitContainer2.Location = new System.Drawing.Point(0, 0);
     163      splitContainer2.Name = "splitContainer2";
     164      splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
    154165      //
    155166      // splitContainer2.Panel1
    156167      //
    157       this.splitContainer2.Panel1.Controls.Add(this.decomposerList);
     168      splitContainer2.Panel1.Controls.Add(this.decomposerList);
    158169      //
    159170      // splitContainer2.Panel2
    160171      //
    161       this.splitContainer2.Panel2.Controls.Add(this.checkBox);
    162       this.splitContainer2.Size = new System.Drawing.Size(199, 580);
    163       this.splitContainer2.SplitterDistance = 290;
    164       this.splitContainer2.TabIndex = 1;
     172      splitContainer2.Panel2.Controls.Add(label1);
     173      splitContainer2.Panel2.Controls.Add(this.checkBox);
     174      splitContainer2.Size = new System.Drawing.Size(199, 580);
     175      splitContainer2.SplitterDistance = 290;
     176      splitContainer2.TabIndex = 1;
     177      //
     178      // checkBox
     179      //
     180      this.checkBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     181                  | System.Windows.Forms.AnchorStyles.Left)
     182                  | System.Windows.Forms.AnchorStyles.Right)));
     183      this.checkBox.Enabled = false;
     184      this.checkBox.FormattingEnabled = true;
     185      this.checkBox.Location = new System.Drawing.Point(0, 18);
     186      this.checkBox.Name = "checkBox";
     187      this.checkBox.Size = new System.Drawing.Size(199, 264);
     188      this.checkBox.TabIndex = 0;
    165189      //
    166190      // formatterTabs
     
    174198      this.formatterTabs.TabIndex = 0;
    175199      //
    176       // checkBox
    177       //
    178       this.checkBox.Dock = System.Windows.Forms.DockStyle.Fill;
    179       this.checkBox.FormattingEnabled = true;
    180       this.checkBox.Location = new System.Drawing.Point(0, 0);
    181       this.checkBox.Name = "checkBox";
    182       this.checkBox.Size = new System.Drawing.Size(199, 277);
    183       this.checkBox.TabIndex = 0;
     200      // updateButton
     201      //
     202      updateButton.Dock = System.Windows.Forms.DockStyle.Bottom;
     203      updateButton.Location = new System.Drawing.Point(0, 557);
     204      updateButton.Name = "updateButton";
     205      updateButton.Size = new System.Drawing.Size(394, 23);
     206      updateButton.TabIndex = 1;
     207      updateButton.Text = "Define Configuration";
     208      updateButton.UseVisualStyleBackColor = true;
     209      updateButton.Click += new System.EventHandler(this.updateButton_Click);
     210      //
     211      // label1
     212      //
     213      label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     214                  | System.Windows.Forms.AnchorStyles.Right)));
     215      label1.Location = new System.Drawing.Point(3, 0);
     216      label1.Name = "label1";
     217      label1.Size = new System.Drawing.Size(193, 13);
     218      label1.TabIndex = 1;
     219      label1.Text = "Configuration Preview";
     220      label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
    184221      //
    185222      // PersistenceConfigurationForm
     
    188225      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    189226      this.ClientSize = new System.Drawing.Size(597, 580);
    190       this.Controls.Add(this.splitContainer1);
     227      this.Controls.Add(splitContainer1);
    191228      this.Name = "PersistenceConfigurationForm";
    192229      this.Text = "PersistenceConfigurationForm";
    193230      nullFormatterConfig.ResumeLayout(false);
    194       ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
    195       this.splitContainer1.Panel1.ResumeLayout(false);
    196       this.splitContainer1.Panel2.ResumeLayout(false);
    197       this.splitContainer1.ResumeLayout(false);
    198       this.splitContainer2.Panel1.ResumeLayout(false);
    199       this.splitContainer2.Panel2.ResumeLayout(false);
    200       this.splitContainer2.ResumeLayout(false);
     231      ((System.ComponentModel.ISupportInitialize)(dataGridView1)).EndInit();
     232      splitContainer1.Panel1.ResumeLayout(false);
     233      splitContainer1.Panel2.ResumeLayout(false);
     234      splitContainer1.ResumeLayout(false);
     235      splitContainer2.Panel1.ResumeLayout(false);
     236      splitContainer2.Panel2.ResumeLayout(false);
     237      splitContainer2.ResumeLayout(false);
    201238      this.formatterTabs.ResumeLayout(false);
    202239      this.ResumeLayout(false);
     
    208245    private System.Windows.Forms.ListView decomposerList;
    209246    private System.Windows.Forms.ColumnHeader DecomposersColumn;
    210     private System.Windows.Forms.SplitContainer splitContainer1;
    211     private System.Windows.Forms.SplitContainer splitContainer2;
    212247    private System.Windows.Forms.TabControl formatterTabs;
    213     private System.Windows.Forms.DataGridView dataGridView1;
    214     private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
    215     private System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
    216     private System.Windows.Forms.DataGridViewComboBoxColumn Column3;
    217248    private System.Windows.Forms.ListBox checkBox;
    218249  }
  • 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   
  • branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.resx

    r1399 r1400  
    121121    <value>False</value>
    122122  </metadata>
     123  <metadata name="dataGridView1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     124    <value>False</value>
     125  </metadata>
     126  <metadata name="Column1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     127    <value>False</value>
     128  </metadata>
    123129  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    124130    <value>True</value>
     131  </metadata>
     132  <metadata name="Column2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     133    <value>False</value>
    125134  </metadata>
    126135  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     
    130139    <value>True</value>
    131140  </metadata>
     141  <metadata name="Column3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     142    <value>False</value>
     143  </metadata>
     144  <metadata name="splitContainer1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     145    <value>False</value>
     146  </metadata>
     147  <metadata name="splitContainer2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     148    <value>False</value>
     149  </metadata>
     150  <metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     151    <value>False</value>
     152  </metadata>
     153  <metadata name="updateButton.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     154    <value>False</value>
     155  </metadata>
    132156</root>
  • branches/New Persistence Exploration/Persistence/Persistence/HeuristicLab.Persistence.csproj

    r1363 r1400  
    5555  </ItemGroup>
    5656  <ItemGroup>
     57    <Compile Include="Core\Configuration.cs" />
    5758    <Compile Include="Default\Decomposers\EnumerableDecomposer.cs" />
    5859    <Compile Include="Default\Decomposers\ArrayDecomposer.cs" />
     
    7677    <Compile Include="Interfaces\IDecomposer.cs" />
    7778    <Compile Include="Interfaces\IFormatter.cs" />
    78     <Compile Include="Core\PersistenceConfiguration.cs" />
     79    <Compile Include="Core\ConfigurationService.cs" />
    7980    <Compile Include="Properties\AssemblyInfo.cs" />
    8081    <Compile Include="Core\Serializer.cs" />
Note: See TracChangeset for help on using the changeset viewer.