private void cbValueType_SelectedIndexChanged(object sender, EventArgs e) { switch (cbValueType.SelectedIndex) { case 0: varopt = TVariableType.vtBinary; break; case 1: varopt = TVariableType.vtByte; break; case 2: varopt = TVariableType.vtWord; break; case 3: varopt = TVariableType.vtDword; break; case 4: varopt = TVariableType.vtQword; break; case 5: varopt = TVariableType.vtSingle; break; case 6: varopt = TVariableType.vtDouble; break; case 7: varopt = TVariableType.vtString; break; } switch (varopt) { case TVariableType.vtBinary: case TVariableType.vtByte: case TVariableType.vtString: case TVariableType.vtUnicodeString: case TVariableType.vtByteArrays: tbAlignment.Text = "1"; break; case TVariableType.vtWord: tbAlignment.Text = "2"; break; default: tbAlignment.Text = "4"; break; } }
// 변수 타입을 설정한다. private void cbValueType_SelectedIndexChanged(object sender, EventArgs e) { // connect 의 열거형중 다음과 같은 변수를 선택시 // cbValueType.SeletedIndex << 는 Form의 스피너이다. // 해당 스피너에서 다음과 같은 값을 선택하면 // varopt 에 저장된다. switch (cbValueType.SelectedIndex) { case 0: varopt = TVariableType.vtBinary; break; case 1: varopt = TVariableType.vtByte; break; case 2: varopt = TVariableType.vtWord; break; case 3: varopt = TVariableType.vtDword; break; case 4: varopt = TVariableType.vtQword; break; case 5: varopt = TVariableType.vtSingle; break; case 6: varopt = TVariableType.vtDouble; break; case 7: varopt = TVariableType.vtString; break; case 8: varopt = TVariableType.vtArrayOfBytes; break; } // varopt 을 통해 스피너의 값을 받아 분기처리 switch (varopt) { case TVariableType.vtBinary: case TVariableType.vtByte: case TVariableType.vtString: case TVariableType.vtUnicodeString: case TVariableType.vtArrayOfBytes: tbAlignment.Text = "16"; break; case TVariableType.vtByteArrays: tbAlignment.Text = "1"; break; case TVariableType.vtWord: tbAlignment.Text = "2"; break; //byte of array type 을 맞춰준다. //case TVariableType.vtArrayOfBytes: tbValue1.Text.ToString(); break; default: tbAlignment.Text = "4"; break; } }
// 프로세스를 열어 연결한다. private void btnOpenProcess_Click(object sender, EventArgs e) { string pid = ltBox.SelectedItem.ToString(); pid = pid.Substring(0, pid.IndexOf('-', 0)); if (!pid.Equals("")) { lib.iOpenProcess(pid); lib.iInitMemoryScanner(Process.GetCurrentProcess().MainWindowHandle.ToInt32()); MessageBox.Show("Process opened"); scanopt = TScanOption.soExactValue; varopt = TVariableType.vtDword; startscan = "$0000000000000000"; endscan = "$7fffffffffffffff"; unicode = false; casesensitive = false; btnNewScan.Enabled = true; btnFirstScan.Enabled = true; } }
private void btnOpenProcess_Click(object sender, EventArgs e) { string pid = ltBox.SelectedItem.ToString(); pid = pid.Substring(0, pid.IndexOf('-', 0)); if (!pid.Equals("")) { lib.iOpenProcess(pid); lib.iInitMemoryScanner(Process.GetCurrentProcess().MainWindowHandle.ToInt32()); MessageBox.Show("Process opened"); scanopt = TScanOption.soExactValue; varopt = TVariableType.vtDword; startscan = "$0000000000000000"; endscan = "$7fffffffffffffff"; unicode = false; casesensitive = false; btnNewScan.Enabled = true; btnFirstScan.Enabled = true; } }
private void cbValueType_SelectedIndexChanged(object sender, EventArgs e) { switch (cbValueType.SelectedIndex) { case 0: varopt = TVariableType.vtBinary; break; case 1: varopt = TVariableType.vtByte; break; case 2: varopt = TVariableType.vtWord; break; case 3: varopt = TVariableType.vtDword; break; case 4: varopt = TVariableType.vtQword; break; case 5: varopt = TVariableType.vtSingle; break; case 6: varopt = TVariableType.vtDouble; break; case 7: varopt = TVariableType.vtString; break; } switch (varopt) { case TVariableType.vtBinary : case TVariableType.vtByte : case TVariableType.vtString : case TVariableType.vtUnicodeString : case TVariableType.vtByteArrays: tbAlignment.Text = "1"; break; case TVariableType.vtWord: tbAlignment.Text = "2"; break; default: tbAlignment.Text = "4"; break; } }