Beispiel #1
0
        private void GMRSettings()
        {
            m_SettingsForm.SavedFilesComboBox.DataSource    = MoveFilesToGameFolderItems.DataSourceItems(MoveFilesToGameFolderItems.Create(this.m_Config.keepFilesInArchiveFolder));
            m_SettingsForm.SavedFilesComboBox.DisplayMember = "Displayed";
            m_SettingsForm.SavedFilesComboBox.ValueMember   = "Item";
            m_SettingsForm.SavedFilesComboBox.SelectedIndex = m_SettingsForm.SavedFilesComboBox.FindStringExact(MoveFilesToGameFolderItems.Create(this.m_Config.keepFilesInArchiveFolder).Displayed);

            m_SettingsForm.ShowDialog();


            this.m_Config.keepFilesInArchiveFolder = (m_SettingsForm.SavedFilesComboBox.SelectedValue as MoveFilesToGameFolderItems).Quantity;
            this.m_Config.AuthKey = m_SettingsForm.AuthKeyTextBox.Text;
        }
Beispiel #2
0
        public static List <MoveFilesToGameFolderItems> DataSourceItems(MoveFilesToGameFolderItems existing)
        {
            List <int> createList = new List <int>()
            {
                Zero, One, All
            };

            if (!createList.Contains(existing.Quantity))
            {
                createList.Add(existing.Quantity);
            }

            var resultList = new List <MoveFilesToGameFolderItems>();

            foreach (var quantityToCreate in createList)
            {
                resultList.Add(Create(quantityToCreate));
            }

            return(resultList);
        }