private void AddContextMenuStripItems() { _itemHighlight = new ToolStripMenuItem("Highlight"); _itemHighlight.Click += (sender, e) => _watchVarControl.ToggleHighlighted(); _itemHighlight.Checked = _watchVarControl.Highlighted; _itemLock = new ToolStripMenuItem("Lock"); _itemLock.Click += (sender, e) => ToggleLocked(null, _watchVarControl.FixedAddressListGetter()); _itemRemoveAllLocks = new ToolStripMenuItem("Remove All Locks"); _itemRemoveAllLocks.Click += (sender, e) => WatchVariableLockManager.RemoveAllLocks(); _itemDisableAllLocks = new ToolStripMenuItem("Disable All Locks"); _itemDisableAllLocks.Click += (sender, e) => LockConfig.LockingDisabled = !LockConfig.LockingDisabled; ToolStripMenuItem itemCopyUnrounded = new ToolStripMenuItem("Copy"); itemCopyUnrounded.Click += (sender, e) => Clipboard.SetText( GetValue(false, true, _watchVarControl.FixedAddressListGetter()).ToString()); ToolStripMenuItem itemPaste = new ToolStripMenuItem("Paste"); itemPaste.Click += (sender, e) => _watchVarControl.SetValue(Clipboard.GetText()); _contextMenuStrip.AddToBeginningList(_itemHighlight); _contextMenuStrip.AddToBeginningList(_itemLock); _contextMenuStrip.AddToBeginningList(_itemRemoveAllLocks); _contextMenuStrip.AddToBeginningList(_itemDisableAllLocks); _contextMenuStrip.AddToBeginningList(itemCopyUnrounded); _contextMenuStrip.AddToBeginningList(itemPaste); }
private void AddContextMenuStripItems() { _itemHighlight = new ToolStripMenuItem("Highlight"); _itemHighlight.Click += (sender, e) => _watchVarControl.ToggleHighlighted(); _itemHighlight.Checked = _watchVarControl.Highlighted; _itemLock = new ToolStripMenuItem("Lock"); _itemLock.Click += (sender, e) => ToggleLocked(null, _watchVarControl.FixedAddressListGetter()); ToolStripMenuItem itemCopyUnrounded = new ToolStripMenuItem("Copy"); itemCopyUnrounded.Click += (sender, e) => { Clipboard.SetText(GetValue(false, true, _watchVarControl.FixedAddressListGetter()).ToString()); _watchVarControl.FlashColor(WatchVariableControl.COPY_COLOR); }; ToolStripMenuItem itemPaste = new ToolStripMenuItem("Paste"); itemPaste.Click += (sender, e) => Paste(); _contextMenuStrip.AddToBeginningList(_itemHighlight); _contextMenuStrip.AddToBeginningList(_itemLock); _contextMenuStrip.AddToBeginningList(itemCopyUnrounded); _contextMenuStrip.AddToBeginningList(itemPaste); }