Changeset 16427


Ignore:
Timestamp:
12/21/18 09:50:22 (4 months ago)
Author:
jzenisek
Message:

#2839:

  • removed update button and functionality
  • fixed bug in hive resource selector (resource update on click)
  • performed some refactoring
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.Designer.cs

    r16117 r16427  
    112112      this.permissionsGroupBox.TabIndex = 4;
    113113      this.permissionsGroupBox.TabStop = false;
    114       this.permissionsGroupBox.Text = "Permissions (Assigned + Included)";
     114      this.permissionsGroupBox.Text = "Compute Permissions (Assigned + Included)";
    115115      //
    116116      // treeView
  • trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.Designer.cs

    r16117 r16427  
    3939      this.endLabel = new System.Windows.Forms.Label();
    4040      this.indefiniteCheckBox = new System.Windows.Forms.CheckBox();
    41       this.createdTextBox = new System.Windows.Forms.TextBox();
    42       this.refreshButton = new System.Windows.Forms.Button();
     41      this.createdTextBox = new System.Windows.Forms.TextBox();     
    4342      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    4443      this.SuspendLayout();
     
    124123      this.ownerComboBox.SelectedIndexChanged += new System.EventHandler(this.ownerComboBox_SelectedIndexChanged);
    125124      //
    126       // refreshButton
    127       //
    128       this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
    129       this.refreshButton.Location = new System.Drawing.Point(278, 162);
    130       this.refreshButton.Name = "refreshButton";
    131       this.refreshButton.Size = new System.Drawing.Size(24, 24);
    132       this.refreshButton.TabIndex = 5;
    133       this.toolTip.SetToolTip(this.refreshButton, "Refresh data");
    134       this.refreshButton.UseVisualStyleBackColor = true;
    135       this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    136       //
    137125      // createdLabel
    138126      //
     
    207195      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    208196      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    209       this.Controls.Add(this.refreshButton);
    210197      this.Controls.Add(this.createdTextBox);
    211198      this.Controls.Add(this.indefiniteCheckBox);
     
    247234    private System.Windows.Forms.Label endLabel;
    248235    private System.Windows.Forms.CheckBox indefiniteCheckBox;
    249     private System.Windows.Forms.TextBox createdTextBox;
    250     private System.Windows.Forms.Button refreshButton;
     236    private System.Windows.Forms.TextBox createdTextBox;   
    251237    private System.Windows.Forms.ToolTip toolTip;
    252238  }
  • trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs

    r16202 r16427  
    126126      bool enabled = Content != null && !Locked && !ReadOnly;
    127127      nameTextBox.Enabled = enabled;
    128       descriptionTextBox.Enabled = enabled;
    129       refreshButton.Enabled = enabled;
     128      descriptionTextBox.Enabled = enabled;     
    130129      ownerComboBox.Enabled = enabled;
    131130      createdTextBox.Enabled = enabled;
     
    188187    }
    189188
    190     private async void refreshButton_Click(object sender, EventArgs e) {
    191       lock (locker) {
    192         if (!refreshButton.Enabled) return;
    193         refreshButton.Enabled = false;
    194       }
    195 
    196       await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
    197         action: () => UpdateUsers(),
    198         finallyCallback: () => {
    199           ownerComboBox.SelectedIndexChanged -= ownerComboBox_SelectedIndexChanged;
    200           var users = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>();
    201           if (Content != null && !Content.ParentProjectId.HasValue) users = users.Where(x => x.Roles.Select(y => y.Name).Contains(HiveRoles.Administrator));
    202           ownerComboBox.DataSource = users.ToList();
    203           ownerComboBox.SelectedItem = users.FirstOrDefault(x => x.Id == persistedOwnerUserId);
    204           ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged;
    205           refreshButton.Enabled = true;
    206         });
    207     }
    208 
    209189    private void nameTextBox_Validating(object sender, CancelEventArgs e) {
    210190      if (string.IsNullOrEmpty(nameTextBox.Text)) {
  • trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.Designer.cs

    r16117 r16427  
    194194      this.permissionsTabPage.Size = new System.Drawing.Size(577, 515);
    195195      this.permissionsTabPage.TabIndex = 1;
    196       this.permissionsTabPage.Text = "Permissions";
     196      this.permissionsTabPage.Text = "Compute Permissions";
    197197      this.permissionsTabPage.UseVisualStyleBackColor = true;
    198198      //
  • trunk/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.Designer.cs

    r16117 r16427  
    1919 */
    2020#endregion
     21
     22using System.Windows.Forms;
    2123
    2224namespace HeuristicLab.Clients.Hive.JobManager.Views {
     
    114116      this.toolTip.SetToolTip(this.searchTextBox, "Enter string to search for resources");
    115117      this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged);
     118      this.searchTextBox.MouseDown += new MouseEventHandler(this.searchTextBox_MouseDown);
    116119      //
    117120      // splitContainer2
     
    146149      this.projectsTreeView.Size = new System.Drawing.Size(204, 410);
    147150      this.projectsTreeView.TabIndex = 3;
     151      this.projectsTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.projectsTreeView_MouseDown);
    148152      this.projectsTreeView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.projectsTreeView_MouseDoubleClick);
    149153      this.projectsTreeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.projectsTreeView_BeforeSelect);
  • trunk/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs

    r16219 r16427  
    145145        selectedProject = value;
    146146
    147         UpdateResourceTree();
     147        UpdateResourceTree();               
    148148        ExtractStatistics();
    149149        OnSelectedProjectChanged();
     
    223223      //UpdateFilteredTree();
    224224      UpdateProjectTree();
     225    }
     226
     227    private void searchTextBox_MouseDown(object sender, MouseEventArgs e) {
     228      resourcesTreeView.SelectedNode = null;
     229      ExtractStatistics();
     230    }
     231
     232    private void projectsTreeView_MouseDown(object sender, MouseEventArgs e) {
     233      resourcesTreeView.SelectedNode = null;
     234      ExtractStatistics();
    225235    }
    226236
Note: See TracChangeset for help on using the changeset viewer.