private void InitLabelRenderLab(MapObjects2.LabelRenderer render) { this.cbbLabelField.Text = render.Field; this.txtFont.Text = render.get_Symbol(0).Font.Name; this.pnlLabelColor.BackColor = Utilities.Converter.ConvertIntegerToSystemColor((int)render.get_Symbol(0).Color); this.cbbLabelHorizonalAligment.Text = (render.get_Symbol(0).HorizontalAlignment).ToString(); this.cbbLabelVerticalAligment.Text = (render.get_Symbol(0).VerticalAlignment).ToString(); this.numLabelSize.Value = render.get_Symbol(0).Font.Size; this.numLabelRotation.Value = (decimal)render.get_Symbol(0).Rotation; this.ckbAllowOverwrite.Checked = render.AllowDuplicates; this.ckbLabelScale.Checked = render.Flip; }
private LabelRenderStruct ExportLabelRender(MapObjects2.LabelRenderer render) { LabelRenderStruct oLabelRender = new LabelRenderStruct(); oLabelRender.AllowDuplicates = render.AllowDuplicates; oLabelRender.DrawBackground = render.DrawBackground; oLabelRender.Field = render.Field; oLabelRender.FittedField = render.FittedField; oLabelRender.Flip = render.Flip; oLabelRender.HeightField = render.HeightField; oLabelRender.LevelField = render.LevelField; oLabelRender.MaxLevel = render.MaxLevel; oLabelRender.MinLevel = render.MinLevel; oLabelRender.RotationField = render.RotationField; oLabelRender.SplinedText = render.SplinedText; oLabelRender.SymbolCount = render.SymbolCount; oLabelRender.SymbolField = render.SymbolField; oLabelRender.Tag = render.Tag; oLabelRender.XOffsetField = render.XOffsetField; oLabelRender.YOffsetField = render.YOffsetField; short iIndex = 0; MapObjects2.TextSymbol oMapTextSymbol = render.get_Symbol(iIndex); while (oMapTextSymbol != null) { TextSymbolStruct oTextSymbol = new TextSymbolStruct(); this.DeconvertTextSymbol(oMapTextSymbol, oTextSymbol); oLabelRender.SymbolList.Add(oTextSymbol); iIndex++; try { oMapTextSymbol = render.get_Symbol(iIndex); } catch { break; } } return(oLabelRender); }