public ShellViewModel(IWindowManager windowManager, ISpotifyController spotifyController, ICoverService coverService, IEventAggregator eventAggregator, AppSettings settings, Core.ILog logger, IUpdateService updateService, IUsageTrackerService usageTrackerService, IBroadcastService broadcastService) { _WindowManager = windowManager; _SpotifyController = spotifyController; _CoverService = coverService; _EventAggregator = eventAggregator; _Settings = settings; _Logger = logger; _UpdateService = updateService; _UsageTrackerService = usageTrackerService; _BroadcastService = broadcastService; _ApplicationSize = _Settings.ApplicationSize; CoverImage = NoCoverUri; UpdateView(); _SpotifyController.TrackChanged += (o, e) => UpdateView(); _SpotifyController.SpotifyOpened += (o, e) => SpotifyOpened(); _SpotifyController.SpotifyExited += (o, e) => SpotifyExited(); _UpdateService.UpdateReady += UpdateReady; _UpdateService.StartBackgroundCheck(); _UsageTrackerService.Track(); _BroadcastService.BroadcastMessageReceived += BroadcastMessageReceived; _BroadcastService.StartListening(); _Settings.PropertyChanged += (o, e) => { if (e.PropertyName == ApplicationSize.GetType().Name) { ApplicationSize = _Settings.ApplicationSize; } }; }
public ShellViewModel(IWindowManager windowManager, ISpotifyController spotifyController, ICoverService coverService, IEventAggregator eventAggregator, AppSettings settings, Core.ILog logger, IUpdateService updateService, IUsageTrackerService usageTrackerService, IBroadcastService broadcastService) { _WindowManager = windowManager; _SpotifyController = spotifyController; _CoverService = coverService; _EventAggregator = eventAggregator; _Settings = settings; _Logger = logger; _UpdateService = updateService; _UsageTrackerService = usageTrackerService; _BroadcastService = broadcastService; _ApplicationSize = _Settings.ApplicationSize; CoverImage = NoCoverUri; UpdateView(); _SpotifyController.TrackChanged += (o, e) => UpdateView(); _SpotifyController.SpotifyOpened += (o, e) => SpotifyOpened(); _SpotifyController.SpotifyExited += (o, e) => SpotifyExited(); _UpdateService.UpdateReady += UpdateReady; _UpdateService.StartBackgroundCheck(); _UsageTrackerService.Track(); _BroadcastService.BroadcastMessageReceived += BroadcastMessageReceived; _BroadcastService.StartListening(); _Settings.PropertyChanged += (o, e) => { if (e.PropertyName == ApplicationSize.GetType().Name) ApplicationSize = _Settings.ApplicationSize; }; }
public SettingsViewModel(AppSettings settings, AppContracts contracts, ICoverService coverService, Core.ILog logger) { _Settings = settings; _Contracts = contracts; _CoverService = coverService; _Logger = logger; DisplayName = string.Format("Settings - {0}", _Contracts.ApplicationName); CacheSize = Helper.MakeNiceSize(_CoverService.CacheSize()); }
public static Core.ILog Fatal(string format, params object[] args) { Core.ILog logger = Fatal(); logger.WriteFormat(format, args); return(logger); }
public static Core.ILog Fatal(string logInfo) { Core.ILog logger = Fatal(); logger.Write(logInfo); return(logger); }
public static Core.ILog Error(string logInfo) { Core.ILog logger = Error(); logger.Write(logInfo); return(logger); }
public static Core.ILog Debug(string logInfo) { Core.ILog logger = Debug(); logger.Write(logInfo); return(logger); }