private SourceContainerDocument CreateNewDocument(FileClass fileClass) { var sourceContainerDocument = new SourceContainerDocument(); sourceContainerDocument.SetSourceFileClass(fileClass); return(sourceContainerDocument); }
public void ReloadDocumentContent(SourceContainerDocument sourceContainerDocument, FileClass fileClass) { fileClass.Text = ReadSourceFile(fileClass.FilePath); fileClass.TextState = ETextState.ReadNotChanged; fileClass.IsOpened = true; sourceContainerDocument.SetSourceFileClass(fileClass); }
private void AnalyzeTypesInSource() { if (IsEditFunctionType) { return; } SourceContainerDocument.AnalyzeSource(); }
private void toolStripButton1_Click(object sender, EventArgs e) { SourceContainerDocument activeSourceContainerDocument = MainEngine.Instance.GetActiveSourceContainerDocument(); activeSourceContainerDocument.SourceEditorPanel.fastColoredTextBox1.Font = new Font("Consolas", 9.75f, FontStyle.Regular); // fastColoredTextBox1.Font = new Font("Consolas", 9.25f, FontStyle.Regular); // fastColoredTextBox1.Font = new Font("Consolas", 10f, FontStyle.Regular); // fastColoredTextBox1.Font = new Font("Arial", 10f, FontStyle.Regular); // fastColoredTextBox1.Font = new Font("Source Code Pro-Regular", 10f, FontStyle.Regular); }
private void FastColoredTextBox1OnSelectionChangedDelayed(object sender, EventArgs eventArgs) { HighlightSelected(sender); if (_isdisableHighlightingObjectOnce == true) { _isdisableHighlightingObjectOnce = false; return; } if (IsSqlSyntax == false) { SourceContainerDocument.HighlightObjectInObjectExplorer(fastColoredTextBox1.Selection.FromLine); } }
private void OpenOrSwitchFile(FileClass fileClass, bool reloadFileContent = false) { if (fileClass != null) { SourceContainerDocument newDocument = null; DockPane orDefault = MainDockPanel.Panes.FirstOrDefault(x => x.Appearance == DockPane.AppearanceStyle.Document); if (orDefault != null) { IDockContent firstOrDefault = orDefault.Contents.FirstOrDefault(s => (s is SourceContainerDocument) && ((SourceContainerDocument)s).FileClass.FilePath == fileClass.FilePath); if (firstOrDefault != null) { newDocument = firstOrDefault as SourceContainerDocument; } } if (newDocument == null) { if (fileClass.TextState == ETextState.UnRead) { fileClass.Text = ReadSourceFile(fileClass.FilePath); fileClass.TextState = ETextState.ReadNotChanged; } fileClass.IsOpened = true; newDocument = CreateNewDocument(fileClass); OpenedDocumentsPanel.RefreshOpenedDocumentsList(); if (App.Configuration.SaveOnCloseOpenDocument) { if (MainEngine.Instance.IsLoadingWorkspase == false) { SaveWorkSpace(); } } } else { if (reloadFileContent) { ReloadDocumentContent(newDocument, fileClass); } } if (reloadFileContent == false) { ShowPanel(newDocument); } newDocument.SourceEditorPanel.fastColoredTextBox1.Focus(); } }
public void RemeberOpenedDocumentsList() { var workSpaceItem = GetWorkspace(App.Configuration.CurrentWorkSpaceName); workSpaceItem.FileClasses.Clear(); foreach (var dockContent in MainDockPanel.Contents) { if (dockContent is SourceContainerDocument) { SourceContainerDocument content = (SourceContainerDocument)dockContent; workSpaceItem.FileClasses.Add(new FileClassInWorkspace() { FilePath = content.FileClass.FilePath, Name = content.FileClass.Name }); } } }
private void toolStripButton4_Click(object sender, EventArgs e) { SourceContainerDocument.ReloadDocumentContent(); }
private void toolStripButton1_Click(object sender, EventArgs e) { SourceContainerDocument.FindTextAllInSource(fastColoredTextBox1.SelectedText); }
public SourceContainerDocument GetActiveSourceContainerDocument() { SourceContainerDocument sourceContainerDocument = MainForm.ActiveMdiChild as SourceContainerDocument; return(sourceContainerDocument); }
private void ShowPanel(SourceContainerDocument dummyDoc) { dummyDoc.Show(MainDockPanel); }
private void CopySql_Button_Click(object sender, EventArgs e) { SourceContainerDocument.CopySql(); }