Ejemplo n.º 1
0
        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)
        {
            var generalSettingsModel = SettingsProvider.GeneralSettingsModel;

            string currentVersion = PackageUtility.GetVersion();

            if (string.IsNullOrWhiteSpace(currentVersion) == false && 0 > string.Compare(version, currentVersion))
            {
                generalSettingsModel.Version = currentVersion;

                var settingsHandler = new SettingsHandler();
                settingsHandler.SaveSettings();

                //var freeTrialController = new FreeTrialController();
                //bool activeLicense = await new LocalLicenseValidator().ValidateAsync();

                //if (activeLicense)
                //  freeTrialController.MarkAsExpired();

                ReleaseNotesView.WasShown = false;
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }
Ejemplo n.º 5
0
 public void OnClosed(object sender, EventArgs e)
 {
     settingsHandler.SaveSettings();
     settingsView.Closed -= OnClosed;
 }