2 using System.Drawing;
\r
4 using System.Windows.Forms;
\r
6 namespace KancolleSniffer.View.MainWindow
\r
8 public class ContextMenuNotifyIcon : ContextMenuStrip
\r
10 private readonly ToolStripMenuItem[] _menuItems =
\r
12 new ToolStripMenuItem
\r
14 Font = new Font("メイリオ", 9F, FontStyle.Bold,
\r
15 GraphicsUnit.Point, 128),
\r
16 Size = new Size(121, 22),
\r
19 new ToolStripMenuItem
\r
21 Size = new Size(121, 22),
\r
26 public ContextMenuNotifyIcon()
\r
28 // ReSharper disable once VirtualMemberCallInConstructor
\r
29 Items.AddRange(_menuItems.ToArray<ToolStripItem>());
\r
32 public void SetEventHandlers(Action open, Action exit)
\r
34 _menuItems[0].Click += (sender , e) => open();
\r
35 _menuItems[1].Click += (sender , e) => exit();
\r