public UpdateService(IUpdateChecker checker, ISettingsStore settings, IEventAggregator eventAggregator, IJarvisLog log) { _checker = checker; _settings = settings; _eventAggregator = eventAggregator; _log = new LogDecorator("UpdateService", log); }
/// <inheritdoc /> public virtual void ShowAboutBox(IUpdateChecker updateChecker = null) { AboutBox aboutBox = new AboutBox(); aboutBox.UpdateChecker = updateChecker; aboutBox.AccentColor = AccentColor; aboutBox.Owner = System.Windows.Application.Current.Windows .OfType <Window>().SingleOrDefault(x => x.IsActive); aboutBox.ShowDialog(); }
public UpdateCheckerViewModel(IUpdateChecker UpdateChecker) { _updateChecker = UpdateChecker; BuildName = UpdateChecker.BuildName; Check(); CheckCommand = new DelegateCommand(Check); GoToDownload = new DelegateCommand(UpdateChecker.GoToDownloadsPage); }
public override void ShowAboutBox(IUpdateChecker updateChecker = null) { Uri iconUri = new Uri("pack://application:,,,/vividl.ico"); AboutBox aboutBox = new AboutBox(new BitmapImage(iconUri)); aboutBox.UpdateChecker = updateChecker; aboutBox.AccentColor = AccentColor; aboutBox.Owner = Application.Current.Windows .OfType <Window>().SingleOrDefault(x => x.IsActive); aboutBox.ShowDialog(); }
public UpdateCheckerViewModel(IUpdateChecker UpdateChecker) { _updateChecker = UpdateChecker; BuildName = UpdateChecker.BuildName; Check(); CheckCommand = new ReactiveCommand() .WithSubscribe(Check); GoToDownload = new ReactiveCommand() .WithSubscribe(UpdateChecker.GoToDownloadsPage); }
public HelpViewModel(IUpdateChecker updateChecker, IMsixHeroApplication application) { this.CloseCommand = new DelegateCommand(((IDialogAware)this).OnDialogClosed, ((IDialogAware)this).CanCloseDialog); this.ShowReleaseNotes = new DelegateCommand(this.OnShowReleaseNotes); this.updateChecker = updateChecker; this.application = application; this.Check = new DelegateCommand(this.CheckExecute, this.CheckCanExecute); this.UpdateCheck = new AsyncProperty <UpdateCheckResult>(); var assemblyLocation = (Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()).Location; this.Version = FileVersionInfo.GetVersionInfo(assemblyLocation).ProductVersion; }
public SettingsViewModel(IFileService fileService, IDialogService dialogService, IThemeResolver themeResolver, IDownloadOptionProvider optionProvider, IUpdateChecker updateChecker, YtdlUpdateService ytdlUpdateService) { this.FileService = fileService; this.dialogService = dialogService; this.themeResolver = themeResolver; this.updateChecker = updateChecker; this.YoutubeDLUpdateService = ytdlUpdateService; DefaultFormats = new ObservableCollection <IDownloadOption>(optionProvider.CreateDownloadOptions()); SwitchAppThemeCommand = new RelayCommand(() => SwitchAppTheme()); UpdateVividlCommand = new RelayCommand(() => UpdateVividl()); UpdateYoutubeDLCommand = new RelayCommand(async() => await UpdateYoutubeDL()); }
public SettingsViewModel(IFileService fileService, IDialogService dialogService, IThemeResolver themeResolver, IDownloadOptionProvider optionProvider) { this.FileService = fileService; this.dialogService = dialogService; this.themeResolver = themeResolver; this.updateChecker = SimpleIoc.Default.GetInstance <IUpdateChecker>(); DefaultFormats = new ObservableCollection <IDownloadOption>(optionProvider.CreateDownloadOptions()); SwitchAppThemeCommand = new RelayCommand(() => SwitchAppTheme()); var ydl = SimpleIoc.Default.GetInstance <YoutubeDLSharp.YoutubeDL>(); YoutubeDLUpdateService = new YtdlUpdateService(ydl); UpdateVividlCommand = new RelayCommand(() => UpdateVividl()); UpdateYoutubeDLCommand = new RelayCommand(async() => await UpdateYoutubeDL()); }
public override void ShowAboutBox(IUpdateChecker updateChecker = null) { Uri iconUri = new Uri("pack://application:,,,/vividl.ico"); AboutBox aboutBox = new AboutBox(new BitmapImage(iconUri)); aboutBox.UpdateChecker = updateChecker; aboutBox.AccentColor = AccentColor; aboutBox.CultureChanging += (o, args) => { LocalizeDictionary.Instance.Culture = args.NewCulture; args.Success = true; }; aboutBox.Owner = Application.Current.Windows .OfType <Window>().SingleOrDefault(x => x.IsActive); aboutBox.ShowDialog(); }
public MainApplicationContext() : base(Resources.PinWinIconWhite) { ContextMenu.Opening += ContextMenu_Opening; if (!String.IsNullOrWhiteSpace(Settings.Default.HotKey)) { var keyConv = new KeysConverter(); Keys keys = (Keys)keyConv.ConvertFromInvariantString(Settings.Default.HotKey); SetHotKey((KeyCombination)keys); } Application.ApplicationExit += Application_ApplicationExit; updateChecker = new WinFormsUpdateChecker(Program.UPDATE_URL, identifier: Program.UPDATE_IDENTIFIER); if (Settings.Default.AlwaysCheckForUpdates) { updateChecker.CheckForUpdates(); } }
public ErrorReportDialog(Context context, IUpdateChecker server, Exception exception) { _exception = exception; _updateServer = server; var builder = new MaterialAlertDialogBuilder(context); builder.SetTitle(Resource.String.title_error); #if DEBUG builder.SetMessage(exception.ToString()); #else builder.SetMessage(exception.Message); #endif builder.SetPositiveButton(Resource.String.button_text_report, OnPositiveButtonClick); builder.SetNegativeButton(Android.Resource.String.Cancel, (sender, args) => { }); _dialog = builder.Create(); }
public NuGetInstaller(IInstallerFactory factory, IEngineEnvironmentSettings settings, string installPath, IDownloader packageDownloader, IUpdateChecker updateChecker) { Factory = factory ?? throw new ArgumentNullException(nameof(factory)); _environmentSettings = settings ?? throw new ArgumentNullException(nameof(settings)); _packageDownloader = packageDownloader ?? throw new ArgumentNullException(nameof(packageDownloader)); _updateChecker = updateChecker ?? throw new ArgumentNullException(nameof(updateChecker)); if (string.IsNullOrWhiteSpace(installPath)) { throw new ArgumentException($"{nameof(installPath)} should not be null or empty", nameof(installPath)); } if (!_environmentSettings.Host.FileSystem.DirectoryExists(installPath)) { _environmentSettings.Host.FileSystem.CreateDirectory(installPath); } _installPath = installPath; }
public MainForm() { Settings = new Settings(); Position = new PositionData(); initManager(); updateChecker = new WinFormsUpdateChecker(Program.UpdateCheckUrl, this); InitializeComponent(); initControls(); this.KeyPreview = true; this.KeyDown += MainForm_KeyDown; this.DpiChanged += MainForm_DpiChanged; // Create and start the timer. timer = new Timer() { Interval = 50 }; timer.Tick += Timer_Tick; panDraw.Focus(); }
public UpdateConfigurationManager(IConfigurationService configurationService, IUpdateChecker updateChecker) { this.configurationService = configurationService; this.updateChecker = updateChecker; }
public UpdateManager(IUpdateDownloader downloader, IUpdateChecker updateChecker, string arg) { _downloader = downloader; _updateChecker = updateChecker; Arg = arg; }
public UpdateService(IUpdateChecker checker, IJarvisLog log, IEventAggregator eventAggregator) { _checker = checker; _eventAggregator = eventAggregator; _log = new LogDecorator("UpdateService", log); }
/// <summary> /// Testing constructor /// </summary> /// <param name="updates">Task that will provide the result of an update check</param> internal VersionManager(IUpdateChecker updates) { _updates = updates; }
/// <summary> /// Simplify construct using lamuda expresion /// </summary> /// <param name="checker"></param> public UpdateWorker(IUpdateChecker checker) { this.updateChecker = checker; this.timer = new UpdateTimer(this); }