Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        private void ResetButton_Click(object sender, EventArgs e)
        {
            ComboSearchType.Items.Clear();
            ComboSearchType.Items.AddRange(SearchTypeInitialTool.GetValues());
            ComboSearchType.SelectedIndex = 0;
            LastSearchCriteria            = null;
            ResultsGrid.Rows.Clear();
            ControlEnabledSearchType = ControlEnabledMemoryRange = ControlEnabledDataType = true;
            if (MemoryRange.SelectedIndex == MemoryRange.Items.Count - 1)
            {
                ControlEnabledStart = ControlEnabledSize = true;
            }

            LabelLastSearch.Text = "Last Search\n";
        }
Exemplo n.º 3
0
        private void ComboDataType_SelectedValueChanged(object sender, EventArgs e)
        {
            string CurrentSearchType = ComboSearchType.SelectedItem == null ? null : ComboSearchType.SelectedItem.ToString();

            if (LastSearchCriteria == null)
            {
                ComboSearchType.Items.Clear();
                ComboSearchType.Items.AddRange(SearchTypeInitialTool.GetValues());
            }
            else
            {
                switch (DataTypeExactTool.GetValue(ComboDataType.SelectedItem.ToString()))
                {
                case DataTypeExact.Bytes1:
                case DataTypeExact.Bytes2:
                case DataTypeExact.Bytes4:
                case DataTypeExact.Bytes8:
                case DataTypeExact.Float:
                case DataTypeExact.Double:
                    ComboSearchType.Items.Clear();
                    ComboSearchType.Items.AddRange(SearchTypeNumericTool.GetValues());
                    break;

                case DataTypeExact.Raw:
                case DataTypeExact.Text:
                    ComboSearchType.Items.Clear();
                    ComboSearchType.Items.AddRange(SearchTypeTextTool.GetValues());
                    break;
                }
            }
            if (CurrentSearchType != null && ComboSearchType.Items.Contains(CurrentSearchType))
            {
                ComboSearchType.SelectedIndex = ComboSearchType.Items.IndexOf(CurrentSearchType);
                ComboSearchType.SelectedItem  = ComboSearchType.SelectedValue = CurrentSearchType;
            }
            else
            {
                ComboSearchType.SelectedIndex = 0;
                ComboSearchType.SelectedItem  = ComboSearchType.SelectedValue = ComboSearchType.Items[0];
            }
        }