Ignore:
Timestamp:
01/21/09 17:14:26 (12 years ago)
Author:
aleitner
Message:

updated details panels, onclick methods on TreeView (#452)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs

    r1148 r1164  
    217217    private void ClientClicked() {
    218218      int i = 0;
    219       while (usersList.List[i].Name != nameCurrentUser) {
     219      while (clientInfo.List[i].Name != nameCurrentClient) {
    220220        i++;
    221221      }
     
    226226      lblClientName.Text = currentClient.Name;
    227227      lblLogin.Text = currentClient.Login.ToString();
     228      lblState.Text = currentClient.State.ToString();
    228229    }
    229230
     
    333334      AddJobForm newForm = new AddJobForm();
    334335      newForm.Show();
     336      newForm.addJobEvent += new addDelegate(Refresh);
     337    }
     338
     339    private void Refresh() {
     340      AddClients();
     341      AddJobs();
     342      AddUsers();
    335343    }
    336344
     
    338346      AddUserForm newForm = new AddUserForm("User", false);
    339347      newForm.Show();
     348      newForm.addUserEvent += new addDelegate(Refresh);
    340349    }
    341350
     
    343352      AddUserForm newForm = new AddUserForm("User", true);
    344353      newForm.Show();
     354      newForm.addUserEvent += new addDelegate(Refresh);                                             
    345355    }
    346356
     
    351361    }
    352362
     363    private void OnTVClientClicked(object sender, TreeViewEventArgs e) {
     364      bool clientgroup = false;
     365      foreach (ClientGroup cg in clients.List) {
     366        if (tvClientControl.SelectedNode.Text == cg.Name) {
     367          clientgroup = true;
     368        }
     369      }
     370      if (clientgroup == false) {
     371        nameCurrentClient = tvClientControl.SelectedNode.Text;
     372        flagClient = true;
     373        ClientClicked();
     374      }
     375
     376    }
     377
    353378    private void OnLVJobControlClicked(object sender, EventArgs e) {
    354379      nameCurrentJob = lvJobControl.SelectedItems[0].Text;
     
    357382    }
    358383
    359     private void OnTVJobControlClicked(object sender, EventArgs e) {
     384    private void OnTVJobControlClicked(object sender, TreeViewEventArgs e) {
    360385      try {
    361386        nameCurrentJob = Convert.ToInt32(tvJobControl.SelectedNode.Text).ToString();
     
    368393
    369394    private void OnLVUserControlClicked(object sender, EventArgs e) {
    370       nameCurrentUser = lvUserControl.SelectedItems[0].Name;
     395      nameCurrentUser = lvUserControl.SelectedItems[0].Text;
    371396      flagUser = true;
    372397      UserClicked();
    373398    }
     399
     400    private void OnTVUserControlClicked(object sender, TreeViewEventArgs e) {
     401      bool usergroup = false;
     402      foreach (UserGroup ug in userGroups.List) {
     403        if (tvUserControl.SelectedNode.Text == ug.Name) {
     404          usergroup = true;
     405        }
     406      }
     407      if (usergroup == false) {
     408        nameCurrentUser = tvUserControl.SelectedNode.Text;
     409        flagUser = true;
     410        UserClicked();
     411      }
     412
     413    }
     414
    374415
    375416    private void btnClientClose_Click(object sender, EventArgs e) {
     
    398439    }
    399440    #endregion
     441
    400442  }
    401443}
Note: See TracChangeset for help on using the changeset viewer.