예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     var appInfo = new AppInfo();
     appInfo.SetAppIcon("Magpie.Example", "lp.png");
     new MagpieService(appInfo).RunInBackground("https://dl.dropboxusercontent.com/u/83257/Updaters/Magpie/appcast.json");
 }
예제 #2
0
 public MagpieService(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null)
 {
     _appInfo = appInfo;
     _logger = debuggingInfoLogger ?? new DebuggingWindowViewModel();
     RemoteContentDownloader = new DefaultRemoteContentDownloader();
     UpdateDecider = new UpdateDecider(_logger);
 }
예제 #3
0
 public MainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger)
 {
     AppIconPath = appInfo.AppIconPath;
     _logger = logger;
     _contentDownloader = contentDownloader;
     _analyticsLogger = analyticsLogger;
 }
예제 #4
0
 public MagpieUpdater(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null, IAnalyticsLogger analyticsLogger = null)
 {
     _appInfo = appInfo;
     _logger = debuggingInfoLogger ?? new DebuggingWindowViewModel();
     _analyticsLogger = analyticsLogger ?? new AnalyticsLogger();
     RemoteContentDownloader = new DefaultRemoteContentDownloader();
     UpdateDecider = new UpdateDecider(_logger);
 }
예제 #5
0
 public void Initialize()
 {
     var debuggingInfoLogger = Substitute.For<IDebuggingInfoLogger>();
     _analyticsLogger = Substitute.For<IAnalyticsLogger>();
     var remoteContentDownloader = Substitute.For<IRemoteContentDownloader>();
     var appInfo = new AppInfo("valid_url");
     _appCast = new MockRemoteAppcast(new Version(1, 0));
     _mainWindowViewModel = new MockMainWindowViewModel(appInfo, debuggingInfoLogger, remoteContentDownloader, _analyticsLogger);
 }
 public SignatureVerificationWindowViewModel(AppInfo appInfo, RemoteAppcast appcast)
 {
     AppIconPath = appInfo.AppIconPath;
     Title = string.Format(Properties.Resources.SignatureErrorTitle, appcast.Title);
 }
예제 #7
0
 private static AppInfo MakeAppInfo()
 {
     var appInfo = new AppInfo("https://dl.dropboxusercontent.com/u/83257/Updaters/Magpie/appcast.json");
     appInfo.SetAppIcon("Magpie.Example", "logo64x64.tiff");
     return appInfo;
 }
예제 #8
0
 public MockMainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger) : base(appInfo, logger, contentDownloader, analyticsLogger)
 {
     DownloadNowCommand = new DelegateCommand(message=> analyticsLogger.LogDownloadNow());
     SkipThisVersionCommand = new DelegateCommand(message => analyticsLogger.LogSkipThisVersion());
     RemindMeLaterCommand = new DelegateCommand(message => analyticsLogger.LogRemindMeLater());
 }
예제 #9
0
 internal DownloadWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader)
 {
     AppIconPath = appInfo.AppIconPath;
     _logger = logger;
     _contentDownloader = contentDownloader;
 }