private void MenuItem_Click(object sender, RoutedEventArgs e) { bool setPolishCulture = (Equals(sender, PolishMenuItem)); CultureResources.ChangeCulture(new CultureInfo(setPolishCulture ? "pl" : "en")); PolishMenuItem.IsChecked = setPolishCulture; EnglishMenuItem.IsChecked = !setPolishCulture; Refresh(); }
public MainWindow() { CultureResources.ChangeCulture(Properties.Settings.Default.DefaultCulture); InitializeComponent(); LeftView.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled); RightView.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled); _backgroundWorker1 = new BackgroundWorker(); _backgroundWorker1.WorkerReportsProgress = true; _backgroundWorker1.WorkerSupportsCancellation = true; _backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork); _backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted); _backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged); }