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

          }    

    }

    }

    }

  • 相关阅读:
    六:Vue之父子组件间的三种通信方式
    五:Vue之ElementUI 表格Table与分页Pagination组件化
    四:Vue之VUEX状态管理
    三:Vue之混入(mixin)与全局混入
    二:Vue之ElementUI Form表单校验
    一:Vue之开发环境搭建
    变了,说不出来的感觉。
    20180320作业2:进行代码复审训练
    20180320作业1:源代码管理工具调查
    15软工课后作业02-15100120
  • 原文地址:https://www.cnblogs.com/kexb/p/3655748.html
Copyright © 2011-2022 走看看