public KanbanBoard() { InitializeComponent(); InitData(); tileView.OptionsEditForm.CustomEditFormLayout = new KanbanEditControl(tileView, employeesData, membersData, checklistData); checkBadge = KanbanHelper.CreateCheckBadge(Color.Gray); checkBadgeDone = KanbanHelper.CreateCheckBadge(GetLabelColor(TaskLabel.Green)); }
void InitData() { tasksData = KanbanHelper.LoadTasks(); employeesData = KanbanHelper.LoadEmployees(); membersData = KanbanHelper.LoadMembers(); checklistData = KanbanHelper.LoadChecklist(); KanbanHelper.ProcessMembersPhoto(employeesData); gridControl.DataSource = tasksData; }
void AddNewCard(TaskStatus status) { string newCaption = XtraInputBox.Show("", "Add new card", "New Task"); if (String.IsNullOrEmpty(newCaption)) { return; } var newRow = KanbanHelper.CreateNewTask(); int maxId = tasksData.OrderByDescending(x => x.Id).ToList()[0].Id; newRow.Id = maxId + 1; newRow.Status = status; newRow.Caption = newCaption; tasksData.Add(newRow); tileView.FocusedRowHandle = tileView.GetRowHandle(tasksData.IndexOf(newRow)); RemoveEmptyItem(newRow.Status); }
void RemoveEmptyItem(TaskStatus status) { KanbanHelper.RemoveEmptyItem(tasksData, status); }
void AddEmptyItem(TaskStatus status) { KanbanHelper.AddEmptyItem(tasksData, status); }