Exemplo n.º 1
0
 public void OnSelectedItem(HeroAdminRecordItemVM item)
 {
     if (null != _lastSelectedItem)
     {
         this._lastSelectedItem.IsSelected = false;
     }
     this._lastSelectedItem = item;
     base.OnPropertyChanged("HasSelectedItem");
 }
Exemplo n.º 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._genRecordItemVMs.Remove(this._lastSelectedItem);
                    this._data.Remove(this._lastSelectedItem.GetItemData());
                    GlobalConfigData.Instance.SaveHeroAdminData();
                    base.OnPropertyChanged("RecordItems");
                    base.OnPropertyChanged("HasSelectedItem");
                    this._lastSelectedItem = null;
                });
            }
        }
Exemplo n.º 3
0
        public void OnEnterNameAfter(string saveName)
        {
            HeroAdminCharacter data = this._editHero;

            data.SaveName = saveName;
            this._data.Insert(0, data);
            this._genRecordItemVMs.Insert(0, new HeroAdminRecordItemVM(data, OnSelectedItem));
            base.OnPropertyChanged("RecordItems");
            if (null != this._lastSelectedItem)
            {
                this._lastSelectedItem.IsSelected = false;
                this._lastSelectedItem            = null;
            }

            GlobalConfigData.Instance.SaveHeroAdminData();
            base.OnPropertyChanged("HasSelectedItem");
        }