c# setup project get radio buttons value

坚强是说给别人听的谎言 提交于 2019-12-04 05:51:13

问题


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

There it is what i'm talking about

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


回答1:


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

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"]

That's the basics of what's described here:

http://www.c-sharpcorner.com/article/customize-user-interfaces-and-pass-user-input-to-installer-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.



来源:https://stackoverflow.com/questions/45568790/c-sharp-setup-project-get-radio-buttons-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!