private void PipAdd_Click(object sender, EventArgs e) { Settings S = new Settings(); SaveSettings(ref S); if (PipelineList.SelectedIndices.Count == 0) { Pipeline.Add(S); PipNames.Add(PipName.Text); PipelineList.Items.Add(PipName.Text); PipelineList.Items[PipelineList.Items.Count - 1].Selected = true; PipelineList.Select(); } else if (PipelineList.SelectedIndices.Count == 1) { if (!in_pipeline || PipelineList.SelectedIndices[0] >= processed) { int i = PipelineList.SelectedIndices[0] + 1; Pipeline.Insert(i, S); PipNames.Insert(i, PipName.Text); PipelineList.Items.Insert(i, PipName.Text); PipelineList.Items[i - 1].Selected = false; PipelineList.Items[i].Selected = true; PipelineList.Select(); } } pip_last_index++; PipName.Text = "Step " + (pip_last_index + 1).ToString(); }
/// <summary> /// This call will give you access to all pipelines the user of this API key has access to. The stages and fields properties are embedded in the pipeline object for convenience, however, to update these properties you must use the respective endpoints listed in the Stages and Fields sections. /// </summary> /// <param name="sortBy">(optional) What order to sort the pipelines by. There are two valid sorts creationTimestamp and lastUpdatedTimestamp. Both are in descending order.</param> /// <returns></returns> public PipelineList ListAllPipelines(SortOptions sortBy = null) { var pipelineList = new PipelineList { RawApiResponse = _rawPipelineServices.ListAllPipelines(sortBy) }; pipelineList.Pipelines = JsonConvert.DeserializeObject <List <Pipeline> >(pipelineList.RawApiResponse.Json); pipelineList.RawApiResponse = GetRawApiResponseOrNull(pipelineList.RawApiResponse); return(pipelineList); }