Exemple #1
0
        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);
        }
Exemple #2
0
        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));
                }
            }
        }
Exemple #3
0
        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);
                }
            }
        }
Exemple #4
0
        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));
                    }
                }
            }
        }