private void UpdateConfig(ScriptDocumentControlConfig config) { checkBoxShowTabs.Checked = config.ShowTabs; checkBoxShowSpaces.Checked = config.ShowSpaces; checkBoxShowLineNumbers.Checked = !config.HideLineNumbers; checkBoxConvertTabsToSpaces.Checked = config.ConvertTabsToSpaces; checkBoxShowEOLMarkers.Checked = config.ShowEndofLineMarkers; }
private void UpdateConfig(ScriptDocumentControlConfig config) { checkBoxShowTabs.Checked = config.ShowTabs; checkBoxShowSpaces.Checked = config.ShowSpaces; checkBoxShowLineNumbers.Checked = !config.HideLineNumbers; checkBoxConvertTabsToSpaces.Checked = config.ConvertTabsToSpaces; checkBoxShowEOLMarkers.Checked = config.ShowEndofLineMarkers; }
private void UpdateConfig(ScriptDocumentControlConfig config) { _config = config; textEditorControl.ShowSpaces = _config.ShowSpaces; textEditorControl.ShowTabs = _config.ShowTabs; textEditorControl.ConvertTabsToSpaces = _config.ConvertTabsToSpaces; textEditorControl.ShowLineNumbers = !_config.HideLineNumbers; textEditorControl.ShowEOLMarkers = _config.ShowEndofLineMarkers; }
private ScriptDocumentControlConfig RebuildConfig() { ScriptDocumentControlConfig config = new ScriptDocumentControlConfig(); config.ConvertTabsToSpaces = checkBoxConvertTabsToSpaces.Checked; config.HideLineNumbers = !checkBoxShowLineNumbers.Checked; config.ShowSpaces = checkBoxShowSpaces.Checked; config.ShowTabs = checkBoxShowTabs.Checked; config.ShowEndofLineMarkers = checkBoxShowEOLMarkers.Checked; return(config); }
private ScriptDocumentControlConfig RebuildConfig() { ScriptDocumentControlConfig config = new ScriptDocumentControlConfig(); config.ConvertTabsToSpaces = checkBoxConvertTabsToSpaces.Checked; config.HideLineNumbers = !checkBoxShowLineNumbers.Checked; config.ShowSpaces = checkBoxShowSpaces.Checked; config.ShowTabs = checkBoxShowTabs.Checked; config.ShowEndofLineMarkers = checkBoxShowEOLMarkers.Checked; return config; }
// TODO: Fix this :) public ScriptDocumentControl(IDocumentObject document, bool forParserDocument) { _document = (ScriptDocument)document; _currText = _document.Script; InitializeComponent(); Text = _document.Name; ScriptDocumentControlConfig config = _document.GetProperty <ScriptDocumentControlConfig>(DOCUMENT_CONFIG_NAME, false); UpdateConfig(config ?? DocumentControl.GetConfigItem <ScriptDocumentControlConfig>(GetConfigForEngine(_document.Container.Engine), true)); LoadFile(_document.Script); _forParserDocument = forParserDocument; if (!forParserDocument) { if (this.ParentForm != null) { this.ParentForm.FormClosing += new FormClosingEventHandler(ParentForm_FormClosing); } } textEditorControl.ActiveTextAreaControl.Document.UndoStack.OperationPushed += new OperationEventHandler(UndoStack_OperationPushed); textEditorControl.ActiveTextAreaControl.Document.UndoStack.ActionUndone += new EventHandler(UndoStack_ActionUndone); textEditorControl.ActiveTextAreaControl.Document.UndoStack.ActionRedone += new EventHandler(UndoStack_ActionUndone); if (GlobalControlConfig.ScriptEditorFont != null) { textEditorControl.Font = GlobalControlConfig.ScriptEditorFont; } if (forParserDocument) { toolStripButtonSave.Visible = false; toolStripButtonOptions.Visible = false; toolStripButtonOpenTest.Visible = false; } }
private void UpdateConfig(ScriptDocumentControlConfig config) { _config = config; textEditorControl.ShowSpaces = _config.ShowSpaces; textEditorControl.ShowTabs = _config.ShowTabs; textEditorControl.ConvertTabsToSpaces = _config.ConvertTabsToSpaces; textEditorControl.ShowLineNumbers = !_config.HideLineNumbers; textEditorControl.ShowEOLMarkers = _config.ShowEndofLineMarkers; }
public ScriptEditorConfigurationForm(ScriptDocumentControlConfig config) { InitializeComponent(); scriptDocumentConfigEditorControl.Config = config; }