大家好,C#应用程序需要帮助 [英] Hey guys C# application help needed

查看:72
本文介绍了大家好,C#应用程序需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,新手.在我第一次接受毕业生面试之后,我已经完成了本周要完成的一项小任务.他们正在寻找谁在这个阶段的业余时间完成我认为最好的任务.我只是想看看在执行此任务时是否应该考虑任何方法或因素.任何帮助和建议,将不胜感激.

谢谢大家.

哦,这是简短的内容:
概述

我们创建动态数字标牌内容的大部分工作都需要将数据与图形结合在一起.获取数据并进行处理是此角色更复杂的日常活动的核心.



我们在寻找什么

我们想看看我们的候选人如何解决这个问题,他们的代码构造得如何优雅以及它的健壮性.候选人可以使用其首选的语言/平台,但理想情况下,它将是Web应用程序或Windows exe.



我们希望看到源代码以及已编译/托管的应用程序.



简介

您的应用程序应:



每5分钟从互联网上检索美元对英镑的当前价值(Google和其他来源提供了此类数据)

向用户显示数据的当前值

使用样式或文本显示自上次检索以来该值的变化方式

在日志中记录值的历史活动

在日志中记录应用程序的活动

Hi guys newbie here. Ive been given a small task to complete this week following my first graduate job interview. They''re looking to see who completes the best task I think in our spare time at this stage. Im just looking to see if there are any approaches or factors i should consider in approaching this task. Any help and recommendations would be appreciated.

Thanks guys.

Oh here''s the brief:
Overview

Most of our work in creating dynamic digital signage content requires data to be combined with graphics. Getting the data and processing it are the core of the more complex day to day activities of this role.



What we’re looking for

We want to see how our candidates approach the problem, how elegantly their code is constructed and how robust it is. Candidates can use their preferred language/platform, but ideally it will either be a web application or a windows exe.



We want to see the source code, as well as the compiled/hosted applications.



The brief

Your application should:



Retrieve every 5 minutes the current value of US dollars to UK pounds from the Internet (Google and other sources provides such data)

Display the current value of the data to the user

Show, using style or text, how that value has changed since the last retrieval

Record the value’s historical activity in a log

Record the application’s activity in a log

推荐答案

看看以下内容:
道琼斯工业平均指数 [ http://www.flashapi.org/ [ http://away3d.com/ [ ^ ]

我相信您会发现一些灵感的:)

最好的问候
Espen Harlinn
Take a look at this:
Dow Jones Industrial Average[^]

DJI has a lot of data, play around with the chart, add another ticker, etc.

Take a look at http://www.flashapi.org/[^]

and

http://away3d.com/[^]

I''m sure you''ll find a bit of inspiration :)

Best regards
Espen Harlinn


我也不想提供太多帮助,因为这些访谈的目的是表明您可以可以做什么,而不是其他人可以做什么可以做. :尽管如此,在CP上问一些聪明的问题还是一个好的开始.我将简要概述如何实现此目标.

1.首先找到一个数据源.有各种各样的交易API提供程序,但是如果您只需要5分钟的数据并且不介意数据被延迟,则有许多免费资源.如果要使用.Net桌面应用程序(WCF很好,REST或我目前不记得其名称的旧版本),请寻找一种可以将数据作为Web服务提供的数据,可以从VS绑定到该Web服务. (使用SOAP作为传输协议也是可以的),因此您可以自动生成客户端内容,而不必解析服务器响应.

2.将价格存储在业务层中.好的,他们只问您一个价格,但是在现实世界中,此应用几乎可以肯定会订阅多个价格,因此我将违反极限编程的您不会要"的原则并进行准备为此.对于您的问题,此层很简单:
I don''t want to give too much help either as the idea of these interviews is to show what you can do, not what other people can do. Asking intelligent questions on CP is a good start though :P. I''ll give a very brief overview of how I''d approach this.

1. First find a data source. There are various trading API providers but if you just want 5 minute data and don''t mind it being delayed, there are many free sources. Look for one which provides the data as a web service you can bind to from VS, if you''re going for a .Net desktop app (WCF is good, REST or the older version which I can''t currently remember the name of which uses SOAP as the transfer protocol is also fine), so you can auto-generate the client side stuff and not have to parse up a server response.

2. Store the prices in a business layer. Okay, they only asked you for one price, but in the real world this app would almost certainly subscribe to multiple prices so I''m going to violate the Extreme Programming ''You Ain''t Gonna Need It'' principle and prepare for that now. For your problem this layer is trivial:
class PriceModel {
 decimal USDGBP;
}


...但是您可以使其实现INotifyPropertyChanged,因此具有可绑定性.您的Web服务客户端应分配给此属性,设置程序应在发生这种情况时通知UI. (同样,对于这种琐碎的情况,这并不是真正必要的,但是我总是以我打算继续的方式开始.)

3. UI应该具有一个绑定到该字段的字段.可以使用实际的数据绑定,也可以使用设置UI字段的notify事件处理程序.

4.在某个地方,您需要存储以前的值,以便可以进行与更改有关的更新.对于像这样的琐碎情况,您可能可以将UI字段本身用作缓存(因为更改显示是与UI相关的事情,我对此不太在意).

5.对于日志记录,将记录器绑定到业务层的通知事件.我不确定应用程序活动"是什么意思,但是记录器也应该在您要记录内容的其他地方可用.

希望您能诚实地寻求帮助;). (嘿,如果我要设置这些问题,我认为此答案应该在没有实际为您解决问题的情况下应该有所帮助.


... but you could make it implement INotifyPropertyChanged and therefore be bindable. Your web service client should assign to this property, and the setter should notify the UI when that happens. (Again, for such a trivial case this isn''t really necessary but I always start as I mean to continue.)

3. The UI should have a field which is bound to that. Either with actual data binding or a notify event handler which sets the UI field.

4. Somewhere, you need to store the previous value, so you can do change related updates. For a trivial case like this you can probably use the UI field itself as the cache (as change display is a UI related thing I don''t mind this too much).

5. For logging, bind a logger to the notification event of the business layer. I''m not sure what ''application activity'' means but the logger should also be available in other places where you want to log stuff.

I hope you are honest about asking for help if it is asked ;). (Heh, if I were setting these questions I think this answer is at the level where it should be helpful without actually doing the problem for you.


下面的链接可能会对您有所帮助

http: //www.eggheadcafe.com/community/aspnet/2/10087566/get-the-currency-value-from-a-website-to-my-local-database.aspx [
Below link might help you

http://www.eggheadcafe.com/community/aspnet/2/10087566/get-the-currency-value-from-a-website-to-my-local-database.aspx[^]


这篇关于大家好,C#应用程序需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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