Exemple #1
0
        public Form1()
        {
            InitializeComponent();

            // Initialize Map Package Manager
            mpm = new MapPackageManager(this);

            // Manage Backup
            if (!MapTransactions.BackupExists())
                MapTransactions.BackupDefaultMap();

            // Load Settings
            if (Properties.Settings.Default.RLFolder != "")
                rlDirTextBox.Text = Properties.Settings.Default.RLFolder;

            if (Properties.Settings.Default.ModFolder != "")
                modsDirTextBox.Text = Properties.Settings.Default.ModFolder;

            restoreDefaultMapCheckBox.Checked = Properties.Settings.Default.restoreDefaultMapOnClose;

            // Fill the drop down map selection with official maps by default
            FillInOfficialMaps();

            // Updated currently loaded map label
            currentMapLabel.Text = MapTransactions.LoadedMap();

            // Default combo boxes
            mapTypeComboBox.SelectedIndex = (int)MapType.Official;
            mapSelectComboBox.SelectedItem = RLData.defaultTrainingMapName;
        }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();

            // Initialize Map Package Manager
            mpm = new MapPackageManager(this);

            // Load Settings
            if (Properties.Settings.Default.RLFolder != "")
            {
                rlDirTextBox.Text = Properties.Settings.Default.RLFolder;
            }
            if (Properties.Settings.Default.ModFolder != "")
            {
                modsDirTextBox.Text = Properties.Settings.Default.ModFolder;
            }
            loadOnStartCheckBox.Checked       = Properties.Settings.Default.loadMapOnStart;
            restoreDefaultMapCheckBox.Checked = Properties.Settings.Default.restoreDefaultMapOnClose;

            //InitializeMemoryAddresses();
            InitializeCustomMapList();

            // Add default maps to selection
            mapSelectComboBox.Items.Add("[Default] EuroStadium_P.upk");
            mapSelectComboBox.Items.Add("[Default] EuroStadium_Rainy_P.upk");

            mapSelectComboBox.Items.Add("[Default] HoopsStadium_P.upk");

            mapSelectComboBox.Items.Add("[Default] Labs_CirclePillars_P.upk");
            mapSelectComboBox.Items.Add("[Default] Labs_Cosmic_P.upk");
            mapSelectComboBox.Items.Add("[Default] Labs_DoubleGoal_P.upk");
            mapSelectComboBox.Items.Add("[Default] Labs_Underpass_P.upk");
            mapSelectComboBox.Items.Add("[Default] Labs_Underpass_v0_p.upk");
            mapSelectComboBox.Items.Add("[Default] Labs_Utopia_P.upk");

            mapSelectComboBox.Items.Add("[Default] NeoTokyo_P.upk");

            mapSelectComboBox.Items.Add("[Default] Park_P.upk");
            mapSelectComboBox.Items.Add("[Default] Park_Night_P.upk");
            mapSelectComboBox.Items.Add("[Default] Park_Rainy_P.upk");

            mapSelectComboBox.Items.Add("[Default] Stadium_P.upk");
            mapSelectComboBox.Items.Add("[Default] Stadium_Winter_P.upk");

            mapSelectComboBox.Items.Add("[Default] test_Volleyball.upk");

            mapSelectComboBox.Items.Add("[Default] TrainStation_P.upk");
            mapSelectComboBox.Items.Add("[Default] TrainStation_Night_P.upk");

            mapSelectComboBox.Items.Add("[Default] TutorialAdvanced.upk");
            mapSelectComboBox.Items.Add("[Default] TutorialTest.upk");

            mapSelectComboBox.Items.Add("[Default] UtopiaStadium_P.upk");
            mapSelectComboBox.Items.Add("[Default] UtopiaStadium_Dusk_P.upk");

            mapSelectComboBox.Items.Add("[Default] Wasteland_P.upk");

            if (Properties.Settings.Default.lastMap != "")
            {
                mapSelectComboBox.SelectedItem = Properties.Settings.Default.lastMap;
            }
            else
            {
                // TO DO: replace this with hash detection to determine actual map, not just default to Park_P when unknown
                mapSelectComboBox.SelectedIndex = mapSelectComboBox.Items.Count - 13;
            }

            if (loadOnStartCheckBox.Checked)
            {
                // Load map, if we had disabled restoring default park_p on last close, don't backup.
                LoadCustomMap(Properties.Settings.Default.restoreDefaultMapOnClose);
            }
        }