//Feladat szerkesztése a listview-ban public void EditTaksInListView(Task task, int index) { String alarm = (task.isAlarm()) ? "Igen" : "Nem"; lvTasks.Items[index].SubItems[0].Text = task.getPriority(); lvTasks.Items[index].SubItems[1].Text = task.getName(); lvTasks.Items[index].SubItems[2].Text = task.getCategory(); lvTasks.Items[index].SubItems[3].Text = task.getDate().ToString(DateTimeFormat); lvTasks.Items[index].SubItems[4].Text = alarm; }
//Feladat hozzáadása a listview-hoz private void AddFinishedTasks(Task task, DateTime dateCompleted) { ListViewItem lvi = new ListViewItem(task.getName()); lvi.SubItems.Add(task.getCategory()); lvi.SubItems.Add(task.getDate().ToString(MainForm.DateTimeFormat)); lvi.SubItems.Add(dateCompleted.ToString(MainForm.DateTimeFormat)); lvDoneTask.Items.Add(lvi); }
//Feladat hozzáadása a listview-hoz public void AddTaskToListView(Task task) { String alarm = (task.isAlarm()) ? "Igen" : "Nem"; ListViewItem lvi = new ListViewItem(task.getPriority()); lvi.SubItems.Add(task.getName()); lvi.SubItems.Add(task.getCategory()); lvi.SubItems.Add(task.getDate().ToString(DateTimeFormat)); lvi.SubItems.Add(alarm); lvTasks.Items.Add(lvi); }