Exemplo n.º 1
0
 private void BuildUserInterface(NotepadFrame frame)
 {
     BuildMenu(frame.menuMain);
     BuildUIArea1(frame.splitControlArea.Panel1);
     BuildUIArea2(frame.splitControlArea.Panel2);
     _loggingController.Log(MessageType.information, " UI Built");
 }
Exemplo n.º 2
0
        private string GetStartingDirectory()
        {
            var startingDirectory = string.Empty;
            var appSettingsReader = new System.Configuration.AppSettingsReader();

            startingDirectory = (string)appSettingsReader.GetValue("startingFolder", typeof(string));
            _loggingController.Log(MessageType.information, " Initial directory loaded from config");
            return(startingDirectory);
        }
Exemplo n.º 3
0
 public NotepadController(SplitterPanel notePadPanel, ILoggingController loggingController)
 {
     _notePadPanel      = notePadPanel;
     _loggingController = loggingController;
     AddMDISupport();
     _loggingController.Log(MessageType.information, "NotePadController Constructed");
 }
Exemplo n.º 4
0
        public FileBrowserController(TabControl tabContainer, ILoggingController loggingController)
        {
            _tabContainer      = tabContainer;
            _loggingController = loggingController;

            BuildFileBrowser();
            FolderView.NodeMouseClick += FolderViewNodeMouseClick;
            PopulateLocal(GetStartingDirectory());
            _loggingController.Log(MessageType.information, "FileBrowserController Constructed");
        }
Exemplo n.º 5
0
 private void AddMDISupport()
 {
     MdiInterface = new TabControl {
         Dock = DockStyle.Fill
     };
     _notePadPanel.Controls.Add(MdiInterface);
     AddMDIPage();
     _loggingController.Log(MessageType.information, " Build interface ");
 }
Exemplo n.º 6
0
 public TodoController(ILoggingController loggingController, ITodoService service, TodoFrame frame)
 {
     _loggingController     = loggingController;
     _service               = service;
     _frame                 = frame;
     _frame.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     _frame.Closing        += _frame_Closing;
     CustomizePanels(_frame);
     LoadPanels();
     _loggingController.Log(MessageType.information, "TODO Board Setup");
 }
Exemplo n.º 7
0
        public IdeaController(TabControl area, IdeaService ideaService, ILoggingController loggingController)
        {
            _area              = area;
            this._ideaService  = ideaService;
            _loggingController = loggingController;
            BuildUIArea(_area);
            var ideaList = GetIdeaList(_area);

            PopulateData((ListView)ideaList);

            _loggingController.Log(MessageType.information, "IdeaController Constructed");
        }
Exemplo n.º 8
0
 public BrandController(NotepadController notepadController, FileBrowserController fileBrowserController,
                        IdeaController ideaController, ILoggingController loggingController, Form frame)
 {
     _notepadController     = notepadController;
     _fileBrowserController = fileBrowserController;
     _ideaController        = ideaController;
     _loggingController     = loggingController;
     _frame = (NotepadFrame)frame;
     SetUpIconList();
     SetIcons(true);
     ActiveBrand = Brands.Normal;
     loggingController.Log(MessageType.information, "BrandController Constructed");
 }
Exemplo n.º 9
0
 public MainController(NotepadController notepadController,
                       FileBrowserController fileBrowserController,
                       BrandController brandController,
                       NotepadFrame frame, IdeaController ideaController, ITodoController todoController,
                       ILoggingController loggingController)
 {
     _notepadController               = notepadController;
     _fileBrowserController           = fileBrowserController;
     _fileBrowserController.OpenFile += OpenFile;
     _brandController   = brandController;
     _frame             = frame;
     _ideaController    = ideaController;
     _todoController    = todoController;
     _loggingController = loggingController;
     BuildUserInterface(frame);
     _loggingController.Log(MessageType.information, "MainController constructed");
     _frame.scOuter.Panel2Collapsed = true;
 }
Exemplo n.º 10
0
        private void CustomizePanels(TodoFrame frame)
        {
            var tableLayoutPanel = new TableLayoutPanel {
                Dock = DockStyle.Fill, RowCount = 1, ColumnCount = 3, HorizontalScroll = { Enabled = false, Visible = false }
            };

            _frame.Controls.Add(tableLayoutPanel);

            //add wrap panals (flowpanals)
            todoArea = new FlowLayoutPanel {
                Dock = DockStyle.Fill, FlowDirection = FlowDirection.TopDown, WrapContents = false, AutoScroll = false, HorizontalScroll = { Visible = false, Enabled = false }, Height = 576, BorderStyle = BorderStyle.FixedSingle, AllowDrop = true
            };
            doingArea = new FlowLayoutPanel {
                Dock = DockStyle.Fill, FlowDirection = FlowDirection.TopDown, WrapContents = false, AutoScroll = false, HorizontalScroll = { Visible = false, Enabled = false }, Height = 576, BorderStyle = BorderStyle.FixedSingle, AllowDrop = true
            };
            doneArea = new FlowLayoutPanel {
                Dock = DockStyle.Fill, FlowDirection = FlowDirection.TopDown, WrapContents = false, AutoScroll = false, Height = 576, HorizontalScroll = { Visible = false, Enabled = false }, BorderStyle = BorderStyle.FixedSingle, AllowDrop = true
            };


            todoArea.DragEnter  += TodoArea_DragEnter;
            doingArea.DragEnter += DoingArea_DragEnter;
            doneArea.DragEnter  += DoneArea_DragEnter;


            todoArea.DragDrop  += TodoArea_DragDrop;
            doingArea.DragDrop += DoingArea_DragDrop;
            doneArea.DragDrop  += DoneArea_DragDrop;

            // https://www.codeproject.com/Questions/571197/disableplustheplushorizontalplusscrollbarplusinplu
            todoArea.AutoScroll  = true;
            doingArea.AutoScroll = true;
            doneArea.AutoScroll  = true;

            var columnStyle1 = new ColumnStyle(SizeType.Percent, 30f);
            var columnStyle2 = new ColumnStyle(SizeType.Percent, 30f);
            var columnStyle3 = new ColumnStyle(SizeType.Percent, 30f);

            //var todoHeader = new Label{Text = "TODO",TextAlign = ContentAlignment.MiddleCenter, Width = 320, BackColor = Color.AntiqueWhite,Anchor = AnchorStyles.Top};
            var todoHeader = new FlowLayoutPanel {
                FlowDirection = FlowDirection.LeftToRight, WrapContents = false, Height = 20, Width = 320, BackColor = Color.AntiqueWhite
            };
            var AddButton = new Button {
                Text = "+", Width = 20, TextAlign = ContentAlignment.MiddleCenter, BackColor = Color.AntiqueWhite, Anchor = AnchorStyles.Top, Margin = Padding.Empty, FlatStyle = FlatStyle.Flat
            };

            AddButton.FlatAppearance.BorderSize = 0;
            AddButton.Click += AddButton_Click;
            todoHeader.Controls.Add(AddButton);
            todoHeader.Controls.Add(new Label {
                Text = "TODO", TextAlign = ContentAlignment.MiddleCenter, Width = 320, BackColor = Color.AntiqueWhite, Anchor = AnchorStyles.Top
            });



            var doingHeader = new Label {
                Text = "Doing", TextAlign = ContentAlignment.MiddleCenter, Width = 320, BackColor = Color.BurlyWood, Anchor = AnchorStyles.Top
            };

            var doneHeader = new Label {
                Text = "Done", TextAlign = ContentAlignment.MiddleCenter, Width = 320, BackColor = Color.Gold, Anchor = AnchorStyles.Top
            };


            tableLayoutPanel.ColumnStyles.Add(columnStyle1);
            tableLayoutPanel.ColumnStyles.Add(columnStyle2);
            tableLayoutPanel.ColumnStyles.Add(columnStyle3);

            tableLayoutPanel.Controls.Add(todoHeader, 0, 0);
            tableLayoutPanel.Controls.Add(doingHeader, 1, 0);
            tableLayoutPanel.Controls.Add(doneHeader, 2, 0);

            tableLayoutPanel.Controls.Add(todoArea, 0, 1);
            tableLayoutPanel.Controls.Add(doingArea, 1, 1);
            tableLayoutPanel.Controls.Add(doneArea, 2, 1);

            _areas.Add(PositionNames.Todo, todoArea);
            _areas.Add(PositionNames.Doing, doingArea);
            _areas.Add(PositionNames.Done, doneArea);
            _loggingController.Log(MessageType.information, "TODO Panals Setup");
        }