Ejemplo n.º 1
0
        public void ChangePaths()
        {
            string[] biogames = new string[3];
            biogames[0] = ME1Directory.GamePath();
            biogames[1] = ME2Directory.GamePath();
            biogames[2] = ME3Directory.GamePath();


            // KFreon: Display PathChanger
            using (KFreonLib.Helpers.PathChanger changer = new KFreonLib.Helpers.PathChanger(biogames[0], biogames[1], biogames[2]))
            {
                if (changer.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    // KFreon: Change paths
                    Properties.Settings.Default.ME1InstallDir = changer.PathME1;
                    Properties.Settings.Default.ME2InstallDir = changer.PathME2;
                    Properties.Settings.Default.ME3InstallDir = changer.PathME3;

                    KFreonLib.MEDirectories.MEDirectories.SaveSettings(new List <string>()
                    {
                        changer.PathME1, changer.PathME2, changer.PathME2
                    });
                    ME1Directory.GamePath(changer.PathME1);
                    ME2Directory.GamePath(changer.PathME2);
                    ME3Directory.GamePath(changer.PathME3);

                    OnPropertyChanged(nameof(ME1Path));
                    OnPropertyChanged(nameof(ME2Path));
                    OnPropertyChanged(nameof(ME3Path));
                }
            }
        }
Ejemplo n.º 2
0
        private void allPathsAtOnceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string[] biogames = new string[3];
            biogames[0] = ME1Directory.GamePath();
            biogames[1] = ME2Directory.GamePath();
            biogames[2] = ME3Directory.GamePath();


            // KFreon: Display PathChanger
            using (KFreonLib.Helpers.PathChanger changer = new KFreonLib.Helpers.PathChanger(biogames[0], biogames[1], biogames[2]))
            {
                if (changer.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    // KFreon: Change paths
                    Properties.Settings.Default.ME1InstallDir = changer.PathME1;
                    Properties.Settings.Default.ME2InstallDir = changer.PathME2;
                    Properties.Settings.Default.ME3InstallDir = changer.PathME3;

                    KFreonLib.MEDirectories.MEDirectories.SaveSettings(new List <string>()
                    {
                        changer.PathME1, changer.PathME2, changer.PathME2
                    });
                    ME1Directory.GamePath(changer.PathME1);
                    ME2Directory.GamePath(changer.PathME2);
                    ME3Directory.GamePath(changer.PathME3);
                }
            }
        }
        private void ChangePathsButton_Click(object sender, EventArgs e)
        {
            using (KFreonLib.Helpers.PathChanger changer = new KFreonLib.Helpers.PathChanger(MEExDirecs.GetDifferentPathBIOGame(1), MEExDirecs.GetDifferentPathBIOGame(2), MEExDirecs.GetDifferentPathBIOGame(3)))
            {
                if (changer.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
                    return;

                // KFreon: Set and save settings
                MEExDirecs.SetPaths(changer.PathME1, changer.PathME2, changer.PathME3);

                // KFreon: Check game paths again for indicators
                DoGameIndicatorChecks();
            }
        }