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

          }    

    }

    }

    }

  • 相关阅读:
    接口和抽象类
    JNI
    Serializable Parcelable
    android keystore 生成以及作用
    svn 服务器搭建
    java 8种基本数据类型
    Android NDK
    android adb命令行
    对称加密AES和DES加密、解密
    .net中的数据库连接字符串
  • 原文地址:https://www.cnblogs.com/kexb/p/3655748.html
Copyright © 2011-2022 走看看