移动应用程序与winform一起工作C# [英] Mobile app to work along side a winform C#

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

问题描述

您好。



我已经制作了一个Windows窗体应用程序,并且一切正常。

但是我想要做的是让它成为人们有一个移动应用程序(最终制作),这将允许他们远离PC并按下移动应用程序上的按钮,该按钮将向Winform应用程序发送一些形式或命令并使其触发按钮点击活动。





EG



Winform在PC上开放一个按钮就可以播放或暂停音乐。



我去楼下喝酒,我想暂停移动应用中的音乐。



按下移动应用程序上的按钮,它连接到Winform应用程序并触发暂停按钮的事件。





如果有人可以帮我解决这个问题,或者让我朝着正确的方向努力做这样的事情,那会很棒。谢谢。



Ben



我的尝试:



好​​吧,我已经四处看看并且搞砸了移动应用程序试图做以后的事情,但似乎无法做到。

解决方案

我强烈建议您使用ASP.MVC实现REST接口,并让客户端和移动应用程序使用该接口进行通信状态。



例如工具



消息/ POST - 将消息持久保存到数据库

消息/ GET - 检索发送到目的地的消息

Hello.

Ive made a Windows Form Application and all is working fine on that.
but what im trying to do is make it so people have a mobile App(that ill end up making) that will allow them to be away from the PC and push a button on the mobile app that will send someform or command to the Winform Application and get it to trigger a button click event.


E.G

Winform is open on PC has a button on it that will play or pause music.

I go get a drink downstairs and i want to pause the music from the mobile app.

Push the button on the mobile app and it connects to the Winform application and triggers the event for the pause button.


If anyone can help me out with this or put me in the right direction to do somthing like this that would be great. thank you.

Ben

What I have tried:

Well i have looked around and messed about with mobile apps trying to do what im after but cant seem to do it.

解决方案

I would stongly suggest you implement a REST interface using ASP.MVC and have both the client and the mobile application communicate state using the interface.

e.g. implement

Messages/POST - to persist the message to the db
Messages/GET - to retrieve messages sent to your destination


这篇关于移动应用程序与winform一起工作C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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