public static Control CreateLabel(Indicator indicator, bool isStatic) { var text = indicator.DisplayName; if (isStatic) text = TranslationLookup.GetValue(indicator.DisplayName, indicator.DisplayName); if (indicator.IsRequired) { var required = new H3Required { Text = text, Name = "ciLabel_" + indicator.Id, AutoSize = true, Anchor = (AnchorStyles.Bottom | AnchorStyles.Left), TabStop = false }; required.SetMaxWidth(370); return required; } else { var lbl = new H3bLabel { Text = text, Name = "ciLabel_" + indicator.Id, AutoSize = true, Anchor = (AnchorStyles.Bottom | AnchorStyles.Left), TabStop = false }; lbl.SetMaxWidth(370); return lbl; } }
private Control CreateLabel(KeyValuePair<string, SurveyUnitsAndSentinelSite> survey) { var required = new H3Required { Text = survey.Key + " - " + Translations.SentinelSite, Name = "ciLabel_" + survey.Key, AutoSize = true, Anchor = (AnchorStyles.Bottom | AnchorStyles.Left), TabStop = false }; required.SetMaxWidth(370); return required; }