public static void ApplyStyle(this StyleItemConfig s, ScintillaControl sci) { var style = (Style)Reflect.GetPropertyValue(sci.Styles, s.Type); if (s.FontName != null) style.Font = s.FontName; if (s.FontSize != 0) style.FontSize = s.FontSize; if (s.ForeColor != null) style.ForeColor = Color.FromKnownColor(s.ForeColor.Value); if (s.BackColor != null) style.BackColor = Color.FromKnownColor(s.BackColor.Value); if (s.Bold != null) style.Bold = s.Bold.Value; if (s.Italic != null) style.Italic = s.Italic.Value; if (s.Underline != null) style.Underline = s.Underline.Value; }
internal BackgroundCompiler(IApp app, ScintillaControl sci, IBackgroundCompiler compiler, BackgroundCompilerService service) { this.app = app; this.sci = sci; this.compiler = compiler; this.service = service; }
private void AddBookmark(ScintillaControl sci, TreeNode parent, int line) { var txt = sci.GetLine(line).Text.TrimStart(' ', '\t'); txt = !String.IsNullOrEmpty(txt) && txt.Length > 30 ? txt.Substring(0, 30) + "..." : txt; var tn = new TreeNode(String.Format("Line {0}: {1}", (line + 1), txt)); tn.ImageKey = tn.SelectedImageKey = "Bookmark"; tn.Tag = line; parent.Nodes.Add(tn); tn.ContextMenuStrip = contextMenu; }
public static void UpdateStyles(this IEnumerable<StyleItemConfig> styles, ScintillaControl sci) { var def = styles.First(s => s.Type == "Default"); def.ApplyStyle(sci); sci.ResetStyles(); foreach (var s in styles.Where(t => t.Type != "Default")) s.ApplyStyle(sci); }
internal BuildLogger(IApp app, Document doc, ScintillaControl sci, BuildOptions options) { this.app = app; this.doc = doc; this.sci = sci; this.options = options; app.CloseView("ErrorList"); this.err = app.GetService<IErrorListService>(); this.output = app.GetService<IOutputService>(); }
public OutputControl() { InitializeComponent(); sci = new ScintillaControl(); sci.Dock = DockStyle.Fill; sci.MarginVisible = false; sci.ViewWhiteSpace = false; sci.IndentationGuides = false; sci.UseTabs = false; sci.AttachDocument(sci.CreateDocument()); sci.ReadOnly = true; sci.UseUnicodeLexing = true; panel.Controls.Add(sci); }
internal FoldingManager(ScintillaControl sci) { this.sci = sci; }
public OutputView() { this.control = new OutputControl(); this.sci = control.Scintilla; this.sci.StyleNeeded += Lex; }
public AutocompleteManager(IApp app, ScintillaControl sci) { this.app = app; this.sci = sci; }
private void TreeViewBeforeExpand(object sender, TreeViewCancelEventArgs e) { e.Node.Nodes.Clear(); var doc = e.Node.Tag as TextDocument; if (doc != null) { var sciDoc = doc.GetSciDocument(); using (var sci = new ScintillaControl()) { sci.AttachDocument(sciDoc); sci.GetAllBookmarks().ForEach(l => AddBookmark(sci, e.Node, l)); } } }
private void RemoveBookmark(TreeNode n) { if (n != null && n.Tag is Int32) { var i = (Int32)n.Tag; var doc = n.Parent.Tag as TextDocument; if (doc != null) { var sciDoc = doc.GetSciDocument(); using (var sciTemp = new ScintillaControl()) { sciTemp.AttachDocument(sciDoc); sciTemp.RemoveBookmark(i); } treeView.Nodes.Remove(n); } } }
public ConsoleTextBox(int historySize) { sci = new ScintillaControl(); history = new HistoryList<String>(historySize); Initialize(); }
internal ElaFunctions(IApp app, ScintillaControl sci) { this.app = app; this.sci = sci; }
private void AddTask(ScintillaControl sci, TreeNode parent, TaskItem task) { var txt = sci.GetTextRangeUnicode(task.Position, task.Position + task.Length).Trim(':', '-', '.', ' ', '\r', '\n'); txt = !String.IsNullOrEmpty(txt) && txt.Length > 30 ? txt.Substring(0, 30) + "..." : txt; var tn = new TreeNode(String.Format("{0}: {1} ({2},{3})", task.Type.ToString().ToUpper(), txt, sci.GetLineFromPosition(task.Position) + 1, sci.GetColumnFromPosition(task.Position) + 1)); tn.ImageKey = tn.SelectedImageKey = "Task"; tn.Tag = task; parent.Nodes.Add(tn); }
private void TreeViewBeforeExpand(object sender, TreeViewCancelEventArgs e) { e.Node.Nodes.Clear(); var doc = e.Node.Tag as CodeDocument; if (doc != null) { var sciDoc = doc.GetSciDocument(); using (var sci = new ScintillaControl()) { sci.AttachDocument(sciDoc); var tp = service.GetTaskProvider(doc); if (tp != null) { var tasks = tp.GetTasks(doc); tasks.ForEach(t => AddTask(sci, e.Node, t)); } } } }