コード例 #1
0
 private void BrowserLib_Click(object sender, System.EventArgs e)
 {
     System.Action<PeopleProfile> action = null;
     if (this.peopleChooserHandler == null)
     {
         this.peopleChooserHandler = new PageActionHandler<PeopleProfile>();
         this.peopleChooserHandler.GetItems = () => ViewModelLocator.PeopleViewModel.AccountBookDataContext.Peoples.AsEnumerable<PeopleProfile>();
         if (action == null)
         {
             action = delegate(PeopleProfile result)
             {
                 PeopleAssociationData item = new PeopleAssociationData
                 {
                     PeopleInfo = result,
                     AttachedId = this.CurrentAttachedObjectId
                 };
                 this.Peoples.Add(item);
                 PeopleSelectorHandler.OnAfterAdd(item);
             };
         }
         PeopleImporter.ResultGetter = action;
     }
     PeopleImporter.Go(this.peopleChooserHandler, this);
 }
コード例 #2
0
 private void detach_People(PeopleAssociationData peopleAssocidated)
 {
     this.OnNotifyPropertyChanging("AccountItem");
     peopleAssocidated.AccountItem = null;
 }
コード例 #3
0
        /// <summary>
        /// Adds the picture.
        /// </summary>
        /// <param name="pic">The pic.</param>
        public void AddPeople(PeopleAssociationData personInfo)
        {
            if (this.PeoplesOutOfDatabase == null)
            {
                this.PeoplesOutOfDatabase = new List<PeopleAssociationData>();
            }

            if (this.PeoplesOutOfDatabase != null)
            {
                this.PeoplesOutOfDatabase.Add(personInfo);
                OnNotifyPropertyChanged(PeopleTotalInfoForEditProperty);
            }
        }
コード例 #4
0
 public void RemovePeople(PeopleAssociationData people)
 {
     if (this.PeoplesOutOfDatabase != null)
     {
         this.PeoplesOutOfDatabase.Remove(people);
         OnNotifyPropertyChanged(PeopleTotalInfoForEditProperty);
     }
 }