/// <summary> /// The update data source. /// </summary> private void UpdateDataSource() { if (this.DataSource != null) { this.loading = true; this.TabControl.TabPages.Clear(); IDriverTypeUI driverTypeUI; foreach (IDriverType driverType in this.DriverTypes) { var page = new TabPage { Text = driverType.Name, BackColor = DefaultBackColor }; driverTypeUI = ScaffoldConfig.ReturnDriverDataTypeUi(driverType.Id, DisplayType.WinForm); page.Controls.Add(driverTypeUI as Control); IDictionary <string, string> parameterList = new Dictionary <string, string>(); parameterList.Add("basePath", this.SavePath); driverTypeUI.LoadConfig(parameterList); this.TabControl.TabPages.Add(page); } this.loading = false; } }
public void Save() { IDriverTypeUI driverTypeUI; foreach (IDriverType driverType in this.DriverTypes) { driverTypeUI = ScaffoldConfig.ReturnDriverDataTypeUi(driverType.Id, DisplayType.WinForm); IDictionary <string, string> parameterList = new Dictionary <string, string>(); parameterList.Add("basePath", this.SavePath); driverTypeUI.SaveConfig(parameterList); } }