将用户输入从一个自定义对话框复制到另一个(Copy user input from one custom dialog to another)

系统教程 行业动态 更新时间:2024-06-14 16:57:18
将用户输入从一个自定义对话框复制到另一个(Copy user input from one custom dialog to another)

我有2个自定义对话框。 它们基本上是彼此的副本。 我们的想法是,在某些情况下,用户将被呈现两个对话框,并且当发生这种情况时,很可能大多数/所有数据都是相同的,但有可能不会全部是相同的,并且用户需要有机会在两个对话框之间具有不同的值。

我想要做的是将第二个对话框中的值默认为第一个对话框的值,或者在第二个对话框中有一个复选值的复选框。 无论哪种方式,我都需要能够设置属性值。 当用户在两个对话框之间切换时,我可以自动执行此操作,也可以在用户选中复选框时执行此操作。 我对任何一种解决方案都很满意。

我查看了SetProperty元素,但据我所知,这只适用于预定义的MSI操作,我不相信任何这些操作都适合我。

任何帮助,将不胜感激。

I have 2 custom dialogs. They are essentially copies of each other. The idea is that there are some scenarios when the user will be presented with both dialogs, and when that happens, it is highly likely that most/all of the data will be the same, but there is a chance that it won't all be the same, and the user needs to be given the opportunity to have different values between the two dialogs.

What I'd like to do is either default the values in the second dialog to the values of the first dialog, or have a checkbox in the second that will copy the values. Either way, I need to be able to set the property values. I can either do it automatically when the user transitions between the two dialogs, or do it upon the user checking a checkbox. I would be happy with either solution.

I've looked into the SetProperty element, but from what I understand, that only works on pre-defined MSI actions, and I don't believe any of those actions will work for me.

Any help would be appreciated.

最满意答案

我想到了。 我正在寻找错误的区域。

我最终选择了PushButton因为它实际上更有意义。

当用户使用我的UI元素下的Publish元素单击PushButton时,我能够复制值。 我的Publish元素如下所示:

<Publish Dialog="TargetDialog" Control="CopyButton" Property="PROPERTY_NAME" Value="[SOURCE_PROPERTY_NAME]">1</Publish>

我有4个相同的发布标记,唯一的区别是属性和值属性。

我希望这有助于其他人!

I figured it out. I was looking in the wrong area.

I ended up going with a PushButton as it actually made more sense.

I was able to copy the values when the user clicks the PushButton using the Publish element under my UI element. My Publish element looks like this:

<Publish Dialog="TargetDialog" Control="CopyButton" Property="PROPERTY_NAME" Value="[SOURCE_PROPERTY_NAME]">1</Publish>

I have 4 more of the same publish tag, with the only difference being the property and value attributes.

I hope this helps other people!

更多推荐

本文发布于:2023-04-12 20:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/e7ff6cf11ea35ba7fabf9e3a6c6afe9e.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   对话框   用户   Copy   dialog

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!