private void InitFileToolbar(IToolbar bar) { var items = bar.Items; items.AddButton(_commands[MenuKeys.NewMap]); items.AddButton(_commands[MenuKeys.OpenProject]); items.AddButton(_commands[MenuKeys.SaveProject]); items.AddButton(_commands[MenuKeys.SaveProjectAs]); items.AddButton(_commands[MenuKeys.AddLayer], true); items.AddButton(_commands[MenuKeys.AddVectorLayer]); items.AddButton(_commands[MenuKeys.AddRasterLayer]); items.AddButton(_commands[MenuKeys.AddDatabaseLayer]); items.AddButton(_commands[MenuKeys.AddWmsLayer]); items.AddButton(_commands[MenuKeys.RemoveLayer]); items.AddButton(_commands[MenuKeys.Settings], true); #if DEBUG if (DebugHelper.ShowDebugMenuElements) { items.AddButton(_commands[MenuKeys.Test], true); } #endif items.InsertBefore = items[items.Count - 2]; // before settings bar.Update(); }
private void InitMapToolbar(IToolbar bar) { var items = bar.Items; items.AddButton(_commands[MenuKeys.ZoomIn]); items.AddButton(_commands[MenuKeys.ZoomOut]); items.AddButton(_commands[MenuKeys.ZoomMax]); items.AddButton(_commands[MenuKeys.ZoomPrev]); items.AddButton(_commands[MenuKeys.ZoomNext]); items.AddButton(_commands[MenuKeys.ZoomToLayer]); items.AddButton(_commands[MenuKeys.Pan]); items.AddButton(_commands[MenuKeys.SetProjection], true); items.AddButton(_commands[MenuKeys.FindLocation]); items.AddButton(_commands[MenuKeys.MeasureDistance], true); items.AddButton(_commands[MenuKeys.MeasureArea]); // select drop down var dropDown = items.AddDropDown("Select", MenuKeys.SelectDropDown, PluginIdentity.Default); dropDown.BeginGroup = true; dropDown.Icon = new MenuIcon(Resources.icon_select); dropDown.SubItems.AddButton(_commands[MenuKeys.SelectByRectangle]); dropDown.SubItems.AddButton(_commands[MenuKeys.SelectByPolygon]); items.AddButton(_commands[MenuKeys.ZoomToSelected]); items.AddButton(_commands[MenuKeys.ClearSelection]); bar.Update(); }
private void InitToolbar(IAppContext context, PluginIdentity identity) { var items = context.Toolbars.FileToolbar.Items; items.AddButton(_commands[MenuKeys.CreateLayer]).BeginGroup = true; context.Toolbars.FileToolbar.Update(); _toolbar = context.Toolbars.Add(ShapeEditorToolbar, identity); _toolbar.DockState = ToolbarDockState.Top; items = _toolbar.Items; items.AddButton(_commands[MenuKeys.LayerEdit]); items.AddButton(_commands[MenuKeys.GeometryCreate], true); items.AddButton(_commands[MenuKeys.VertexEditor]); items.AddButton(_commands[MenuKeys.SplitShapes], true); items.AddButton(_commands[MenuKeys.MergeShapes]); items.AddButton(_commands[MenuKeys.MoveShapes]); items.AddButton(_commands[MenuKeys.RotateShapes]); items.AddButton(_commands[MenuKeys.Copy], true); items.AddButton(_commands[MenuKeys.Paste]); items.AddButton(_commands[MenuKeys.Cut]); var dropDown = items.AddDropDown("Polygon Overlay", MenuKeys.PolygonOverlayDropDown, identity); dropDown.BeginGroup = true; dropDown.Icon = new MenuIcon(Resources.icon_geometry_erase_by_polygon); dropDown.SubItems.AddButton(_commands[MenuKeys.EraseByPolygon]); dropDown.SubItems.AddButton(_commands[MenuKeys.ClipByPolygon]); dropDown.SubItems.AddButton(_commands[MenuKeys.SplitByPolygon]); items.AddButton(_commands[MenuKeys.SplitByPolyline]); items.AddButton(_commands[MenuKeys.Undo], true); items.AddLabel("0/0", MenuKeys.HistoryLength, identity); items.AddButton(_commands[MenuKeys.Redo]); items.AddButton(_commands[MenuKeys.SnapToActiveLayer], true); items.AddButton(_commands[MenuKeys.SnapToAlLayers]); items.AddButton(_commands[MenuKeys.SnapToVertices], true); items.AddButton(_commands[MenuKeys.SnapToSegments]); _toolbar.Update(); }