|
@@ -3,6 +3,7 @@ using System.Linq;
|
|
|
using System.Threading;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
+using System.Windows.Media;
|
|
|
using Comal.Classes;
|
|
|
using InABox.Clients;
|
|
|
using InABox.Core;
|
|
@@ -28,6 +29,29 @@ public class KanbanSubscriberGrid(Kanban kanban) : DynamicDataGrid<KanbanSubscri
|
|
|
AddButton("Select Team", PRSDesktop.Resources.team.AsBitmapImage(), SelectTeamClick);
|
|
|
}
|
|
|
|
|
|
+ #region UI Component
|
|
|
+
|
|
|
+ private class UIComponent : DynamicGridGridUIComponent<KanbanSubscriber>
|
|
|
+ {
|
|
|
+ protected override Brush? GetCellBackground(CoreRow row, DynamicColumnBase column)
|
|
|
+ {
|
|
|
+ if(row.Get<KanbanSubscriber, bool>(x => x.Manager) || row.Get<KanbanSubscriber, bool>(x => x.Assignee))
|
|
|
+ {
|
|
|
+ return Colors.Gainsboro.ToBrush(0.5);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ protected override IDynamicGridUIComponent<KanbanSubscriber> CreateUIComponent()
|
|
|
+ {
|
|
|
+ return new UIComponent { Parent = this };
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
protected override void DoReconfigure(DynamicGridOptions options)
|
|
|
{
|
|
|
base.DoReconfigure(options);
|
|
@@ -41,6 +65,7 @@ public class KanbanSubscriberGrid(Kanban kanban) : DynamicDataGrid<KanbanSubscri
|
|
|
public override KanbanSubscriber CreateItem()
|
|
|
{
|
|
|
var result = base.CreateItem();
|
|
|
+ result.Kanban.CopyFrom(Kanban);
|
|
|
result.Observer = true;
|
|
|
return result;
|
|
|
}
|