Ejemplo n.º 1
0
        private void Connect(string userName, string userPassword)
        {
            if (NetworkInterface.GetIsNetworkAvailable() == false)
            {
                MessageBox.Show("Offline mode");
                return;
            }

            #region Login Data
            //mc = new MessengerClient("*****@*****.**", "ohudhqar");
            mc = new MessengerClient(userName, userPassword);
            #endregion

            // Blocking!
            mc.Authenticate();

            if (mc.Authenticated == false)
            {
                MessageBox.Show("Authenticated Failed");
                return;
            }

            mc.SyncronizeContacts();
            mc.ChangeStatus(ClientStatus.Online);
            mc.ChangePersonalMessage("ÀÁàáÈÉèéÌÍìíÒÓòóÙÚùúÂâÃãÊêÎîÔôÕõÛûÄäËëÏïÖöÜüÇçÑñ");

            //const string user = "******";
            //for (int i = 5; i >= 0; --i)
            //{
            //    Console.WriteLine("waiting to cal user: {0} in {1}", user, i*1000);
            //    Thread.Sleep(1000);
            //}

            //mc.InviteUserToChatSession(user);
        }
Ejemplo n.º 2
0
        public static void Main(string[] arguments)
        {
            if (NetworkInterface.GetIsNetworkAvailable() == false)
            {
                Console.WriteLine("Offline mode");
                Console.ReadLine();
                return;
            }

            if (Debugger.IsAttached)
            {
                ConfigureConsole();
            }

            #region Login Data
            //MessengerClient mc = new MessengerClient("*****@*****.**", "ohudhqar");
            MessengerClient mc = new MessengerClient("*****@*****.**", "ohudhqar");
            #endregion

            // Blocking!
            mc.Authenticate();

            if (mc.Authenticated == false)
            {
                Console.WriteLine("Authenticated Failed");
                Console.ReadLine();
                return;
            }

            mc.SyncronizeContacts();
            mc.ChangeStatus(ClientStatus.Online);
            mc.ChangePersonalMessage("ÀÁàáÈÉèéÌÍìíÒÓòóÙÚùúÂâÃãÊêÎîÔôÕõÛûÄäËëÏïÖöÜüÇçÑñ");

            Console.WriteLine("Hello");

            //const string user = "******";
            //for (int i = 5; i >= 0; --i)
            //{
            //    Console.WriteLine("waiting to cal user: {0} in {1}", user, i*1000);
            //    Thread.Sleep(1000);
            //}

            //mc.InviteUserToChatSession(user);

            Console.ReadLine();
        }