private void RemoveHdfsServerButtonClick(object sender, EventArgs e) { try { var selectionForm = new HdfsDriveSelectionForm(_drives .Select(d => d.Value) .OfType <HdfsDrive>() .ToList()) { FormCaption = Resources.RemoveHdfsServerCaption, SelectButtonText = Resources.RemoveButtonText }; if (selectionForm.ShowDialog() != DialogResult.OK) { return; } RemoveHdfsServer(selectionForm.SelectedDrive); } catch (Exception ex) { MessageBox.Show(ex.Message, Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void RemoveHdfsServerButtonClick(object sender, EventArgs e) { try { var selectionForm = new HdfsDriveSelectionForm(_drives .Select(d => d.Value) .OfType<HdfsDrive>() .ToList()) { FormCaption = Resources.RemoveHdfsServerCaption, SelectButtonText = Resources.RemoveButtonText }; if (selectionForm.ShowDialog() != DialogResult.OK) return; RemoveHdfsServer(selectionForm.SelectedDrive); } catch (Exception ex) { MessageBox.Show(ex.Message, Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }