コード例 #1
0
        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);
            }
        }