C#安装项目获取单选按钮值 [英] c# setup project get radio buttons value

查看:145
本文介绍了C#安装项目获取单选按钮值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用Visual Studio中的安装项目为我的应用程序创建安装程序,并用两个单选按钮制作了用户界面.

I've started to create installer for my application using Setup Project in Visual Studio, I've made User Interface with two radio buttons.

这就是我在说的

我想在c#中访问这些单选按钮的值,但是我完全不知道该怎么做.谁能帮我吗?

I want to get access to values of these radiobuttons in c#, but I completely have no idea how. Can any1 help me ?

推荐答案

假设将它们放入C#中意味着您有一个自定义操作安装程序类,希望将该值传递给:

Assuming that getting them in C# means that you have a custom action installer class that you wish to pass the values to:

DOMAINLOCALVALUE似乎是与单选按钮关联的属性的名称.在要将值传递到的自定义操作的属性窗口中,在CustomActionData字段中,输入类似/DLV = [DOMAINLOCALVALUE]的内容,然后在安装程序类中,使用this.Context.Parameters ["DLV ]

DOMAINLOCALVALUE appears to be the name of the property associated with the radiobutton. In the properties window of the custom action you want to pass the value into, in the CustomActionData field, you put something like /DLV=[DOMAINLOCALVALUE] and then in your installer class you get the value with this.Context.Parameters["DLV"]

这是这里描述的基础:

http://www.c-sharpcorner.com/article/customize-user-interfaces-and-pass-user-input-to-installer-c/

如果要将其传递给C#可执行文件或其他命令,则需要更精确地了解在c#中访问这些单选按钮的值"的含义.

If you want to pass it to a C# executeable or something else then you'll need to be more precise about exactly what "get access to values of these radiobuttons in c#" means.

这篇关于C#安装项目获取单选按钮值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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