Example #1
0
 // Constructeur internal car c'est la classe MonitorViewModel qui construit les User
 internal UserViewModel(string pseudoDownload, RdmDalWSR rdmDAL)
 {
     _pseudoDownload = pseudoDownload;
     _rdmDAL         = rdmDAL;
     _timer          = new DispatcherTimer()
     {
         Interval = new TimeSpan(0, 0, INTERVAL_DOWNLOADIMAGE)
     };
     _timer.Tick += dispatcherTimer_Tick;
 }
 public MonitorViewModel()
 {
     _rdmDAL            = new RdmDalWSR();
     _colUsersViewModel = new ObservableCollection <UserViewModel>();
     _timer             = new DispatcherTimer()
     {
         Interval = new TimeSpan(0, 0, INTERVAL_GETUSERS)
     };
     _timer.Tick += dispatcherTimer_Tick;
 }
Example #3
0
        private async void btnLoginAsync_Click(object sender, EventArgs e)
        {
            btnLoginAsync.Enabled = false;
            dal = new RdmDalWSR("http://user09.2isa.org/", txtBoxPseudo.Text);
            RdmDalWSRResult ret = await dal.LoginAsync(CancellationToken.None);

            if (ret.ErrorCode == 0)
            {
                txtBoxMdp.Text = dal.Password;
                Grisage();
                GetListUsers();
            }
            else
            {
                MessageBox.Show(ret.ErrorMessage);
            }
        }