Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/24/10 06:53:43 (14 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

Location:
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.Designer.cs

    r4466 r4481  
    4646    private void InitializeComponent() {
    4747      this.components = new System.ComponentModel.Container();
    48       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdministratorView));
    4948      this.tabControl = new System.Windows.Forms.TabControl();
    5049      this.platformsTabPage = new System.Windows.Forms.TabPage();
    5150      this.platformCollectionView = new HeuristicLab.Clients.OKB.PlatformCollectionView();
     51      this.dataTypesTabPage = new System.Windows.Forms.TabPage();
     52      this.dataTypeCollectionView = new HeuristicLab.Clients.OKB.DataTypeCollectionView();
    5253      this.algorithmClassesTabPage = new System.Windows.Forms.TabPage();
    5354      this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.AlgorithmClassCollectionView();
    5455      this.algorithmsTabPage = new System.Windows.Forms.TabPage();
    5556      this.algorithmCollectionView = new HeuristicLab.Clients.OKB.AlgorithmCollectionView();
    56       this.dataTypesTabPage = new System.Windows.Forms.TabPage();
     57      this.problemClassesTabPage = new System.Windows.Forms.TabPage();
     58      this.problemsTabPage = new System.Windows.Forms.TabPage();
    5759      this.refreshButton = new System.Windows.Forms.Button();
    5860      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    59       this.dataTypeCollectionView = new HeuristicLab.Clients.OKB.DataTypeCollectionView();
     61      this.problemClassCollectionView = new HeuristicLab.Clients.OKB.ProblemClassCollectionView();
     62      this.problemCollectionView = new HeuristicLab.Clients.OKB.ProblemCollectionView();
    6063      this.tabControl.SuspendLayout();
    6164      this.platformsTabPage.SuspendLayout();
     65      this.dataTypesTabPage.SuspendLayout();
    6266      this.algorithmClassesTabPage.SuspendLayout();
    6367      this.algorithmsTabPage.SuspendLayout();
    64       this.dataTypesTabPage.SuspendLayout();
     68      this.problemClassesTabPage.SuspendLayout();
     69      this.problemsTabPage.SuspendLayout();
    6570      this.SuspendLayout();
    6671      //
     
    7176                  | System.Windows.Forms.AnchorStyles.Right)));
    7277      this.tabControl.Controls.Add(this.platformsTabPage);
     78      this.tabControl.Controls.Add(this.dataTypesTabPage);
    7379      this.tabControl.Controls.Add(this.algorithmClassesTabPage);
    7480      this.tabControl.Controls.Add(this.algorithmsTabPage);
    75       this.tabControl.Controls.Add(this.dataTypesTabPage);
     81      this.tabControl.Controls.Add(this.problemClassesTabPage);
     82      this.tabControl.Controls.Add(this.problemsTabPage);
    7683      this.tabControl.Location = new System.Drawing.Point(0, 29);
    7784      this.tabControl.Name = "tabControl";
     
    98105      this.platformCollectionView.Caption = "PlatformCollection View";
    99106      this.platformCollectionView.Content = null;
    100       this.platformCollectionView.Location = new System.Drawing.Point(6, 6);
     107      this.platformCollectionView.Location = new System.Drawing.Point(3, 3);
    101108      this.platformCollectionView.Name = "platformCollectionView";
    102109      this.platformCollectionView.ReadOnly = false;
    103       this.platformCollectionView.Size = new System.Drawing.Size(707, 368);
     110      this.platformCollectionView.Size = new System.Drawing.Size(713, 374);
    104111      this.platformCollectionView.TabIndex = 0;
     112      //
     113      // dataTypesTabPage
     114      //
     115      this.dataTypesTabPage.Controls.Add(this.dataTypeCollectionView);
     116      this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22);
     117      this.dataTypesTabPage.Name = "dataTypesTabPage";
     118      this.dataTypesTabPage.Padding = new System.Windows.Forms.Padding(3);
     119      this.dataTypesTabPage.Size = new System.Drawing.Size(719, 380);
     120      this.dataTypesTabPage.TabIndex = 3;
     121      this.dataTypesTabPage.Text = "Data Types";
     122      this.dataTypesTabPage.UseVisualStyleBackColor = true;
     123      //
     124      // dataTypeCollectionView
     125      //
     126      this.dataTypeCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     127                  | System.Windows.Forms.AnchorStyles.Left)
     128                  | System.Windows.Forms.AnchorStyles.Right)));
     129      this.dataTypeCollectionView.Caption = "DataTypeCollection View";
     130      this.dataTypeCollectionView.Content = null;
     131      this.dataTypeCollectionView.Location = new System.Drawing.Point(3, 3);
     132      this.dataTypeCollectionView.Name = "dataTypeCollectionView";
     133      this.dataTypeCollectionView.ReadOnly = false;
     134      this.dataTypeCollectionView.Size = new System.Drawing.Size(713, 374);
     135      this.dataTypeCollectionView.TabIndex = 0;
    105136      //
    106137      // algorithmClassesTabPage
     
    122153      this.algorithmClassCollectionView.Caption = "AlgorithmClassCollection View";
    123154      this.algorithmClassCollectionView.Content = null;
    124       this.algorithmClassCollectionView.Location = new System.Drawing.Point(6, 6);
     155      this.algorithmClassCollectionView.Location = new System.Drawing.Point(3, 3);
    125156      this.algorithmClassCollectionView.Name = "algorithmClassCollectionView";
    126157      this.algorithmClassCollectionView.ReadOnly = false;
    127       this.algorithmClassCollectionView.Size = new System.Drawing.Size(707, 368);
     158      this.algorithmClassCollectionView.Size = new System.Drawing.Size(713, 374);
    128159      this.algorithmClassCollectionView.TabIndex = 0;
    129160      //
     
    146177      this.algorithmCollectionView.Caption = "AlgorithmCollection View";
    147178      this.algorithmCollectionView.Content = null;
    148       this.algorithmCollectionView.Location = new System.Drawing.Point(6, 6);
     179      this.algorithmCollectionView.Location = new System.Drawing.Point(3, 3);
    149180      this.algorithmCollectionView.Name = "algorithmCollectionView";
    150181      this.algorithmCollectionView.ReadOnly = false;
    151       this.algorithmCollectionView.Size = new System.Drawing.Size(707, 368);
     182      this.algorithmCollectionView.Size = new System.Drawing.Size(713, 374);
    152183      this.algorithmCollectionView.TabIndex = 0;
    153184      //
    154       // dataTypesTabPage
    155       //
    156       this.dataTypesTabPage.Controls.Add(this.dataTypeCollectionView);
    157       this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22);
    158       this.dataTypesTabPage.Name = "dataTypesTabPage";
    159       this.dataTypesTabPage.Padding = new System.Windows.Forms.Padding(3);
    160       this.dataTypesTabPage.Size = new System.Drawing.Size(719, 380);
    161       this.dataTypesTabPage.TabIndex = 3;
    162       this.dataTypesTabPage.Text = "Data Types";
    163       this.dataTypesTabPage.UseVisualStyleBackColor = true;
     185      // problemClassesTabPage
     186      //
     187      this.problemClassesTabPage.Controls.Add(this.problemClassCollectionView);
     188      this.problemClassesTabPage.Location = new System.Drawing.Point(4, 22);
     189      this.problemClassesTabPage.Name = "problemClassesTabPage";
     190      this.problemClassesTabPage.Size = new System.Drawing.Size(719, 380);
     191      this.problemClassesTabPage.TabIndex = 4;
     192      this.problemClassesTabPage.Text = "Problem Classes";
     193      this.problemClassesTabPage.UseVisualStyleBackColor = true;
     194      //
     195      // problemsTabPage
     196      //
     197      this.problemsTabPage.Controls.Add(this.problemCollectionView);
     198      this.problemsTabPage.Location = new System.Drawing.Point(4, 22);
     199      this.problemsTabPage.Name = "problemsTabPage";
     200      this.problemsTabPage.Size = new System.Drawing.Size(719, 380);
     201      this.problemsTabPage.TabIndex = 5;
     202      this.problemsTabPage.Text = "Problems";
     203      this.problemsTabPage.UseVisualStyleBackColor = true;
    164204      //
    165205      // refreshButton
    166206      //
    167       this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));
     207      this.refreshButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Refresh;
    168208      this.refreshButton.Location = new System.Drawing.Point(0, 0);
    169209      this.refreshButton.Name = "refreshButton";
     
    174214      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    175215      //
    176       // dataTypeCollectionView
    177       //
    178       this.dataTypeCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    179                   | System.Windows.Forms.AnchorStyles.Left)
    180                   | System.Windows.Forms.AnchorStyles.Right)));
    181       this.dataTypeCollectionView.Caption = "DataTypeCollection View";
    182       this.dataTypeCollectionView.Content = null;
    183       this.dataTypeCollectionView.Location = new System.Drawing.Point(6, 6);
    184       this.dataTypeCollectionView.Name = "dataTypeCollectionView";
    185       this.dataTypeCollectionView.ReadOnly = false;
    186       this.dataTypeCollectionView.Size = new System.Drawing.Size(707, 368);
    187       this.dataTypeCollectionView.TabIndex = 0;
     216      // problemClassCollectionView
     217      //
     218      this.problemClassCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     219                  | System.Windows.Forms.AnchorStyles.Left)
     220                  | System.Windows.Forms.AnchorStyles.Right)));
     221      this.problemClassCollectionView.Caption = "ProblemClassCollection View";
     222      this.problemClassCollectionView.Content = null;
     223      this.problemClassCollectionView.Location = new System.Drawing.Point(3, 3);
     224      this.problemClassCollectionView.Name = "problemClassCollectionView";
     225      this.problemClassCollectionView.ReadOnly = false;
     226      this.problemClassCollectionView.Size = new System.Drawing.Size(713, 374);
     227      this.problemClassCollectionView.TabIndex = 0;
     228      //
     229      // problemCollectionView
     230      //
     231      this.problemCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     232                  | System.Windows.Forms.AnchorStyles.Left)
     233                  | System.Windows.Forms.AnchorStyles.Right)));
     234      this.problemCollectionView.Caption = "ProblemCollection View";
     235      this.problemCollectionView.Content = null;
     236      this.problemCollectionView.Location = new System.Drawing.Point(3, 3);
     237      this.problemCollectionView.Name = "problemCollectionView";
     238      this.problemCollectionView.ReadOnly = false;
     239      this.problemCollectionView.Size = new System.Drawing.Size(713, 374);
     240      this.problemCollectionView.TabIndex = 0;
    188241      //
    189242      // AdministratorView
     
    197250      this.tabControl.ResumeLayout(false);
    198251      this.platformsTabPage.ResumeLayout(false);
     252      this.dataTypesTabPage.ResumeLayout(false);
    199253      this.algorithmClassesTabPage.ResumeLayout(false);
    200254      this.algorithmsTabPage.ResumeLayout(false);
    201       this.dataTypesTabPage.ResumeLayout(false);
     255      this.problemClassesTabPage.ResumeLayout(false);
     256      this.problemsTabPage.ResumeLayout(false);
    202257      this.ResumeLayout(false);
    203258
     
    217272    private System.Windows.Forms.TabPage dataTypesTabPage;
    218273    private DataTypeCollectionView dataTypeCollectionView;
     274    private System.Windows.Forms.TabPage problemClassesTabPage;
     275    private System.Windows.Forms.TabPage problemsTabPage;
     276    private ProblemClassCollectionView problemClassCollectionView;
     277    private ProblemCollectionView problemCollectionView;
    219278
    220279  }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.cs

    r4466 r4481  
    5454      if (Content == null) {
    5555        platformCollectionView.Content = null;
     56        dataTypeCollectionView.Content = null;
    5657        algorithmClassCollectionView.Content = null;
    5758        algorithmCollectionView.Content = null;
    58         dataTypeCollectionView.Content = null;
     59        problemClassCollectionView.Content = null;
     60        problemCollectionView.Content = null;
    5961      } else {
    6062        platformCollectionView.Content = Content.Platforms;
     63        dataTypeCollectionView.Content = Content.DataTypes;
    6164        algorithmClassCollectionView.Content = Content.AlgorithmClasses;
    6265        algorithmCollectionView.Content = Content.Algorithms;
    63         dataTypeCollectionView.Content = Content.DataTypes;
     66        problemClassCollectionView.Content = Content.ProblemClasses;
     67        problemCollectionView.Content = Content.Problems;
    6468      }
    6569    }
     
    6973      refreshButton.Enabled = Content != null;
    7074      platformCollectionView.Enabled = Content != null;
     75      dataTypeCollectionView.Enabled = Content != null;
    7176      algorithmClassCollectionView.Enabled = Content != null;
    7277      algorithmCollectionView.Enabled = Content != null;
    73       dataTypeCollectionView.Enabled = Content != null;
     78      problemClassCollectionView.Enabled = Content != null;
     79      problemCollectionView.Enabled = Content != null;
    7480    }
    7581
     
    8894      } else {
    8995        platformCollectionView.Content = Content.Platforms;
     96        dataTypeCollectionView.Content = Content.DataTypes;
    9097        algorithmClassCollectionView.Content = Content.AlgorithmClasses;
    9198        algorithmCollectionView.Content = Content.Algorithms;
    92         dataTypeCollectionView.Content = Content.DataTypes;
     99        problemClassCollectionView.Content = Content.ProblemClasses;
     100        problemCollectionView.Content = Content.Problems;
    93101        refreshButton.Enabled = true;
    94102        tabControl.Enabled = true;
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmView.Designer.cs

    r4466 r4481  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AlgorithmView));
    4748      this.platformLabel = new System.Windows.Forms.Label();
    4849      this.platformComboBox = new System.Windows.Forms.ComboBox();
     
    5556      this.refreshUsersButton = new System.Windows.Forms.Button();
    5657      this.dataTabPage = new System.Windows.Forms.TabPage();
    57       this.fileLabel = new System.Windows.Forms.Label();
    58       this.storeDataButton = new System.Windows.Forms.Button();
    59       this.fileTextBox = new System.Windows.Forms.TextBox();
    60       this.openFileButton = new System.Windows.Forms.Button();
    61       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    62       this.dataTypeLabel = new System.Windows.Forms.Label();
    63       this.dataTypeComboBox = new System.Windows.Forms.ComboBox();
     58      this.algorithmDataView = new HeuristicLab.Clients.OKB.AlgorithmDataView();
    6459      ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit();
    6560      this.tabControl.SuspendLayout();
     
    135130      this.usersListBox.Enabled = false;
    136131      this.usersListBox.FormattingEnabled = true;
    137       this.usersListBox.Location = new System.Drawing.Point(6, 35);
     132      this.usersListBox.Location = new System.Drawing.Point(6, 36);
    138133      this.usersListBox.Name = "usersListBox";
    139134      this.usersListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
     
    170165      // storeUsersButton
    171166      //
    172       this.storeUsersButton.Location = new System.Drawing.Point(86, 6);
     167      this.storeUsersButton.Image = ((System.Drawing.Image)(resources.GetObject("storeUsersButton.Image")));
     168      this.storeUsersButton.Location = new System.Drawing.Point(36, 6);
    173169      this.storeUsersButton.Name = "storeUsersButton";
    174       this.storeUsersButton.Size = new System.Drawing.Size(75, 23);
     170      this.storeUsersButton.Size = new System.Drawing.Size(24, 24);
    175171      this.storeUsersButton.TabIndex = 1;
    176       this.storeUsersButton.Text = "&Store";
    177172      this.toolTip.SetToolTip(this.storeUsersButton, "Store Authorized Users");
    178173      this.storeUsersButton.UseVisualStyleBackColor = true;
     
    181176      // refreshUsersButton
    182177      //
     178      this.refreshUsersButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshUsersButton.Image")));
    183179      this.refreshUsersButton.Location = new System.Drawing.Point(6, 6);
    184180      this.refreshUsersButton.Name = "refreshUsersButton";
    185       this.refreshUsersButton.Size = new System.Drawing.Size(75, 23);
     181      this.refreshUsersButton.Size = new System.Drawing.Size(24, 24);
    186182      this.refreshUsersButton.TabIndex = 0;
    187       this.refreshUsersButton.Text = "&Refresh";
    188183      this.toolTip.SetToolTip(this.refreshUsersButton, "Refresh Authorized Users");
    189184      this.refreshUsersButton.UseVisualStyleBackColor = true;
     
    192187      // dataTabPage
    193188      //
    194       this.dataTabPage.Controls.Add(this.dataTypeComboBox);
    195       this.dataTabPage.Controls.Add(this.openFileButton);
    196       this.dataTabPage.Controls.Add(this.fileTextBox);
    197       this.dataTabPage.Controls.Add(this.storeDataButton);
    198       this.dataTabPage.Controls.Add(this.dataTypeLabel);
    199       this.dataTabPage.Controls.Add(this.fileLabel);
     189      this.dataTabPage.Controls.Add(this.algorithmDataView);
    200190      this.dataTabPage.Location = new System.Drawing.Point(4, 22);
    201191      this.dataTabPage.Name = "dataTabPage";
     
    203193      this.dataTabPage.Size = new System.Drawing.Size(625, 266);
    204194      this.dataTabPage.TabIndex = 1;
    205       this.dataTabPage.Text = "Serialized Algorithm";
     195      this.dataTabPage.Text = "Platform-Specific Algorithm Data";
    206196      this.dataTabPage.UseVisualStyleBackColor = true;
    207197      //
    208       // fileLabel
    209       //
    210       this.fileLabel.AutoSize = true;
    211       this.fileLabel.Location = new System.Drawing.Point(6, 38);
    212       this.fileLabel.Name = "fileLabel";
    213       this.fileLabel.Size = new System.Drawing.Size(26, 13);
    214       this.fileLabel.TabIndex = 1;
    215       this.fileLabel.Text = "&File:";
    216       //
    217       // storeDataButton
    218       //
    219       this.storeDataButton.Enabled = false;
    220       this.storeDataButton.Location = new System.Drawing.Point(6, 6);
    221       this.storeDataButton.Name = "storeDataButton";
    222       this.storeDataButton.Size = new System.Drawing.Size(75, 23);
    223       this.storeDataButton.TabIndex = 0;
    224       this.storeDataButton.Text = "&Store";
    225       this.toolTip.SetToolTip(this.storeDataButton, "Store Serialized Algorithm");
    226       this.storeDataButton.UseVisualStyleBackColor = true;
    227       this.storeDataButton.Click += new System.EventHandler(this.storeDataButton_Click);
    228       //
    229       // fileTextBox
    230       //
    231       this.fileTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    232                   | System.Windows.Forms.AnchorStyles.Right)));
    233       this.fileTextBox.Location = new System.Drawing.Point(69, 35);
    234       this.fileTextBox.Name = "fileTextBox";
    235       this.fileTextBox.ReadOnly = true;
    236       this.fileTextBox.Size = new System.Drawing.Size(520, 20);
    237       this.fileTextBox.TabIndex = 2;
    238       //
    239       // openFileButton
    240       //
    241       this.openFileButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    242       this.openFileButton.Location = new System.Drawing.Point(595, 32);
    243       this.openFileButton.Name = "openFileButton";
    244       this.openFileButton.Size = new System.Drawing.Size(24, 24);
    245       this.openFileButton.TabIndex = 3;
    246       this.openFileButton.Text = "...";
    247       this.openFileButton.UseVisualStyleBackColor = true;
    248       this.openFileButton.Click += new System.EventHandler(this.openFileButton_Click);
    249       //
    250       // openFileDialog
    251       //
    252       this.openFileDialog.FileName = "algorithm";
    253       this.openFileDialog.Filter = "All Files (*.*)|*.*";
    254       this.openFileDialog.Title = "Select Algorithm File";
    255       //
    256       // dataTypeLabel
    257       //
    258       this.dataTypeLabel.AutoSize = true;
    259       this.dataTypeLabel.Location = new System.Drawing.Point(6, 64);
    260       this.dataTypeLabel.Name = "dataTypeLabel";
    261       this.dataTypeLabel.Size = new System.Drawing.Size(57, 13);
    262       this.dataTypeLabel.TabIndex = 4;
    263       this.dataTypeLabel.Text = "&DataType:";
    264       //
    265       // dataTypeComboBox
    266       //
    267       this.dataTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    268                   | System.Windows.Forms.AnchorStyles.Right)));
    269       this.dataTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    270       this.dataTypeComboBox.FormattingEnabled = true;
    271       this.dataTypeComboBox.Location = new System.Drawing.Point(69, 61);
    272       this.dataTypeComboBox.Name = "dataTypeComboBox";
    273       this.dataTypeComboBox.Size = new System.Drawing.Size(550, 21);
    274       this.dataTypeComboBox.TabIndex = 5;
    275       this.dataTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.dataTypeComboBox_SelectedIndexChanged);
     198      // algorithmDataView
     199      //
     200      this.algorithmDataView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     201                  | System.Windows.Forms.AnchorStyles.Left)
     202                  | System.Windows.Forms.AnchorStyles.Right)));
     203      this.algorithmDataView.Caption = "AlgorithmData View";
     204      this.algorithmDataView.Content = null;
     205      this.algorithmDataView.Location = new System.Drawing.Point(6, 6);
     206      this.algorithmDataView.Name = "algorithmDataView";
     207      this.algorithmDataView.ReadOnly = false;
     208      this.algorithmDataView.Size = new System.Drawing.Size(613, 254);
     209      this.algorithmDataView.TabIndex = 0;
    276210      //
    277211      // AlgorithmView
     
    300234      this.usersTabPage.ResumeLayout(false);
    301235      this.dataTabPage.ResumeLayout(false);
    302       this.dataTabPage.PerformLayout();
    303236      this.ResumeLayout(false);
    304237      this.PerformLayout();
     
    318251    private System.Windows.Forms.Button refreshUsersButton;
    319252    private System.Windows.Forms.TabPage dataTabPage;
    320     private System.Windows.Forms.ComboBox dataTypeComboBox;
    321     private System.Windows.Forms.Button openFileButton;
    322     private System.Windows.Forms.TextBox fileTextBox;
    323     private System.Windows.Forms.Button storeDataButton;
    324     private System.Windows.Forms.Label dataTypeLabel;
    325     private System.Windows.Forms.Label fileLabel;
    326     private System.Windows.Forms.OpenFileDialog openFileDialog;
     253    private AlgorithmDataView algorithmDataView;
    327254
    328255  }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmView.cs

    r4466 r4481  
    2626using HeuristicLab.MainForm;
    2727using HeuristicLab.MainForm.WindowsForms;
    28 using System.IO;
    2928
    3029namespace HeuristicLab.Clients.OKB {
     
    4544      platformComboBox.DataSource = Administrator.Instance.Platforms.ToList();
    4645      algorithmClassComboBox.DataSource = Administrator.Instance.AlgorithmClasses.ToList();
    47       dataTypeComboBox.DataSource = Administrator.Instance.DataTypes.ToList();
    4846    }
    4947
     
    6260        platformComboBox.SelectedIndex = -1;
    6361        algorithmClassComboBox.SelectedIndex = -1;
     62        algorithmDataView.AlgorithmId = 0;
    6463      } else {
    6564        platformComboBox.SelectedItem = Administrator.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
    6665        algorithmClassComboBox.SelectedItem = Administrator.Instance.AlgorithmClasses.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
     66        algorithmDataView.AlgorithmId = Content.Id;
    6767      }
    6868      usersListBox.DataSource = null;
    69       fileTextBox.Text = "";
    70       dataTypeComboBox.SelectedIndex = -1;
     69      algorithmDataView.Content = null;
    7170    }
    7271
     
    7877      storeUsersButton.Enabled = usersListBox.DataSource != null;
    7978      usersListBox.Enabled = usersListBox.DataSource != null;
    80       storeDataButton.Enabled = !string.IsNullOrEmpty(fileTextBox.Text) && dataTypeComboBox.SelectedIndex != -1;
     79      algorithmDataView.Enabled = Content != null;
    8180    }
    8281
     
    119118    }
    120119    private void storeUsersButton_Click(object sender, System.EventArgs e) {
    121       if (Administrator.Instance.StoreAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToArray()))
     120      if (Administrator.Instance.UpdateAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToArray()))
    122121        storeUsersButton.Enabled = false;
    123122    }
     
    125124      storeUsersButton.Enabled = true;
    126125    }
    127 
    128     private void storeDataButton_Click(object sender, EventArgs e) {
    129       AlgorithmData data = new AlgorithmData();
    130       data.AlgorithmId = Content.Id;
    131       data.DataTypeId = ((DataType)dataTypeComboBox.SelectedItem).Id;
    132 
    133       using (FileStream stream = new FileStream(fileTextBox.Text, FileMode.Open, FileAccess.Read)) {
    134         byte[] bytes = new byte[stream.Length];
    135         stream.Read(bytes, 0, bytes.Length);
    136         stream.Close();
    137         data.Data = bytes;
    138       }
    139 
    140       if (Administrator.Instance.StoreAlgorithmData(data))
    141         storeDataButton.Enabled = false;
    142     }
    143     private void openFileButton_Click(object sender, EventArgs e) {
    144       if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
    145         fileTextBox.Text = openFileDialog.FileName;
    146         storeDataButton.Enabled = true;
    147       }
    148     }
    149     private void dataTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) {
    150       storeDataButton.Enabled = !string.IsNullOrEmpty(fileTextBox.Text);
    151     }
    152126  }
    153127}
Note: See TracChangeset for help on using the changeset viewer.