public void FillComboBox(MetroToolbarDropDownButton PrefList) { // For design mode if (GlobalInfo.SqlConnection == null) { return; } PrefList.Items.Clear(); RRReadAllPreference DRRead = new RRReadAllPreference(); if (DRRead.Find(PrefType, ComputerName, UserName, ApplicationName)) { for (int t = 0; t < DRRead.Count; t++) { string computer = DRRead.GetValue <string>(EF_Preferences.Computer, t); string user = DRRead.GetValue <string>(EF_Preferences.Username, t); string application = DRRead.GetValue <string>(EF_Preferences.Application, t); MyToolStripItem tsi = new MyToolStripItem(computer, user, application); PrefList.AddDropDownItem(tsi); } } }
public PreferencesManager(string Application, Type[] types) { ApplicationName = Application; this.AllTypes = types; RRAllPref = new RRReadAllPreference(null); DRPref = new DUPreference(null); DRFindPref = new DRFindPreference(null); if (Preference == null) { Preference = new T(); } }