Beispiel #1
0
        private void refreshTaskTable()
        {
            TaskManager     manager  = TaskManager.getInstance();
            List <TaskItem> taskList = manager.getTaskList();

            this.taskListPanel.Controls.Clear();
            TaskViewManager.getInstance().clear();

            DateTime date = new DateTime();
            int      max  = Properties.Settings.Default.taskNum;

            for (int i = 0; i < taskList.Count && i < max; i++)
            {
                TaskItem task = taskList[i];

                if (task.Deadline.Date != date)
                {
                    addDateView(task.Deadline.Date);
                    date = task.Deadline.Date;
                }
                addTaskView(task);
            }

            this.taskListPanel.AutoScroll = false;
            this.taskListPanel.AutoScroll = true;
        }
Beispiel #2
0
 ///タスク追加ボタンのクリックイベント
 private void addButton_Click(object sender, EventArgs e)
 {
     //タスク編集(MODE=New)を表示
     showTaskEditView(EDIT_MODE.New);
     //タスク一覧をロック
     TaskViewManager.getInstance().hideAllMenuContent();
 }
Beispiel #3
0
        private void addTaskView(TaskItem task)
        {
            TaskView view = new TaskView(task);

            view.doneButton_Click   += done;
            view.editButton_Click   += edit;
            view.deleteButton_Click += delete;
            this.taskListPanel.Controls.Add(view);
            TaskViewManager.getInstance().addTaskView(view);
        }
Beispiel #4
0
        /// <summary>
        /// メイン画面にタスクビューを表示
        /// </summary>
        /// <param name="task"></param>
        private void addTaskView(TaskItem task)
        {
            TaskView view = new TaskView(task);

            view.completeButton_Click += complete;
            view.editButton_Click     += edit;
            view.deleteButton_Click   += delete;
            //ビューのコントロールを追加
            this.taskListPanel.Controls.Add(view);
            //リストに追加
            TaskViewManager.getInstance().addTaskView(view);
        }
Beispiel #5
0
        private void hideTaskEditView()
        {
            this.mainPanel.Controls.Remove(this.taskEditView);
            this.mainPanel.SetRow(this.taskListPanel, 0);
            this.mainPanel.SetRowSpan(this.taskListPanel, 2);

            this.settingButton.Enabled         = true;
            this.settingButton.BackgroundImage = Properties.Resources.setting_enable;

            this.addButton.Enabled         = true;
            this.addButton.BackgroundImage = Properties.Resources.plus_enable;

            TaskViewManager.getInstance().setTaskViewLock(false);
        }
Beispiel #6
0
        //タスクのオプション表示
        private void showOptionContent()
        {
            if (this.Lock)
            {
                return;
            }
            this.mainPanel.Controls.Clear();
            TaskOptionPanel opt = createOptionPanel();

            this.mainPanel.Controls.Add(opt, 0, 0);
            this.mainPanel.SetColumnSpan(opt, this.mainPanel.ColumnCount);
            this.showOption = true;
            //指定タスク以外のオプションを非表示に
            TaskViewManager.getInstance().indicateShowMenu(this);
        }
Beispiel #7
0
        private void showSettingView()
        {
            this.mainPanel.SetRowSpan(this.taskListPanel, 1);
            this.mainPanel.SetRow(this.taskListPanel, 1);

            this.mainPanel.Controls.Add(this.settingView);
            this.mainPanel.SetRow(this.settingView, 0);

            this.settingButton.Enabled         = false;
            this.settingButton.BackgroundImage = Properties.Resources.setting_disable;

            this.addButton.Enabled         = false;
            this.addButton.BackgroundImage = Properties.Resources.plus_disable;

            TaskViewManager.getInstance().hideAllMenuContent();
            TaskViewManager.getInstance().setTaskViewLock(true);
        }
Beispiel #8
0
        private void showTaskEditView(EDIT_MODE mode)
        {
            this.mainPanel.SetRowSpan(this.taskListPanel, 1);
            this.mainPanel.SetRow(this.taskListPanel, 1);

            this.mainPanel.Controls.Add(this.taskEditView);
            this.mainPanel.SetRow(this.taskEditView, 0);

            this.settingButton.Enabled         = false;
            this.settingButton.BackgroundImage = Properties.Resources.setting_disable;

            this.addButton.Enabled         = false;
            this.addButton.BackgroundImage = Properties.Resources.plus_disable;

            this.taskEditView.setEditMode(mode);

            TaskViewManager.getInstance().setTaskViewLock(true);
        }
Beispiel #9
0
 private void addButton_Click(object sender, EventArgs e)
 {
     showTaskEditView(EDIT_MODE.New);
     TaskViewManager.getInstance().hideAllMenuContent();
 }