-
Notifications
You must be signed in to change notification settings - Fork 2
/
VmisMenuItem.cs
96 lines (86 loc) · 2.94 KB
/
VmisMenuItem.cs
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
namespace Microsoft.Virtualization.Client.InteractiveSession
{
// Token: 0x02000029 RID: 41
internal class VmisMenuItem : ToolStripMenuItem
{
// Token: 0x0600020E RID: 526 RVA: 0x0001174D File Offset: 0x0000F94D
public VmisMenuItem(string text) : base(text)
{
}
// Token: 0x0600020F RID: 527 RVA: 0x00011756 File Offset: 0x0000F956
public VmisMenuItem(string text, EventHandler onClick) : base(text, null, onClick)
{
}
// Token: 0x06000210 RID: 528 RVA: 0x00011761 File Offset: 0x0000F961
public VmisMenuItem(string text, EventHandler onClick, Keys shortcutKey) : base(text, null, onClick, shortcutKey)
{
this.SetShortcutKeyDisplayString();
}
// Token: 0x06000211 RID: 529 RVA: 0x00011773 File Offset: 0x0000F973
public VmisMenuItem(string text, params ToolStripItem[] items) : base(text, null, items)
{
}
// Token: 0x1700004F RID: 79
// (get) Token: 0x06000212 RID: 530 RVA: 0x0001177E File Offset: 0x0000F97E
// (set) Token: 0x06000213 RID: 531 RVA: 0x00011786 File Offset: 0x0000F986
public VMControlAction Action
{
get
{
return this.m_Action;
}
set
{
this.m_Action = value;
}
}
// Token: 0x17000050 RID: 80
// (get) Token: 0x06000214 RID: 532 RVA: 0x0001178F File Offset: 0x0000F98F
public static string EndEllipses
{
get
{
return "...";
}
}
// Token: 0x06000215 RID: 533 RVA: 0x00011798 File Offset: 0x0000F998
internal void SetShortcutKeyDisplayString()
{
if (base.ShortcutKeys == Keys.None)
{
return;
}
base.ShortcutKeyDisplayString = VmisMenuItem.gm_Converter.ConvertToString(null, CultureInfo.CurrentUICulture, base.ShortcutKeys);
base.ShortcutKeyDisplayString = base.ShortcutKeyDisplayString.Replace(VMISResources.Menu_PauseKey, VMISResources.Menu_BreakKey);
}
// Token: 0x06000216 RID: 534 RVA: 0x000117EC File Offset: 0x0000F9EC
internal void UpdateDropDownSizes()
{
if (base.HasDropDown)
{
base.DropDown.AutoSize = true;
foreach (object obj in base.DropDownItems)
{
ToolStripItem toolStripItem = (ToolStripItem)obj;
toolStripItem.AutoSize = true;
toolStripItem.AutoSize = false;
}
base.DropDown.AutoSize = false;
base.DropDown.Size = new Size(base.DropDown.Size.Width + ToolStripScaleAwareProfessionalRenderer.ToolStripItemWidthScaleDelta, base.DropDown.Size.Height);
foreach (object obj2 in base.DropDownItems)
{
ToolStripItem toolStripItem2 = (ToolStripItem)obj2;
toolStripItem2.Size = new Size(toolStripItem2.Width + ToolStripScaleAwareProfessionalRenderer.ToolStripItemWidthScaleDelta, toolStripItem2.Height);
}
}
}
// Token: 0x0400015B RID: 347
private static KeysConverter gm_Converter = new KeysConverter();
// Token: 0x0400015C RID: 348
private VMControlAction m_Action;
}
}