Пример #1
0
 public void ExecuteLoadSelected()
 {
     if (null != this._lastSelectedItem)
     {
         InformationUtils.ShowComfirInformation(new TextObject("{=tips_cr_ConfirmLoad}Confirm to load"), null, () => {
             String propertiesString       = this._lastSelectedItem.GetFacGenRecordData().BodyPropertiesString;
             BodyProperties bodyProperties = BodyProperties.Default;
             BodyProperties.FromString(propertiesString, out bodyProperties);
             this._generatorView.DataSource.SetBodyProperties(bodyProperties, !TaleWorlds.Core.FaceGen.ShowDebugValues, -1, true);
             this._generatorView.DataSource.SelectedGender = this._lastSelectedItem.GetFacGenRecordData().IsFemale ? 1 : 0;
         });
     }
 }
Пример #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");
         });
     }
 }
Пример #3
0
 //这是一个点击事件,
 public void ExecuteLoadSelected()
 {
     if (null != this._lastSelectedItem)
     {
         TextObject messageObject = new TextObject("", null);
         //title ,message, 确认按钮,取消按钮
         InformationUtils.ShowComfirInformation(new TextObject("{=tips_cr_ConfirmLoad}Confirm to load"), messageObject, () => {
             HeroAdminCharacter data = this._lastSelectedItem.GetItemData();
             data           = JsonUtils.DeepCopyByJson(data);//拷贝
             String title   = new TextObject("{=tips_cr_IncloudBody}Does it contain physical characteristics", null).ToString();
             String message = new TextObject("", null).ToString();
             InformationManager.ShowInquiry(new InquiryData(title, message, true, true, new TextObject("{=tips_cr_Yes}Yes", null).ToString(), new TextObject("{=tips_cr_No}No", null).ToString(), () => {
                 //是的话
                 this._onToLoadHeroCharacter(data, true);
             }, () => {
                 // 否的话
                 this._onToLoadHeroCharacter(data, false);
             }));
         });
     }
 }