将两个App绑定到同一个数据库 [英] Binding two App to the same database

查看:147
本文介绍了将两个App绑定到同一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WPF和数据绑定的新手。我有一个名为Tag(id,name,value)的数据库表,我想将两个应用程序绑定到这个表,第一个有一个(打开/关闭)按钮,它绑定到Tag.value,第二个应用程序有一个具有两个状态(打开和关闭)的灯,它再次绑定到Tag.value。什么是执行此任务的最佳方式和工具,因此当我单击第一个应用程序上的开启按钮时,它将直接更改第二个应用程序的灯状态。感谢高级

I am new to WPF and data binding. I have a database table called Tag(id, name, value), I want to bind two application to this table, the first one has a (turn on/off) button which has binding to Tag.value, the second application has a lamp with two state (on and off) which again has binding to Tag.value. what is the best way and tools to do this task so when I click the turn on button on the first App it will directly change the lamp status at the second App. Thank in Advanced

推荐答案

请参阅我对该问题的评论。这是解决方案之一:使用计时器轮询数据库 [ ^ ]。



-SA
Please see my comments to the question. This is one of the solutions: Polling Database with Timer[^].

—SA


这篇关于将两个App绑定到同一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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