使用Windows工作流和WinForms无法安慰简单的应用程序 [英] Simple app using Windows Workflow and winforms NOT console

查看:151
本文介绍了使用Windows工作流和WinForms无法安慰简单的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个简单的入门应用程序,可以让你在一个价值1型 - 10这个值传递给WF规则,评估是否大于,小于或等于5,并将结果返回到Windows窗体应用程序,它在标签中显示结果。

I'm looking for a simple starter app that allows you to type in a value 1 - 10 this value is passed to a WF rule that evaluates if it is greater, less than or equal to 5 and returns the results to the windows forms app which displays the results in a label.

我可以找到很多的.NET 3.5的控制台应用程序的教程,但没有显示如何传递到和接收回结果使用Windows窗体和.NET 4!

I can find a lot of .net 3.5 console app tutorials but nothing that shows how to pass into and receive the result back using windows forms and .net 4!

它并不需要是上面的例子,但它需要告诉我如何传递一个值到规则,编写规则和规则的范围内使用.NET 4的C#Windows窗体应用程序读取结果。

it doesn't need to be the above example but it needs to show me how to pass a value into the rule, write the rule and read the result from the rule from within a windows forms app in .net 4 c#.

我迷路了!

我的基本code现在工作的情况下,它可以帮助其他人:

My Basic code now working in case it helps others:

var workflow = new Activity1();

        IDictionary<string, object> inputs = new Dictionary<string, object>();
        inputs["firstname"] = textBox1.Text;
        IDictionary<string, object> outputs = WorkflowInvoker.Invoke(workflow, inputs);
        textBox2.Text= outputs["greeting"].ToString();

姓与方向传递到工作流程的参数。 问候与方向的工作流中进行分配的参数。

firstname is an argument with direction in passed to the work flow. greeting is an argument with direction out assigned within the work flow.

推荐答案

//看看这个链接,开始指针

// look at this link for starting pointers

<一个href="http://social.msdn.microsoft.com/Forums/en/windowsworkflowfoundation/thread/f5aefe65-f2b4-4286-b0d9-9bee3b37fba2"相对=nofollow>传递PARAMS到工作流程从WinForms应用程序

这篇关于使用Windows工作流和WinForms无法安慰简单的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆