/// <summary> /// 暂存表单数据 /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SaveForm(object sender, PowerThreadNodeSaveFormEventArgs args) { PowerThreadForm form = (PowerThreadForm)sender; var formData = args.Entity; PersistData(context, form, formData); }
/// <summary> /// 注册默认表单 /// </summary> /// <param name="form"></param> public void RegisterDefaultForm(PowerThreadForm form) { this.DefaultForm = form; this.DefaultForm.GoNext += this.GoNext; this.DefaultForm.LoadForm += this.LoadForm; this.DefaultForm.SaveForm += this.SaveForm; //this.DefaultForm.Terminate += this.Terminate; //this.DefaultForm.SetVariable += this.SetContextVariable; //this.DefaultForm.GetVariable += this.GetContextVariable; }
private void LoadFormData( PowerThreadContext context , PowerThreadForm form ) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (form == null) { throw new ArgumentNullException(nameof(form)); } var json = string.Format("{{Content:\"my content of {0}\"}}", form.Name); form.BindingViewModel.Data = JsonConvert.DeserializeObject <ExpandoObject>(json); }
private void PersistData( PowerThreadContext context , PowerThreadForm form , PowerThreadEntity formData) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (form == null) { throw new ArgumentNullException(nameof(form)); } if (formData == null) { throw new ArgumentNullException(nameof(formData)); } throw new NotImplementedException(); }
/// <summary> /// 加载当前节点信息, 并显示Form / View 相关内容 /// </summary> /// <param name="sender"></param> /// <param name=""></param> private void LoadForm(object sender, PowerThreadNodeLoadEventArgs args) { PowerThreadForm form = (PowerThreadForm)sender; LoadFormData(context, form); }