private void UpdateVersion(string version) { var currentVersion = PackageUtility.GetVersion(); if (string.IsNullOrWhiteSpace(currentVersion) == false && 0 > string.Compare(version, currentVersion)) { SettingsViewModelProvider.GeneralSettingsViewModel.GeneralSettingsModel.Version = currentVersion; mSettingsHandler.SaveSettings(); ReleaseNotesView releaseNotesView = new ReleaseNotesView(); releaseNotesView.Show(); } }
private void UpdateVersion(string version) { GeneralSettingsModel generalSettingsModel = mSettingsProvider.GetGeneralSettingsModel(); string currentVersion = PackageUtility.GetVersion(); if (string.IsNullOrWhiteSpace(currentVersion) == false && 0 > string.Compare(version, currentVersion)) { generalSettingsModel.Version = currentVersion; mSettingsProvider.SetGeneralSettingsModel(generalSettingsModel); mSettingsHandler.SaveSettings(); FreeTrialController freeTrialController = new FreeTrialController(); LicenseController licenseController = new LicenseController(); if (licenseController.CheckLocalLicense()) { freeTrialController.MarkAsExpired(); } ReleaseNotesView releaseNotesView = new ReleaseNotesView(); releaseNotesView.Show(); } }
private async Task UpdateVersionAsync(string version) { GeneralSettingsModel generalSettingsModel = mSettingsProvider.GetGeneralSettingsModel(); string currentVersion = PackageUtility.GetVersion(); if (string.IsNullOrWhiteSpace(currentVersion) == false && 0 > string.Compare(version, currentVersion)) { generalSettingsModel.Version = currentVersion; mSettingsProvider.SetGeneralSettingsModel(generalSettingsModel); mSettingsHandler.SaveSettings(); FreeTrialController freeTrialController = new FreeTrialController(); bool activeLicense = await new LocalLicenseValidator().ValidateAsync(); if (activeLicense) { freeTrialController.MarkAsExpired(); } ReleaseNotesView releaseNotesView = new ReleaseNotesView(); releaseNotesView.Show(); } }
public void OnWindowActivated(Window GotFocus, Window LostFocus) { VsWindowController.SetPreviousActiveWindow(LostFocus); if (ReleaseNotesView.WasShown == false) { var releaseNotesView = new ReleaseNotesView(true); releaseNotesView.Show(); } if (showOpenFolderWarning) { var registryUtility = new RegistryUtility(registryName); string showCMakeBetaWarning = registryUtility.ReadCurrentUserKey(keyName); if (showCMakeBetaWarning == null && SolutionInfo.IsOpenFolderModeActive()) { showOpenFolderWarning = false; CMakeBetaWarning cMakeBetaWarning = new CMakeBetaWarning(); cMakeBetaWarning.Show(); } } if (SettingsProvider.CompilerSettingsModel.ShowSquiggles == false) { return; } if (running || vsBuildRunning) { return; } Document document = GotFocus.Document; if (document == null) { return; } if (!string.IsNullOrEmpty(oldActiveDocumentName) && oldActiveDocumentName == document.FullName) { return; } oldActiveDocumentName = document.FullName; if (!ScriptConstants.kAcceptedFileExtensions.Contains(Path.GetExtension(document.FullName))) { return; } _ = Task.Run(() => { lock (mutex) { try { TaskErrorViewModel.FileErrorsPair.Clear(); using BackgroundTidy backgroundTidyCommand = new BackgroundTidy(); backgroundTidyCommand.Run(document, CommandIds.kTidyId); } catch (Exception e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }); }