Example #1
0
 public void OnSelectedItem(FacGenRecordItemVM item)
 {
     if (null != _lastSelectedItem)
     {
         this._lastSelectedItem.IsSelected = false;
     }
     this._lastSelectedItem = item;
     base.OnPropertyChanged("HasSelectedItem");
 }
Example #2
0
 public void ExecuteDeleteSelected()
 {
     if (null != this._lastSelectedItem)
     {
         InformationUtils.ShowComfirInformation(new TextObject("{=tips_cr_WarningToDelete}Warning: Confirm to Delete"), new TextObject("{=tips_cr_WarningToDelete2}This operation will delete the data and cannot be undone"), () => {
             this._lastSelectedItem.IsSelected = false;
             this._data.Remove(this._lastSelectedItem.GetFacGenRecordData());
             this._genRecordItemVMs.Remove(this._lastSelectedItem);
             base.OnPropertyChanged("RecordItems");
             this._lastSelectedItem = null;
             base.OnPropertyChanged("HasSelectedItem");
         });
     }
 }
Example #3
0
        public void OnEnterNameAfter(string saveName)
        {
            String           propertiesString = this._generatorView.BodyGen.CurrentBodyProperties.ToString();;
            FacGenRecordData data             = new FacGenRecordData(saveName, propertiesString);

            data.IsFemale = this._generatorView.BodyGen.IsFemale;
            if (this._data.Count >= MaxSaveCount)
            {
                this._data.RemoveAt(this._data.Count - 1);
                this._genRecordItemVMs.RemoveAt(this._data.Count);
            }
            this._data.Insert(0, data);
            this._genRecordItemVMs.Insert(0, new FacGenRecordItemVM(data, OnSelectedItem));
            base.OnPropertyChanged("RecordItems");
            if (null != this._lastSelectedItem)
            {
                this._lastSelectedItem.IsSelected = false;
                this._lastSelectedItem            = null;
            }
            base.OnPropertyChanged("HasSelectedItem");
        }