/// <summary> /// Constructor for setting label expression and options /// </summary> public LabelStyleForm(IAppContext context, ILayer layer) : base(context) { InitializeComponent(); InitLayer(context, layer); // old-style labels not based on expression if (_featureSet.Labels.Expression == "" && !_featureSet.Labels.Empty && _featureSet.Labels.Items[0].Text != "") { txtExpression.Text = NoExpression; listBox1.Enabled = false; btnPlus.Enabled = false; btnQuotes.Enabled = false; btnNewLine.Enabled = false; txtExpression.Enabled = false; } else { txtExpression.Text = LabelHelper.StripNewLineQuotes(_featureSet.Labels.Expression); } dynamicVisibilityControl1.Initialize(_featureSet.Labels, _context.Map.CurrentZoom, _context.Map.CurrentScale); dynamicVisibilityControl1.ValueChanged += (s, e) => { btnApply.Enabled = true; }; Initialize(_featureSet.Labels.Style); tabControlAdv1.SelectedIndex = tabNumber; }