示例#1
0
        /// <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);
        }
示例#2
0
 /// <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;
 }
示例#3
0
        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);
        }
示例#4
0
        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();
        }
示例#5
0
        /// <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);
        }