private void buttonLaunchCharacterIS_Click(object sender, RoutedEventArgs e)
        {
            List <EVECharacter> launchCharacters = new List <EVECharacter>();

            foreach (EVECharacter a in listCharacters.SelectedItems)
            {
                launchCharacters.Add(a);
            }

            if (launchCharacters.Count == 0)
            {
                return;
            }

            InnerSpaceGameProfile gp;

            if (App.Settings.UseSingularity)
            {
                gp = App.Settings.SingularityGameProfile;
            }
            else
            {
                gp = App.Settings.TranquilityGameProfile;
            }

            if (gp == null || string.IsNullOrEmpty(gp.Game) || string.IsNullOrEmpty(gp.GameProfile))
            {
                MessageBox.Show("Please select a Game Profile first!");
                return;
            }

            Windows.LaunchProgressWindow lpw = new LaunchProgressWindow(launchCharacters, new Launchers.InnerSpace(gp, App.Settings.UseDirectXVersion, App.Settings.UseSingularity));
            lpw.ShowDialog();
        }
        private void buttonLaunchCharacterNonIS_Click(object sender, RoutedEventArgs e)
        {
            List <EVECharacter> launchCharacters = new List <EVECharacter>();

            foreach (EVECharacter a in listCharacters.SelectedItems)
            {
                launchCharacters.Add(a);
            }

            if (launchCharacters.Count == 0)
            {
                return;
            }

            InnerSpaceGameProfile gp;

            if (string.IsNullOrWhiteSpace(App.Settings.EVESharedCachePath))
            {
                MessageBox.Show("Please set the EVE SharedCache path first!");
                return;
            }

            Windows.LaunchProgressWindow lpw = new LaunchProgressWindow(launchCharacters, new Launchers.Direct(App.Settings.EVESharedCachePath, App.Settings.UseDirectXVersion, App.Settings.UseSingularity));
            lpw.ShowDialog();
        }
Beispiel #3
0
        public static void ProcessCommandLine(IEnumerable <string> Args)
        {
            if (Args == null || Args.Count() == 0)
            {
                return;
            }

            List <string> LaunchAccountNames = new List <string>();

            bool useInnerSpace = false;

            foreach (string s in Args)
            {
                switch (s.ToLowerInvariant())
                {
                case "-dx9":
                    Settings.UseDirectXVersion = DirectXVersion.dx9;
                    break;

                case "-dx11":
                    Settings.UseDirectXVersion = DirectXVersion.dx11;
                    break;

                case "-singularity":
                    Settings.UseSingularity = true;
                    break;

                case "-tranquility":
                    Settings.UseSingularity = false;
                    break;

                case "-innerspace":
                    useInnerSpace = true;
                    break;

                case "-eve":
                    useInnerSpace = false;
                    break;

                case "-multiinstance":
                    break;

                case "-exit":
                    ExitAfterLaunch = true;
                    break;

                case "null":
                    // ignore
                    break;

                default:
                    LaunchAccountNames.Add(s);
                    break;
                }
            }

            if (LaunchAccountNames.Count == 0)
            {
                return;
            }

            List <Launchers.ILaunchTarget> LaunchAccounts = new List <Launchers.ILaunchTarget>();

            foreach (string name in LaunchAccountNames)
            {
                EVEAccount acct = Settings.Accounts.FirstOrDefault(q => q.Username.Equals(name, StringComparison.InvariantCultureIgnoreCase));
                if (acct != null)
                {
                    LaunchAccounts.Add(acct);
                    continue;
                }

                EVECharacter ec = Settings.Characters.FirstOrDefault(q => q.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
                if (ec != null)
                {
                    LaunchAccounts.Add(ec);
                    continue;
                }

                MessageBox.Show("Unrecognized EVE Account or Character name '" + name + "' -- if this is correct, please use Add Account/Character to enable it before launching.");
                return;
            }

            Launchers.ILauncher launcher;
            if (useInnerSpace)
            {
                InnerSpaceGameProfile gp;
                if (Settings.UseSingularity)
                {
                    gp = Settings.SingularityGameProfile;
                }
                else
                {
                    gp = Settings.TranquilityGameProfile;
                }

                if (gp == null || string.IsNullOrEmpty(gp.Game) || string.IsNullOrEmpty(gp.GameProfile))
                {
                    MessageBox.Show("Please select a Game Profile first!");
                    return;
                }

                launcher = new Launchers.InnerSpaceLauncher(gp, Settings.UseDirectXVersion, Settings.UseSingularity);
            }
            else
            {
                launcher = new Launchers.DirectLauncher(Settings.EVESharedCachePath, Settings.UseDirectXVersion, Settings.UseSingularity);
            }
            Windows.LaunchProgressWindow lpw = new Windows.LaunchProgressWindow(LaunchAccounts, launcher);
            lpw.ShowDialog();

            if (ExitAfterLaunch)
            {
                App.Current.Shutdown();
            }
        }