Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/20/12 13:24:10 (12 years ago)
Author:
ascheibe
Message:

#1648

  • fixed user query ws methods
  • improved user view
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/Views/RefreshableLightweightUserView.cs

    r7375 r7380  
    3434    public RefreshableLightweightUserView() {
    3535      InitializeComponent();
    36 
    3736    }
    3837
    39     //set an action like a webservice call to retrieve the users which should be marked as checked       
    40     //TODO: disable refresh button if not set
     38    //set an action like a webservice call to retrieve the users which should be marked as checked           
    4139    public Func<List<Guid>> FetchSelectedUsers { get; set; }
    4240    private List<Guid> selectedUsers;
     
    6462        checkedUsers.SetItemCheckedState(idx, selectedUsers.Contains(u.Id));
    6563      });
    66       lightweightUserView.Content = checkedUsers;
     64      lightweightUserView.Content = checkedUsers.AsReadOnly();
     65    }
     66
     67    protected override void SetEnabledStateOfControls() {
     68      base.SetEnabledStateOfControls();
     69      refreshButton.Enabled = FetchSelectedUsers != null;
    6770    }
    6871
    6972    public ICheckedItemList<LightweightUser> GetCheckedUsers() {
    70       if (lightweightUserView.Content == null)
    71         return null;
    72       else
    73         return lightweightUserView.Content;
     73      return (lightweightUserView.Content == null) ? null : lightweightUserView.Content;
    7474    }
    7575
Note: See TracChangeset for help on using the changeset viewer.