//TODO: refactor this to a different class with some inheritance structure public JobOutputWindow(String name, JobCreateResponse response, AutomationISEClient client) { InitializeComponent(); StartJobButton.IsEnabled = false; StopJobButton.IsEnabled = false; this.Title = "Job: " + name; AdditionalInformation.Text = "This is a Global Runbook responsible for syncing your GitHub repo with your Automation Account. Neato!"; runbookName = name; jobCreateResponse = response; iseClient = client; Task t = checkJob(); }
//TODO: refactor this to a different class with some inheritance structure public JobOutputWindow(String name, JobCreateResponse response, AutomationISEClient client) { InitializeComponent(); StartJobButton.IsEnabled = false; StopJobButton.IsEnabled = false; this.Title = "Job: " + name; AdditionalInformation.Text = "This is a Global Runbook responsible for syncing your GitHub repo with your Automation Account. Neato!"; runbookName = name; jobCreateResponse = response; iseClient = client; Task t = checkJob(); refreshTimer = new System.Timers.Timer(); refreshTimer.Interval = 30000; refreshTimer.Elapsed += new ElapsedEventHandler(refresh); }
private async void ButtonSourceControlRunbook_Click(object sender, RoutedEventArgs e) { try { JobCreateResponse sourceControlJob = await AutomationSourceControl.startSouceControlJob(iseClient.automationManagementClient, iseClient.accountResourceGroups[iseClient.currAccount].Name, iseClient.currAccount.Name); JobOutputWindow jobWindow = new JobOutputWindow(sourceControlJob.Job.Properties.Runbook.Name, sourceControlJob, iseClient); jobWindow.Show(); } catch (Exception ex) { MessageBox.Show("The source control job could not be started. " + ex.Message, "Error"); return; } }