コード例 #1
0
        private void LoadTabPanel(BaseSettingsPanel tabPanel)
        {
            pnlContainer.Controls.Clear();
            if (tabPanel == null)
            {
                return;
            }

            _Translator.TranslateUI(_Settings.Language, Name, tabPanel.Controls);
            pnlContainer.Controls.Add(tabPanel);
        }
コード例 #2
0
        private void settingsTabs_TabChanged(object sender, int index)
        {
            string str = string.Empty;

            if (_tabPanel.GetType() == typeof(BehavioursPanel))
            {
                ((BehavioursPanel)_tabPanel).LanguageChanged -= new BehavioursPanel.LanguageChangedDelegate(pnl_LanguageChanged);
            }

            if (_tabPanel != null)
            {
                _tabPanel.Dispose();
            }

            switch (index)
            {
            case 1:
                _tabPanel = new DOSBoxPanel(_Translator, _Settings, _Translator.GetTranslatedMessage(_Settings.Language, 52, "DOSBox Settings"));
                break;

            case 2:
                _tabPanel = new GamesPanel(_Translator, _Settings, _Translator.GetTranslatedMessage(_Settings.Language, 53, "Games Settings"));
                break;

            case 3:
                _tabPanel = new BehavioursPanel(_Translator, _Settings, _manager.SettingsDB, _Translator.GetTranslatedMessage(_Settings.Language, 54, "Application Behaviours"));
                ((BehavioursPanel)_tabPanel).LanguageChanged += new BehavioursPanel.LanguageChangedDelegate(pnl_LanguageChanged);
                break;

            default:
                _tabPanel = null;
                break;
            }

            LoadTabPanel(_tabPanel);
        }
コード例 #3
0
 private void InitiateUI()
 {
     _tabPanel = new DOSBoxPanel(_Translator, _Settings, _Translator.GetTranslatedMessage(_Settings.Language, 52, "DOSBox Settings"));
     LoadTabPanel(_tabPanel);
 }