private async Task HandleStartup()
        {
            if (!Directory.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Aurora")))
            {
                Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Aurora"));
            }
            if (!File.Exists(this._nativePath))
            {
                ContentDialog contentDialog = new ContentDialog();
                contentDialog.set_Title((object)Resources.ExceptionOccurredText);
                ((ContentControl)contentDialog).Content = (object)("\"Aurora.Runtime.dll\"  " + Resources.FileMissingErrorText);
                contentDialog.set_CloseButtonText(Resources.ExitButtonText);
                ContentDialogResult contentDialogResult = await contentDialog.ShowAsync();

                Application.Current.Shutdown();
            }
            else
            {
                Config config = AuroraConfig.Get();
                if (config.DeviceAuth == null)
                {
                    this.SetLoggingIn();
                }
                else
                {
                    await this.LoginWithDeviceAuth(config.DeviceAuth);
                }
            }
        }
Exemple #2
0
        private async void SignOutLabel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Aurora.Launcher.Windows.Launcher launcher = this;
            ContentDialog contentDialog = new ContentDialog();

            contentDialog.set_Title((object)Resources.SignOutConfirmationDialogTitle);
            ((ContentControl)contentDialog).Content = (object)Resources.SignOutConfirmationDialogContent;
            contentDialog.set_PrimaryButtonText(Resources.Yes);
            contentDialog.set_CloseButtonText(Resources.No);
            if (await contentDialog.ShowAsync() != 1)
            {
                return;
            }
            AuroraConfig.SaveDeviceAuth((DeviceAuth)null);
            Globals.AuthData = (OAuthToken)null;
            new Login().Show();
            launcher.Close();
        }
        private async void PrimaryButton_Click(
            ContentDialog sender,
            ContentDialogButtonClickEventArgs args)
        {
            Settings settings = this;

            if (Directory.Exists(settings.PathField.Text))
            {
                AuroraConfig.SavePath(settings.PathField.Text);
            }
            else
            {
                settings.Hide();
                ContentDialog contentDialog = new ContentDialog();
                contentDialog.set_Title((object)Resources.ExceptionOccurredText);
                ((ContentControl)contentDialog).Content = (object)Resources.PathDoesntExistDialogContent;
                contentDialog.set_CloseButtonText(Resources.ExitButtonText);
                ContentDialogResult contentDialogResult = await contentDialog.ShowAsync();
            }
        }
Exemple #4
0
        private async void LaunchButton_Click(object sender, RoutedEventArgs e)
        {
            Aurora.Launcher.Windows.Launcher launcher = this;
            string arguments = "-epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -skippatchcheck -AUTH_TYPE=exchangecode -AUTH_LOGIN=unused ";
            int    num       = 0;
            object obj;

            try
            {
                arguments = arguments + "-AUTH_PASSWORD="******" ";
            }
            catch (Exception ex)
            {
                obj = (object)ex;
                num = 1;
            }
            if (num == 1)
            {
                Exception     exception     = (Exception)obj;
                ContentDialog contentDialog = new ContentDialog();
                contentDialog.set_Title((object)Resources.ExceptionOccurredText);
                ((ContentControl)contentDialog).Content = exception.Message == "Invalid credentials!" ? (object)Resources.InvalidCredentialsText : (exception.Message == "Unknown exception occurred!" ? (object)Resources.UnknownExceptionText : (object)Resources.FailedToConnectText);
                contentDialog.set_CloseButtonText(Resources.ExitButtonText);
                ContentDialogResult contentDialogResult = await contentDialog.ShowAsync();

                new Login().Show();
                launcher.Close();
                arguments = (string)null;
            }
            else
            {
                obj        = (object)null;
                arguments += "-noeac -fromfl=be -fltoken=f7b9gah4h5380d10f721dd6a";
                if (!File.Exists(Path.Combine(AuroraConfig.Get()?.Path ?? "", "FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe")))
                {
                    ContentDialog contentDialog = new ContentDialog();
                    contentDialog.set_Title((object)Resources.ExceptionOccurredText);
                    ((ContentControl)contentDialog).Content = (object)("\"FortniteClient-Win64-Shipping.exe\" " + Resources.InvalidPathErrorText);
                    contentDialog.set_CloseButtonText(Resources.ExitButtonText);
                    ContentDialogResult contentDialogResult = await contentDialog.ShowAsync();

                    arguments = (string)null;
                }
                else
                {
                    launcher.SetHide();
                    await launcher._launcher.StartGame(arguments);

                    try
                    {
                        await AuroraAuth.RefreshToken();
                    }
                    catch
                    {
                        AuroraConfig.SaveDeviceAuth((DeviceAuth)null);
                        Globals.AuthData = (OAuthToken)null;
                        new Login().Show();
                        launcher.Close();
                    }
                    launcher.SetShow();
                    arguments = (string)null;
                }
            }
        }