构建应用程序服务以获得计算机温度,风扇速度等。 [英] Build application service to get computer temperatures, fan speeds, etc.

查看:85
本文介绍了构建应用程序服务以获得计算机温度,风扇速度等。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了这个:

计算机温度,风扇速度等 [ ^ ]



我想构建同样的应用程序但作为服务。请问你能帮帮我吗! (使用Visual Studio 2015 C#)。



我尝试过:



我想建立这个相同的应用程序,但作为一项服务。请问你能帮帮我吗! (使用Visual Studio 2015 C#)。

I've found this :
Computer Temperatures, Fan Speeds, etc.[^]

And I want to build this same app but as a service. Could you help me please! (With Visual Studio 2015 C#).

What I have tried:

And I want to build this same app but as a service. Could you help me please! (With Visual Studio 2015 C#).

推荐答案

上周你在C#论坛发布了这个:使用C#的应用程序服务。 - C#讨论区 [ ^ ]



然后,你被告知服务不能有用户界面,所以不管怎样它都不可能工作,但是我们还需要更多有关您希望服务的确切信息(以及应用程序当前的功能)的信息,以便进一步帮助您。



这些都没有改变......
You posted this in the C# forum last week: Application service with C#. - C# Discussion Boards[^]

Then, you were told that Services can't have a UI so it's unlikely to work anyway, but that we would need a lot more information on exactly what you expect the service to do (and thus what the application currently does) in order to help you further.

None of that has changed ...


所以基本上你需要将这个应用程序分成两个独立的应用程序



1.数据收集:这将是服务器,定义为正在监控的机器,它将与单独的应用程序共享该信息,以便在本地或通过网络查看



2.查看应用程序:这将是将提供UI的客户端应用程序。实际上,这可能是在Windows窗体,通用Windows,移动应用程序或Web应用程序中。它的工作是连接到特定机器上的数据收集服务并检索值。



这一切都归结为关注点分离。您需要在原始应用程序中推断出拆分的位置,然后使用任意数量的方法获取该信息。

如何执行此操作将完全取决于 你想做什么。正如你在其他主题中所经历的那样,对你的意图含糊不清将导致你无处可去。



我的建议是写下你想要的一切计划2应用程序能够做到,找出完成此任务需要做什么,然后询问有关遇到的问题的SPECIFIC问题。
So basically you need to split this application into two separate applications

1. Data collection: this would be on the "server", defined as the machine that is being monitored which will be sharing that information with a separate application for viewing, either locally or over a network

2. Viewing Application: this would be the client application which will provide the UI. In all reality this could be in Windows Forms, Universal Windows, Mobile application, or a web application. It's job is to connect to the Data Collection Service on a particular machine and retrieve the values.

This all comes down to Separation of Concerns. You will need to deduce where to make the split in the original application, and then take make that information available using any number of methods.
How you do it is going to be dependent upon exactly what you want to do. As you have experienced in your other threads, being vague with your intentions will lead you nowhere.

My recommendation would be to write up a plan on everything you want these 2 applications to be able to do, figure out what needs to be done to accomplish this, and then ask SPECIFIC questions on the problems you encounter.


这篇关于构建应用程序服务以获得计算机温度,风扇速度等。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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