Beispiel #1
0
        private void showNewCatchall(object sender, RoutedEventArgs e)
        {
            CatchallDialog dlg = new CatchallDialog();
            dlg.Owner = this;
            if (dlg.ShowDialog() == true)
            {
                int jobTimeout = dlg.timeJob.Value.HasValue ? Convert.ToInt32(dlg.timeJob.Value.Value.TotalSeconds) : 0;
                int taskTimeout = dlg.timeTask.Value.HasValue ? Convert.ToInt32(dlg.timeTask.Value.Value.TotalSeconds) : 0;

                Submission sdlg = new Submission(txtDatabase.Text,
                                                 dlg.txtCluster.Text,
                                                 dlg.cmbLocality.Text,
                                                 dlg.cmbPriority.SelectedIndex,
                                                 dlg.cmbNodeGroup.Text,
                                                 dlg.txtExecutor.Text,
                                                 dlg.txtLimitMin.Text,
                                                 dlg.txtLimitMax.Text,
                                                 dlg.txtJobTemplate.Text,
                                                 jobTimeout, taskTimeout);

                sdlg.Owner = this;
                sdlg.ShowDialog();

                if (sdlg.lastError != null)
                {
                    System.Windows.MessageBox.Show(this, sdlg.lastError.Message, "Error",
                                                   System.Windows.MessageBoxButton.OK,
                                                   System.Windows.MessageBoxImage.Error);
                }

                updateState();
            }
        }
Beispiel #2
0
        private void showNewCatchall(object sender, RoutedEventArgs e)
        {
            CatchallDialog dlg = new CatchallDialog();
            dlg.Owner = this;
            if (dlg.ShowDialog() == true)
            {
                Submission sdlg = new Submission(txtDatabase.Text,
                                                 dlg.txtCluster.Text,
                                                 dlg.cmbLocality.Text,
                                                 dlg.cmbPriority.SelectedIndex,
                                                 dlg.cmbNodeGroup.Text,
                                                 dlg.txtExecutor.Text,
                                                 dlg.txtLimitMin.Text,
                                                 dlg.txtLimitMax.Text);

                sdlg.Owner = this;
                sdlg.ShowDialog();

                if (sdlg.lastError != null)
                {
                    System.Windows.MessageBox.Show(this, sdlg.lastError.Message, "Error",
                                                   System.Windows.MessageBoxButton.OK,
                                                   System.Windows.MessageBoxImage.Error);
                }

                updateState();
            }
        }