public void ReloadSettings() { model.ReloadSettings(); FlightServerIP = model.FlightServerIP; FlightCommandPort = model.FlightCommandPort; FlightInfoPort = model.FlightInfoPort; }
public SettingsWindowViewModel(ISettingsModel model) { this.model = model; model.ReloadSettings(); this.OKBtnCommand = new CommandHandler(OnOKClick); this.CancelBtnCommand = new CommandHandler(OnCancelClick); }
/// <summary> /// The ReloadSettings function of reloading the settings from the default settings. /// </summary> public void ReloadSettings() { model.ReloadSettings(); NotifyPropertyChanged("FlightServerIP"); NotifyPropertyChanged("FlightInfoPort"); NotifyPropertyChanged("FlightCommandPort"); }
// create a new connection with the flight simulator public void ConnectCmd() { getter.Stop(); settingsModel.ReloadSettings(); getter = new InfoGetter(settingsModel); getter.InitServer(); sender = new CommandsSender(settingsModel); }
/// <summary> /// Initializes the properties to the values inside the config, /// only used upon initialization of the settings window /// </summary> private void InitDefaults() { ISettingsModel settings = ApplicationSettingsModel.Instance; settings.ReloadSettings(); try { FlightServerIP = settings.FlightServerIP; FlightCommandPort = settings.FlightCommandPort.ToString(); FlightInfoPort = settings.FlightInfoPort.ToString(); } catch (ArgumentException) { } }
public void ReloadSettings() { model.ReloadSettings(); }
private void CancelClick() { model.ReloadSettings(); this.settingsWindow.Close(); }
private void OnCancelClicked() { model.ReloadSettings(); closeAction?.Invoke(); }
// Send command for reload settings to model public void ReloadSettings() => model.ReloadSettings();
public void Reload() { _settings.ReloadSettings(); }
// the logic of the cancel private void ClickCancel() { model.ReloadSettings(); settings.Close(); }