示例#1
0
        // Change Area style of all regions in the region layer
        private void button2_Click(object sender, System.EventArgs e)
        {
            FeatureLayer _lyr = this.mapControl1.Map.Layers["grid15"] as FeatureLayer;

            if (_lineStyleDlg == null)
            {
                _lineStyleDlg = new LineStyleDlg();
            }
            if (_lineStyleDlg.ShowDialog() == DialogResult.OK)
            {
                FeatureOverrideStyleModifier fsm = new FeatureOverrideStyleModifier(null, new MapInfo.Styles.CompositeStyle(_lineStyleDlg.LineStyle));
                _lyr.Modifiers.Append(fsm);
                this.mapControl1.Map.Zoom = new MapInfo.Geometry.Distance(25000, MapInfo.Geometry.DistanceUnit.Mile);
            }
        }
示例#2
0
 private void buttonLineStyleDialog_Click(object sender, System.EventArgs e)
 {
     if (_lineStyleDlg == null)
     {
         _lineStyleDlg = new LineStyleDlg();
     }
     _lineStyleDlg.LineStyle = _lineStyle;
     if (_lineStyleDlg.ShowDialog() == DialogResult.OK)
     {
         BaseLineStyle ls = _lineStyleDlg.LineStyle;
         if (ls is SimpleLineStyle)
         {
             _lineStyle = (SimpleLineStyle)ls;
             SetLineSample();
         }
         else
         {
             throw new System.NotImplementedException("New style type not handled.");
         }
     }
 }
示例#3
0
 // Change Area style of all regions in the region layer
 private void button2_Click(object sender, System.EventArgs e)
 {
     FeatureLayer _lyr = this.mapControl1.Map.Layers["grid15"] as FeatureLayer;
     if (_lineStyleDlg == null) {
         _lineStyleDlg = new LineStyleDlg();
     }
     if (_lineStyleDlg.ShowDialog() == DialogResult.OK) {
         FeatureOverrideStyleModifier fsm = new FeatureOverrideStyleModifier(null, new MapInfo.Styles.CompositeStyle(_lineStyleDlg.LineStyle));
         _lyr.Modifiers.Append(fsm);
         this.mapControl1.Map.Zoom = new MapInfo.Geometry.Distance(25000, MapInfo.Geometry.DistanceUnit.Mile);
     }
 }
示例#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 );
 }