private void AddAngleContextMenuStripItems() { ToolStripMenuItem itemSigned = new ToolStripMenuItem("Signed"); _setSigned = (bool signed) => { _signed = signed; itemSigned.Checked = signed; }; itemSigned.Click += (sender, e) => _setSigned(!_signed); itemSigned.Checked = _signed; ToolStripMenuItem itemUnits = new ToolStripMenuItem("Units..."); _setAngleUnitType = ControlUtilities.AddCheckableDropDownItems( itemUnits, new List <string> { "In-Game Units", "HAU", "Degrees", "Radians", "Revolutions" }, new List <AngleUnitType> { AngleUnitType.InGameUnits, AngleUnitType.HAU, AngleUnitType.Degrees, AngleUnitType.Radians, AngleUnitType.Revolutions, }, (AngleUnitType angleUnitType) => { _angleUnitType = angleUnitType; }, _angleUnitType); ToolStripMenuItem itemTruncateToMultipleOf16 = new ToolStripMenuItem("Truncate to Multiple of 16"); _setTruncateToMultipleOf16 = (bool truncateToMultipleOf16) => { _truncateToMultipleOf16 = truncateToMultipleOf16; itemTruncateToMultipleOf16.Checked = truncateToMultipleOf16; }; itemTruncateToMultipleOf16.Click += (sender, e) => _setTruncateToMultipleOf16(!_truncateToMultipleOf16); itemTruncateToMultipleOf16.Checked = _truncateToMultipleOf16; ToolStripMenuItem itemConstrainToOneRevolution = new ToolStripMenuItem("Constrain to One Revolution"); _setConstrainToOneRevolution = (bool constrainToOneRevolution) => { _constrainToOneRevolution = constrainToOneRevolution; itemConstrainToOneRevolution.Checked = constrainToOneRevolution; }; itemConstrainToOneRevolution.Click += (sender, e) => _setConstrainToOneRevolution(!_constrainToOneRevolution); itemConstrainToOneRevolution.Checked = _constrainToOneRevolution; _contextMenuStrip.AddToBeginningList(new ToolStripSeparator()); _contextMenuStrip.AddToBeginningList(itemSigned); _contextMenuStrip.AddToBeginningList(itemUnits); _contextMenuStrip.AddToBeginningList(itemTruncateToMultipleOf16); _contextMenuStrip.AddToBeginningList(itemConstrainToOneRevolution); }