Ejemplo n.º 1
0
        public void Login()
        {
            MessengerClient messengerClient = new MessengerClient();
            string          login = "", password = "", email = " ", name = "";

            byte[] img         = null;
            Dispatcher.Invoke(() =>
            {
                password = Account.Password;
                login    = Account.Login;
                email    = Account.Email;
                name     = Account.Name;
                img      = Account.Image;
            });
            messengerClient.Registrate(email, login, password, name, img);

            AccountDTO account = messengerClient.Login(login, password);
            MainWindow mainWindow = null;

            Dispatcher.Invoke(() => mainWindow = new MainWindow(account));
            Dispatcher.Invoke(() => mainWindow.Show());
            this.Hide();
        }