예제 #1
0
        public static void Main(string[] args)
        {
            GaduHttp gaduHttp = new GaduHttp();
            String   tokenid;
            Image    token;

            gaduHttp.getToken(out tokenid, out token);
            token.Save("token.gif");

            try
            {
                String tokenval;
                int    uin;
                String passwd;
                Console.WriteLine("Odczytana wartosc z tokenu:");
                tokenval = Console.ReadLine();
                Console.WriteLine("Numer gg do usuniecia:");
                uin = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("Haslo:");
                passwd = Console.ReadLine();
                gaduHttp.deleteAccount(uin, passwd, tokenid, tokenval);
                Console.WriteLine("Konto usuniete poprawnie");
            }
            catch (GaduDeleteException e)
            {
                Console.WriteLine("Blad usuwania konta: " + e.Message);
            }
        }
예제 #2
0
        public static void Main(string[] args)
        {
            GaduHttp gaduHttp = new GaduHttp();
            String   tokenid;
            Image    token;

            gaduHttp.getToken(out tokenid, out token);
            token.Save("token.gif");

            try
            {
                String tokenval;
                int    uin;

                Console.WriteLine("Odczytana wartosc z tokenu:");
                tokenval = Console.ReadLine();

                Console.WriteLine("Numer gg:");
                uin = Convert.ToInt32(Console.ReadLine());

                gaduHttp.remindPassword(uin, tokenid, tokenval);
                Console.WriteLine("Haslo wyslane poprawnie");
            }
            catch (GaduRemindException e)
            {
                Console.WriteLine("Blad wysylania hasla " + e.Message);
            }
        }
예제 #3
0
        public static void Main(string[] args)
        {
            GaduHttp gaduHttp = new GaduHttp();
            String   tokenid;
            Image    token;

            gaduHttp.getToken(out tokenid, out token);
            token.Save("token.gif");

            try
            {
                String tokenval;
                int    uin;
                String email, OldPass, NewPass;

                Console.WriteLine("Odczytana wartosc z tokenu:");
                tokenval = Console.ReadLine();

                Console.WriteLine("Numer gg:");
                uin = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("E-Mail:");
                email = Console.ReadLine();
                Console.WriteLine("Stare haslo:");
                OldPass = Console.ReadLine();
                Console.WriteLine("Nowe haslo:");
                NewPass = Console.ReadLine();

                gaduHttp.changePassword(uin, email, OldPass, NewPass, tokenid, tokenval);
                Console.WriteLine("Haslo zmienione poprawnie");
            }
            catch (GaduChangePasswordException e)
            {
                Console.WriteLine("Blad zmiany hasla " + e.Message);
            }
        }
예제 #4
0
        public static void Main(string[] args)
        {
            GaduHttp gaduHttp = new GaduHttp();
            String   tokenid;
            Image    token;

            gaduHttp.getToken(out tokenid, out token);
            Console.WriteLine("Tokenid: " + tokenid);
            token.Save("token.gif");
        }
예제 #5
0
        public static void Main(string[] args)
        {
            GaduHttp gaduHttp = new GaduHttp();
            String   tokenid;
            Image    token;

            gaduHttp.getToken(out tokenid, out token);
            token.Save("token.gif");

            try
            {
                String tokenval;
                int    uin;
                Console.WriteLine("Odczytana wartosc z tokenu:");
                tokenval = Console.ReadLine();
                uin      = gaduHttp.registerAccount("passwd", "*****@*****.**", tokenid, tokenval);
                Console.WriteLine("Konto zarejestrowane poprawnie, twoj numer to: " + uin);
            }
            catch (GaduRegisterException e)
            {
                Console.WriteLine("Blad rejestorwania konta: " + e.Message);
            }
        }