大嘴巴幼儿英语,国际儿童图书日,王秉璋的子女现状
winform中实现读取xml配置文件并动态配置zedgraph的radiogroup的选项:
https://blog.csdn.net/badao_liumang_qizhi/article/details/100540708
在上面实现了将radiogroup的选项根据配置文件动态配置后,
比如这里有三个选项,在更改选项时会对其他的控件的值进行更改。
关注公众号
霸道的程序猿
获取编程相关电子书、教程推送与免费下载。
大量编程视频教程:
首先在窗体的加载完成的方法中,实现对其他控件默认属性的赋值。
具体可以参照上面的博客。
//将默认选择项的值赋给其他控件 this.textedit1.text = selectedradio.max.tostring(); this.textedit2.text = selectedradio.min.tostring(); this.colorpickedit1.text = selectedradio.color.tostring();
然后在窗体设页面找到radiogroup控件-右击-属性
找到小闪电下的事件列表中的selectedindexchanged事件,双击进入其方法的编写中。
private void radiogroup1_selectedindexchanged(object sender, eventargs e) { foreach (yaxismodel y in nodeylist) { if (y.no.tostring().equals(this.radiogroup1.text.tostring())) { this.textedit1.text = y.max.tostring(); this.textedit2.text = y.min.tostring(); this.colorpickedit1.text = y.color.tostring(); break; } } }
注:
其中nodeylist是从配置文件中读取的对象的list,这里在窗体加载完之后将其存放在全局变量中,具体参照上面博客。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论