public void Save() { var wpf = settings.Get <WPFSettings>(); var ui = settings.Get <PeerCastStation.UI.UISettings>(); ui.BroadcastHistory = BroadcastHistory.Select(info => info.Save()).ToArray(); wpf.BroadcastHistory = new BroadcastInfo[0]; PeerCastStation.Core.PeerCastApplication.Current.SaveSettings(); }
public UISettingsViewModel(PeerCastStation.Core.PecaSettings settings) { this.settings = settings; var wpf = settings.Get<WPFSettings>(); var ui = settings.Get<PeerCastStation.UI.UISettings>(); if (ui.BroadcastHistory.Length>0) { BroadcastHistory = new ObservableCollection<BroadcastInfoViewModel>( ui.BroadcastHistory.Select(info => new BroadcastInfoViewModel(info))); } else { BroadcastHistory = new ObservableCollection<BroadcastInfoViewModel>( wpf.BroadcastHistory.Select(info => new BroadcastInfoViewModel(info))); } }
public UISettingsViewModel(PeerCastStation.Core.PecaSettings settings) { this.settings = settings; var wpf = settings.Get <WPFSettings>(); var ui = settings.Get <PeerCastStation.UI.UISettings>(); if (ui.BroadcastHistory.Length > 0) { BroadcastHistory = new ObservableCollection <BroadcastInfoViewModel>( ui.BroadcastHistory.Select(info => new BroadcastInfoViewModel(info))); } else { BroadcastHistory = new ObservableCollection <BroadcastInfoViewModel>( wpf.BroadcastHistory.Select(info => new BroadcastInfoViewModel(info))); } }