Example #1
0
        /// <summary>
        /// 보드 폼 생성자, 프로그램 실행 시 최초 호출
        /// </summary>
        public BoardForm()
        {
            InitializeComponent();

            workForm    = new WorkForm();
            tabEditForm = new TabEditForm();


            CreateWorkBtn = new Button
            {
                Size     = new Size(100, 30),
                Location = new Point(10, 10),
                Text     = "새 일정",
                Name     = "MakeNewWorkButton",
                UseVisualStyleBackColor = true
            };
            CreateWorkBtn.Click += (s, e) =>
            {
                CBoardForm.isLabel = false;
                CBoardForm.OpenWorkForm();
            };
            //taeyoon
            MoveWorkBtn = new Button {
                Size     = new Size(100, 30),
                Location = new Point(150, 10),
                Text     = "일정 이동",
                UseVisualStyleBackColor = true
            };
            MoveWorkBtn.Click += (s, e) =>
            {
                CBoardForm.OpneMoveWorkForm();
            };

            // 폼 생성
            CBoardForm    = new BoardFormController(this, workForm);
            CWorkForm     = new WorkFormController(this, workForm);
            CTabForm      = new TabEditFormController(tabEditForm);
            CMoveWorkForm = new MoveWorkFormController(this);
            // 폼에 컨트롤러 연결
            workForm.Link(CWorkForm);

            // 기존 데이터 불러오기
            // 정상적으로 데이터를 불러 왔다면 불러온 데이터로 초기화
            // null이라면 기본 데이터로 초기화
            CData = new DataController();
            BoardData tmp = CData.DeserializeData();

            if (tmp != null)
            {
                CBoardForm.BoardData = tmp;
                CData.Init(this);
            }
            else
            {
                CBoardForm.Init();
            }
        }
Example #2
0
 public MoveWorkForm(MoveWorkFormController controller)  //structer
 {
     InitializeComponent();
     moveWorkFormController = controller;
     ClickedLabel           = null;
     //tabControl 2개 초기화 시켜야함
     moveWorkFormController.initTabControl(tabControl1, tabControl2);
     foreach (TabPage t in tabControl1.TabPages)
     {
         foreach (Label label in t.Controls)
         {
             label.MouseDown += Label_MouseDown;
         }
     }
     foreach (TabPage t in tabControl2.TabPages)
     {
         foreach (Label label in t.Controls)
         {
             label.MouseDown += Label_MouseDown;
         }
     }
 }
Example #3
0
 public void Link(MoveWorkFormController _moveWorkFormController)  //controller랑 연결
 {
     moveWorkFormController = _moveWorkFormController;
 }