private void buttonGlobalSettings_Click(object sender, EventArgs e) { CrestronConfig configForm = new CrestronConfig(); GateSettings gsNew = new GateSettings(Manager.gateSettings); configForm.SetSettings(gsNew); if (configForm.ShowDialog() == DialogResult.OK) { if (gsNew.SettingsChanged(Manager.gateSettings)) { Manager.gateSettings = gsNew; Manager.SaveGlobalSettings(); } } }
public void SetSettings(GateSettings gs) { propertyGrid1.SelectedObject = gs; }
public bool SettingsChanged(GateSettings oldGS) { return(CrestronIP != oldGS.CrestronIP); }
public GateSettings(GateSettings gs) { CrestronIP = gs.CrestronIP; PluginsSettings = new List <PluginSetting>(gs.PluginsSettings); }