@@ -55,39 +55,42 @@ private static void AddDevelopmentTests()
5555 } ) ;
5656 } ) ;
5757
58- Electron . Dock . SetMenu ( new [ ]
58+ if ( System . OperatingSystem . IsMacOS ( ) )
5959 {
60- new MenuItem
60+ Electron . Dock . SetMenu ( new [ ]
6161 {
62- Type = MenuType . normal ,
63- Label = "MenuItem" ,
64- Click = ( ) =>
62+ new MenuItem
6563 {
66- Electron . Notification . Show ( new NotificationOptions (
67- "Dock MenuItem Click" ,
68- "A menu item added to the Dock was selected;" ) ) ;
64+ Type = MenuType . normal ,
65+ Label = "MenuItem" ,
66+ Click = ( ) =>
67+ {
68+ Electron . Notification . Show ( new NotificationOptions (
69+ "Dock MenuItem Click" ,
70+ "A menu item added to the Dock was selected;" ) ) ;
71+ } ,
6972 } ,
70- } ,
71- new MenuItem
72- {
73- Type = MenuType . submenu ,
74- Label = "SubMenu" ,
75- Submenu = new [ ]
73+ new MenuItem
7674 {
77- new MenuItem
75+ Type = MenuType . submenu ,
76+ Label = "SubMenu" ,
77+ Submenu = new [ ]
7878 {
79- Type = MenuType . normal ,
80- Label = "Sub MenuItem" ,
81- Click = ( ) =>
79+ new MenuItem
8280 {
83- Electron . Notification . Show ( new NotificationOptions (
84- "Dock Sub MenuItem Click" ,
85- "A menu item added to the Dock was selected;" ) ) ;
81+ Type = MenuType . normal ,
82+ Label = "Sub MenuItem" ,
83+ Click = ( ) =>
84+ {
85+ Electron . Notification . Show ( new NotificationOptions (
86+ "Dock Sub MenuItem Click" ,
87+ "A menu item added to the Dock was selected;" ) ) ;
88+ } ,
8689 } ,
87- } ,
90+ }
8891 }
89- }
90- } ) ;
92+ } ) ;
93+ }
9194 }
9295 }
9396}
0 commit comments