示例#1
0
 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();
 }
示例#2
0
        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();
        }
示例#3
0
        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);
        }
示例#4
0
 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();
 }
示例#5
0
 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();
 }