Example #1
0
        private void button3_Click(object sender, System.EventArgs e)
        {
            LabelLayer _lyr = this.mapControl1.Map.Layers["worldlabels"] as LabelLayer;

            if (_textStyleDlg == null)
            {
                _textStyleDlg = new TextStyleDlg();
            }
            if (_textStyleDlg.ShowDialog() == DialogResult.OK)
            {
                _lyr.Sources["world"].DefaultLabelProperties.Style    = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["world"].DefaultLabelProperties.Style.CalloutLine);
                _lyr.Sources["worldcap"].DefaultLabelProperties.Style = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["worldcap"].DefaultLabelProperties.Style.CalloutLine);
                _lyr.Sources["wldcty25"].DefaultLabelProperties.Style = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["wldcty25"].DefaultLabelProperties.Style.CalloutLine);
                this.mapControl1.Map.Zoom = new MapInfo.Geometry.Distance(6250, MapInfo.Geometry.DistanceUnit.Mile);
            }
        }
Example #2
0
 private void buttonTextStyleDialog_Click(object sender, System.EventArgs e)
 {
     if (_textStyleDlg == null)
     {
         _textStyleDlg = new TextStyleDlg();
     }
     if (_textStyleDlg.ShowDialog() == DialogResult.OK)
     {
         _textStyle.Font = _textStyleDlg.FontStyle;
         SetTextSample();
     }
 }
Example #3
0
 private void button3_Click(object sender, System.EventArgs e)
 {
     LabelLayer _lyr = this.mapControl1.Map.Layers["worldlabels"] as LabelLayer;
     if (_textStyleDlg == null) {
         _textStyleDlg = new TextStyleDlg();
     }
     if (_textStyleDlg.ShowDialog() == DialogResult.OK) {
         _lyr.Sources["world"].DefaultLabelProperties.Style = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["world"].DefaultLabelProperties.Style.CalloutLine);
         _lyr.Sources["worldcap"].DefaultLabelProperties.Style = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["worldcap"].DefaultLabelProperties.Style.CalloutLine);
         _lyr.Sources["wldcty25"].DefaultLabelProperties.Style = new TextStyle(_textStyleDlg.FontStyle, _lyr.Sources["wldcty25"].DefaultLabelProperties.Style.CalloutLine);
         this.mapControl1.Map.Zoom = new MapInfo.Geometry.Distance(6250, MapInfo.Geometry.DistanceUnit.Mile);
     }
 }
Example #4
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose( bool disposing )
 {
     if (this._lineStyleDlg != null)
     {
         this._lineStyleDlg.Dispose();
         this._lineStyleDlg = null;
     }
     if (this._areaStyleDlg != null)
     {
         this._areaStyleDlg.Dispose();
         this._areaStyleDlg = null;
     }
     if (this._textStyleDlg != null)
     {
         this._textStyleDlg.Dispose();
         this._textStyleDlg = null;
     }
     if (this._symbolStyleDlg != null)
     {
         this._symbolStyleDlg.Dispose();
         this._symbolStyleDlg = null;
     }
     if( disposing )
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     Session.Dispose();
     base.Dispose( disposing );
 }