FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MapWindow5/src/MW5.UI/Menu/MenuFactory.cs at develop · MapWindow/MapWindow5 · GitHub
MapWindow
/
MapWindow5
Public
Notifications
You must be signed in to change notification settings
Fork
102
Star
308
Code
Issues
14
Pull requests
12
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MapWindow5
/
src
/
MW5.UI
/
Menu
/
MenuFactory.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
80 lines (67 loc) · 2.68 KB
Breadcrumbs
MapWindow5
/
src
/
MW5.UI
/
Menu
/
MenuFactory.cs
Copy path
File metadata and controls
80 lines (67 loc) · 2.68 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using
System
;
using
System
.
Windows
.
Forms
;
using
MW5
.
Plugins
.
Concrete
;
using
MW5
.
Plugins
.
Enums
;
using
MW5
.
Plugins
.
Interfaces
;
using
MW5
.
Shared
;
using
MW5
.
UI
.
Enums
;
using
MW5
.
UI
.
Menu
.
Classic
;
using
Syncfusion
.
Windows
.
Forms
.
Tools
.
XPMenus
;
namespace
MW5
.
UI
.
Menu
{
public
class
MenuFactory
{
private
static
IMenu
_instance
;
internal
static
IMenu
CreateMainMenu
(
object
menuManager
)
{
if
(
_instance
==
null
)
{
var
menuIndex
=
new
MenuIndex
(
MenuIndexType
.
MainMenu
)
;
if
(
DebugHelper
.
SyncfusionMenu
)
{
_instance
=
new
MainSyncfusionMenu
(
menuManager
,
menuIndex
)
;
}
else
{
_instance
=
new
MainMenuStripMenu
(
menuManager
,
menuIndex
)
;
}
CreateDefaultMenuItems
(
_instance
)
;
}
return
_instance
;
}
internal
static
IMenuEx
CreateMenu
(
object
menuManager
)
{
var
menuIndex
=
new
MenuIndex
(
MenuIndexType
.
MainMenu
,
false
)
;
return
new
MenuStripMenu
(
menuManager
,
menuIndex
)
;
}
internal
static
IStatusBar
CreateStatusBar
(
object
bar
,
PluginIdentity
identity
)
{
var
menuIndex
=
new
MenuIndex
(
MenuIndexType
.
StatusBar
)
;
var
statusBar
=
new
StatusBar
(
bar
,
menuIndex
,
identity
)
;
return
statusBar
;
}
internal
static
IToolbarCollection
CreateMainToolbars
(
object
menuManager
)
{
var
menuIndex
=
new
MenuIndex
(
MenuIndexType
.
Toolbar
)
;
return
new
ToolbarCollectionMain
(
menuManager
,
menuIndex
)
;
}
internal
static
IToolbarCollectionEx
CreateToolbars
(
object
menuManager
)
{
var
menuIndex
=
new
MenuIndex
(
MenuIndexType
.
Toolbar
,
false
)
;
return
new
ToolbarCollection
(
menuManager
,
menuIndex
)
;
}
private
static
void
CreateDefaultMenuItems
(
IMenuBase
menu
)
{
var
items
=
menu
.
Items
;
items
.
AddDropDown
(
"File"
,
MainMenuKeys
.
File
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"View"
,
MainMenuKeys
.
View
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Map"
,
MainMenuKeys
.
Map
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Layer"
,
MainMenuKeys
.
Layer
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Plugins"
,
MainMenuKeys
.
Plugins
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Tiles"
,
MainMenuKeys
.
Tiles
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Tools"
,
MainMenuKeys
.
Tools
,
PluginIdentity
.
Default
)
;
items
.
AddDropDown
(
"Help"
,
MainMenuKeys
.
Help
,
PluginIdentity
.
Default
)
;
menu
.
Update
(
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL