private void Window_Loaded(object sender, RoutedEventArgs e) { // Restore ASCII-only setting. AsciiOnlyDump = AppSettings.Global.GetBool(AppSettings.HEXD_ASCII_ONLY, false); // Restore conv mode setting. CharConvMode mode = (CharConvMode)AppSettings.Global.GetEnum( AppSettings.HEXD_CHAR_CONV, typeof(CharConvMode), (int)CharConvMode.Ascii); int index = 0; for (int i = 0; i < CharConvItems.Length; i++) { if (CharConvItems[i].Mode == mode) { index = i; break; } } charConvComboBox.SelectedIndex = index; }
public CharConvItem(string name, CharConvMode mode) { Name = name; Mode = mode; }