Exemplo n.º 1
0
        private void deleteAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            disconnectToolStripMenuItem_Click(sender, e);
            // Remove user from file
            Authentification auth = new Authentification();

            auth.removeUser(pseudo);
        }
Exemplo n.º 2
0
        private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            leaveTopic_Click(sender, e); // Check if he is in a chatroom
            Authentification auth = new Authentification();

            auth.updateUser(pseudo, false); // Put user connected state at false and save in file
            client.disconnect();
            this.Hide();                    // Close = bug
            Form1 log = new Form1();

            log.Show();
        }
Exemplo n.º 3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Authentification auth = new Authentification(this);

            auth.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            auth.ShowDialog();
            if (auth.DialogResult == false)
            {
                this.Close();
            }
            else
            {
                Task.Factory.StartNew(ListenToServer, tcpClient);
            }
        }
Exemplo n.º 4
0
 public IEnumerable <Tuple <int, AnimeComment> > ReadComments()
 {
     return(Authentification.readAllComments());
 }
Exemplo n.º 5
0
 public bool WriteComments(IEnumerable <AnimeComment> comments)
 {
     return(Authentification.writeComments(comments));
 }
Exemplo n.º 6
0
 public IEnumerable <AnimeInfo> QueryYearAndSeason(AuthInfo token, int year, SeasonsEnum season)
 {
     return(Authentification.browseYearAndSeason(token, year.ToString(), Helpers.StringifySeasonEnum(season)));
 }
Exemplo n.º 7
0
 public Task <AuthInfo> AskToken()
 {
     return(Authentification.requestAccessToken());
 }