Example #1
0
        private async void Connection()
        {
            if (PS3.ConnectTarget())
            {
                if (PS3.AttachProcess())
                {
                    if (PS3.GetCurrentGame() == "Modern Warfare® 3")
                    {
                        await Dialog.ShowMessageAsync(this, Resources["success"].ToString(), $"{Resources["successAttached"]} \"{PS3.CurrentGame}\".");

                        IsAttached = true;
                        return;
                    }
                    else
                    {
                        await Dialog.ShowMessageAsync(this, Resources["wrongProcess"].ToString(), $"{Resources["currentProcess"]} \"{PS3.CurrentGame}\".");
                    }
                }
                else
                {
                    await Dialog.ShowMessageAsync(this, Resources["attachFailed"].ToString(), Resources["unableAttach"].ToString());
                }
            }
            else
            {
                await Dialog.ShowMessageAsync(this, Resources["connectFailed"].ToString(), Resources["unableConnect"].ToString());
            }
            IsAttached = false;
        }
Example #2
0
        private async void Connect()
        {
            if (PS3.ConnectTarget())
            {
                if (PS3.AttachProcess())
                {
                    if (PS3.GetCurrentGame() == "Modern Warfare® 3")
                    {
                        await Dialog.ShowMessageAsync(this, "Success..", $"Succesfully attached to \"{PS3.CurrentGame}\".", MessageDialogStyle.Affirmative);

                        //IgrisMessageBox.Show($"Succesfully attached to \"{PS3.CurrentGame}\".", "Success..", MessageBoxButton.OK, MessageBoxImage.Information);
                        Status           = $"Attached to {PS3.CurrentGame}!";
                        IsAttached       = true;
                        StatsTypeEnabled = true;
                        return;
                    }
                    else
                    {
                        await Dialog.ShowMessageAsync(this, "Wrong process...", $"The process is \"{PS3.CurrentGame}\".", MessageDialogStyle.Affirmative);

                        Status = $"{PS3.CurrentGame} is a wrong process, immediate detachment!";
                        PS3.DetachProcess();
                    }
                }
                else
                {
                    await Dialog.ShowMessageAsync(this, "Attach failed..", "Unable to attach process.", MessageDialogStyle.Affirmative);

                    Status = "Attached to any process!";
                }
            }
            else
            {
                await Dialog.ShowMessageAsync(this, "Connect failed..", "Unable to connect to PS3.", MessageDialogStyle.Affirmative);

                Status = "Connected to any ps3!";
            }
            IsAttached = false;
        }