public DeskViewModel(ContentView view, string name) : base(name, view) { _configurationService = DependencyService.Resolve <ConfigurationService>(); _sourceService = DependencyService.Resolve <SourceService>(); _deskViewSettings = _configurationService.GetSharedConfiguration().DeskViewSettings; ConnectStatus = ConnectStatus.Idle; ConnectButtonText = "Connect"; DeskViewSettings.CurrentBackgroundImage = "Background_Blue.jpg"; BackgroundImages = new ObservableCollection <BackgroundImage>() { new BackgroundImage() { Name = "Background_1.jpg", }, new BackgroundImage() { Name = "Background_2.jpg", }, new BackgroundImage() { Name = "Background_Blue.jpg", } }; BackgroundImages.First(x => x.Name == DeskViewSettings.CurrentBackgroundImage).IsSelected = true; }
public ApplicationConfiguration() { NetworkSettings = new NetworkSettings(); DeskViewSettings = new DeskViewSettings(); ServerSettings = new ServerSettings(); }
public async Task UpdateSettings(ServerSettings server, NetworkSettings network, DeskViewSettings deskview) { _sharedViewModel.ApplicationConfiguration.DeskViewSettings = new DeskViewSettings(deskview); _sharedViewModel.ApplicationConfiguration.ServerSettings = new ServerSettings(server); _sharedViewModel.ApplicationConfiguration.NetworkSettings = new NetworkSettings(network); await SaveToPCL(); }
public async Task UpdateSettings(DeskViewSettings settings) { _sharedViewModel.ApplicationConfiguration.DeskViewSettings = new DeskViewSettings(settings); await SaveToPCL(); }