Пример #1
0
        public ConfigForm(Config data)
        {
            this.data = data;

            InitializeComponent();

            panel = new CSScriptIntellisense.ConfigForm(CSScriptIntellisense.Config.Instance);
            generalPage.Controls.Add(panel.ContentPanel);

            checkUpdates.Checked = data.CheckUpdatesOnStartup;
            useCS6.Checked       = data.UseRoslynProvider;

            installedEngineLocation.Text           = CSScriptHelper.SystemCSScriptDir ?? "<not detected>";
            installedEngineLocation.SelectionStart = installedEngineLocation.Text.Length - 1;
            scriptsDir.Text = data.ScriptsDir;

            embeddedEngine.Checked = data.UseEmbeddedEngine;

            restorePanels.Checked = data.RestorePanelsAtStartup;
            if (!data.UseEmbeddedEngine)
            {
                if (data.UseCustomEngine.IsEmpty())
                {
                    installedEngine.Checked = true;
                }
                else
                {
                    customEngine.Checked      = true;
                    customEngineLocation.Text = data.UseCustomEngine;
                }
            }
        }
Пример #2
0
        public ConfigForm(Config data)
        {
            this.data = data;

            InitializeComponent();

            panel = new CSScriptIntellisense.ConfigForm(CSScriptIntellisense.Config.Instance);
            generalPage.Controls.Add(panel.ContentPanel);

            checkUpdates.Checked = data.CheckUpdatesOnStartup;
            useCS6.Checked       = data.UseRoslynProvider;

            installedEngineLocation.Text           = CSScriptHelper.SystemCSScriptDir ?? "<not detected>";
            installedEngineLocation.SelectionStart = installedEngineLocation.Text.Length - 1;
            scriptsDir.Text = data.ScriptsDir;

            embeddedEngine.Checked = data.UseEmbeddedEngine;

            restorePanels.Checked = data.RestorePanelsAtStartup;

            RefreshUseCustomLauncherCmd(data.UseCustomLauncher);
            useCustomLauncher.Checked = !data.UseCustomLauncher.IsEmpty() && data.UseCustomLauncher != defaultLauncher;

            if (!data.UseEmbeddedEngine)
            {
                if (data.UseCustomEngine.IsEmpty())
                {
                    installedEngine.Checked = true;
                }
                else
                {
                    customEngine.Checked      = true;
                    customEngineLocation.Text = data.UseCustomEngine;
                }
            }
            customSyntaxer.Checked     = data.CustomSyntaxer;
            customSyntaxerExe.Text     = data.CustomSyntaxerExe;
            syntaxerPort.Text          = data.SyntaxerPort.ToString();
            customSyntaxerExe.ReadOnly = !customSyntaxer.Checked;

            cssInstallCmd.Text        = CSScriptHelper.InstallCssCmd;
            cssyntaxerInstallCmd.Text = CSScriptHelper.InstallCsSyntaxerCmd;
        }
Пример #3
0
        public ConfigForm(Config data)
        {
            this.data = data;

            InitializeComponent();

            panel = new CSScriptIntellisense.ConfigForm(CSScriptIntellisense.Config.Instance);
            generalPage.Controls.Add(panel.ContentPanel);

            checkUpdates.Checked = data.CheckUpdatesOnStartup;

            scriptsDir.Text = data.ScriptsDir;

            embeddedEngine.Checked    = data.UseEmbeddedEngine;
            customLocationBtn.Checked = !embeddedEngine.Checked;

            restorePanels.Checked = data.RestorePanelsAtStartup;

            customEngineLocation.Text = data.CustomEngineAsm;
            customSyntaxerExe.Text    = data.CustomSyntaxerAsm;
            syntaxerPort.Text         = data.CustomSyntaxerPort.ToString();

            if (customEngineLocation.Text.IsEmpty() && CSScriptHelper.IsCSScriptInstalled)
            {
                customEngineLocation.Text = CSScriptHelper.SystemCSScriptDir.PathJoin("cscs.dll");
            }

            if (customSyntaxerExe.Text.IsEmpty() && CSScriptHelper.IsCSSyntaxerInstalled)
            {
                customSyntaxerExe.Text = CSScriptHelper.SystemCSSyntaxerDir.PathJoin("syntaxer.dll");
            }

            cssInstallCmd.Text        = CSScriptHelper.InstallCssCmd;
            cssyntaxerInstallCmd.Text = CSScriptHelper.InstallCsSyntaxerCmd;

            customLocationBtn_CheckedChanged(null, null);
        }