Example #1
0
 void tileView_ItemClick(object sender, TileViewItemClickEventArgs e)
 {
     if (!IsEmptyItem(e.Item.RowHandle))
     {
         return;
     }
     TaskStatus status = (TaskStatus)tileView.GetRowCellValue(e.Item.RowHandle, "Status");
     //AddNewCard(status);   //  创建新卡片,暂时不要了
 }
Example #2
0
        void AddNewCard(TaskStatus status)
        {
            string newCaption = XtraInputBox.Show("", "新建任务", "新建任务");

            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);
        }
Example #3
0
 void RemoveEmptyItem(TaskStatus status)
 {
     KanbanHelper.RemoveEmptyItem(tasksData, status);
 }
Example #4
0
 void AddEmptyItem(TaskStatus status)
 {
     KanbanHelper.AddEmptyItem(tasksData, status);
 }