Ejemplo n.º 1
0
        private void SaveSettings()
        {
            Preferences.Current.BackupLocation              = chkAutoBackup.Checked ? txtBackupPath.Text : string.Empty;
            Preferences.Current.CheckForUpdates             = chkAutoUpdate.Checked;
            Preferences.Current.FormulaFixup                = chkFixup.Checked;
            Preferences.Current.AllowUnsupportedPBIFeatures = chkAllowUnsupportedPBIFeatures.Checked;
            Preferences.Current.UseSemicolonsAsSeparators   = cmbSeparators.SelectedIndex == 1;
            Preferences.Current.BackgroundBpa               = chkBackgroundBpa.Checked;
            Preferences.Current.AnnotateDeploymentMetadata  = chkAnnotateDeploymentMetadata.Checked;

            Preferences.Current.IgnoreTimestamps                = chkIgnoreTimestamps.Checked;
            Preferences.Current.IgnoreInferredObjects           = chkIgnoreInfObjects.Checked;
            Preferences.Current.IgnoreInferredProperties        = chkIgnoreInfProps.Checked;
            Preferences.Current.SplitMultilineStrings           = chkSplitMultiline.Checked;
            Preferences.Current.SaveToFolder_PrefixFiles        = chkPrefixFiles.Checked;
            Preferences.Current.SaveToFolder_LocalPerspectives  = chkLocalPerspectives.Checked;
            Preferences.Current.SaveToFolder_LocalTranslations  = chkLocalTranslations.Checked;
            Preferences.Current.SaveToFolder_LocalRelationships = chkLocalRelationships.Checked;
            Preferences.Current.Copy_IncludeTranslations        = chkCopyIncludeTranslations.Checked;
            Preferences.Current.Copy_IncludePerspectives        = chkCopyIncludePerspectives.Checked;
            Preferences.Current.Copy_IncludeRLS = chkCopyIncludeRLS.Checked;
            Preferences.Current.Copy_IncludeOLS = chkCopyIncludeOLS.Checked;

            Preferences.Current.ProxyUseSystem         = chkSystemProxy.Checked;
            Preferences.Current.ProxyAddress           = txtProxyAddress.Text;
            Preferences.Current.ProxyUser              = txtProxyUser.Text;
            Preferences.Current.ProxyPasswordEncrypted = txtProxyPassword.Text.Encrypt();
            ProxyCache.ClearProxyCache();

            Preferences.Current.SaveToFolder_Levels = new HashSet <string>();
            SaveCheckedNodes(treeView1.Nodes, Preferences.Current.SaveToFolder_Levels);
        }
Ejemplo n.º 2
0
        private void btnVersionCheck_Click(object sender, EventArgs e)
        {
            ProxyCache.ClearProxyCache();
            SaveProxySettings();
            var newVersion = UpdateService.Check(true);

            RestoreProxySettings();

            if (!newVersion.HasValue)
            {
                return;
            }
            if (newVersion.Value)
            {
                btnVersionCheck.Visible     = false;
                lblAvailableVersion.Visible = true;
                lblAvailableVersion.Text    = "Available Version: " + UpdateService.AvailableBuild + " (click to download)";
            }
            else
            {
                MessageBox.Show("You are currently using the latest version of Tabular Editor.", "No updates available", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }