Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        private void Initialize()
        {
            _tableLayout.Dock = DockStyle.Fill;
            _grid.Dock        = DockStyle.Fill;

            _tableLayout.BringToFront();
            _grid.BringToFront();

            _toolStripLeftSide.Renderer  = new NoToolStripBorderRenderer();
            _toolStripRightSide.Renderer = new NoToolStripBorderRenderer();

            InitializeColorsAndFonts();

            GetDialogBoxSettings();

            _comboSourceLang.Items.AddRange(LocalizationManagerInternal <T> .GetUILanguages(true).ToArray());
            _comboTargetLang.Items.AddRange(LocalizationManagerInternal <T> .GetUILanguages(false).ToArray());
            _comboSourceLang.ComboBox.DisplayMember = "NativeName";
            _comboTargetLang.ComboBox.DisplayMember = "NativeName";

            UpdateLanguageSensitiveControls();
            _viewModel.LoadTreeNodes(_treeView);
            _labelCount.Text  = _viewModel.GetNumberOfTranslatedItemsString();
            _grid.MultiSelect = true;
            UpdateGridSortGlyph();
        }
        public FallbackLanguagesDlg()
        {
            _uiCulture = CultureInfo.GetCultureInfo(LocalizationManager.UILanguageId);

            _listBoxAvailableLanguages.Items.AddRange(LocalizationManagerInternal <T> .GetUILanguages(false).ToArray());
            _listBoxAvailableLanguages.Items.Remove(_uiCulture);
            _listBoxAvailableLanguages.Items.Remove(CultureInfo.GetCultureInfo(LocalizationManager.kDefaultLang));

            foreach (var langId in LocalizationManagerInternal <T> .FallbackLanguageIds)
            {
                _listBoxFallbackLanguages.Items.Add(CultureInfo.GetCultureInfo(langId));
            }

            _labelMessage.Text = string.Format(_labelMessage.Text, _uiCulture.DisplayName, _uiCulture.DisplayName);

            UpdateDisplay();
        }