Ejemplo n.º 1
0
        private void GridHatchPropertyPage_Load(object sender, EventArgs e)
        {
            double     num;
            double     num2;
            double     num3;
            IGridHatch pMapGrid = GridAxisPropertyPage.m_pMapGrid as IGridHatch;

            this.DegreeToDMS(pMapGrid.HatchIntervalX, out num, out num2, out num3);
            this.txtHatchIntervalXDegree.Text = num.ToString();
            this.txtHatchIntervalXMinute.Text = num2.ToString();
            this.txtHatchIntervalXSecond.Text = num3.ToString();
            this.DegreeToDMS(pMapGrid.HatchIntervalY, out num, out num2, out num3);
            this.txtHatchIntervalYDegree.Text = num.ToString();
            this.txtHatchIntervalYMinute.Text = num2.ToString();
            this.txtHatchIntervalYSecond.Text = num3.ToString();
            this.txtHatchLength.Text          = pMapGrid.HatchLength.ToString();
            this.chkHatchDirectional.Checked  = pMapGrid.HatchDirectional;
            if (pMapGrid.HatchLineSymbol != null)
            {
                this.btnStyle.Style = pMapGrid.HatchLineSymbol;
            }
            else
            {
                this.btnStyle.Style = pMapGrid.HatchMarkerSymbol;
            }
            this.txtAxisTickOffset.Text = (pMapGrid as IGridAxisTicks).AxisTickOffset.ToString();
            this.m_CanDo = true;
        }
Ejemplo n.º 2
0
 public void Apply()
 {
     if (this.m_IsPageDirty)
     {
         this.m_IsPageDirty = false;
         IGridHatch pMapGrid = GridAxisPropertyPage.m_pMapGrid as IGridHatch;
         double     num      = double.Parse(this.txtHatchIntervalXDegree.Text);
         double     num2     = double.Parse(this.txtHatchIntervalXMinute.Text);
         double     num3     = double.Parse(this.txtHatchIntervalXSecond.Text);
         pMapGrid.HatchIntervalX = (num + (num2 / 60.0)) + (num3 / 3600.0);
         num  = double.Parse(this.txtHatchIntervalYDegree.Text);
         num2 = double.Parse(this.txtHatchIntervalYMinute.Text);
         num3 = double.Parse(this.txtHatchIntervalYSecond.Text);
         pMapGrid.HatchIntervalY   = (num + (num2 / 60.0)) + (num3 / 3600.0);
         pMapGrid.HatchLength      = double.Parse(this.txtHatchLength.Text);
         pMapGrid.HatchDirectional = this.chkHatchDirectional.Checked;
         if (this.btnStyle.Style is ILineSymbol)
         {
             pMapGrid.HatchLineSymbol = this.btnStyle.Style as ILineSymbol;
         }
         else
         {
             pMapGrid.HatchMarkerSymbol = this.btnStyle.Style as IMarkerSymbol;
         }
         (pMapGrid as IGridAxisTicks).AxisTickOffset = double.Parse(this.txtAxisTickOffset.Text);
     }
 }