/// <summary> /// 创建流程表单窗口 /// </summary> /// <param name="p_info">流程表单描述信息</param> /// <returns></returns> public static async Task <WfFormWin> CreateFormWin(WfFormInfo p_info) { await p_info.Init(); var win = new WfFormWin(p_info); p_info.FormWin = win; return(win); }
public override bool Equals(object obj) { if (obj == null || !(obj is WfFormInfo)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } // 只比较标识,识别窗口用 WfFormInfo info = (WfFormInfo)obj; return(info._itemID == _itemID && info._prcID == _prcID); }
/// <summary> /// 打开流程表单窗口(创建、编辑或浏览表单) /// </summary> /// <param name="p_info">流程表单描述信息</param> public static async void OpenFormWin(WfFormInfo p_info) { Throw.IfNull(p_info, "流程表单描述信息不可为空!"); if (!Kit.IsPhoneUI) { // 因p_info.Init耗时,先激活已打开的窗口,Kit.OpenWin中也有判断 foreach (var win in Desktop.Inst.Items) { if (win.GetType() == typeof(WfFormWin) && win.Params != null && win.Params.Equals(p_info)) { Desktop.Inst.ActiveWin(win); return; } } } await p_info.Init(); p_info.FormWin = (WfFormWin)Kit.OpenWin(typeof(WfFormWin), p_info.PrcInst.Name, Icons.None, p_info); }