Example #1
0
        private void AddGameToList()
        {
            string     GameName = "";
            FormRename NewGame  = new FormRename();

            NewGame.ShowDialog();

            if (NewGame.DialogResult == DialogResult.OK)
            {
                if (NewGame.NewName != "")
                {
                    GameName = NewGame.NewName;
                    CurrentConfig.Games.Add(new Game(GameName, ""));
                }

                Directory.CreateDirectory(Configuration.AppDataRoamingPath + "//" + GameName + "//" + "Default");

                LoadGameList();
                ComboBoxSelectGame.Text = GameName;
            }
        }
Example #2
0
        private void AddNewProfile()
        {
            FormRename NewProfileName = new FormRename();

            NewProfileName.StartPosition = FormStartPosition.CenterParent;
            DialogResult DR = NewProfileName.ShowDialog();

            if (DR == DialogResult.OK)
            {
                string DirectoryPath = CurrentDirectory() + "\\" + NewProfileName.NewName;
                if (VerifyValidity(DirectoryPath, NewProfileName.NewName))
                {
                    Directory.CreateDirectory(CurrentDirectory() + "\\" + NewProfileName.NewName);
                    GetSubDirectories();
                    ComboBoxSelectSubDirectory.SelectedIndex = ComboBoxSelectSubDirectory.Items.IndexOf(NewProfileName.NewName);
                }
            }
            if (DR == DialogResult.Cancel)
            {
                ComboBoxSelectSubDirectory.SelectedIndex = ComboBoxSelectSubDirectory.Items.IndexOf("Default");
            }
        }
Example #3
0
 private void RenameProfile()
 {
     if (ComboBoxSelectSubDirectory.Text == "Default")
     {
         ActionCenter.Toast("You cannot rename the default profile.", StartPoint());
     }
     else
     {
         FormRename NewProfileName = new FormRename();
         NewProfileName.StartPosition = FormStartPosition.CenterParent;
         DialogResult DR = NewProfileName.ShowDialog();
         if (DR == DialogResult.OK)
         {
             string NewPath = CurrentDirectory() + "\\" + NewProfileName.NewName;
             if (VerifyValidity(NewPath, NewProfileName.NewName))
             {
                 Directory.Move(CurrentSubDirectory(), NewPath);
                 GetSubDirectories();
                 ComboBoxSelectSubDirectory.SelectedIndex = ComboBoxSelectSubDirectory.Items.IndexOf(NewProfileName.NewName);
             }
         }
     }
 }