Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/20/10 05:15:15 (14 years ago)
Author:
swagner
Message:

Worked on OKB data model and services (#1174)

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

Legend:

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

    r4426 r4441  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.tabControl = new System.Windows.Forms.TabControl();
     49      this.platformsTabPage = new System.Windows.Forms.TabPage();
     50      this.platformCollectionView = new HeuristicLab.Clients.OKB.PlatformCollectionView();
    4851      this.algorithmClassesTabPage = new System.Windows.Forms.TabPage();
    4952      this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.AlgorithmClassCollectionView();
    50       this.refreshButton = new System.Windows.Forms.Button();
    5153      this.algorithmsTabPage = new System.Windows.Forms.TabPage();
    5254      this.algorithmCollectionView = new HeuristicLab.Clients.OKB.AlgorithmCollectionView();
     55      this.refreshButton = new System.Windows.Forms.Button();
     56      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    5357      this.tabControl.SuspendLayout();
     58      this.platformsTabPage.SuspendLayout();
    5459      this.algorithmClassesTabPage.SuspendLayout();
    5560      this.algorithmsTabPage.SuspendLayout();
     
    6166                  | System.Windows.Forms.AnchorStyles.Left)
    6267                  | System.Windows.Forms.AnchorStyles.Right)));
     68      this.tabControl.Controls.Add(this.platformsTabPage);
    6369      this.tabControl.Controls.Add(this.algorithmClassesTabPage);
    6470      this.tabControl.Controls.Add(this.algorithmsTabPage);
     
    6773      this.tabControl.SelectedIndex = 0;
    6874      this.tabControl.Size = new System.Drawing.Size(727, 406);
    69       this.tabControl.TabIndex = 2;
     75      this.tabControl.TabIndex = 1;
     76      //
     77      // platformsTabPage
     78      //
     79      this.platformsTabPage.Controls.Add(this.platformCollectionView);
     80      this.platformsTabPage.Location = new System.Drawing.Point(4, 22);
     81      this.platformsTabPage.Name = "platformsTabPage";
     82      this.platformsTabPage.Padding = new System.Windows.Forms.Padding(3);
     83      this.platformsTabPage.Size = new System.Drawing.Size(719, 380);
     84      this.platformsTabPage.TabIndex = 2;
     85      this.platformsTabPage.Text = "Platforms";
     86      this.platformsTabPage.UseVisualStyleBackColor = true;
     87      //
     88      // platformCollectionView
     89      //
     90      this.platformCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     91                  | System.Windows.Forms.AnchorStyles.Left)
     92                  | System.Windows.Forms.AnchorStyles.Right)));
     93      this.platformCollectionView.Caption = "PlatformCollection View";
     94      this.platformCollectionView.Content = null;
     95      this.platformCollectionView.Location = new System.Drawing.Point(6, 6);
     96      this.platformCollectionView.Name = "platformCollectionView";
     97      this.platformCollectionView.ReadOnly = false;
     98      this.platformCollectionView.Size = new System.Drawing.Size(707, 368);
     99      this.platformCollectionView.TabIndex = 0;
    70100      //
    71101      // algorithmClassesTabPage
     
    91121      this.algorithmClassCollectionView.ReadOnly = false;
    92122      this.algorithmClassCollectionView.Size = new System.Drawing.Size(707, 368);
    93       this.algorithmClassCollectionView.TabIndex = 3;
    94       //
    95       // refreshButton
    96       //
    97       this.refreshButton.Location = new System.Drawing.Point(0, 0);
    98       this.refreshButton.Name = "refreshButton";
    99       this.refreshButton.Size = new System.Drawing.Size(75, 23);
    100       this.refreshButton.TabIndex = 2;
    101       this.refreshButton.Text = "&Refresh";
    102       this.refreshButton.UseVisualStyleBackColor = true;
    103       this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
     123      this.algorithmClassCollectionView.TabIndex = 0;
    104124      //
    105125      // algorithmsTabPage
     
    125145      this.algorithmCollectionView.ReadOnly = false;
    126146      this.algorithmCollectionView.Size = new System.Drawing.Size(707, 368);
    127       this.algorithmCollectionView.TabIndex = 2;
     147      this.algorithmCollectionView.TabIndex = 0;
     148      //
     149      // refreshButton
     150      //
     151      this.refreshButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Refresh;
     152      this.refreshButton.Location = new System.Drawing.Point(0, 0);
     153      this.refreshButton.Name = "refreshButton";
     154      this.refreshButton.Size = new System.Drawing.Size(24, 24);
     155      this.refreshButton.TabIndex = 0;
     156      this.toolTip.SetToolTip(this.refreshButton, "Refresh Data");
     157      this.refreshButton.UseVisualStyleBackColor = true;
     158      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    128159      //
    129160      // AdministratorView
     
    136167      this.Size = new System.Drawing.Size(727, 435);
    137168      this.tabControl.ResumeLayout(false);
     169      this.platformsTabPage.ResumeLayout(false);
    138170      this.algorithmClassesTabPage.ResumeLayout(false);
    139171      this.algorithmsTabPage.ResumeLayout(false);
     
    150182    private AlgorithmClassCollectionView algorithmClassCollectionView;
    151183    private AlgorithmCollectionView algorithmCollectionView;
     184    private System.Windows.Forms.ToolTip toolTip;
     185    private System.Windows.Forms.TabPage platformsTabPage;
     186    private PlatformCollectionView platformCollectionView;
    152187
    153188  }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.cs

    r4433 r4441  
    5353      base.OnContentChanged();
    5454      if (Content == null) {
     55        platformCollectionView.Content = null;
    5556        algorithmClassCollectionView.Content = null;
    5657        algorithmCollectionView.Content = null;
    5758      } else {
     59        platformCollectionView.Content = Content.Platforms;
    5860        algorithmClassCollectionView.Content = Content.AlgorithmClasses;
    5961        algorithmCollectionView.Content = Content.Algorithms;
     
    6466      base.SetEnabledStateOfControls();
    6567      refreshButton.Enabled = Content != null;
     68      platformCollectionView.Enabled = Content != null;
    6669      algorithmClassCollectionView.Enabled = Content != null;
    6770      algorithmCollectionView.Enabled = Content != null;
     
    7275        Invoke(new EventHandler(Content_Refreshing), sender, e);
    7376      } else {
    74         Enabled = false;
    7577        Cursor = Cursors.AppStarting;
     78        refreshButton.Enabled = false;
     79        tabControl.Enabled = false;
    7680      }
    7781    }
     
    8084        Invoke(new EventHandler(Content_Refreshed), sender, e);
    8185      } else {
     86        platformCollectionView.Content = Content.Platforms;
    8287        algorithmClassCollectionView.Content = Content.AlgorithmClasses;
    8388        algorithmCollectionView.Content = Content.Algorithms;
     89        refreshButton.Enabled = true;
     90        tabControl.Enabled = true;
    8491        Cursor = Cursors.Default;
    85         Enabled = true;
    8692      }
    8793    }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/NamedOKBItemView.Designer.cs

    r4426 r4441  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.components = new System.ComponentModel.Container();
    4847      this.nameLabel = new System.Windows.Forms.Label();
    4948      this.nameTextBox = new System.Windows.Forms.TextBox();
    5049      this.descriptionLabel = new System.Windows.Forms.Label();
    5150      this.descriptionTextBox = new System.Windows.Forms.TextBox();
    52       this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     51      ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit();
    5352      this.SuspendLayout();
     53      //
     54      // storeButton
     55      //
     56      this.toolTip.SetToolTip(this.storeButton, "Store Data");
     57      //
     58      // modifiedPictureBox
     59      //
     60      this.modifiedPictureBox.Location = new System.Drawing.Point(308, 3);
     61      this.modifiedPictureBox.Size = new System.Drawing.Size(39, 130);
    5462      //
    5563      // nameLabel
     
    6876      this.nameTextBox.Location = new System.Drawing.Point(72, 29);
    6977      this.nameTextBox.Name = "nameTextBox";
    70       this.nameTextBox.Size = new System.Drawing.Size(279, 20);
     78      this.nameTextBox.Size = new System.Drawing.Size(230, 20);
    7179      this.nameTextBox.TabIndex = 2;
     80      this.nameTextBox.TextChanged += new System.EventHandler(this.nameTextBox_TextChanged);
    7281      this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown);
    73       this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);
    7482      //
    7583      // descriptionLabel
     
    8997      this.descriptionTextBox.Name = "descriptionTextBox";
    9098      this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    91       this.descriptionTextBox.Size = new System.Drawing.Size(279, 20);
     99      this.descriptionTextBox.Size = new System.Drawing.Size(230, 20);
    92100      this.descriptionTextBox.TabIndex = 4;
     101      this.descriptionTextBox.TextChanged += new System.EventHandler(this.descriptionTextBox_TextChanged);
    93102      this.descriptionTextBox.DoubleClick += new System.EventHandler(this.descriptionTextBox_DoubleClick);
    94       this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated);
    95103      //
    96104      // NamedOKBItemView
     
    103111      this.Controls.Add(this.nameTextBox);
    104112      this.Name = "NamedOKBItemView";
    105       this.Size = new System.Drawing.Size(351, 80);
     113      this.Size = new System.Drawing.Size(350, 229);
     114      this.Controls.SetChildIndex(this.modifiedPictureBox, 0);
    106115      this.Controls.SetChildIndex(this.storeButton, 0);
    107116      this.Controls.SetChildIndex(this.nameTextBox, 0);
     
    109118      this.Controls.SetChildIndex(this.descriptionLabel, 0);
    110119      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
     120      ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).EndInit();
    111121      this.ResumeLayout(false);
    112122      this.PerformLayout();
     
    120130    protected System.Windows.Forms.Label descriptionLabel;
    121131    protected System.Windows.Forms.TextBox descriptionTextBox;
    122     protected System.Windows.Forms.ToolTip toolTip;
    123132  }
    124133}
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/NamedOKBItemView.cs

    r4426 r4441  
    9191      }
    9292    }
    93     protected virtual void nameTextBox_Validated(object sender, EventArgs e) {
    94       Content.Name = nameTextBox.Text;
     93    protected virtual void nameTextBox_TextChanged(object sender, EventArgs e) {
     94      if (nameTextBox.Text != Content.Name)
     95        Content.Name = nameTextBox.Text;
    9596    }
    96     protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) {
    97       Content.Description = descriptionTextBox.Text;
     97    protected virtual void descriptionTextBox_TextChanged(object sender, EventArgs e) {
     98      if (descriptionTextBox.Text != Content.Description)
     99        Content.Description = descriptionTextBox.Text;
    98100    }
    99101
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBItemView.Designer.cs

    r4426 r4441  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.storeButton = new System.Windows.Forms.Button();
     49      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     50      this.modifiedPictureBox = new System.Windows.Forms.PictureBox();
     51      ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit();
    4852      this.SuspendLayout();
    4953      //
    5054      // storeButton
    5155      //
     56      this.storeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.PublishToWeb;
    5257      this.storeButton.Location = new System.Drawing.Point(0, 0);
    5358      this.storeButton.Name = "storeButton";
    54       this.storeButton.Size = new System.Drawing.Size(75, 23);
     59      this.storeButton.Size = new System.Drawing.Size(24, 24);
    5560      this.storeButton.TabIndex = 0;
    56       this.storeButton.Text = "&Store";
     61      this.toolTip.SetToolTip(this.storeButton, "Store Data");
    5762      this.storeButton.UseVisualStyleBackColor = true;
    5863      this.storeButton.Click += new System.EventHandler(this.storeButton_Click);
     64      //
     65      // modifiedPictureBox
     66      //
     67      this.modifiedPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     68      this.modifiedPictureBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.HighPriorityLarge;
     69      this.modifiedPictureBox.Location = new System.Drawing.Point(312, 3);
     70      this.modifiedPictureBox.Name = "modifiedPictureBox";
     71      this.modifiedPictureBox.Size = new System.Drawing.Size(39, 130);
     72      this.modifiedPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
     73      this.modifiedPictureBox.TabIndex = 1;
     74      this.modifiedPictureBox.TabStop = false;
     75      this.toolTip.SetToolTip(this.modifiedPictureBox, "Data Modified");
     76      this.modifiedPictureBox.Visible = false;
    5977      //
    6078      // OKBItemView
     
    6280      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    6381      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     82      this.Controls.Add(this.modifiedPictureBox);
    6483      this.Controls.Add(this.storeButton);
    6584      this.Name = "OKBItemView";
    66       this.Size = new System.Drawing.Size(315, 292);
     85      this.Size = new System.Drawing.Size(354, 308);
     86      ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).EndInit();
    6787      this.ResumeLayout(false);
    6888
     
    7292
    7393    protected System.Windows.Forms.Button storeButton;
     94    protected System.Windows.Forms.ToolTip toolTip;
     95    protected System.Windows.Forms.PictureBox modifiedPictureBox;
    7496
    7597
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBItemView.cs

    r4426 r4441  
    4343    protected override void DeregisterContentEvents() {
    4444      Content.PropertyChanged -= new PropertyChangedEventHandler(Content_PropertyChanged);
     45      Content.ModifiedChanged -= new EventHandler(Content_ModifiedChanged);
    4546      base.DeregisterContentEvents();
    4647    }
     
    4849      base.RegisterContentEvents();
    4950      Content.PropertyChanged += new PropertyChangedEventHandler(Content_PropertyChanged);
     51      Content.ModifiedChanged += new EventHandler(Content_ModifiedChanged);
    5052    }
    5153
    5254    protected override void SetEnabledStateOfControls() {
    5355      base.SetEnabledStateOfControls();
    54       storeButton.Enabled = Content != null;
     56      storeButton.Enabled = (Content != null) && Content.Modified;
     57      modifiedPictureBox.Visible = (Content != null) && Content.Modified;
    5558    }
    5659
     
    6366    }
    6467    protected virtual void OnContentPropertyChanged(string propertyName) { }
     68    protected virtual void Content_ModifiedChanged(object sender, EventArgs e) {
     69      if (InvokeRequired)
     70        Invoke(new EventHandler(Content_ModifiedChanged), sender, e);
     71      else {
     72        storeButton.Enabled = Content.Modified;
     73        modifiedPictureBox.Visible = Content.Modified;
     74      }
     75    }
    6576
    6677    protected virtual void storeButton_Click(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.