static void Main(string[] arguments) { if (arguments.Length != 3) throw new Exception(string.Format("Invalid argument count: {0}", arguments.Length)); PVPNetConnection connection = new PVPNetConnection(); connection.OnConnect += OnConnect; connection.OnLogin += OnLogin; connection.OnDisconnect += OnDisconnect; connection.Connect(arguments[0], arguments[1], Region.NA, arguments[2]); ManualResetEvent terminationEvent = new ManualResetEvent(false); terminationEvent.WaitOne(); }
static void Main(string[] arguments) { if (arguments.Length != 3) { throw new Exception(string.Format("Invalid argument count: {0}", arguments.Length)); } PVPNetConnection connection = new PVPNetConnection(); connection.OnConnect += OnConnect; connection.OnLogin += OnLogin; connection.OnDisconnect += OnDisconnect; connection.Connect(arguments[0], arguments[1], Region.NA, arguments[2]); ManualResetEvent terminationEvent = new ManualResetEvent(false); terminationEvent.WaitOne(); }
public Client(Region region, string username, string password) { Data = new Account { Username = username, Password = password, Region = region, Refunds = 0 }; IsCompleted = new TaskCompletionSource<bool>(); Connection = new PVPNetConnection(); Connection.OnLogin += OnLogin; Connection.OnError += OnError; Connection.Connect(username, password, region, Settings.Config.ClientVersion); }
private static void Main(string[] arguments) { PVPNetConnection connection = new PVPNetConnection(); connection.OnLogin += delegate(object sender, string username, string address) { PVPNetConnection conn = (PVPNetConnection)sender; IterateDatabase(conn); }; connection.Connect("USERNAME", "PASSWORD", Region.LA1, GameVersion); ManualResetEvent terminationEvent = new ManualResetEvent(false); terminationEvent.WaitOne(); }
private static void Main(string[] arguments) { PVPNetConnection connection = new PVPNetConnection(); connection.OnLogin += OnLogin; connection.Connect("USERNAME", "PASSWORD", Region.LA1, GameVersion); ManualResetEvent terminationEvent = new ManualResetEvent(false); terminationEvent.WaitOne(); }