Exemplo n.º 1
0
 private void updateProgress(double received)
 {
     if (received == -1)
     {
         Download_ProgressBar.Value = 100;
         ServerService.MediationServerClient server = new ServerService.MediationServerClient();
         user.loadFiles(uploadPath);
         Files_DataGrid.ItemsSource = user.userFiles;
         server.SignOut(JsonConvert.SerializeObject(user));
         server.SignIn(JsonConvert.SerializeObject(user));
     }
     else
     {
         Download_ProgressBar.Value = (double)(received / downloadFileSize) * 100;
     }
 }
Exemplo n.º 2
0
 protected override void OnClosed(EventArgs e)
 {
     ServerService.MediationServerClient server = new ServerService.MediationServerClient();
     server.SignOut(JsonConvert.SerializeObject(this.user));
     base.OnClosed(e);
 }