vb.net - User Control Form (Wizard panel) to have common ShowData() function
问题描述
Like many, I'm trying to build a wizard like presentation.
I've created a Windows Form as the host for a series of "WizPanel"s that have been designed as User Control Forms. Each of them may/will have unique data connections and layouts. My intended implementation creates a Collection(of UserControl). I'm at the design point that I want to load the collection with a set of panels that best describe the process flow required by the current use case.
The problem I'm running into is how to be able to load a New UCDataReview (user control form), a New UCDataParameters (user control form), then the rest of the panels as required. I don't want the panels to load data at this point as some of the data queries may never be required - based on data supplied in previous panels (possibly, just design at this point). I just want to make sure data only loads when I specify. I like to have a function ShowData() on each of the panels and then execute it from within the main Wizard form (after the next button is clicked - it wouldn't be needed on a back as it should be there already).
So, I'm stuck on the concept of crating a 'base wizard panel' control (WizPanelBase) that has a ShowData() function that is empty in the base control form but can be overridden in the class (WizPanel) that the panel is based upon. I'd then have a Collection(of WizPanelBase) that would then allow me to issue a ShowData() call.
I'm sorry for not using the correct verbiage as I'm only a part timer and just playing to learn. I've done this with an Object Class (ObjBase_Person; ObjBase_Vehicle ...) and then extended them into Person_Student, Person_Instructor, Vehicle_Car, Vehicle_Truck etc). I'm quite sure I can, I just know enough to be dangerous, but I don't know what to even ask for to find tutorials. The similar questions here are generally about using a User Control on a Windows form.
解决方案
推荐阅读
- python - Python Timedelta[M] 添加不完整的天数
- amazon-dynamodb - 读取 DynamoDB 中的最新记录
- android - 未来建造者
(脏,状态:_FutureBuilderState #7140d) 在 null 上调用了 getter 'isEmpty' - node.js - 通过 npm 安装 RSSHub 时出错,错误:找不到模块“模块别名”,我该如何解决?
- python - Pandas - 如何对标题为字符串但列内容为百分比的数据框进行排序
- python - 词汇表中的单词数 gensim word2vec
- c# - 我想做一个简单的纸牌游戏,但有什么问题?
- java - 即使正确加载,似乎也无法访问我的 PlayerClass 中的图像文件
- python - 烧瓶名称错误:而 flask_wtf 和 FlaskForm
- javascript - 倒计时结束后,javascript和HTML中的倒计时页面不会重定向到另一个页面