Thanks to [B]JimmyTM[/B] for verifying the [B]WORKING on WINDOWS 8.1[/B].
Thanks to [B]Absolute Zero[/B] for verifiying it [B]NOT WORKING[/B] on Windows [B]8[/B], and for support.
Thanks to [B]Eddie Mac[/B] for support.
Thanks to [B]FarsideX[/B] for support + trying to help.
using System;
using System.Text;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI.Popups;
using System.Runtime.InteropServices;
using Windows.System;
try
{
var dialog1 = new MessageDialog("Connect IP: " + ipaddresstextbox.Text + "?" + Environment.NewLine + "CEX ONLY!", "Connect to PS3");
dialog1.Commands.Add(new UICommand("CEX", new UICommandInvokedHandler(CommandHandler)));
dialog1.Commands.Add(new UICommand("DEX", new UICommandInvokedHandler(CommandHandler)));
dialog1.Commands.Add(new UICommand("Cancel", new UICommandInvokedHandler(CommandHandler)));
dialog1.DefaultCommandIndex = 3;
dialog1.CancelCommandIndex = 1;
attachbutton.IsEnabled = true;
await dialog1.ShowAsync();
}
catch
{
var Mesg = new MessageDialog("Failure Connecting!", "Error!");
await Mesg.ShowAsync();
}
private async void Button_Click(object sender, RoutedEventArgs e)//...ETC
//(Inbetween 'private' & 'void' of your button, put "async").
public PS3Lib.CCAPI CEX = new PS3Lib.CCAPI();
public PS3Lib.Extension EXT = new PS3Lib.Extension();
public PS3Lib.PS3API ps3api = new PS3Lib.PS3API(PS3Lib.SelectAPI.ControlConsole);
private void CommandHandler(IUICommand command)//added async
{
var commandLabel = command.Label;
switch (commandLabel)
{
case "CEX":
if (Convert.ToBoolean(CEX.ConnectTarget(ipaddresstext box.Text)))
{
CEX.RingBuzzer(PS3Lib.CCAPI.BuzzerMode.Single);
CEX.Notify(PS3Lib.CCAPI.NotifyIcon.FRIEND, "Connected!");
MessageDialog CEXConnect = new MessageDialog("SUCCESS!", "Connected to CEX!");
// await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this.
}
else
{
MessageDialog CEXConnect = new MessageDialog("Error!", "Failure Connecting to CEX!");
// await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this.
}
break;
case "DEX":
//Nothing
break;
case "Cancel":
//Nothing
break;
}
}
private async void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
ToggleSwitch toggleswitch = sender as ToggleSwitch;
if (toggleswitch.IsOn == true)
{
MessageDialog MyMessage = new MessageDialog("Activated", "VSAT");
//MessageDialog MyMessage = new MessageDialog(Description text, TITLE TEXT);
byte[] buffer = new byte[4];
buffer[0] = 0x60;
xmain.CEX.SetMemory(0x33c60, buffer);
await MyMessage.ShowAsync();
}
else
{
MessageDialog MyMessage = new MessageDialog("Deactivated", "VSAT");
xmain.CEX.SetMemory(0x33c60, new byte[] { 0x40, 0x81, 0, 0x44 });
await MyMessage.ShowAsync();
}
using System;
using System.Text;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI.Popups;
using System.Runtime.InteropServices;
using Windows.System;
try
{
var dialog1 = new MessageDialog("Connect IP: " + ipaddresstextbox.Text + "?" + Environment.NewLine + "CEX ONLY!", "Connect to PS3");
dialog1.Commands.Add(new UICommand("CEX", new UICommandInvokedHandler(CommandHandler)));
dialog1.Commands.Add(new UICommand("DEX", new UICommandInvokedHandler(CommandHandler)));
dialog1.Commands.Add(new UICommand("Cancel", new UICommandInvokedHandler(CommandHandler)));
dialog1.DefaultCommandIndex = 3;
dialog1.CancelCommandIndex = 1;
attachbutton.IsEnabled = true;
await dialog1.ShowAsync();
}
catch
{
var Mesg = new MessageDialog("Failure Connecting!", "Error!");
await Mesg.ShowAsync();
}
private async void Button_Click(object sender, RoutedEventArgs e)//...ETC
//(Inbetween 'private' & 'void' of your button, put "async").
public PS3Lib.CCAPI CEX = new PS3Lib.CCAPI();
public PS3Lib.Extension EXT = new PS3Lib.Extension();
public PS3Lib.PS3API ps3api = new PS3Lib.PS3API(PS3Lib.SelectAPI.ControlConsole);
private void CommandHandler(IUICommand command)//added async
{
var commandLabel = command.Label;
switch (commandLabel)
{
case "CEX":
if (Convert.ToBoolean(CEX.ConnectTarget(ipaddresstext box.Text)))
{
CEX.RingBuzzer(PS3Lib.CCAPI.BuzzerMode.Single);
CEX.Notify(PS3Lib.CCAPI.NotifyIcon.FRIEND, "Connected!");
MessageDialog CEXConnect = new MessageDialog("SUCCESS!", "Connected to CEX!");
// await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this.
}
else
{
MessageDialog CEXConnect = new MessageDialog("Error!", "Failure Connecting to CEX!");
// await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this.
}
break;
case "DEX":
//Nothing
break;
case "Cancel":
//Nothing
break;
}
}
private async void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
ToggleSwitch toggleswitch = sender as ToggleSwitch;
if (toggleswitch.IsOn == true)
{
MessageDialog MyMessage = new MessageDialog("Activated", "VSAT");
//MessageDialog MyMessage = new MessageDialog(Description text, TITLE TEXT);
byte[] buffer = new byte[4];
buffer[0] = 0x60;
xmain.CEX.SetMemory(0x33c60, buffer);
await MyMessage.ShowAsync();
}
else
{
MessageDialog MyMessage = new MessageDialog("Deactivated", "VSAT");
xmain.CEX.SetMemory(0x33c60, new byte[] { 0x40, 0x81, 0, 0x44 });
await MyMessage.ShowAsync();
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.