Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/18 23:06:00 (6 years ago)
Author:
jzenisek
Message:

#2839: fixed couple of minor issues

  • changed tags in resource selector
  • added project information in job list and adapted sortation
  • fixed hand-down save by withdrawing additional offset-rights (permissions, resources),...
Location:
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj

    r15412 r15992  
    105105    <Compile Include="ExtensionMethods\TreeNodeExtensions.cs" />
    106106    <Compile Include="ListViewItemDateComparer.cs" />
     107    <Compile Include="ListViewItemComparer.cs" />
    107108    <Compile Include="MenuItems\CreateHiveJobMenuItem.cs" />
    108109    <Compile Include="MenuItems\RunInHiveMenuItem.cs" />
     
    244245      <Private>False</Private>
    245246    </ProjectReference>
     247  </ItemGroup>
     248  <ItemGroup>
     249    <EmbeddedResource Include="Views\RefreshableHiveJobView.resx">
     250      <DependentUpon>RefreshableHiveJobView.cs</DependentUpon>
     251    </EmbeddedResource>
    246252  </ItemGroup>
    247253  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs

    r15978 r15992  
    4343    public const string additionalSlavesGroupDescription = "Contains additional slaves which are either ungrouped or the parenting slave group is not assigned to the selected project.";
    4444
    45     private const string CURRENT_SELECTION_TAG = " [current selection]";
    46     private const string NEW_SELECTION_TAG = " [new selection]";
    47     private const string CHANGED_SELECTION_TAG = " [changed selection]";
    48     private const string ADDED_SELECTION_TAG = " [added selection]";
    49     private const string REMOVED_SELECTION_TAG = " [removed selection]";
    50     private const string SELECTED_TAG = " [selected]";
     45    private const string CURRENT_SELECTION_TAG = " [current assignment]";
     46    private const string NEW_SELECTION_TAG = " [new assignment]";
     47    private const string CHANGED_SELECTION_TAG = " [changed assignment]";
     48    private const string ADDED_SELECTION_TAG = " [added assignment]";
     49    private const string REMOVED_SELECTION_TAG = " [removed assignment]";
     50    private const string SELECTED_TAG = " [assigned]";
    5151    private const string INCLUDED_TAG = " [included]";
    5252    private const string ADDED_INCLUDE_TAG = " [added include]";
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs

    r14185 r15992  
    4141      this.itemsListView.Columns.Add(new ColumnHeader("Date") { Text = "Date" });
    4242      this.itemsListView.Columns.Add(new ColumnHeader("Name") { Text = "Name" });
     43      this.itemsListView.Columns.Add(new ColumnHeader("Project") { Text = "Project" });
    4344
    4445      this.itemsListView.HeaderStyle = ColumnHeaderStyle.Clickable;
    4546      this.itemsListView.FullRowSelect = true;
    4647
    47       this.itemsListView.ListViewItemSorter = new ListViewItemDateComparer(0, SortOrder.Ascending);
     48      this.itemsListView.ListViewItemSorter = new ListViewItemComparer(new int[] { 2, 0 }, new SortOrder[] { SortOrder.Ascending, SortOrder.Ascending });
     49
     50      foreach (ColumnHeader c in this.itemsListView.Columns) {
     51        c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     52        int w = c.Width;
     53        c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     54        if(w > c.Width) {
     55          c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     56        }
     57      }
    4858    }
    4959
    5060    protected override void SortItemsListView(SortOrder sortOrder) {
    5161      if (itemsListView.Sorting == sortOrder || sortOrder == SortOrder.None) return;
    52       ((ListViewItemDateComparer)itemsListView.ListViewItemSorter).Order = sortOrder;
     62      ((ListViewItemComparer)itemsListView.ListViewItemSorter).Orders[1] = sortOrder;
    5363      itemsListView.Sorting = sortOrder;
    5464      itemsListView.Sort();
    55       AdjustListViewColumnSizes();
     65      //AdjustListViewColumnSizes();
    5666    }
    5767
     
    133143        base.Content_ItemsAdded(sender, e);
    134144        foreach (ColumnHeader c in this.itemsListView.Columns) {
     145          c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     146          int w = c.Width;
    135147          c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     148          if (w > c.Width) {
     149            c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     150          }
    136151        }
    137152        foreach (var item in e.Items) {
     
    180195      listViewItem.SubItems.Insert(0, new ListViewItem.ListViewSubItem(listViewItem, item.Job.DateCreated.ToString()));
    181196      listViewItem.SubItems.Insert(1, new ListViewItem.ListViewSubItem(listViewItem, item.Job.Name));
     197      listViewItem.SubItems.Insert(2, new ListViewItem.ListViewSubItem(listViewItem, HiveClient.Instance.GetProjectAncestry(item.Job.ProjectId)));
     198     
    182199      listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername);
    183200      return listViewItem;
     
    189206      listViewItem.SubItems[0].Text = item == null ? "null" : item.Job.DateCreated.ToString("dd.MM.yyyy HH:mm");
    190207      listViewItem.SubItems[1].Text = item == null ? "null" : item.Job.Name;
     208      listViewItem.SubItems[2].Text = item == null ? "null" : HiveClient.Instance.GetProjectAncestry(item.Job.ProjectId);
    191209      listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername);
    192210      listViewItem.ToolTipText = item == null ? string.Empty : item.ItemName + ": " + item.ItemDescription;
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs

    r15953 r15992  
    4646    private void InitializeComponent() {
    4747      this.components = new System.ComponentModel.Container();
     48      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RefreshableHiveJobView));
    4849      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    4950      this.tasksTabPage = new System.Windows.Forms.TabPage();
     
    5152      this.permissionTabPage = new System.Windows.Forms.TabPage();
    5253      this.refreshPermissionsButton = new System.Windows.Forms.Button();
     54      this.hiveExperimentPermissionListView = new HeuristicLab.Clients.Hive.JobManager.Views.HiveJobPermissionListView();
    5355      this.runsTabPage = new System.Windows.Forms.TabPage();
    5456      this.runCollectionViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     
    6668      this.nameLabel = new System.Windows.Forms.Label();
    6769      this.nameTextBox = new System.Windows.Forms.TextBox();
     70      this.descriptionLabel = new System.Windows.Forms.Label();
     71      this.descriptionTextBox = new System.Windows.Forms.TextBox();
    6872      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    6973      this.refreshButton = new System.Windows.Forms.Button();
    7074      this.updateButton = new System.Windows.Forms.Button();
    7175      this.UnloadButton = new System.Windows.Forms.Button();
     76      this.searchButton = new System.Windows.Forms.Button();
    7277      this.refreshAutomaticallyCheckBox = new System.Windows.Forms.CheckBox();
    7378      this.infoGroupBox = new System.Windows.Forms.GroupBox();
     
    7883      this.calculatingLabel = new System.Windows.Forms.Label();
    7984      this.jobsLabel = new System.Windows.Forms.Label();
    80       this.searchButton = new System.Windows.Forms.Button();
    81       this.hiveExperimentPermissionListView = new HeuristicLab.Clients.Hive.JobManager.Views.HiveJobPermissionListView();
    8285      this.tabControl.SuspendLayout();
    8386      this.tasksTabPage.SuspendLayout();
     
    100103      this.tabControl.Controls.Add(this.stateTabPage);
    101104      this.tabControl.Controls.Add(this.logTabPage);
    102       this.tabControl.Location = new System.Drawing.Point(0, 78);
     105      this.tabControl.Location = new System.Drawing.Point(0, 106);
    103106      this.tabControl.Name = "tabControl";
    104107      this.tabControl.SelectedIndex = 0;
     
    147150      // refreshPermissionsButton
    148151      //
    149       this.refreshPermissionsButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
     152      this.refreshPermissionsButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshPermissionsButton.Image")));
    150153      this.refreshPermissionsButton.Location = new System.Drawing.Point(3, 3);
    151154      this.refreshPermissionsButton.Name = "refreshPermissionsButton";
     
    155158      this.refreshPermissionsButton.UseVisualStyleBackColor = true;
    156159      this.refreshPermissionsButton.Click += new System.EventHandler(this.refreshPermissionsButton_Click);
     160      //
     161      // hiveExperimentPermissionListView
     162      //
     163      this.hiveExperimentPermissionListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     164            | System.Windows.Forms.AnchorStyles.Left)
     165            | System.Windows.Forms.AnchorStyles.Right)));
     166      this.hiveExperimentPermissionListView.Caption = "HiveExperimentPermissionList View";
     167      this.hiveExperimentPermissionListView.Content = null;
     168      this.hiveExperimentPermissionListView.HiveExperimentId = new System.Guid("00000000-0000-0000-0000-000000000000");
     169      this.hiveExperimentPermissionListView.Location = new System.Drawing.Point(3, 33);
     170      this.hiveExperimentPermissionListView.Name = "hiveExperimentPermissionListView";
     171      this.hiveExperimentPermissionListView.ReadOnly = false;
     172      this.hiveExperimentPermissionListView.ShowDetails = true;
     173      this.hiveExperimentPermissionListView.Size = new System.Drawing.Size(703, 390);
     174      this.hiveExperimentPermissionListView.TabIndex = 0;
    157175      //
    158176      // runsTabPage
     
    235253      //
    236254      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    237       this.startButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
    238       this.startButton.Location = new System.Drawing.Point(0, 536);
     255      this.startButton.Image = ((System.Drawing.Image)(resources.GetObject("startButton.Image")));
     256      this.startButton.Location = new System.Drawing.Point(0, 564);
    239257      this.startButton.Name = "startButton";
    240258      this.startButton.Size = new System.Drawing.Size(24, 24);
    241       this.startButton.TabIndex = 5;
     259      this.startButton.TabIndex = 4;
    242260      this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");
    243261      this.startButton.UseVisualStyleBackColor = true;
     
    247265      //
    248266      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    249       this.stopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Stop;
    250       this.stopButton.Location = new System.Drawing.Point(60, 536);
     267      this.stopButton.Image = ((System.Drawing.Image)(resources.GetObject("stopButton.Image")));
     268      this.stopButton.Location = new System.Drawing.Point(60, 564);
    251269      this.stopButton.Name = "stopButton";
    252270      this.stopButton.Size = new System.Drawing.Size(24, 24);
    253       this.stopButton.TabIndex = 7;
     271      this.stopButton.TabIndex = 6;
    254272      this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");
    255273      this.stopButton.UseVisualStyleBackColor = true;
     
    260278      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    261279      this.executionTimeLabel.AutoSize = true;
    262       this.executionTimeLabel.Location = new System.Drawing.Point(491, 543);
     280      this.executionTimeLabel.Location = new System.Drawing.Point(491, 571);
    263281      this.executionTimeLabel.Name = "executionTimeLabel";
    264282      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
    265       this.executionTimeLabel.TabIndex = 9;
     283      this.executionTimeLabel.TabIndex = 100;
    266284      this.executionTimeLabel.Text = "&Execution Time:";
    267285      //
     
    269287      //
    270288      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    271       this.executionTimeTextBox.Location = new System.Drawing.Point(580, 540);
     289      this.executionTimeTextBox.Location = new System.Drawing.Point(580, 568);
    272290      this.executionTimeTextBox.Name = "executionTimeTextBox";
    273291      this.executionTimeTextBox.ReadOnly = true;
    274292      this.executionTimeTextBox.Size = new System.Drawing.Size(137, 20);
    275       this.executionTimeTextBox.TabIndex = 10;
     293      this.executionTimeTextBox.TabIndex = 100;
    276294      //
    277295      // pauseButton
     
    279297      this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    280298      this.pauseButton.Enabled = false;
    281       this.pauseButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Pause;
    282       this.pauseButton.Location = new System.Drawing.Point(30, 536);
     299      this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image")));
     300      this.pauseButton.Location = new System.Drawing.Point(30, 564);
    283301      this.pauseButton.Name = "pauseButton";
    284302      this.pauseButton.Size = new System.Drawing.Size(24, 24);
    285       this.pauseButton.TabIndex = 6;
     303      this.pauseButton.TabIndex = 5;
    286304      this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");
    287305      this.pauseButton.UseVisualStyleBackColor = true;
     
    291309      //
    292310      this.projectLabel.AutoSize = true;
    293       this.projectLabel.Location = new System.Drawing.Point(3, 56);
     311      this.projectLabel.Location = new System.Drawing.Point(3, 83);
    294312      this.projectLabel.Name = "projectLabel";
    295313      this.projectLabel.Size = new System.Drawing.Size(43, 13);
    296       this.projectLabel.TabIndex = 12;
     314      this.projectLabel.TabIndex = 100;
    297315      this.projectLabel.Text = "Project:";
    298316      //
     
    301319      this.projectNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    302320            | System.Windows.Forms.AnchorStyles.Right)));
    303       this.projectNameTextBox.Location = new System.Drawing.Point(82, 52);
     321      this.projectNameTextBox.Location = new System.Drawing.Point(100, 80);
    304322      this.projectNameTextBox.Name = "projectNameTextBox";
    305323      this.projectNameTextBox.ReadOnly = true;
    306       this.projectNameTextBox.Size = new System.Drawing.Size(489, 20);
    307       this.projectNameTextBox.TabIndex = 2;
     324      this.projectNameTextBox.Size = new System.Drawing.Size(471, 20);
     325      this.projectNameTextBox.TabIndex = 100;
    308326      this.projectNameTextBox.Validated += new System.EventHandler(this.resourceNamesTextBox_Validated);
    309327      //
     
    311329      //
    312330      this.nameLabel.AutoSize = true;
    313       this.nameLabel.Location = new System.Drawing.Point(3, 30);
     331      this.nameLabel.Location = new System.Drawing.Point(3, 35);
    314332      this.nameLabel.Name = "nameLabel";
    315333      this.nameLabel.Size = new System.Drawing.Size(38, 13);
    316       this.nameLabel.TabIndex = 20;
     334      this.nameLabel.TabIndex = 100;
    317335      this.nameLabel.Text = "Name:";
    318336      //
     
    321339      this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    322340            | System.Windows.Forms.AnchorStyles.Right)));
    323       this.nameTextBox.Location = new System.Drawing.Point(52, 27);
     341      this.nameTextBox.Location = new System.Drawing.Point(71, 32);
    324342      this.nameTextBox.Name = "nameTextBox";
    325       this.nameTextBox.Size = new System.Drawing.Size(519, 20);
     343      this.nameTextBox.Size = new System.Drawing.Size(500, 20);
    326344      this.nameTextBox.TabIndex = 1;
    327345      this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);
    328346      //
     347      // descriptionLabel
     348      //
     349      this.descriptionLabel.AutoSize = true;
     350      this.descriptionLabel.Location = new System.Drawing.Point(3, 59);
     351      this.descriptionLabel.Name = "descriptionLabel";
     352      this.descriptionLabel.Size = new System.Drawing.Size(63, 13);
     353      this.descriptionLabel.TabIndex = 100;
     354      this.descriptionLabel.Text = "Description:";
     355      //
     356      // descriptionTextBox
     357      //
     358      this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     359            | System.Windows.Forms.AnchorStyles.Right)));
     360      this.descriptionTextBox.Location = new System.Drawing.Point(71, 56);
     361      this.descriptionTextBox.Name = "descriptionTextBox";
     362      this.descriptionTextBox.Size = new System.Drawing.Size(500, 20);
     363      this.descriptionTextBox.TabIndex = 2;
     364      this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated);
     365      //
    329366      // refreshButton
    330367      //
    331       this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
     368      this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));
    332369      this.refreshButton.Location = new System.Drawing.Point(3, 0);
    333370      this.refreshButton.Name = "refreshButton";
    334371      this.refreshButton.Size = new System.Drawing.Size(24, 24);
    335       this.refreshButton.TabIndex = 22;
     372      this.refreshButton.TabIndex = 7;
    336373      this.toolTip.SetToolTip(this.refreshButton, "Refresh Data");
    337374      this.refreshButton.UseVisualStyleBackColor = true;
     
    340377      // updateButton
    341378      //
    342       this.updateButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Save;
     379      this.updateButton.Image = ((System.Drawing.Image)(resources.GetObject("updateButton.Image")));
    343380      this.updateButton.Location = new System.Drawing.Point(30, 0);
    344381      this.updateButton.Name = "updateButton";
    345382      this.updateButton.Size = new System.Drawing.Size(24, 24);
    346       this.updateButton.TabIndex = 23;
     383      this.updateButton.TabIndex = 8;
    347384      this.toolTip.SetToolTip(this.updateButton, "Update Job (Name, Project, Resources)");
    348385      this.updateButton.UseVisualStyleBackColor = true;
     
    351388      // UnloadButton
    352389      //
    353       this.UnloadButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Disconnect;
     390      this.UnloadButton.Image = ((System.Drawing.Image)(resources.GetObject("UnloadButton.Image")));
    354391      this.UnloadButton.Location = new System.Drawing.Point(57, 0);
    355392      this.UnloadButton.Name = "UnloadButton";
    356393      this.UnloadButton.Size = new System.Drawing.Size(24, 24);
    357       this.UnloadButton.TabIndex = 27;
     394      this.UnloadButton.TabIndex = 9;
    358395      this.toolTip.SetToolTip(this.UnloadButton, "Unload Job");
    359396      this.UnloadButton.UseVisualStyleBackColor = true;
    360397      this.UnloadButton.Click += new System.EventHandler(this.UnloadButton_Click);
     398      //
     399      // searchButton
     400      //
     401      this.searchButton.Image = ((System.Drawing.Image)(resources.GetObject("searchButton.Image")));
     402      this.searchButton.Location = new System.Drawing.Point(71, 79);
     403      this.searchButton.Name = "searchButton";
     404      this.searchButton.Size = new System.Drawing.Size(24, 24);
     405      this.searchButton.TabIndex = 3;
     406      this.toolTip.SetToolTip(this.searchButton, "Select project and resources");
     407      this.searchButton.UseVisualStyleBackColor = true;
     408      this.searchButton.Click += new System.EventHandler(this.searchButton_Click);
    361409      //
    362410      // refreshAutomaticallyCheckBox
     
    366414      this.refreshAutomaticallyCheckBox.Name = "refreshAutomaticallyCheckBox";
    367415      this.refreshAutomaticallyCheckBox.Size = new System.Drawing.Size(127, 17);
    368       this.refreshAutomaticallyCheckBox.TabIndex = 24;
     416      this.refreshAutomaticallyCheckBox.TabIndex = 100;
    369417      this.refreshAutomaticallyCheckBox.Text = "&Refresh automatically";
    370418      this.refreshAutomaticallyCheckBox.UseVisualStyleBackColor = true;
     
    380428      this.infoGroupBox.Controls.Add(this.calculatingLabel);
    381429      this.infoGroupBox.Controls.Add(this.jobsLabel);
    382       this.infoGroupBox.Location = new System.Drawing.Point(580, 5);
     430      this.infoGroupBox.Location = new System.Drawing.Point(578, 16);
    383431      this.infoGroupBox.Name = "infoGroupBox";
    384432      this.infoGroupBox.Size = new System.Drawing.Size(133, 89);
     
    394442      this.finishedTextBox.Name = "finishedTextBox";
    395443      this.finishedTextBox.Size = new System.Drawing.Size(53, 20);
    396       this.finishedTextBox.TabIndex = 5;
     444      this.finishedTextBox.TabIndex = 100;
    397445      //
    398446      // calculatingTextBox
     
    403451      this.calculatingTextBox.Name = "calculatingTextBox";
    404452      this.calculatingTextBox.Size = new System.Drawing.Size(53, 20);
    405       this.calculatingTextBox.TabIndex = 4;
     453      this.calculatingTextBox.TabIndex = 100;
    406454      //
    407455      // jobsTextBox
     
    412460      this.jobsTextBox.Name = "jobsTextBox";
    413461      this.jobsTextBox.Size = new System.Drawing.Size(53, 20);
    414       this.jobsTextBox.TabIndex = 3;
     462      this.jobsTextBox.TabIndex = 100;
    415463      //
    416464      // finishedLabel
     
    420468      this.finishedLabel.Name = "finishedLabel";
    421469      this.finishedLabel.Size = new System.Drawing.Size(49, 13);
    422       this.finishedLabel.TabIndex = 2;
     470      this.finishedLabel.TabIndex = 100;
    423471      this.finishedLabel.Text = "Finished:";
    424472      //
     
    429477      this.calculatingLabel.Name = "calculatingLabel";
    430478      this.calculatingLabel.Size = new System.Drawing.Size(62, 13);
    431       this.calculatingLabel.TabIndex = 1;
     479      this.calculatingLabel.TabIndex = 100;
    432480      this.calculatingLabel.Text = "Calculating:";
    433481      //
     
    438486      this.jobsLabel.Name = "jobsLabel";
    439487      this.jobsLabel.Size = new System.Drawing.Size(46, 13);
    440       this.jobsLabel.TabIndex = 0;
     488      this.jobsLabel.TabIndex = 100;
    441489      this.jobsLabel.Text = "Waiting:";
    442       //
    443       // searchButton
    444       //
    445       this.searchButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Zoom;
    446       this.searchButton.Location = new System.Drawing.Point(52, 50);
    447       this.searchButton.Name = "searchButton";
    448       this.searchButton.Size = new System.Drawing.Size(24, 24);
    449       this.searchButton.TabIndex = 26;
    450       this.toolTip.SetToolTip(this.searchButton, "Select project and resources");
    451       this.searchButton.UseVisualStyleBackColor = true;
    452       this.searchButton.Click += new System.EventHandler(this.searchButton_Click);
    453       //
    454       // hiveExperimentPermissionListView
    455       //
    456       this.hiveExperimentPermissionListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    457             | System.Windows.Forms.AnchorStyles.Left)
    458             | System.Windows.Forms.AnchorStyles.Right)));
    459       this.hiveExperimentPermissionListView.Caption = "HiveExperimentPermissionList View";
    460       this.hiveExperimentPermissionListView.Content = null;
    461       this.hiveExperimentPermissionListView.HiveExperimentId = new System.Guid("00000000-0000-0000-0000-000000000000");
    462       this.hiveExperimentPermissionListView.Location = new System.Drawing.Point(3, 33);
    463       this.hiveExperimentPermissionListView.Name = "hiveExperimentPermissionListView";
    464       this.hiveExperimentPermissionListView.ReadOnly = false;
    465       this.hiveExperimentPermissionListView.ShowDetails = true;
    466       this.hiveExperimentPermissionListView.Size = new System.Drawing.Size(703, 390);
    467       this.hiveExperimentPermissionListView.TabIndex = 0;
    468490      //
    469491      // RefreshableHiveJobView
     
    478500      this.Controls.Add(this.nameTextBox);
    479501      this.Controls.Add(this.nameLabel);
     502      this.Controls.Add(this.descriptionTextBox);
     503      this.Controls.Add(this.descriptionLabel);
    480504      this.Controls.Add(this.tabControl);
    481505      this.Controls.Add(this.startButton);
     
    487511      this.Controls.Add(this.stopButton);
    488512      this.Name = "RefreshableHiveJobView";
    489       this.Size = new System.Drawing.Size(717, 560);
     513      this.Size = new System.Drawing.Size(717, 588);
    490514      this.tabControl.ResumeLayout(false);
    491515      this.tasksTabPage.ResumeLayout(false);
     
    515539    private System.Windows.Forms.Label nameLabel;
    516540    private System.Windows.Forms.TextBox nameTextBox;
     541    private System.Windows.Forms.Label descriptionLabel;
     542    private System.Windows.Forms.TextBox descriptionTextBox;
    517543    private System.Windows.Forms.ToolTip toolTip;
    518544    private System.Windows.Forms.Button refreshButton;
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r15966 r15992  
    121121        if (Content == null) {
    122122          nameTextBox.Text = string.Empty;
     123          descriptionTextBox.Text = string.Empty;
    123124          executionTimeTextBox.Text = string.Empty;
    124125          projectNameTextBox.Text = string.Empty;
     
    139140
    140141          nameTextBox.Text = Content.Job.Name;
     142          descriptionTextBox.Text = Content.Job.Description;
    141143          executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    142144          refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
     
    183185      tabControl.Enabled = !Locked;
    184186      nameTextBox.Enabled = !Locked;
     187      descriptionTextBox.Enabled = !Locked;
    185188      projectNameTextBox.Enabled = !Locked;
    186189      searchButton.Enabled = !Locked;
     
    208211
    209212          this.nameTextBox.ReadOnly = Content.IsProgressing;
     213          this.descriptionTextBox.ReadOnly = Content.IsProgressing;
    210214          this.searchButton.Enabled = !Content.IsProgressing && Content.ExecutionState != ExecutionState.Stopped;
    211215          this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     
    457461    }
    458462
     463    private void descriptionTextBox_Validated(object sender, EventArgs e) {
     464      if (!SuppressEvents && Content.Job != null && Content.Job.Description != descriptionTextBox.Text)
     465        Content.Job.Description = descriptionTextBox.Text;
     466    }
     467
    459468    private void resourceNamesTextBox_Validated(object sender, EventArgs e) {
    460469      //if (!SuppressEvents && Content.Job != null && Content.Job.ResourceNames != resourceNamesTextBox.Text)
     
    478487    }
    479488
     489    private void updateButton_Click2(object sender, EventArgs e) {
     490      if (Content.ExecutionState == ExecutionState.Stopped) {
     491        MessageBox.Show("Job cannot be updated once it stopped.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
     492        return;
     493      }
     494
     495      HiveClient.UpdateJob(
     496        (Exception ex) => ErrorHandling.ShowErrorDialog(this, "Update failed.", ex),
     497        Content,
     498        new CancellationToken());
     499      UpdateSelectorDialog();
     500    }
     501
    480502    private void updateButton_Click(object sender, EventArgs e) {
    481503      if (Content.ExecutionState == ExecutionState.Stopped) {
     
    484506      }
    485507
    486       HiveClient.UpdateJob(
    487         (Exception ex) => ErrorHandling.ShowErrorDialog(this, "Update failed.", ex),
    488         Content,
    489         new CancellationToken());
     508      var invoker = new Action<RefreshableJob>(HiveClient.UpdateJob);
     509      invoker.BeginInvoke(Content, (ar) => {
     510        try {
     511          invoker.EndInvoke(ar);
     512        } catch (Exception ex) {
     513          ThreadPool.QueueUserWorkItem(delegate (object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex);
     514        }
     515      }, null);
    490516      UpdateSelectorDialog();
    491517    }
Note: See TracChangeset for help on using the changeset viewer.