private void envPickerCB_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (sender == null) { return; } ComboBox cb = sender as ComboBox; if (cb == null || cb.SelectedItem == null) { return; } Release.REnvironment re = cb.SelectedItem as Release.REnvironment; Release.DeployStep ds = re.DeploySteps; if (ds != null && ds.Tasks != null) { logsLV.ItemsSource = ds.Tasks; } else { logsLV.ItemsSource = null; } }
private Dictionary <ItemDetails, List <TimelineRecord> > getEnvToTasks(Release release) { Dictionary <ItemDetails, List <TimelineRecord> > envToTasksDict = new Dictionary <ItemDetails, List <TimelineRecord> >(); List <Release.REnvironment> envs = release.Environments; if (envs != null && envs.Count > 0) { foreach (var env in envs) { ItemDetails id = new ItemDetails(env.Id, env.Name); //TimelineRecord Release.DeployStep deploySteps = env.DeploySteps; if (deploySteps != null && deploySteps.Tasks != null) { //foreach Task } } } return(envToTasksDict); }
public object Convert(object value, Type targetType, object parameter, string language) { string status = "NOT-STARTED"; Release.DeployStep deploySteps = (Release.DeployStep)value; if (deploySteps != null) { if (deploySteps.Job != null) { status = deploySteps.Job.Status.ToUpperInvariant(); } } return(status); }
public object Convert(object value, Type targetType, object parameter, string language) { string color = "#9E9E9E"; Release.DeployStep deploySteps = (Release.DeployStep)value; if (deploySteps != null) { if (deploySteps.Job != null) { color = getStatusColor(deploySteps.Job.Status); } } return(color); }