zoukankan      html  css  js  c++  java
  • 工作流入门(流程图-控制台应用程序)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities;

    namespace WorkflowConsoleApplication3

    {

        public sealed class InputDataActivity : CodeActivity  

       {    

         // 定义一个字符串类型的活动输入参数      

       public OutArgument<int> Money { get; set; }

            // 如果活动返回值,则从 CodeActivity<TResult>    

         // 派生并从 Execute 方法返回该值。  

           protected override void Execute(CodeActivityContext context)   

          {         

        string money = Console.ReadLine();      

           int mnoy = 0;         

        try   

              {       

              mnoy = int.Parse(money);        

         }         

        catch (Exception)      

           {

                    Console.WriteLine("你输入的不是整数");     

            }             context.SetValue(Money, mnoy);      

           // 获取 Text 输入参数的运行时值          

      // string text = context.GetValue(this.Text);     

        }

        }

    ------------------------------------------------------------------------------

    -------------------------------------------------------------------------------------------

    using System; using System.Linq; using System.Activities; using System.Activities.Statements;

    namespace WorkflowConsoleApplication3

    {

        class Program  

       {   

          static void Main(string[] args)   

          {      

           Activity workflow1 = new Workflow1();     

            WorkflowInvoker.Invoke(workflow1);        

         Console.ReadKey();   

          }    

    }

    }

    }

  • 相关阅读:
    uva 12426 Counting Triangles 计算几何
    poj 1195 Mobile phones 二维树状数组
    poj 1039 Pipe 计算几何
    poj 3580 SuperMemo 数据结构
    poj 1031 Fence 计算几何
    ArcEngine 无法嵌入互操作类型
    IDL 读取显示HDF文件
    Sql Server 2005 Com+ 警告处理办法
    C# 自定义控件开发
    ArcEngine 获取HDF文件中的子文件
  • 原文地址:https://www.cnblogs.com/kexb/p/3655748.html
Copyright © 2011-2022 走看看