Example #1
0
        /// <summary>
        /// 初期処理
        /// </summary>
        private void Initialize()
        {
            // コマンドを設定
            this.PrevDayCommand        = new DelegateCommand(PrevDayClick);
            this.NextDayCommand        = new DelegateCommand(NextDayClick);
            this.NewTodoCommand        = new DelegateCommand(NewTodoClick);
            this.SelectTemplateCommand = new DelegateCommand(SelectTemplateClick);
            this.EmptyTodoCommand      = new DelegateCommand(EmptyTodoClick);
            this.CalendarCommand       = new DelegateCommand(CalendarClick);
            this.EditCategoryCommand   = new DelegateCommand(EditCategoryClick, () => true);
            this.EditTemplateCommand   = new DelegateCommand(EditTemplateClick, () => true);
            this.DeleteCommand         = new DelegateCommand(DeleteClick, () => HasData);
            this.SelectDatabaseCommand = new DelegateCommand(SelectDatabaseClick);
            this.AddLogCommand         = new DelegateCommandWithParam <long>(AddLogClick);
            this.DeleteTodoCommand     = new DelegateCommandWithParam <int>(DeleteTodoClick);
            this.AddTempLogCommand     = new DelegateCommand(AddTempLogClick);
            this.DeleteTempLogCommand  = new DelegateCommandWithParam <int>(DeleteTempLogClick);

            // 初期データを表示
            this.RecordedOn = DateTime.Now.ToString(DateFormat);
            this.ShowDataByRecordedOn();
            var repo = new MyLogRepo();

            this.TempLogList = repo.SelectTempLogList();
        }
Example #2
0
        /// <summary>
        /// 初期処理
        /// </summary>
        private void Initialize()
        {
            // コマンドを設定
            this.AddTemplateCommand    = new DelegateCommand(AddTemplateClick);
            this.SelectTemplateCommand = new DelegateCommand(SelectTemplateClick);
            this.EditTemplateCommand   = new DelegateCommand(EditTemplateClick);
            this.DeleteTemplateCommand = new DelegateCommand(DeleteTemplateClick);
            this.SaveTemplateCommand   = new DelegateCommand(SaveTemplateClick);
            this.ClearCommand          = new DelegateCommand(ClearClick);
            this.AddLogCommand         = new DelegateCommandWithParam <long>(AddLogClick);
            this.DeleteTodoCommand     = new DelegateCommandWithParam <int>(DeleteTodoClick);

            //
            var repo = new TemplateRepo();

            this.TemplateList = repo.Select();
            this.CreateTemplateNameList();
        }