private async void DownloadPath(string srcPath, string targetPath) { try { MainDownload d = new MainDownload(IP, USER, PASSWARD); await d.Download(srcPath, targetPath); } catch (Exception err) { System.Windows.MessageBox.Show(err.ToString()); } }
private void UploadFile(string path) { try { MainDownload d = new MainDownload(IP, USER, PASSWARD); d.Upload(UploadName.Text, path); } catch (Exception err) { System.Windows.MessageBox.Show(err.ToString()); } }