private void btnSave_Click(object sender, RoutedEventArgs e) { //SignDomainContext sds = new SignDomainContext(); // 创建一个WriteableBitmap并且把需要呈现位图的元素赋值给WriteableBitmap WriteableBitmap wb = new WriteableBitmap(inkC, null); // 创建一个Image元素来承载位图 System.Windows.Controls.Image image = new System.Windows.Controls.Image(); image.Height = App.H; image.Width = App.W; image.Margin = new Thickness(5); image.Source = wb; thumbs.Children.Add(image); ScreenshotViewer.ScrollToHorizontalOffset(ScreenshotViewer.ExtentWidth); //this.LayoutRoot.Children.Clear(); //this.LayoutRoot.Children.Add(new TextBlock() { Text ="我是最新的"}); BPPaint.FF.CCFormSoapClient da = Glo.GetCCFormSoapClientServiceInstance(); da.SaveImageAsFileAsync(ImageHandle.ImageToByte(image.Source), App.pkval, App.mypk); da.SaveImageAsFileCompleted += new EventHandler <SaveImageAsFileCompletedEventArgs>(da_SaveImageAsFileCompleted); }
/// <summary> /// 设置打开网页窗口的属性 /// </summary> /// <param name="lang">语言</param> /// <param name="dotype">窗口类型</param> /// <param name="fk_flow">工作流ID</param> /// <param name="node1">结点1</param> /// <param name="node2">结点2</param> public static void WinOpenByDoType(string lang, string dotype, string fk_flow, string node1, string node2) { Glo.DoTypeNow = dotype; string url = ""; switch (Glo.DoTypeNow) { case UrlFlag.StaDef: url = "/WF/Admin/XAP/DoPort.aspx?DoType=StaDef&PK=" + node1 + "&Lang=CH"; Glo.OpenDialog(Glo.BPMHost + url, "执行", 500, 400); return; case UrlFlag.FrmLib: url = "/WF/Admin/XAP/DoPort.aspx?DoType=FrmLib&FK_Flow=" + fk_flow + "&FK_Node=0&Lang=CH"; Glo.WinOpen(Glo.BPMHost + url, "执行", 800, 760); return; case UrlFlag.FlowFrms: url = "/WF/Admin/XAP/DoPort.aspx?DoType=FlowFrms&FK_Flow=" + fk_flow + "&FK_Node=" + node1 + "&Lang=CH"; Glo.WinOpen(Glo.BPMHost + url, "执行", 800, 760); return; case UrlFlag.NodeP: url = "/WF/Admin/XAP/DoPort.aspx?DoType=En&EnName=BP.WF.Node&PK=" + node1 + "&Lang=CH"; Glo.OpenDialog(Glo.BPMHost + url, "执行", 600, 500); return; case UrlFlag.FlowP: // 节点属性与流程属性。 url = "/WF/Admin/XAP/DoPort.aspx?DoType=En&EnName=BP.WF.Flow&PK=" + fk_flow + "&Lang=CH"; Glo.OpenDialog(Glo.BPMHost + url, "执行", 500, 400); return; case UrlFlag.MapDefFixModel: // 节点表单设计。 url = "/WF/Admin/XAP/DoPort.aspx?DoType=MapDefFixModel&FK_MapData=ND" + node1 + "&FK_Node=" + node1 + "&Lang=CH&FK_Flow=" + fk_flow; Glo.OpenWindowOrDialog(Glo.BPMHost + url, "节点表单设计", "Height:600px;Width:800px;", WindowModelEnum.Window); return; case UrlFlag.MapDefFreeModel: // 节点表单设计。 url = "/WF/Admin/XAP/DoPort.aspx?DoType=MapDefFreeModel&FK_MapData=ND" + node1 + "&FK_Node=" + node1 + "&Lang=CH&FK_Flow=" + fk_flow; Glo.OpenWindowOrDialog(Glo.BPMHost + url, "节点表单设计", "Height:600px;Width:800px;", WindowModelEnum.Window); return; case UrlFlag.FormFixModel: // 节点表单设计。 url = "/WF/Admin/XAP/DoPort.aspx?DoType=MapDefFixModel&FK_MapData=" + fk_flow; Glo.OpenWindowOrDialog(Glo.BPMHost + url, "节点表单设计", "Height:600px;Width:800px;", WindowModelEnum.Window); return; case UrlFlag.FormFreeModel: // 节点表单设计。 url = "/WF/Admin/XAP/DoPort.aspx?DoType=MapDefFreeModel&FK_MapData=" + fk_flow; Glo.OpenWindowOrDialog(Glo.BPMHost + url, "节点表单设计", "Height:600px;Width:800px;", WindowModelEnum.Window); return; case UrlFlag.Dir: // 方向条件。 url = "/WF/Admin/Cond.aspx?FK_Flow=" + fk_flow + "&FK_MainNode=" + node1 + "&FK_Node=" + node1 + "&ToNodeID=" + node2 + "&CondType=2&Lang=CH"; Glo.OpenDialog(Glo.BPMHost + url, "方向条件", 550, 500); return; case "RunFlow": // 运行流程。 url = "/WF/Admin/TestFlow.aspx?FK_Flow=" + fk_flow + "&Lang=CH"; Glo.WinOpen(Glo.BPMHost + url, "运行流程", 850, 990); return; case "FlowCheck": // 流程设计。 url = "/WF/Admin/DoType.aspx?RefNo=" + fk_flow + "&DoType=" + dotype + "&Lang=CH"; Glo.WinOpen(Glo.BPMHost + url, "运行流程", 850, 990); return; case "LoginPage": // 流程设计。 url = @"/WF/Login.aspx?Lang=CH"; Glo.WinOpen(Glo.BPMHost + url, "运行流程", 850, 990); return; case "WFRpt": // 流程设计。 url = "/WF/Admin/XAP/DoPort.aspx?RefNo=" + fk_flow + "&DoType=" + dotype + "&Lang=CH&PK=" + fk_flow; Glo.WinOpen(Glo.BPMHost + url, "运行流程", 850, 990); return; default: MessageBox.Show("没有判断的url执行标记:" + dotype); return; } Glo.WinOpen(Glo.BPMHost + "/WF/Admin/XAP/DoType=" + dotype + "&FK_Flow=" + fk_flow + "&FK_Node1=" + node1 + "&Lang=CH", "节点表单设计", 850, 990); return; }
private void Menu_ItemSelected(object sender, MenuEventArgs e) { if (e.Tag == null) { return; } switch (e.Tag.ToString()) { case "MenuDisplayHideGrid": //显示/隐藏网格 if (_container.GridLinesContainer.Children.Count > 0) { _container.GridLinesContainer.Children.Clear(); } else { _container.SetGridLines(); } break; case "menuExp": // 导出/共享:流程模板 BP.Frm.FrmExp exp = new BP.Frm.FrmExp(); exp.Show(); break; case "menuImp": // 导入/查找:流程模板 BP.Frm.FrmImp imp = new BP.Frm.FrmImp(); imp.Show(); break; case "Help": Glo.WinOpen("http://ccflow.org/Help.aspx?wd=设计器", "帮助", 900, 1200); break; case "menuModifyName": showFlowNodeSetting(); break; case "menuDeleteNode": deleteFlowNode(); break; case "menuDesignNodeFixModel": Glo.WinOpenByDoType("CH", "MapDefFixModel", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuDesignNodeFreeModel": Glo.WinOpenByDoType("CH", "MapDefFreeModel", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuDesignFlowFrm": // 表单库 Glo.WinOpenByDoType("CH", "FrmLib", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuDesignBindFlowFrm": //流程表单 Glo.WinOpenByDoType("CH", "FlowFrms", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuJobStation": // 节点工作岗位。 Glo.WinOpenByDoType("CH", "StaDef", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuNodeProperty": Glo.WinOpenByDoType("CH", "NodeP", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuFlowProperty": Glo.WinOpenByDoType("CH", "FlowP", _container.FlowID, RelatedFlowNode.NodeID, null); break; case "menuNodeTypePT": RelatedFlowNode.HisRunModel = FlowNodeType.Ordinary; break; case "menuNodeTypeFL": RelatedFlowNode.HisRunModel = FlowNodeType.FL; break; case "menuNodeTypeHL": RelatedFlowNode.HisRunModel = FlowNodeType.HL; break; case "menuNodeTypeFHL": RelatedFlowNode.HisRunModel = FlowNodeType.FHL; break; case "menuNodeTypeZLC": RelatedFlowNode.HisRunModel = FlowNodeType.SubThread; break; } MuContentMenu.Hide(); }