问题描述
我们有一个应用程序从文档扫描程序读取条形码等数据,然后将该数据传递给正在运行的应用程序,如Excel电子表格。用户确定数据的格式化方式 - 它可以包含特殊按键(如Escape和Tab),以及固定文本(如名字以及传入数据) - 并且它们选择接收格式化输出的应用程序。使用System.Windows.Forms.SendKeys.SendWait()将格式化的数据简单地粘贴到目标应用程序中。
有没有一种非常巧妙的方法可以让它更灵活,更强大?我想我们可以实现某种数据源(WCF?),客户可以通过一些编码来实现。也许客户希望将我们的数据填充到他们的SQL数据库中。显然我可以编写数据库代码来自己做,但必须有一些自动化框架。
很抱歉啰嗦,并提前感谢您的建议。
我是什么尝试过:
详见上述说明。
We have an application which reads data such as barcodes from a document scanner and then passes that data to a running application such as an Excel spreadsheet. The user determines how the data is formatted - it can contain special key presses such as Escape and Tab, and fixed text such as "First name" as well as the incoming data - and they choose the application that receives the formatted output. The formatted data is simply pasted into the destination application using System.Windows.Forms.SendKeys.SendWait().
Is there a really neat way to make this more flexible and powerful? I'm thinking we could implement some sort of data source (WCF?) which clients could plumb into with a little coding. Maybe customers want to stuff our data into their SQL database. Obviously I could write database code to do that myself, but there must be some automated framework about.
Sorry to ramble a bit, and thanks in advance for suggestions.
What I have tried:
See the above description for details.
推荐答案
这篇关于如何将数据传递到用户选择的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!