控制台应用程序上的表单 [英] form at a console application

查看:62
本文介绍了控制台应用程序上的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我最近开始用C#编码,所以我不是那么精通.我创建了一个控制台应用程序,其功能类似于订单簿.买卖获得饲料.

Hi. I have recently started coded in C# so I'm not that proficient. I created a console app that works like an order book. Buys and sells gets feed in.

我进行订单匹配,并具有两个Order的ListArrays:BuyCol和SellCol(长度不相等)

I do the order matching and have 2 ListArrays of Order : BuyCol and SellCol (unequal lengths)

我希望做的是在控制台应用程序中创建一个表单,该表单创建一个表,在该表中输出BuyColl和SellColl,如下所示:

What I wish to do is to create a form that at console app that creates a table where BuyColl and SellColl are outputted like:

              b&b ;     购买             b               nbsp; bsp     出售

                               Buy                                                       Sell

ordertime       股票代号数量    价格      价格   数量.....

ordertime         Ticker    quantity        Price          Price        quantity       .....

时间戳记" MSFT        100           28           28.3        200             ...

'Time stamp'    MSFT         100             28            28.3         200              ...

              b&b ;                    nbsp; bsp                28.4        150       ....

                                                                         28.4         150              ....

以此类推

我添加了

            Form Output = new Form();           

Output.Show();

Output.Show();

但是我不确定如何编辑此表单,因为我看不到设计或不知道应该使用什么命令.表单在调试过程中弹出并消失.正如我说的那样,我真的是C#的新手,所以我们将不胜感激.

but I'm not sure how I can edit this form as I can't see the design or don't know what commands I should use. Form pops up and disappears during debug. As I said I'm really new to C# so any help would be appreciated.

推荐答案

您可以在Windows窗体应用程序项目中创建窗体,从而可以使用设计器.然后,您可以将其构建为类库,并在控制台应用程序中引用该项目并使用该表单,也可以选择从Windows复制该表单 窗体项目到控制台项目.

You can create the Form in Windows Forms Application project, that way you can use the designer. Then you can build it as class library and reference the project in you console application and use the form or optionally just copy the form from Windows Forms project to console project.

但是为什么不创建Windows Forms应用程序呢?

But why not just create Windows Forms application?


这篇关于控制台应用程序上的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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