Example #1
0
        private void newButton_Click(object sender, EventArgs e)
        {
            //Previous load file
            string removePrevious = $"..\\Games\\{gameToLoad}\\load";


            // Checks for previous data, then removes it
            if (Directory.Exists(removePrevious))
            {
                string[] files = Directory.GetFiles(removePrevious);
                foreach (string file in files)
                {
                    File.Delete(file);
                }
                Directory.Delete(removePrevious);
                newSave();
            }
            else
            {
                //Creates new save
                newSave();
            }

            GameSelectedForm GameSelected = new GameSelectedForm();

            GameSelected.title      = gameTitle;
            GameSelected.gameToLoad = gameToLoad;
            GameSelected.Show();
        }
Example #2
0
        private void loadButton_Click(object sender, EventArgs e)
        {
            GameSelectedForm GameSelected = new GameSelectedForm();

            GameSelected.title      = gameTitle;
            GameSelected.gameToLoad = gameToLoad;
            GameSelected.Show();
        }