public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent content)
        {
            using (new WaitCursor())
            {
                if (!MapForm.ValidateLiveLocalConnection(true))
                {
                    return(DialogResult.Cancel);
                }

                using (MapForm mapForm = new MapForm(true, _pluginOptions, ((ICommandManagerHost)dialogOwner).CommandManager))
                {
                    mapForm.LoadMap(-0.3515603f, 0.3515625f, null, "r", 1, null);
                    if (mapForm.ShowDialog(dialogOwner) == DialogResult.OK)
                    {
                        MapSettings settings = new MapSettings(content.Properties);
                        settings.MapId = "map-" + Guid.NewGuid().ToString();
                        settings.UpdateSettings(mapForm.Latitude, mapForm.Longitude, mapForm.Reserved, mapForm.ZoomLevel, mapForm.MapStyle, mapForm.Pushpins, mapForm.BirdseyeScene);
                        _pluginOptions.DefaultDialogSize = mapForm.Size;

                        return(DialogResult.OK);
                    }
                    else
                    {
                        return(DialogResult.Cancel);
                    }
                }
            }
        }
        public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent content)
        {
            using (new WaitCursor())
            {
                if (!MapForm.ValidateLiveLocalConnection(true))
                    return DialogResult.Cancel;

                using (MapForm mapForm = new MapForm(true, _pluginOptions, ((ICommandManagerHost)dialogOwner).CommandManager))
                {
                    mapForm.LoadMap(-0.3515603f, 0.3515625f, null, "r", 1, null);
                    if (mapForm.ShowDialog(dialogOwner) == DialogResult.OK)
                    {
                        MapSettings settings = new MapSettings(content.Properties);
                        settings.MapId = "map-" + Guid.NewGuid().ToString();
                        settings.UpdateSettings(mapForm.Latitude, mapForm.Longitude, mapForm.Reserved, mapForm.ZoomLevel, mapForm.MapStyle, mapForm.Pushpins, mapForm.BirdseyeScene);
                        _pluginOptions.DefaultDialogSize = mapForm.Size;

                        return DialogResult.OK;
                    }
                    else
                    {
                        return DialogResult.Cancel;
                    }
                }
            }
        }
        private void ShowCustomizeMapDialog()
        {
            using (new WaitCursor())
            {
                if (!MapForm.ValidateLiveLocalConnection(true))
                {
                    return;
                }

                using (MapForm mapForm = new MapForm(false, _mapOptions, ((ICommandManagerHost)_contentEditorSite).CommandManager))
                {
                    VEBirdseyeScene scene = null;
                    if (_mapSettings.MapStyle == "o")
                    {
                        scene = new VEBirdseyeScene(_mapSettings.BirdseyeSceneId, _mapSettings.BirdseyeOrientation);
                    }
                    mapForm.LoadMap(_mapSettings.Latitude, _mapSettings.Longitude, _mapSettings.Reserved, _mapSettings.MapStyle, _mapSettings.ZoomLevel, scene);
                    mapForm.Pushpins = _mapSettings.Pushpins;
                    if (mapForm.ShowDialog(this) == DialogResult.OK)
                    {
                        _mapOptions.DefaultDialogSize = mapForm.Size;
                        _mapSettings.UpdateSettings(mapForm.Latitude, mapForm.Longitude, mapForm.Reserved, mapForm.ZoomLevel, mapForm.MapStyle, mapForm.Pushpins, mapForm.BirdseyeScene);

                        SelectedContent.Files.Remove(_mapSettings.ImageFileId);
                        Size mapSize = _mapSettings.Size;
                        Debug.Assert(mapSize != Size.Empty);
                        MapContentSource.UpdateMapImage(SelectedContent, _mapSettings, mapSize);
                        _mapSettings.Size = mapSize;

                        sidebarHeaderControl1.LinkUrl = _mapSettings.LiveMapUrl;
                        sidebarHeaderControl1.RefreshLayout();

                        OnContentEdited();
                    }
                }
            }
        }