Пример #1
0
        private void buttonWriteSave_Click(object sender, EventArgs e)
        {
            if (extraDrivers.Count() > 0 || extraVehicles.Count() > 0)
            {
                DialogResult res = MessageBox.Show("Do you want to save Drivers and Trucks from sold garages?", "Attention! Loosing content", MessageBoxButtons.YesNo);
                if (res == DialogResult.Yes)
                {
                    FormGaragesSoldContent testDialog = new FormGaragesSoldContent();
                    testDialog.ShowDialog(this);
                }
            }

            ToggleControlsAccess(false);

            string SiiSavePath = SavefilePath + @"\game.sii";

            LogWriter("Backing up file to: " + SavefilePath + @"\game_backup.sii");
            //File.Copy(SiiSavePath, SiiSavePath + "_backup", true);
            File.Copy(SiiSavePath, SavefilePath + @"\game_backup.sii", true);

            WriteSaveFile(); //Save save file with or without changes

            buttonMainDecryptSave.Enabled = true;
            MessageBox.Show("File saved", "Saving", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        //Buttons
        private void buttonUserCompanyGaragesManage_Click(object sender, EventArgs e)
        {
            PrepareGarages();

            FormGaragesSoldContent testDialog = new FormGaragesSoldContent();

            testDialog.ShowDialog(this);
        }