private async void RemoveLanguage(object sender, RoutedEventArgs e) { MenuItem menuItem = sender as MenuItem; if (menuItem == null) { return; } CultureItem culture = menuItem.Tag as CultureItem; if (culture == null) { return; } string message = StringUtils.String("MB_RemoveLanguage", culture.Culture.Description); MessageBoxResult mbResult = await App.MainWindow.ShowMessage(message); if (mbResult == MessageBoxResult.Yes) { App.MainWindow.Document.RemoveLanguage(culture.Culture.CultureCode); Cultures.Remove(culture); } }
private void LanguageOpen(object sender, RoutedEventArgs e) { Button pressedButton = sender as Button; CultureItem selectedCulture = (CultureItem)pressedButton.Tag; p_Translation translationPage = new p_Translation(); translationPage.SelectedCulture = selectedCulture.DocumentCulture; App.MainWindow.AnimatedNavigate(App.MainWindow.MiddleLayerFrame, translationPage); }