Пример #1
0
        private void Run()
        {
            if (optFindLocation.Checked)
            {
                if (string.IsNullOrWhiteSpace(txtFindLocation.Text))
                {
                    MessageHelper.Info("Enter the name of location.");
                    return;
                }

                try
                {
                    var box = GeoLocationHelper.FindLocation(txtFindLocation.Text);
                    OnNewExtents(new NewExtentsEventArgs()
                    {
                        ExtentsType       = ExtentType.Geogrpahic,
                        GeographicExtents = box
                    });
                }
                catch (Exception ex)
                {
                    MessageHelper.Warn(ex.Message);
                }
            }
            if (optKnownExtents.Checked)
            {
                OnNewExtents(new NewExtentsEventArgs()
                {
                    ExtentsType  = ExtentType.Known,
                    KnownExtents = (tkKnownExtents)cboKnownExtents.SelectedItem
                });
            }
        }