Esempio n. 1
0
        public void Initialize(IEnumerable <ITabView> additionalFileViews, IGameFile gameFile)
        {
            m_init = true;
            m_additionalFileViews = additionalFileViews.ToArray();

            GameFile = gameFile;

            m_handler = new FileLoadHandler(m_adapter, gameFile);

            cmbSourcePorts.DataSource = m_adapter.GetSourcePorts();
            cmbIwad.DataSource        = Util.GetIWadsDataSource(m_adapter);

            if (gameFile != null)
            {
                Text = "Launch - " + (string.IsNullOrEmpty(gameFile.Title) ? gameFile.FileName : gameFile.Title);
                if (!string.IsNullOrEmpty(gameFile.Map))
                {
                    cmbMap.DataSource = gameFile.Map.Split(new string[] { ", ", "," }, StringSplitOptions.RemoveEmptyEntries);
                }
                chkSaveStats.Checked = gameFile.SettingsStat;
            }

            cmbSkill.DataSource   = Util.GetSkills();
            cmbSkill.SelectedItem = "3";

            if (gameFile != null && IsIwad(gameFile))
            {
                pbInfo.Image = DoomLauncher.Properties.Resources.bon2b;
                lblInfo.Text = string.Format("These files will automatically be added{0} when this IWAD is selected for play.", Environment.NewLine);
            }
            else
            {
                tblFiles.RowStyles[0].Height = 0;
            }
        }
Esempio n. 2
0
        private void PopulateDefaultSettings(IDataSourceAdapter adapter)
        {
            cmbSourcePorts.DataSource = adapter.GetSourcePorts();
            cmbIwad.DataSource        = Util.GetIWadsDataSource(adapter);
            cmbSkill.DataSource       = Util.GetSkills();

            cmbSourcePorts.SelectedValue = m_appConfig.GetTypedConfigValue(ConfigType.DefaultSourcePort, typeof(int));
            cmbIwad.SelectedValue        = m_appConfig.GetTypedConfigValue(ConfigType.DefaultIWad, typeof(int));
            cmbSkill.SelectedItem        = m_appConfig.GetTypedConfigValue(ConfigType.DefaultSkill, typeof(string));
        }
Esempio n. 3
0
        private void PopulateDefaultSettings(IDataSourceAdapter adapter)
        {
            cmbSourcePorts.DataSource    = adapter.GetSourcePorts();
            cmbIwad.DataSource           = Util.GetIWadsDataSource(adapter);
            cmbSkill.DataSource          = Util.GetSkills();
            cmbFileManagement.DataSource = Enum.GetValues(typeof(FileManagement));
            cmbViewType.DataSource       = new string[] { "Grid", "Tile Large", "Tile Small" };

            cmbSourcePorts.SelectedValue    = m_appConfig.GetTypedConfigValue(ConfigType.DefaultSourcePort, typeof(int));
            cmbIwad.SelectedValue           = m_appConfig.GetTypedConfigValue(ConfigType.DefaultIWad, typeof(int));
            cmbSkill.SelectedItem           = m_appConfig.GetTypedConfigValue(ConfigType.DefaultSkill, typeof(string));
            cmbFileManagement.SelectedIndex = (int)Enum.Parse(typeof(FileManagement), (string)m_appConfig.GetTypedConfigValue(ConfigType.FileManagement, typeof(string)));
            cmbViewType.SelectedIndex       = (int)Enum.Parse(typeof(GameFileViewType), (string)m_appConfig.GetTypedConfigValue(ConfigType.GameFileViewType, typeof(string)));
        }
Esempio n. 4
0
        public void Initialize(IEnumerable <ITabView> additionalFileViews, IGameFile gameFile)
        {
            m_additionalFileViews = additionalFileViews.ToArray();

            GameFile = gameFile;

            SetAutoCompleteCustomSource(cmbSourcePorts, m_adapter.GetSourcePorts(), typeof(ISourcePortData), "Name");
            SetAutoCompleteCustomSource(cmbIwad, Util.GetIWadsDataSource(m_adapter), typeof(IIWadData), "FileName");

            if (gameFile != null)
            {
                Text = "Launch - " + (string.IsNullOrEmpty(gameFile.Title) ? gameFile.FileName : gameFile.Title);
                if (!string.IsNullOrEmpty(gameFile.Map))
                {
                    SetAutoCompleteCustomSource(cmbMap, MapSplit(gameFile), null, null);
                }
            }

            cmbSkill.DataSource   = Util.GetSkills();
            cmbSkill.SelectedItem = "3";

            LoadProfiles();
        }