Пример #1
0
        private void HandleFirstStartAndUpdates(IActionService actionService, IAppSettingService appSettingService, IApplicationHotkeyService hotkeyService, bool firstTimeUser)
        {
            if (appSettingService.CheckForUpdateOnStart)
            {
                Task.Run(() => { actionService.CheckForUpdates(showMessages: false); });
            }

            var     currentFileVersion   = new Version(ThisAssembly.AssemblyFileVersion);
            Version lastInstalledVersion = appSettingService.LastInstalledVersion;

            appSettingService.LastInstalledVersion = currentFileVersion;
            hotkeyService.ResetAndReadHotkeysFromConfig();

            if (firstTimeUser)
            {
                actionService.ShowNewToApplicationWindow();
            }
            else if (currentFileVersion.CompareTo(lastInstalledVersion) > 0)
            {
                actionService.ShowNewToVersionDialog(currentFileVersion, lastInstalledVersion);
            }
            else if (appSettingService.ShowTipsAtApplicationStart)
            {
                actionService.ShowRandomApplicationTip();
            }
        }
 private void CheckForUpdates_MenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     actionService.CheckForUpdates(showMessages: true);
 }
Пример #3
0
 private void CheckForUpdateButton_Click(object sender, RoutedEventArgs e)
 {
     Task.Run(() => { actionService.CheckForUpdates(true); });
 }