private void btnSetZoom_Click(object sender, EventArgs e)
        {
            var diag = new ExtentCalculationDialog(_service.CurrentConnection, _map.CoordinateSystem, CollectLayerIds);

            if (diag.ShowDialog() == DialogResult.OK)
            {
                var env = diag.Extents;
                if (env != null)
                {
                    _map.SetExtents(env.MinX, env.MinY, env.MaxX, env.MaxY);
                }
                else
                {
                    MessageBox.Show(Strings.ErrorMapExtentCalculationFailed, Strings.TitleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
예제 #2
0
 private void btnSetZoom_Click(object sender, EventArgs e)
 {
     var diag = new ExtentCalculationDialog(_map);
     if (diag.ShowDialog() == DialogResult.OK)
     {
         var env = diag.Extents;
         if (env != null)
         {
             _map.SetExtents(env.MinX, env.MinY, env.MaxX, env.MaxY);
         }
         else
         {
             MessageBox.Show(Strings.ErrorMapExtentCalculationFailed, Strings.TitleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
예제 #3
0
 private void btnSetZoom_Click(object sender, EventArgs e)
 {
     var diag = new ExtentCalculationDialog(_mdf);
     if (diag.ShowDialog() == DialogResult.OK)
     {
         var env = diag.Extents;
         if (env != null)
         {
             _mdf.SetExtents(env.MinX, env.MinY, env.MaxX, env.MaxY);
             txtLowerX.Text = env.MinX.ToString(CultureInfo.InvariantCulture);
             txtLowerY.Text = env.MinY.ToString(CultureInfo.InvariantCulture);
             txtUpperX.Text = env.MaxX.ToString(CultureInfo.InvariantCulture);
             txtUpperY.Text = env.MaxY.ToString(CultureInfo.InvariantCulture);
         }
         else
         {
             MessageBox.Show(Strings.ErrorMapExtentCalculationFailed, Strings.TitleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }