public SettingsDesignerViewModel() { //check if it is a designer instance if (this.GetType() != typeof(SettingsDesignerViewModel)) { return; } Model = new SettingsModel(); AutostartChangedCommand = new WpfUtil.RelayCommand((o) => {}); }
public SettingsViewModel() { HostDataModel mdl = ConfigHandler.Load(); HostModel.Instance.PropertyChanged += Instance_PropertyChanged; _autostart = mdl.Autostart; _serverAddress = mdl.ServerAddress; _ownName = HostModel.Instance.OwnName; CommandResetServer = new WpfUtil.RelayCommand((o) => ServerAddress = HostModel.DefaultServer); }