private async void ShowingFile_Click(object sender, RoutedEventArgs e) { if (await ConnectionAvailable() == true) { var selectItem = TableFilesFromDirectory.SelectedItem; FilesFromDirectory currentFile = (FilesFromDirectory)selectItem; ShowingDataFile window = new ShowingDataFile(currentFile.DirectLink); window.Show(); } }
private async void RenameFile_Click(object sender, RoutedEventArgs e) { if (await ConnectionAvailable() == true) { var selectItem = TableFilesFromDirectory.SelectedItem; FilesFromDirectory currentFile = (FilesFromDirectory)selectItem; if (currentFile == null) { MessageBox.Show("Выберите файл!"); return; } NameForDirectory window = new NameForDirectory(); if (window.ShowDialog() == true) { var resultRename = api.RenameFile(window.NameDirectory.Text, Convert.ToInt32(currentFile.Id)); UpdateListFiles(); } } }