Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/12 21:15:33 (13 years ago)
Author:
ascheibe
Message:

#1648 added CRUD operations for user groups in ui

Location:
branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients/AccessItem.cs

    r7368 r7637  
    6565    }
    6666
     67    public void SetUnmodified() {
     68      Modified = false;
     69    }
     70
    6771    protected AccessItem(AccessItem original, Cloner cloner) {
    6872      cloner.RegisterClonedObject(original, this);
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients/UserGroup.cs

    r7436 r7637  
    2020#endregion
    2121
     22using System;
    2223using System.Drawing;
     24using System.Runtime.Serialization;
    2325using HeuristicLab.Common;
    2426using HeuristicLab.Core;
    2527namespace HeuristicLab.Clients.Access {
    2628  [Item("UserGroup", "A group.")]
    27   public partial class UserGroup {
     29  public partial class UserGroup : IDisposable {
    2830    protected UserGroup(UserGroup original, Cloner cloner)
    2931      : base(original, cloner) {
     
    3537    }
    3638
    37     public UserGroup() { }
     39    public UserGroup() {
     40      this.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(UserGroup_PropertyChanged);
     41    }
     42
     43    [OnDeserialized]
     44    private void RegisterNamePropertyChangedEvent(StreamingContext c) {
     45      this.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(UserGroup_PropertyChanged);
     46    }
     47
     48    void UserGroup_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) {
     49      //this is a workaround as we can't overide the Name property and fire directly
     50      if (e.PropertyName == "Name") {
     51        OnToStringChanged();
     52      }
     53    }
    3854
    3955    public override IDeepCloneable Clone(Cloner cloner) {
     
    4460      return Name;
    4561    }
     62
     63    #region IDisposable Members
     64    public void Dispose() {
     65      this.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(UserGroup_PropertyChanged);
     66    }
     67    #endregion
    4668  }
    4769}
Note: See TracChangeset for help on using the changeset viewer.