private string CreateSilverlightObject() { var xapPath = WfRuntimeViewerSettings.GetConfig().XapUrl; string result = Assembly.GetExecutingAssembly().LoadStringFromResource(@"MCS.Web.WebControls.Workflow.WfRuntimeViewer.SilverlightObjectResource.htm"); result = result.Replace("{OBJECTID}", this.SilverlightControlClientID); result = result.Replace("{OBJECTPATH}", xapPath); result = result.Replace("{INITPARAMS}", this.ClientID); return(result); }
protected void Page_Load(object sender, EventArgs e) { this.xapPath.Attributes["value"] = WfRuntimeViewerSettings.GetConfig().DesignerXapUrl; this.enableSimulation.Text = "<param name=\"InitParams\" value=\"enableSimulation=" + WfSimulationSettings.GetConfig().Enabled.ToString() + "\" />"; PropertyEditorRegister(); InitializeTemplate(); //InitializeEnumStore(); if (Request["processid"].IsNotEmpty()) { InitInstanceDescription(Request["processid"]); } else if (Request["processDescKey"].IsNotEmpty()) { InitInstanceByProcessDescKey(Request["processDescKey"]); } }
private void ShowAdvancedOperation(Control container) { if (this.CurrentProcess == null) { return; } this.advancedOpWrapperControl = CreateAdvancedOpWrapperControl(container, "相关操作↓", "advancedOpWrapper"); var span = new HtmlGenericControl("span"); span.Attributes["class"] = "wfrtvwc-container"; this.advancedOpWrapperControl.Controls.AddAt(0, span); var ul = new HtmlGenericControl("ul"); ul.Attributes["class"] = "wfrtvwc-wrapper"; span.Controls.Add(ul); AddAdvancedOpLink(ul, "编辑流程模板", "#", string.Format("$find('{0}').openDesigner('{1}'); return false;", this.ClientID, WfRuntimeViewerSettings.GetConfig().DesignerUrl)); //AddAdvancedOpLink(ul, "作废", "#", // string.Format("$find('{0}').abortCurrentProcess(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "作废", "#", "abortProcess", "确定要作废或取消流程吗?", "正在作废...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(AbortProcessButton_Click)); //AddAdvancedOpLink(ul, "还原", "#", // string.Format("$find('{0}').restoreCurrentProcess(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "还原", "#", "restoreProcess", "确定要还原作废(取消)的流程吗?", "正在还原...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(RestoreProcessButton_Click)); //AddAdvancedOpLink(ul, "暂停", "#", // string.Format("$find('{0}').pauseCurrentProcess(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "暂停", "#", "pauseProcess", "确定要暂停流程吗?", "正在暂停...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(PauseProcessButton_Click)); //AddAdvancedOpLink(ul, "恢复", "#", // string.Format("$find('{0}').resumeCurrentProcess(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "恢复", "#", "resumeProcess", "确定要恢复暂停的流程吗?", "正在恢复...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(ResumeProcessButton_Click)); //WithdrawProcessButton_Click //AddAdvancedOpLink(ul, "撤回", "#", // string.Format("$find('{0}').withdrawCurrentProcess(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "撤回", "#", "withdrawProcess", "确认要撤回吗?", "正在撤回...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(WithdrawProcessButton_Click)); //AddAdvancedOpLink(ul, "退出维护模式", "#", // string.Format("$find('{0}').exitCurrentProcessMaintainingStatus(); return false;", this.ClientID)); AddAdvancedOpLinkWithSubmitButton(ul, "退出维护模式", "#", "exitCurrentProcessMaintainingStatus", "确认要退出维护状态吗?", "正在执行...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(ExitCurrentProcessMaintainingStatus_Click)); AddAdvancedOpLinkWithSubmitButton(ul, "异步作废", "#", "asyncCancelProcess", "确认要异步作废流程吗?", "正在执行...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(AsyncCancelProcess_Click)); AddAdvancedOpLinkWithSubmitButton(ul, "异步撤回", "#", "asyncWithdrawProcess", "确认要异步撤回流程吗?", "正在执行...", WfActionAfterOperation.RefreshCurrent | WfActionAfterOperation.RefreshOpener, new EventHandler(AsyncWithdrawProcess_Click)); HtmlAnchor modifyAssigneeLink = AddAdvancedOpLink(ul, "修改活动操作人", "#", string.Empty, "在图中选择需要修改的流程活动点,然后点击此链接进行修改"); Control userSelector = this.FindControlByID("userSelector", true); modifyAssigneeLink.Attributes["onclick"] = string.Format("$find('{0}').onChangeAssigneeClick('{1}');", this.ClientID, userSelector.ClientID); AddAdvancedOpLink(ul, "处理等待中的活动", "#", string.Format("$find('{0}').onChangePendingActivity(); return false;", this.ClientID)); }