public MainSettingsTab(Style settingsStyle) { Resources.Add("settingsStyle", settingsStyle); InitializeComponent(); List <CultureInfo> cultures = new List <CultureInfo>(); foreach (var cult in supportedCulture) { cultures.Add(CultureInfo.CreateSpecificCulture(cult)); } cultures.Sort((x, y) => x.DisplayName.CompareTo(y.DisplayName)); foreach (var cultureInfo in cultures) { Culture.Items.Add(cultureInfo); if (cultureInfo.TextInfo.CultureName == CultureInfo.CurrentUICulture.TextInfo.CultureName) { Culture.SelectedItem = cultureInfo; } } RecentFileListLengthBox.Text = RecentFileList.GetSingleton().ListLength.ToString(); initialized = true; }
private void RecentFileListLengthBox_TextChanged(object sender, TextChangedEventArgs e) { int l; if (int.TryParse(RecentFileListLengthBox.Text, out l)) { RecentFileList.GetSingleton().ChangeListLength(l); } else { RecentFileListLengthBox.Text = RecentFileList.GetSingleton().ListLength.ToString(); } }