Пример #1
0
 private void Drives_Change(object sender, SelectionChangedEventArgs e)
 {
     try {
         SwitchDrive();
     }
     catch (Exception ex) {
         AppendErrorDelegate?.Invoke(ex.Message, ex);
     }
 }
Пример #2
0
 private void OpenButton_Click(object sender, RoutedEventArgs e)
 {
     try {
         if (CreateNewFile && File.Exists(FileFullPathInput.Text) && MessageBoxResult.No ==
             MessageBox.Show(this, OverwriteMessage, OverwriteDialogTitle, MessageBoxButton.YesNo))
         {
             return;
         }
         SelectedPath = FileFullPathInput.Text;
         Close();
     }
     catch (Exception ex) {
         AppendErrorDelegate?.Invoke(ex.Message, ex);
     }
 }
Пример #3
0
 private void FileList_Select(object sender, SelectedCellsChangedEventArgs e)
 {
     try {
         if (!((sender as DataGrid)?.SelectedItem is RowEntity row))
         {
             return;
         }
         if (row.TryGetMember(@"FileName", out var selectedFile))
         {
             FileFullPathInput.Text = selectedFile as string ?? @"";
         }
     }
     catch (Exception ex) {
         AppendErrorDelegate?.Invoke(ex.Message, ex);
     }
 }
Пример #4
0
 private void Item_Select(object sender, RoutedEventArgs e)
 {
     try {
         if (!((sender as TreeView)?.SelectedItem is FileSystemNode item))
         {
             return;
         }
         GridOperator.DisplayDirectory(item);
         if (CreateNewFile)
         {
             FileFullPathInput.Text = item.FullPath;
         }
     }
     catch (Exception ex) {
         AppendErrorDelegate?.Invoke(ex.Message, ex);
     }
 }