Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #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);
            }
        }
Beispiel #4
0
 public IEnumerable <Tuple <int, AnimeComment> > ReadComments()
 {
     return(Authentification.readAllComments());
 }
Beispiel #5
0
 public bool WriteComments(IEnumerable <AnimeComment> comments)
 {
     return(Authentification.writeComments(comments));
 }
Beispiel #6
0
 public IEnumerable <AnimeInfo> QueryYearAndSeason(AuthInfo token, int year, SeasonsEnum season)
 {
     return(Authentification.browseYearAndSeason(token, year.ToString(), Helpers.StringifySeasonEnum(season)));
 }
Beispiel #7
0
 public Task <AuthInfo> AskToken()
 {
     return(Authentification.requestAccessToken());
 }