|
@@ -95,20 +95,36 @@ public class EventEditorControl<TEvent, TDataModel> : Grid, IEventEditorControl
|
|
|
|
|
|
this.AddRow(GridUnitType.Auto);
|
|
|
this.AddRow(GridUnitType.Star);
|
|
|
- this.AddColumn(GridUnitType.Star);
|
|
|
- this.AddColumn(GridUnitType.Auto);
|
|
|
+
|
|
|
+ var hasTriggers = evData.Event is not ScheduledEvent;
|
|
|
+
|
|
|
+ if(!hasTriggers)
|
|
|
+ {
|
|
|
+ this.AddColumn(0);
|
|
|
+ this.AddColumn(0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.AddColumn(GridUnitType.Star);
|
|
|
+ this.AddColumn(GridUnitType.Auto);
|
|
|
+ }
|
|
|
this.AddColumn(GridUnitType.Star);
|
|
|
|
|
|
- this.AddChild(triggerLabelBorder, 0, 0);
|
|
|
- this.AddChild(separator, 0, 1, rowSpan: 2);
|
|
|
+ if (hasTriggers)
|
|
|
+ {
|
|
|
+ this.AddChild(triggerLabelBorder, 0, 0);
|
|
|
+ this.AddChild(separator, 0, 1, rowSpan: 2);
|
|
|
+ this.AddChild(TriggerGrid, 1, 0);
|
|
|
+ }
|
|
|
this.AddChild(actionsLabelBorder, 0, 2);
|
|
|
- this.AddChild(TriggerGrid, 1, 0);
|
|
|
this.AddChild(ActionGrid, 1, 2);
|
|
|
|
|
|
- TriggerGrid.Refresh(true, true);
|
|
|
+ if (hasTriggers)
|
|
|
+ {
|
|
|
+ TriggerGrid.Refresh(true, true);
|
|
|
+ TriggerGrid.OnChanged += Grid_OnChanged;
|
|
|
+ }
|
|
|
ActionGrid.Refresh(true, true);
|
|
|
-
|
|
|
- TriggerGrid.OnChanged += Grid_OnChanged;
|
|
|
ActionGrid.OnChanged += Grid_OnChanged;
|
|
|
}
|
|
|
|