public Notes() { InitializeComponent(); CurrItem = App.CurrentItem; textBoxNotes.Text = CurrItem.Notes; textBlockTitle.Text = CurrItem.textboxTaskContent.Text; }
public void LoadData(TaskFrame Frame) { List<TaskShellInfo> tsList = App.tsList; if (tsList == null) { return; } foreach (TaskShellInfo tsInfo in tsList) { TaskShell ts = new TaskShell(); foreach (TaskItemlInfo tiInfo in tsInfo.ItemList) { TaskItem ti = new TaskItem(); ti.Margin = new System.Windows.Thickness(2); ti.TaskContent = tiInfo.Content; ti.IsCompleted = tiInfo.IsCompleted; ts.AddTask(ti); } ts.TaskShellName = tsInfo.Name; Frame.AddShell(ts); } }
private void AddTaskItem() { TaskItem item = new TaskItem(DelTask); item.Margin = new System.Windows.Thickness(2); Pool.Children.Add(item); }
public void AddTask(TaskItem t) { t.DeleteSelf = DelTask; Pool.Children.Add(t); }
public void LoadData() { PivotTask.Items.Clear(); List<TaskListInfo> Lists = (List<TaskListInfo>)DataStorage.GetInstance().LoadData(Key); if (Lists == null) { foreach (string header in LanguageContent.GetInstance().Headers) { AddPivot(header); } return; } foreach (TaskListInfo ListInfo in Lists) { ListBox ItemList = new ListBox(); foreach (TaskIteminfo ItemInfo in ListInfo.Items) { TaskItem Item = new TaskItem(); Item.textboxTaskContent.Text = ItemInfo.Content; Item.IsFinished = ItemInfo.IsFinish; Item.Notes = ItemInfo.Note; Item.IsPriority = ItemInfo.IsPriority; Item.date = ItemInfo.date; Item.UpdateTextColor(); ItemList.Items.Add(Item); } PivotItem Pi = CreatePivot(ListInfo.Header); Pi.Content = ItemList; PivotTask.Items.Add(Pi); } }
private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { if (TextBoxTaskInfo.Text == "") { return; } TaskItem item = new TaskItem(); item.textboxTaskContent.Text = TextBoxTaskInfo.Text; TextBoxTaskInfo.Text = ""; PivotItem Item = (PivotItem)PivotTask.SelectedItem; if (Item == null) { ApplicationBarMenuItem_Click_AddNewList(sender, e); return; } ListBox listbox = (ListBox)Item.Content; listbox.Items.Add(item); }
private void AddPivot(string Header) { ListBox lb = new ListBox(); TaskItem ti = new TaskItem(); ti.textboxTaskContent.Text = LanguageContent.GetInstance().TextItemHit; ti.textboxTaskContent.Foreground = new SolidColorBrush(Colors.DarkGray); lb.Items.Add(ti); PivotItem p = CreatePivot(Header); p.Content = lb; try { PivotTask.Items.Add(p); } catch (System.Exception ex) { MessageBox.Show(ex.ToString()); } }