internal ContextMenuHandler(MapForm parentFrame, MapControl mapControl, MapOptions mapOptions, MapContextMenuEvent e) { _mapForm = parentFrame; _mapControl = mapControl; _mapOptions = mapOptions; _event = e; }
internal MapForm(bool insertNewMap, MapOptions mapOptions, CommandManager commandManager) { CommandManager = commandManager; _mapOptions = mapOptions; // // Required for Windows Form Designer support // InitializeComponent(); //set accessibility names comboBoxStyle.Initialize(VEMapStyle.Road); comboBoxStyle.AccessibleName = Res.Get(StringId.MapStyle); mapZoomPlusButton.AccessibleName = Res.Get(StringId.MapZoomIn); buttonZoomMinus.AccessibleName = Res.Get(StringId.MapZoomOut); trackBarZoom.AccessibleName = Res.Get(StringId.MapZoomSlider); buttonSearch.AccessibleName = Res.Get(StringId.MapSearch); buttonGotoBirdseye.AccessibleName = Res.Get(StringId.MapBirdseyeButton); label1.Text = Res.Get(StringId.MapFindAddress); buttonCancel.Text = Res.Get(StringId.CancelButton); buttonGotoBirdseye.Text = Res.Get(StringId.MapBirdseyeLabel); cbShowLabels.Text = Res.Get(StringId.MapShowLabel); mapTipControl.Text = Res.Get(StringId.MapPushpinTip); if (insertNewMap) { Text = Res.Get(StringId.InsertMap); buttonOK.Text = Res.Get(StringId.InsertButton); } else { Text = Res.Get(StringId.CustomizeMap); buttonOK.Text = Res.Get(StringId.OKButtonText); } if (!DesignMode) { Icon = ApplicationEnvironment.ProductIcon; } comboBoxStyle.SelectedIndexChanged += new EventHandler(comboBoxStyle_SelectedIndexChanged); mapControl.MapStyleChanged += new EventHandler(mapControl_MapStyleChanged); mapControl.ZoomLevelChanged += new EventHandler(mapControl_ZoomLevelChanged); mapControl.BirdseyeChanged += new EventHandler(mapControl_BirdseyeChanged); mapControl.ShowMapContextMenu += new MapContextMenuHandler(mapControl_ShowMapContextMenu); mapControl.ShowPushpinContextMenu += new MapPushpinContextMenuHandler(mapControl_ShowPushpinContextMenu); mapScrollControl.DirectionalButtonClicked += new DirectionalButtonClickedHandler(mapScrollControl_DirectionalButtonClicked); mapBirdsEyeZoomControl.ZoomLevelChanged += new EventHandler(mapBirdsEyeZoomControl_ZoomLevelChanged); mapBirdsEyeDirectionControl.DirectionChanged += new EventHandler(mapBirdsEyeDirectionControl_DirectionChanged); trackBarZoom.Maximum = MapControl.MAX_ZOOM; trackBarZoom.Minimum = MapControl.MIN_ZOOM; trackBarZoom.AutoSize = false; trackBarZoom.Height = 30; cbShowLabels.Top = trackBarZoom.Bottom; }
internal MapForm(bool insertNewMap, MapOptions mapOptions, CommandManager commandManager) { CommandManager = commandManager; _mapOptions = mapOptions; // // Required for Windows Form Designer support // InitializeComponent(); //set accessibility names comboBoxStyle.Initialize(VEMapStyle.Road); comboBoxStyle.AccessibleName = Res.Get(StringId.MapStyle); mapZoomPlusButton.AccessibleName = Res.Get(StringId.MapZoomIn); buttonZoomMinus.AccessibleName = Res.Get(StringId.MapZoomOut); trackBarZoom.AccessibleName = Res.Get(StringId.MapZoomSlider); buttonSearch.AccessibleName = Res.Get(StringId.MapSearch); buttonGotoBirdseye.AccessibleName = Res.Get(StringId.MapBirdseyeButton); label1.Text = Res.Get(StringId.MapFindAddress); buttonCancel.Text = Res.Get(StringId.CancelButton); buttonGotoBirdseye.Text = Res.Get(StringId.MapBirdseyeLabel); cbShowLabels.Text = Res.Get(StringId.MapShowLabel); mapTipControl.Text = Res.Get(StringId.MapPushpinTip); if (insertNewMap) { Text = Res.Get(StringId.InsertMap); buttonOK.Text = Res.Get(StringId.InsertButton); } else { Text = Res.Get(StringId.CustomizeMap); buttonOK.Text = Res.Get(StringId.OKButtonText); } if (!DesignMode) Icon = ApplicationEnvironment.ProductIcon; comboBoxStyle.SelectedIndexChanged += new EventHandler(comboBoxStyle_SelectedIndexChanged); mapControl.MapStyleChanged += new EventHandler(mapControl_MapStyleChanged); mapControl.ZoomLevelChanged += new EventHandler(mapControl_ZoomLevelChanged); mapControl.BirdseyeChanged += new EventHandler(mapControl_BirdseyeChanged); mapControl.ShowMapContextMenu += new MapContextMenuHandler(mapControl_ShowMapContextMenu); mapControl.ShowPushpinContextMenu += new MapPushpinContextMenuHandler(mapControl_ShowPushpinContextMenu); mapScrollControl.DirectionalButtonClicked += new DirectionalButtonClickedHandler(mapScrollControl_DirectionalButtonClicked); mapBirdsEyeZoomControl.ZoomLevelChanged += new EventHandler(mapBirdsEyeZoomControl_ZoomLevelChanged); mapBirdsEyeDirectionControl.DirectionChanged += new EventHandler(mapBirdsEyeDirectionControl_DirectionChanged); trackBarZoom.Maximum = MapControl.MAX_ZOOM; trackBarZoom.Minimum = MapControl.MIN_ZOOM; trackBarZoom.AutoSize = false; trackBarZoom.Height = 30; cbShowLabels.Top = trackBarZoom.Bottom; }
internal PushpinContextMenuHandler(MapForm parentFrame, MapControl mapControl, MapOptions mapOptions, MapContextMenuEvent e, string pushpinId) { _mapForm = parentFrame; _mapControl = mapControl; _mapOptions = mapOptions; _event = e; _pushpinId = pushpinId; }
public MapOptionsDialog(MapOptions mapOptions) { // // Required for Windows Form Designer support // InitializeComponent(); _mapOptions = mapOptions; textBoxPushpinUrl.Text = _mapOptions.PushpinUrl; linkLabelViewPushpin.Visible = _mapOptions.MoreAboutPushpinsUrl != String.Empty; }
public MapSidebarControl(MapOptions mapOptions, ISmartContentEditorSite contentEditorSite) { _mapOptions = mapOptions; // This call is required by the Windows.Forms Form Designer. InitializeComponent(); this.labelCaption.Text = Res.Get(StringId.MapSBCaption); this.labelMargins.Text = Res.Get(StringId.MapSBMargins); this.sectionHeaderControlOptions.HeaderText = Res.Get(StringId.Options); this.headerLayout.HeaderText = Res.Get(StringId.MapSBLayoutHeader); this.labelTop.Text = Res.Get(StringId.MapSBTop); this.labelRight.Text = Res.Get(StringId.MapSBRight); this.labelLeft.Text = Res.Get(StringId.MapSBLeft); this.labelBottom.Text = Res.Get(StringId.MapSBBottom); this.labelTextWrapping.Text = Res.Get(StringId.MapSBWrapping); this.linkLabelCustomizeMap.Text = Res.Get(StringId.MapSBCustomize); linkLabelCustomizeMap.LinkColor = ColorizedResources.Instance.SidebarLinkColor; //linkLabelCustomizeMap.LinkArea = new LinkArea(0, linkLabelCustomizeMap.Text.Length); this.toolTip.SetToolTip(this.linkLabelCustomizeMap, Res.Get(StringId.MapSBCustomizeTooltip)); SimpleTextEditorCommandHelper.UseNativeBehaviors(((ICommandManagerHost)contentEditorSite).CommandManager, numericMarginLeft, numericMarginRight, numericMarginTop, numericMarginBottom); sidebarHeaderControl1.LinkText = Res.Get(StringId.ViewMap); sidebarHeaderControl1.HeaderText = Res.Get(StringId.MapSBMapHeader); sidebarHeaderControl1.LinkUrl = ""; sidebarHeaderControl1.TabIndex = 0; _contentEditorSite = contentEditorSite; InitializeCommands(); // initialize bitmaps pictureBoxCustomizeMap.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.CustomizeMapIcon.png"); // additional initializatoin of combos comboBoxTextWrapping.Initialize(); comboBoxMargins.Initialize(); }
public override void Initialize(IProperties pluginOptions) { base.Initialize(pluginOptions); _pluginOptions = new MapOptions(pluginOptions); }