public WatchVariableNumberWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            Type displayType      = DEFAULT_DISPLAY_TYPE,
            int?roundingLimit     = DEFAULT_ROUNDING_LIMIT,
            bool?displayAsHex     = DEFAULT_DISPLAY_AS_HEX,
            bool useCheckbox      = DEFAULT_USE_CHECKBOX,
            Coordinate?coordinate = null)
            : base(watchVar, watchVarControl, useCheckbox)
        {
            _displayType = displayType;

            _defaultRoundingLimit = roundingLimit ?? DEFAULT_ROUNDING_LIMIT;
            _roundingLimit        = _defaultRoundingLimit;
            if (_roundingLimit < -1 || _roundingLimit > MAX_ROUNDING_LIMIT)
            {
                throw new ArgumentOutOfRangeException();
            }

            _defaultDisplayAsHex = displayAsHex ?? DEFAULT_DISPLAY_AS_HEX;
            _displayAsHex        = _defaultDisplayAsHex;

            AddCoordinateContextMenuStripItems();
            AddNumberContextMenuStripItems();

            if (coordinate != null)
            {
                WatchVariableCoordinateManager.NotifyCoordinate(coordinate.Value, this);
            }
        }
 public WatchVariableAddressWrapper(
     WatchVariable watchVar,
     WatchVariableControl watchVarControl)
     : base(watchVar, watchVarControl, DEFAULT_DISPLAY_TYPE, DEFAULT_ROUNDING_LIMIT, true)
 {
     AddAddressContextMenuStripItems();
 }
Beispiel #3
0
        public WatchVariableAngleWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            Type displayType,
            bool?isYaw)
            : base(watchVar, watchVarControl, displayType, 0)
        {
            _baseType             = WatchVar.MemoryType ?? displayType;
            _defaultEffectiveType = displayType ?? WatchVar.MemoryType;
            if (_baseType == null || _defaultEffectiveType == null)
            {
                throw new ArgumentOutOfRangeException();
            }

            _defaultSigned = TypeUtilities.TypeSign[_defaultEffectiveType];
            _signed        = _defaultSigned;

            _defaultAngleUnitType = AngleUnitType.InGameUnits;
            _angleUnitType        = _defaultAngleUnitType;

            _defaultTruncateToMultipleOf16 = false;
            _truncateToMultipleOf16        = _defaultTruncateToMultipleOf16;

            _defaultConstrainToOneRevolution =
                displayType != null && TypeUtilities.TypeSize[displayType] == 2 &&
                watchVar.MemoryType != null && TypeUtilities.TypeSize[watchVar.MemoryType] == 4;
            _constrainToOneRevolution = _defaultConstrainToOneRevolution;

            _defaultReverse = false;
            _reverse        = _defaultReverse;

            _isYaw = isYaw ?? DEFAULT_IS_YAW;

            AddAngleContextMenuStripItems();
        }
Beispiel #4
0
 public WatchVariableTriangleWrapper(
     WatchVariable watchVar,
     WatchVariableControl watchVarControl)
     : base(watchVar, watchVarControl)
 {
     AddTriangleContextMenuStripItems();
 }
 public WatchVariableStringWrapper(
     WatchVariable watchVar,
     WatchVariableControl watchVarControl)
     : base(watchVar, watchVarControl, DEFAULT_USE_CHECKBOX)
 {
     AddStringContextMenuStripItems(watchVar.SpecialType);
 }
Beispiel #6
0
 public void RemoveVariable(WatchVariableControl watchVarControl)
 {
     RemoveVariables(new List <WatchVariableControl>()
     {
         watchVarControl
     });
 }
Beispiel #7
0
 public void AddVariable(WatchVariableControl watchVarControl)
 {
     AddVariables(new List <WatchVariableControl>()
     {
         watchVarControl
     });
 }
        public static WatchVariableWrapper CreateWatchVariableWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            WatchVariableSubclass subclass,
            bool?useHex,
            bool?invertBool,
            WatchVariableCoordinate?coordinate)
        {
            switch (subclass)
            {
            case WatchVariableSubclass.String:
                return(new WatchVariableWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Number:
                return(new WatchVariableNumberWrapper(
                           watchVar,
                           watchVarControl,
                           DEFAULT_ROUNDING_LIMIT,
                           useHex,
                           DEFAULT_USE_CHECKBOX,
                           coordinate));

            case WatchVariableSubclass.Angle:
                return(new WatchVariableAngleWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Object:
                return(new WatchVariableObjectWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Boolean:
                return(new WatchVariableBooleanWrapper(watchVar, watchVarControl, invertBool));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
        public WatchVariableNumberWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            int?roundingLimit = DEFAULT_ROUNDING_LIMIT,
            bool?displayAsHex = DEFAULT_DISPLAY_AS_HEX,
            bool useCheckbox  = DEFAULT_USE_CHECKBOX,
            WatchVariableCoordinate?coordinate = null)
            : base(watchVar, watchVarControl, useCheckbox)
        {
            if (roundingLimit.HasValue)
            {
                roundingLimit = MoreMath.Clamp(roundingLimit.Value, 0, MAX_ROUNDING_LIMIT);
            }

            _roundingLimit    = roundingLimit;
            _displayAsHex     = displayAsHex ?? DEFAULT_DISPLAY_AS_HEX;
            _displayAsNegated = false;

            AddCoordinateContextMenuStripItems();
            AddNumberContextMenuStripItems();

            if (coordinate != null)
            {
                WatchVariableCoordinateManager.NotifyCoordinate(coordinate.Value, this);
            }
        }
 public void RemoveVariable(WatchVariableControl watchVarControl)
 {
     // No need to lock, since this calls into a method that locks
     RemoveVariables(new List <WatchVariableControl>()
     {
         watchVarControl
     });
 }
Beispiel #11
0
        public WatchVariableControl AddCopyToCustomTab()
        {
            WatchVariableControl newControl = _watchVarPrecursor.CreateWatchVariableControl();

            Config.CustomManager.AddVariable(newControl);
            FlashColor(ADD_TO_CUSTOM_TAB_COLOR);
            return(newControl);
        }
        public WatchVariableObjectWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl)
            : base(watchVar, watchVarControl)
        {
            _displayAsObject = true;

            AddObjectContextMenuStripItems();
        }
Beispiel #13
0
        public WatchVariableObjectWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl)
            : base(watchVar, watchVarControl, DEFAULT_ROUNDING_LIMIT, true)
        {
            _displayAsObject = true;

            AddObjectContextMenuStripItems();
        }
 public void AddVariable(WatchVariableControl watchVarControl)
 {
     lock (_objectLock)
     {
         AddVariables(new List <WatchVariableControl>()
         {
             watchVarControl
         });
     }
 }
Beispiel #15
0
        public bool SetVariableValueByName(string name, object value, bool allowToggle)
        {
            WatchVariableControl control = GetCurrentVariableControls().FirstOrDefault(c => c.VarName == name);

            if (control == null)
            {
                return(false);
            }
            return(control.SetValue(value, allowToggle));
        }
Beispiel #16
0
        public WatchVariableBooleanWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            bool?displayAsInverted)
            : base(watchVar, watchVarControl, DEFAULT_DISPLAY_TYPE, DEFAULT_ROUNDING_LIMIT, DEFAULT_DISPLAY_AS_HEX, true)
        {
            _displayAsCheckbox = true;
            _displayAsInverted = displayAsInverted ?? false;

            AddBooleanContextMenuStripItems();
        }
Beispiel #17
0
        protected WatchVariableWrapper(WatchVariable watchVar, WatchVariableControl watchVarControl, bool useCheckbox = false)
        {
            _watchVar = watchVar;
            _watchVarControl = watchVarControl;

            _startsAsCheckbox = useCheckbox;
            _contextMenuStrip = new BetterContextMenuStrip();
            AddContextMenuStripItems();
            AddExternalContextMenuStripItems();
            AddCustomContextMenuStripItems();
        }
Beispiel #18
0
        public WatchVariableAngleWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl)
            : base(watchVar, watchVarControl, 0)
        {
            _signed                   = _watchVar.SignedType.Value;
            _angleUnitType            = AngleUnitType.InGameUnits;
            _truncateToMultipleOf16   = false;
            _constrainToOneRevolution = false;

            AddAngleContextMenuStripItems();
        }
Beispiel #19
0
        public WatchVariablePanel()
        {
            _objectLock           = new Object();
            _precursors           = new List <WatchVariableControlPrecursor>();
            _watchVarControlsList = new List <WatchVariableControl>();
            _allGroups            = new List <VariableGroup>();
            _initialVisibleGroups = new List <VariableGroup>();
            _visibleGroups        = new List <VariableGroup>();

            ContextMenuStrip = new ContextMenuStrip();

            _reorderingWatchVarControl = null;
        }
        public List <WatchVariableControl> GetCurrentVariableControls()
        {
            List <WatchVariableControl> watchVarControls = new List <WatchVariableControl>();

            lock (_objectLock)
            {
                foreach (Control control in Controls)
                {
                    WatchVariableControl watchVarControl = control as WatchVariableControl;
                    watchVarControls.Add(watchVarControl);
                }
            }
            return(watchVarControls);
        }
Beispiel #21
0
 public void NotifyOfReordering(WatchVariableControl watchVarControl)
 {
     if (_reorderingWatchVarControls.Count == 0)
     {
         NotifyOfReorderingStart(new List <WatchVariableControl>()
         {
             watchVarControl
         });
     }
     else
     {
         NotifyOfReorderingEnd(new List <WatchVariableControl>()
         {
             watchVarControl
         });
     }
 }
Beispiel #22
0
        public static WatchVariableWrapper CreateWatchVariableWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            WatchVariableSubclass subclass,
            Type displayType,
            int?roundingLimit,
            bool?useHex,
            bool?invertBool,
            bool?isYaw,
            Coordinate?coordinate)
        {
            switch (subclass)
            {
            case WatchVariableSubclass.String:
                return(new WatchVariableStringWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Number:
                return(new WatchVariableNumberWrapper(
                           watchVar,
                           watchVarControl,
                           displayType,
                           roundingLimit,
                           useHex,
                           DEFAULT_USE_CHECKBOX,
                           coordinate));

            case WatchVariableSubclass.Angle:
                return(new WatchVariableAngleWrapper(watchVar, watchVarControl, displayType, isYaw));

            case WatchVariableSubclass.Object:
                return(new WatchVariableObjectWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Triangle:
                return(new WatchVariableTriangleWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Address:
                return(new WatchVariableAddressWrapper(watchVar, watchVarControl));

            case WatchVariableSubclass.Boolean:
                return(new WatchVariableBooleanWrapper(watchVar, watchVarControl, invertBool));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Beispiel #23
0
 public void NotifyOfReordering(WatchVariableControl watchVarControl)
 {
     if (_reorderingWatchVarControl == null)
     {
         _reorderingWatchVarControl = watchVarControl;
         _reorderingWatchVarControl.FlashColor(WatchVariableControl.REORDER_START_COLOR);
     }
     else if (watchVarControl == _reorderingWatchVarControl)
     {
         _reorderingWatchVarControl.FlashColor(WatchVariableControl.REORDER_RESET_COLOR);
         _reorderingWatchVarControl = null;
     }
     else
     {
         int newIndex = Controls.IndexOf(watchVarControl);
         Controls.SetChildIndex(_reorderingWatchVarControl, newIndex);
         _reorderingWatchVarControl.FlashColor(WatchVariableControl.REORDER_END_COLOR);
         _reorderingWatchVarControl = null;
     }
 }
        public void NotifySelectClick(
            WatchVariableControl clickedControl, bool ctrlHeld, bool shiftHeld)
        {
            List <WatchVariableControl> currentControls = GetCurrentVariableControls();

            if (shiftHeld && _selectedWatchVarControls.Count > 0)
            {
                int index1   = currentControls.IndexOf(_selectedWatchVarControls.Last());
                int index2   = currentControls.IndexOf(clickedControl);
                int diff     = Math.Abs(index2 - index1);
                int diffSign = index2 > index1 ? 1 : -1;
                for (int i = 0; i <= diff; i++)
                {
                    int index = index1 + diffSign * i;
                    WatchVariableControl control = currentControls[index];
                    if (!_selectedWatchVarControls.Contains(control))
                    {
                        control.IsSelected = true;
                        _selectedWatchVarControls.Add(control);
                    }
                }
            }
            else
            {
                bool toggle = ctrlHeld || (_selectedWatchVarControls.Count == 1 && _selectedWatchVarControls[0] == clickedControl);
                if (!toggle)
                {
                    UnselectAllVariables();
                }
                if (clickedControl.IsSelected)
                {
                    clickedControl.IsSelected = false;
                    _selectedWatchVarControls.Remove(clickedControl);
                }
                else
                {
                    clickedControl.IsSelected = true;
                    _selectedWatchVarControls.Add(clickedControl);
                }
            }
        }
 public WatchVariableStringWrapper(
     WatchVariable watchVar,
     WatchVariableControl watchVarControl)
     : base(watchVar, watchVarControl, DEFAULT_USE_CHECKBOX)
 {
 }
Beispiel #26
0
        private void OnNameTextBoxClick()
        {
            this.Focus();

            KeyboardState keyboardState   = Keyboard.GetState();
            bool          isCtrlKeyHeld   = keyboardState.IsKeyDown(Key.ControlLeft) || keyboardState.IsKeyDown(Key.ControlRight);
            bool          isShiftKeyHeld  = keyboardState.IsKeyDown(Key.ShiftLeft) || keyboardState.IsKeyDown(Key.ShiftRight);
            bool          isAltKeyHeld    = keyboardState.IsKeyDown(Key.AltLeft) || keyboardState.IsKeyDown(Key.AltRight);
            bool          isFKeyHeld      = keyboardState.IsKeyDown(Key.F);
            bool          isHKeyHeld      = keyboardState.IsKeyDown(Key.H);
            bool          isLKeyHeld      = keyboardState.IsKeyDown(Key.L);
            bool          isRKeyHeld      = keyboardState.IsKeyDown(Key.R);
            bool          isDeleteKeyHeld =
                keyboardState.IsKeyDown(Key.Delete) ||
                keyboardState.IsKeyDown(Key.BackSpace) ||
                keyboardState.IsKeyDown(Key.Escape);
            bool isBacktickHeld = keyboardState.IsKeyDown(Key.Grave);

            if (isFKeyHeld && isCtrlKeyHeld)
            {
                WatchVariableControl newControl = AddCopyToCustomTab();
                newControl.ToggleFixedAddress();
                return;
            }

            if (isFKeyHeld)
            {
                ToggleFixedAddress();
                return;
            }

            if (isHKeyHeld)
            {
                _watchVarWrapper.ToggleHighlighted();
                return;
            }

            if (isLKeyHeld)
            {
                _watchVarWrapper.ToggleLocked(FixedAddressList);
                return;
            }

            if (isRKeyHeld)
            {
                RenameMode = true;
                return;
            }

            if (isDeleteKeyHeld)
            {
                DeleteFromPanel();
                return;
            }

            if (isCtrlKeyHeld)
            {
                AddCopyToCustomTab();
                return;
            }

            if (isShiftKeyHeld)
            {
                NotifyPanelOfReodering();
                return;
            }

            if (isAltKeyHeld)
            {
                EnableCustomFunctionality();
                return;
            }

            if (isBacktickHeld)
            {
                AddToVarHackTab();
                return;
            }

            // default
            {
                _watchVarWrapper.ShowVarInfo();
                return;
            }
        }
        public static void AddVarsToTab(
            List <WatchVariableControl> watchVars, WatchVariableFlowLayoutPanel variableAdder, AddToTabTypeEnum?addToTabTypeNullable = null)
        {
            List <List <WatchVariableControl> > newVarListList = new List <List <WatchVariableControl> >();
            AddToTabTypeEnum addToTabType = addToTabTypeNullable ?? GetAddToTabType();

            foreach (WatchVariableControl watchVar in watchVars)
            {
                List <WatchVariableControl> newVarList = new List <WatchVariableControl>();
                List <uint>         addressList        = watchVar.FixedAddressListGetter() ?? watchVar.WatchVarWrapper.GetCurrentAddressesToFix();
                List <List <uint> > addressesLists     =
                    addToTabType == AddToTabTypeEnum.GroupedByVariable ||
                    addToTabType == AddToTabTypeEnum.GroupedByBaseAddress
                        ? addressList.ConvertAll(address => new List <uint>()
                {
                    address
                })
                        : new List <List <uint> >()
                {
                    addressList
                };
                for (int i = 0; i < addressesLists.Count; i++)
                {
                    string name = watchVar.VarName;
                    if (addressesLists.Count > 1)
                    {
                        name += " " + (i + 1);
                    }
                    bool useFixed =
                        addToTabType == AddToTabTypeEnum.Fixed ||
                        addToTabType == AddToTabTypeEnum.GroupedByVariable ||
                        addToTabType == AddToTabTypeEnum.GroupedByBaseAddress;
                    List <uint>          constructorAddressList = useFixed ? addressesLists[i] : null;
                    WatchVariableControl newControl             =
                        watchVar.WatchVarPrecursor.CreateWatchVariableControl(
                            name,
                            watchVar._baseColor,
                            new List <VariableGroup>()
                    {
                        VariableGroup.Custom
                    },
                            constructorAddressList);
                    newVarList.Add(newControl);
                }
                watchVar.FlashColor(ADD_TO_CUSTOM_TAB_COLOR);
                newVarListList.Add(newVarList);
            }

            if (addToTabType == AddToTabTypeEnum.GroupedByBaseAddress)
            {
                int maxListLength = newVarListList.Max(list => list.Count);
                for (int i = 0; i < maxListLength; i++)
                {
                    for (int j = 0; j < newVarListList.Count; j++)
                    {
                        List <WatchVariableControl> newVarList = newVarListList[j];
                        if (i >= newVarList.Count)
                        {
                            continue;
                        }
                        WatchVariableControl newVar = newVarList[i];
                        variableAdder.AddVariable(newVar);
                    }
                }
            }
            else
            {
                foreach (List <WatchVariableControl> newVarList in newVarListList)
                {
                    foreach (WatchVariableControl newVar in newVarList)
                    {
                        variableAdder.AddVariable(newVar);
                    }
                }
            }
        }
Beispiel #28
0
 private bool ShouldShow(WatchVariableControl watchVarControl)
 {
     return(_allGroups.Count == 0 || watchVarControl.BelongsToAnyGroup(_visibleGroups));
 }
Beispiel #29
0
        private void AddItemsToContextMenuStrip()
        {
            ToolStripMenuItem resetVariablesItem = new ToolStripMenuItem("Reset Variables");

            resetVariablesItem.Click += (sender, e) => ResetVariables();

            ToolStripMenuItem clearAllButHighlightedItem = new ToolStripMenuItem("Clear All But Highlighted");

            clearAllButHighlightedItem.Click += (sender, e) => ClearAllButHighlightedVariables();

            ToolStripMenuItem fixVerticalScrollItem = new ToolStripMenuItem("Fix Vertical Scroll");

            fixVerticalScrollItem.Click += (sender, e) => FixVerticalScroll();

            ToolStripMenuItem addCustomVariablesItem = new ToolStripMenuItem("Add Custom Variables");

            addCustomVariablesItem.Click += (sender, e) =>
            {
                VariableCreationForm form = new VariableCreationForm();
                form.Initialize(this);
                form.Show();
            };

            ToolStripMenuItem addMappingVariablesItem = new ToolStripMenuItem("Add Mapping Variables");

            addMappingVariablesItem.Click += (sender, e) => AddVariables(MappingConfig.GetVariables());

            ToolStripMenuItem addDummyVariableItem = new ToolStripMenuItem("Add Dummy Variable...");
            List <string>     types = new List <string>(TypeUtilities.InGameTypeList);

            types.Add("string");
            foreach (string typeString in types)
            {
                ToolStripMenuItem typeItem = new ToolStripMenuItem(typeString);
                addDummyVariableItem.DropDownItems.Add(typeItem);
                typeItem.Click += (sender, e) =>
                {
                    int numEntries = 1;
                    if (KeyboardUtilities.IsCtrlHeld())
                    {
                        string numEntriesString = DialogUtilities.GetStringFromDialog(labelText: "Enter Num Vars:");
                        if (numEntriesString == null)
                        {
                            return;
                        }
                        int parsed = ParsingUtilities.ParseInt(numEntriesString);
                        parsed     = Math.Max(parsed, 0);
                        numEntries = parsed;
                    }

                    List <WatchVariableControl> controls = new List <WatchVariableControl>();
                    for (int i = 0; i < numEntries; i++)
                    {
                        string        specialType   = WatchVariableSpecialUtilities.AddDummyEntry(typeString);
                        WatchVariable watchVariable =
                            new WatchVariable(
                                name: specialType,
                                memoryTypeName: null,
                                specialType: specialType,
                                baseAddressType: BaseAddressTypeEnum.None,
                                offsetUS: null,
                                offsetJP: null,
                                offsetSH: null,
                                offsetEU: null,
                                offsetDefault: null,
                                mask: null,
                                shift: null,
                                handleMapping: true);
                        WatchVariableControlPrecursor precursor =
                            new WatchVariableControlPrecursor(
                                name: specialType,
                                watchVar: watchVariable,
                                subclass: typeString == "string" ? WatchVariableSubclass.String : WatchVariableSubclass.Number,
                                backgroundColor: null,
                                displayType: null,
                                roundingLimit: null,
                                useHex: null,
                                invertBool: null,
                                isYaw: null,
                                coordinate: null,
                                groupList: new List <VariableGroup>()
                        {
                            VariableGroup.Custom
                        });
                        WatchVariableControl control = precursor.CreateWatchVariableControl();
                        controls.Add(control);
                    }
                    AddVariables(controls);
                };
            }

            ToolStripMenuItem openSaveClearItem = new ToolStripMenuItem("Open / Save / Clear ...");

            ControlUtilities.AddDropDownItems(
                openSaveClearItem,
                new List <string>()
            {
                "Open", "Open as Pop Out", "Save in Place", "Save As", "Clear"
            },
                new List <Action>()
            {
                () => OpenVariables(),
                () => OpenVariablesAsPopOut(),
                () => SaveVariablesInPlace(),
                () => SaveVariables(),
                () => ClearVariables(),
            });

            ToolStripMenuItem doToAllVariablesItem = new ToolStripMenuItem("Do to all variables...");

            WatchVariableSelectionUtilities.CreateSelectionToolStripItems(
                () => GetCurrentVariableControls(), this)
            .ForEach(item => doToAllVariablesItem.DropDownItems.Add(item));

            ToolStripMenuItem filterVariablesItem = new ToolStripMenuItem("Filter Variables...");

            _filteringDropDownItems = _allGroups.ConvertAll(varGroup => CreateFilterItem(varGroup));
            UpdateFilterItemCheckedStatuses();
            _filteringDropDownItems.ForEach(item => filterVariablesItem.DropDownItems.Add(item));
            filterVariablesItem.DropDown.MouseEnter += (sender, e) =>
            {
                filterVariablesItem.DropDown.AutoClose = false;
            };
            filterVariablesItem.DropDown.MouseLeave += (sender, e) =>
            {
                filterVariablesItem.DropDown.AutoClose = true;
                filterVariablesItem.DropDown.Close();
            };

            ContextMenuStrip.Items.Add(resetVariablesItem);
            ContextMenuStrip.Items.Add(clearAllButHighlightedItem);
            ContextMenuStrip.Items.Add(fixVerticalScrollItem);
            ContextMenuStrip.Items.Add(addCustomVariablesItem);
            ContextMenuStrip.Items.Add(addMappingVariablesItem);
            ContextMenuStrip.Items.Add(addDummyVariableItem);
            ContextMenuStrip.Items.Add(openSaveClearItem);
            ContextMenuStrip.Items.Add(doToAllVariablesItem);
            ContextMenuStrip.Items.Add(filterVariablesItem);
        }
 private bool ShouldShow(WatchVariableControl watchVarControl)
 {
     return(watchVarControl.BelongsToAnyGroupOrHasNoGroup(_visibleGroups));
 }