private void ShowCharacters() { lvCharmap.Clear(); for (int i = first; i < first + 0x100; i++) { lvCharmap.Items.Add(Unicode.Decode(i)); } if (first < Convert.ToInt32(content.Text.Substring(0, content.Text.IndexOf(' ')), 0x10) || first > Convert.ToInt32(content.Text.Substring(content.Text.LastIndexOf(' ') + 1), 0x10)) { content.Text = (first / 0x1000 * 0x1000).ToString("X") + " ~ " + (first / 0x1000 * 0x1000 + 0xfff).ToString("X"); } }
private void Goto_Click(object sender, EventArgs e) { string s = Interaction.InputBox("轉到"); if (s == "") { return; } if (!new Regex("^[0-9A-Fa-f]+$").IsMatch(s)) { s = Unicode.Encode(s)[0]; } first = Convert.ToInt32(s, 16) / 0x100 * 0x100; ShowCharacters(); lvCharmap.Items[Convert.ToInt32(s, 16) % 0x100].Selected = true; lvCharmap.Focus(); }