Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/12 16:46:35 (12 years ago)
Author:
gkronber
Message:

#1847: merged r8084:8205 from trunk into GP move operators branch

Location:
branches/GP-MoveOperators
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-MoveOperators

  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleListView.cs

    r8042 r8206  
    5050        base.Content_Refreshed(sender, e);
    5151        roleListView.Enabled = true;
    52         storeButton.Enabled = true;
    5352        roleListView.Content = Content.Roles;
    5453        if (Content.Roles != null) {
     54          storeButton.Enabled = true;
    5555          Content.Roles.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<Role>>(Roles_ItemsRemoved);
    5656        }
  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserGroupListView.cs

    r8042 r8206  
    5050        base.Content_Refreshed(sender, e);
    5151        userGroupListView.Enabled = true;
    52         storeButton.Enabled = true;
    5352        userGroupListView.Content = Content.Groups;
    5453        if (Content.Groups != null) {
     54          storeButton.Enabled = true;
    5555          Content.Groups.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<UserGroup>>(Groups_ItemsRemoved);
    5656        }
  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserListView.cs

    r8042 r8206  
    5050        base.Content_Refreshed(sender, e);
    5151        userListView.Enabled = true;
    52         storeButton.Enabled = true;
    5352        userListView.Content = Content.Users;
    5453        if (Content.Users != null) {
     54          storeButton.Enabled = true;
    5555          Content.Users.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<User>>(Users_ItemsRemoved);
    5656        }
  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupView.Designer.cs

    r8042 r8206  
    8686      // storeButton
    8787      //
     88      this.storeButton.Enabled = false;
    8889      this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
    8990      this.storeButton.Location = new System.Drawing.Point(31, 58);
  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupView.cs

    r8042 r8206  
    3838    }
    3939
     40    protected override void RegisterContentEvents() {
     41      base.RegisterContentEvents();
     42      Access.AccessClient.Instance.Refreshing += new EventHandler(Content_Refreshing);
     43      refreshableLightweightUserView.StorableStateChanged += new EventHandler(refreshableLightweightUserView_StorableStateChanged);
     44    }
     45
     46    protected override void DeregisterContentEvents() {
     47      Access.AccessClient.Instance.Refreshing -= new EventHandler(Content_Refreshing);
     48      refreshableLightweightUserView.StorableStateChanged -= new EventHandler(refreshableLightweightUserView_StorableStateChanged);
     49      base.DeregisterContentEvents();
     50    }
     51
    4052    protected override void OnContentChanged() {
    4153      base.OnContentChanged();
     
    5163        idTextBox.Text = Content.Id.ToString();
    5264
    53         refreshableLightweightUserView.Content = Access.AccessClient.Instance;
    54         refreshableLightweightUserView.FetchSelectedUsers = new Func<List<Guid>>(delegate { return AccessAdministrationClient.CallAccessService<List<Guid>>(s => s.GetUserGroupIdsOfGroup(Content.Id)); });
     65        refreshableLightweightUserView.Content = Content.Id != Guid.Empty ? Access.AccessClient.Instance : null;
     66        refreshableLightweightUserView.FetchSelectedUsers = Content.Id != Guid.Empty ? new Func<List<Guid>>(delegate { return AccessAdministrationClient.CallAccessService<List<Guid>>(s => s.GetUserGroupIdsOfGroup(Content.Id)); }) : null;
    5567      }
    5668    }
     
    7789      AccessAdministrationClient.Instance.ExecuteActionAsync(deleteAction, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
    7890    }
     91
     92    private void Content_Refreshing(object sender, EventArgs e) {
     93      storeButton.Enabled = false;
     94    }
     95
     96    private void refreshableLightweightUserView_StorableStateChanged(object sender, EventArgs e) {
     97      storeButton.Enabled = true;
     98    }
    7999  }
    80100}
  • branches/GP-MoveOperators/HeuristicLab.Clients.Access.Administration/3.3/Views/UserView.cs

    r8042 r8206  
    5757        lastActivityTextBox.Text = Content.LastActivityDate.ToString();
    5858        lastLoginTextBox.Text = Content.LastLoginDate.ToString();
    59         refreshableRoleSelectionListView.Content = AccessAdministrationClient.Instance;
     59        refreshableRoleSelectionListView.Content = Content.Id != Guid.Empty ? AccessAdministrationClient.Instance : null;
    6060        refreshableRoleSelectionListView.CurrentUser = Content;
     61      }
     62    }
     63
     64    protected override void SetEnabledStateOfControls() {
     65      base.SetEnabledStateOfControls();
     66      if (Content == null) {
     67        resetPasswordButton.Enabled = false;
     68      } else {
     69        resetPasswordButton.Enabled = Content.Id != Guid.Empty;
    6170      }
    6271    }
Note: See TracChangeset for help on using the changeset viewer.