workflow1.cs
来自「.NET工作流实例,适合刚接确工作流人员参考的例子.」· CS 代码 · 共 98 行
CS
98 行
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
namespace WorkflowConsoleApplication2
{
public sealed partial class Workflow1: SequentialWorkflowActivity
{
public Workflow1()
{
InitializeComponent();
}
public static DependencyProperty EProperty = DependencyProperty.Register("E", typeof(WorkflowConsoleApplication2.NextStepEventArgs), typeof(WorkflowConsoleApplication2.Workflow1));
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[BrowsableAttribute(true)]
[CategoryAttribute("Parameters")]
public NextStepEventArgs E
{
get
{
return ((WorkflowConsoleApplication2.NextStepEventArgs)(base.GetValue(WorkflowConsoleApplication2.Workflow1.EProperty)));
}
set
{
base.SetValue(WorkflowConsoleApplication2.Workflow1.EProperty, value);
}
}
public static DependencyProperty DFProperty = DependencyProperty.Register("DF", typeof(WorkflowConsoleApplication2.dataform), typeof(WorkflowConsoleApplication2.Workflow1));
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[BrowsableAttribute(true)]
[CategoryAttribute("Parameters")]
public dataform DF
{
get
{
return ((WorkflowConsoleApplication2.dataform)(base.GetValue(WorkflowConsoleApplication2.Workflow1.DFProperty)));
}
set
{
base.SetValue(WorkflowConsoleApplication2.Workflow1.DFProperty, value);
}
}
private void callExternalMethodActivity1_MethodInvoking(object sender, EventArgs e)
{
DF.guid = this.WorkflowInstanceId.ToString();
DF.state = 1;
}
private void callExternalMethodActivity2_MethodInvoking(object sender, EventArgs e)
{
DF.state = 2;
DF.result = "超时否决";
}
private void callExternalMethodActivity3_MethodInvoking(object sender, EventArgs e)
{
DF.state = 2;
DF.result = E.result;
}
private void callExternalMethodActivity4_MethodInvoking(object sender, EventArgs e)
{
DF.state = 3;
System.Console.WriteLine("ok");
}
private void handleExternalEventActivity1_Invoked(object sender, ExternalDataEventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?