public void AddSpecialControls(IndicatorControl cntrl) { if (model.TypeOfSurvey.Indicators.Values.FirstOrDefault(i => i.DataTypeId == (int)IndicatorDataType.SentinelSite) != null) { model.HasSentinelSite = true; sitePicker = cntrl.LoadSentinelSitePicker(FormColor); sitePicker.LoadModel(model); } }
public SentinelSitePickerControl LoadSentinelSitePicker(Color color) { tblTopControls.Visible = true; tblTopControls.Controls.Clear(); var picker = new SentinelSitePickerControl(); tblTopControls.Controls.Add(picker, 0, 0); int hrRow = tblTopControls.RowStyles.Add(new RowStyle { SizeType = SizeType.AutoSize }); tblTopControls.Controls.Add(new HR { RuleColor = color, Width = 780 }, 0, hrRow); return picker; }