private void MainForm_Load(object sender, EventArgs e)
 {
     ComboSearchType.Items.AddRange(SearchTypeInitialTool.GetValues());
     ComboDataType.Items.AddRange(DataTypeExactTool.GetValues());
     ValuesGridTypeColumn.Items.AddRange(DataTypeExactTool.GetValues());
     this.ComboSearchType.SelectedIndex = 0;
     this.ComboDataType.SelectedIndex   = 2;
 }
Exemple #2
0
 private void MemoryViewer_Load(object sender, EventArgs e)
 {
     hexProvider = new HexboxProvider(rangeBothDirections * 2);
     hexProvider.OnByteChanged       += HexProvider_OnByteChanged;
     hexEditBox.ByteProvider          = hexProvider;
     hexEditBox.LineInfoOffset        = startingAddress;
     hexEditBox.GroupSeparatorVisible = false;
     comboSelType.Items.AddRange(DataTypeExactTool.GetValues());
     comboSelType.SelectedIndex = 0;
 }
        private void ComboSearchType_SelectedValueChanged(object sender, EventArgs e)
        {
            string CurrentDataType = ComboDataType.SelectedItem == null ? null : ComboDataType.SelectedItem.ToString();

            switch (SearchTypeBaseTool.GetValue(ComboSearchType.SelectedItem.ToString()))
            {
            case SearchTypeBase.Exact:
                ComboDataType.Items.Clear();
                ComboDataType.Items.AddRange(DataTypeExactTool.GetValues());
                SearchValue.Width    = 286;
                SearchValue2.Visible = LabelDash.Visible = false;
                break;

            case SearchTypeBase.Range:
                ComboDataType.Items.Clear();
                ComboDataType.Items.AddRange(DataTypeNumericTool.GetValues());
                SearchValue.Width    = 136;
                SearchValue2.Visible = LabelDash.Visible = true;
                break;

            case SearchTypeBase.IncreasedBy:
            case SearchTypeBase.DecreasedBy:
            case SearchTypeBase.Increased:
            case SearchTypeBase.Decreased:
            case SearchTypeBase.Unknown:
                ComboDataType.Items.Clear();
                ComboDataType.Items.AddRange(DataTypeNumericTool.GetValues());
                SearchValue.Width    = 286;
                SearchValue2.Visible = LabelDash.Visible = false;
                break;
            }
            if (CurrentDataType != null && ComboDataType.Items.Contains(CurrentDataType))
            {
                ComboDataType.SelectedIndex = ComboDataType.Items.IndexOf(CurrentDataType);
                ComboDataType.SelectedItem  = ComboDataType.SelectedValue = CurrentDataType;
            }
            else
            {
                ComboDataType.SelectedIndex = 0;
                ComboDataType.SelectedItem  = ComboDataType.SelectedValue = ComboDataType.Items[0];
            }
        }