private void btnNext_Click(object sender, System.EventArgs e) { workitem.JobSpecification = new JobSpecification(); try { if (txtRetry.Text != "") { workitem.JobSpecification.Priority = int.Parse(txtPriority.Text); } else { workitem.JobSpecification.Priority = 0; } } catch (Exception ex) { System.Windows.MessageBox.Show(string.Format( "{0} Caught", ex)); } workitem.JobSpecification.JobConstraints = new JobConstraints(); try { if (txtRetry.Text != "") { workitem.JobSpecification.JobConstraints.MaxTaskRetryCount = int.Parse(txtRetry.Text); } } catch (Exception ex) { System.Windows.MessageBox.Show(string.Format( "Max Task Retry Count:\n{0}", ex)); } try { if (Time.CanParse(dataTableWallClock)) { TimeSpan span = Time.ParseTimeSpan(dataTableWallClock); workitem.JobSpecification.JobConstraints.MaxWallClockTime = span; } else { workitem.JobSpecification.JobConstraints.MaxWallClockTime = null; } } catch (Exception) { } if (chkJobManager.IsChecked == true) { CreateWIP3 p3 = new CreateWIP3(Sender, workitem); NavigationService.Navigate(p3); } else { CreateWIP5 p5 = new CreateWIP5(Sender, workitem); NavigationService.Navigate(p5); } }