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();   

          }    

    }

    }

    }

  • 相关阅读:
    jsp获取一个对象和list对象
    request属性 request.getAttribute()
    Ajax注册表单用户名实时验证
    codeigniter 操作mysql的PHP代码--更新
    linux后台server开发环境的部署配置和验证(nginx+apache+php-fpm+FASTCGI(C/C++))
    Android
    Jquery Jqprint—随着Jquery Jqprint实现网页打印
    SQL于DML(数据库操作语言)采用
    远程数据client交换器
    如何选择项目?
  • 原文地址:https://www.cnblogs.com/kexb/p/3655748.html
Copyright © 2011-2022 走看看