Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }