Esempio n. 1
0
        public TaskManager(IApp app, TaskListService service)
        {
            this.app     = app;
            this.service = service;

            this.sciMap                   = new Dictionary <ScintillaControl, Object>();
            this.nodeMap                  = new Dictionary <CodeDocument, TreeNode>();
            this.treeView                 = new BufferedTreeView();
            this.treeView.Font            = Fonts.Text;
            this.treeView.BorderStyle     = BorderStyle.None;
            this.treeView.ShowLines       = false;
            this.treeView.BeforeExpand   += TreeViewBeforeExpand;
            this.treeView.NodeMouseClick += NodeMouseClick;

            var img = new ImageList();

            img.ColorDepth       = ColorDepth.Depth32Bit;
            img.TransparentColor = Color.Magenta;
            img.ImageSize        = new Size(16, 16);
            img.Images.Add("Folder", Bitmaps.Load <NS>("Folder"));
            img.Images.Add("Task", Bitmaps.Load <NS>("Task"));
            treeView.ImageList = img;

            var srv = app.GetService <IDocumentService>();

            srv.EnumerateDocuments().ForEach(d => AddDocument(d as CodeDocument));
            srv.DocumentAdded   += DocumentAdded;
            srv.DocumentRemoved += DocumentRemoved;
        }
Esempio n. 2
0
        public TaskManager(IApp app, TaskListService service)
        {
            this.app = app;
            this.service = service;

            this.sciMap = new Dictionary<ScintillaControl,Object>();
            this.nodeMap = new Dictionary<CodeDocument,TreeNode>();
            this.treeView = new BufferedTreeView();
            this.treeView.Font = Fonts.Text;
            this.treeView.BorderStyle = BorderStyle.None;
            this.treeView.ShowLines = false;
            this.treeView.BeforeExpand += TreeViewBeforeExpand;
            this.treeView.NodeMouseClick += NodeMouseClick;

            var img = new ImageList();
            img.ColorDepth = ColorDepth.Depth32Bit;
            img.TransparentColor = Color.Magenta;
            img.ImageSize = new Size(16, 16);
            img.Images.Add("Folder", Bitmaps.Load<NS>("Folder"));
            img.Images.Add("Task", Bitmaps.Load<NS>("Task"));
            treeView.ImageList = img;

            var srv = app.GetService<IDocumentService>();
            srv.EnumerateDocuments().ForEach(d => AddDocument(d as CodeDocument));
            srv.DocumentAdded += DocumentAdded;
            srv.DocumentRemoved += DocumentRemoved;
        }