Esempio n. 1
0
 private IEnumerable<UserLinkData> GenerateUserLinkData()
 {
     var celem = TargetElements;
     foreach (var e in AccountModel.GetAccountElements())
     {
         var uld = new UserLinkData(this, e, celem.Contains(e));
         uld.LinkChanged += new Action<UserLinkData>(uld_LinkChanged);
         yield return uld;
     }
 }
Esempio n. 2
0
 void uld_LinkChanged(UserLinkData obj)
 {
     if (obj.Link)
     {
         TargetElements = TargetElements.Concat(new[] { obj.Element });
     }
     else
     {
         TargetElements = TargetElements.Except(new[] { obj.Element });
     }
 }