private void Name_Click(object sender, RoutedEventArgs e) { SQLiteClass.DateSumNameOrderByDirection = SQLiteClass.toggleDirection(SQLiteClass.DateSumNameOrderByDirection); SQLiteClass.DateSumSetOrderBy("name", SQLiteClass.DateSumNameOrderByDirection); ExecuteFirstSelectTableTaskTime(DateCalc.StringToDate(textboxDateSum.Text, System.Globalization.CultureInfo.CurrentCulture)); }
private void ButtonNewWindowOk_Click(object sender, RoutedEventArgs e) { Int64 retId; NewWindowOk.IsEnabled = false; // template description update check var selectedTemplate = (ListTemplate)templateBox.SelectedItem; if ((selectedTemplate.Id > 0) && (!string.IsNullOrEmpty(NewDescriptionBox.Text)) && (!string.IsNullOrEmpty(selectedTemplate.Template))) { var result = MessageBox.Show(Properties.Resources.WH_AlreadyExists, "taskalu", MessageBoxButton.YesNo, MessageBoxImage.Warning); if (result == MessageBoxResult.No) { NewWindowOk.IsEnabled = true; return; } } DateTime due = (DateTime)dateBox.SelectedDate; DateTime dueDate = new DateTime(due.Year, due.Month, due.Day, hourBox.SelectedIndex, (minuteBox.SelectedIndex * 5), 0); if (TimeZoneInfo.Local.IsInvalidTime(dueDate)) { MessageBox.Show(Properties.Resources.MW_InvalidDate); } else { ListViewFile lvFile = new ListViewFile() { Name = NewTitleBox.Text, Description = NewDescriptionBox.Text, Memo = "", Priority = priorityBox.Text, DueDate = TimeZoneInfo.ConvertTimeToUtc(dueDate).ToString("yyyy-MM-dd HH:mm:ss"), Status = "Active", WorkHolder = WorkHolder.CreateWorkHolder(NewTitleBox.Text) }; if (!string.IsNullOrEmpty(selectedTemplate.Template)) { lvFile.Description = selectedTemplate.Template; } retId = SQLiteClass.ExecuteInsertTable(SQLiteClass.dbpath, lvFile); SQLiteClass.ExecuteInsertTableFTSString(SQLiteClass.dbpath, retId, "tasklist_name", Ngram.getNgramText(NewTitleBox.Text, 2)); SQLiteClass.ExecuteInsertTableFTSString(SQLiteClass.dbpath, retId, "tasklist_description", Ngram.getNgramText(NewDescriptionBox.Text, 2)); // copy template path if (selectedTemplate.Id > 0) { string workHolder = WorkHolder.CreateWorkHolder(NewTitleBox.Text); WorkHolder.CopyTemplatePathToWorkFolder(SQLiteClass.dbpath, selectedTemplate.Id, workHolder); } // Dialog box accepted; ウィンドウを閉じる this.DialogResult = true; } NewWindowOk.IsEnabled = true; }
private void DurationDes_Click(object sender, RoutedEventArgs e) { SQLiteClass.DateSumNameOrderByDirection = "DESC"; SQLiteClass.DateSumSetOrderBy("duration", "DESC"); ExecuteFirstSelectTableTaskTime(DateCalc.StringToDate(textboxDateSum.Text, System.Globalization.CultureInfo.CurrentCulture)); }
private void DueDate_Click(object sender, RoutedEventArgs e) { SQLiteClass.duedateOrderByDirection = SQLiteClass.toggleDirection(SQLiteClass.duedateOrderByDirection); SQLiteClass.SetOrderBy("duedate", SQLiteClass.duedateOrderByDirection); ExecuteFirstSelectTable(); }
private void DueDateDes_Click(object sender, RoutedEventArgs e) { SQLiteClass.duedateOrderByDirection = "DESC"; SQLiteClass.SetOrderBy("duedate", "DESC"); ExecuteFirstSelectTable(); }
private void MemoDes_Click(object sender, RoutedEventArgs e) { SQLiteClass.memoOrderByDirection = "DESC"; SQLiteClass.SetOrderBy("memo", "DESC"); ExecuteFirstSelectTable(); }
private void Memo_Click(object sender, RoutedEventArgs e) { SQLiteClass.memoOrderByDirection = SQLiteClass.toggleDirection(SQLiteClass.memoOrderByDirection); SQLiteClass.SetOrderBy("memo", SQLiteClass.memoOrderByDirection); ExecuteFirstSelectTable(); }
private void NameAsc_Click(object sender, RoutedEventArgs e) { SQLiteClass.nameOrderByDirection = "ASC"; SQLiteClass.SetOrderBy("name", "ASC"); ExecuteFirstSelectTable(); }
private void PriorityDes_Click(object sender, RoutedEventArgs e) { SQLiteClass.priorityOrderByDirection = "DESC"; SQLiteClass.SetOrderBy("priority", "DESC"); ExecuteFirstSelectTable(); }
// ASC/DESC private void Priority_Click(object sender, RoutedEventArgs e) { SQLiteClass.priorityOrderByDirection = SQLiteClass.toggleDirection(SQLiteClass.priorityOrderByDirection); SQLiteClass.SetOrderBy("priority", SQLiteClass.priorityOrderByDirection); ExecuteFirstSelectTable(); }