public PipelineNodeWrapper(PipelineView pipeline) { name = pipeline.PipelineName; pNodes = pipeline.Nodes; scrollX = pipeline.Scrollview.HorizontalScrollControl.Value; scrollY = pipeline.Scrollview.VerticalScrollControl.Value; }
/// <summary> /// Get called when a new worksheet should be added. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Event arguments.</param> void OnWorksheetAdd(object sender, EventArgs e) { Tuple<Command, string> ret = WorksheetNameDialog(); Command r = ret.Item1; if (r != null && r.Id == Command.Ok.Id) { PipelineView newPipeline = new PipelineView(project); newPipeline.Initialize(pipelineScroller); newPipeline.PipelineName = ret.Item2; pipelines.Add(newPipeline.PipelineName, newPipeline); CurrentPipeline = newPipeline; tabHost.Add(newPipeline.PipelineName); tabHost.SelectedIndex = tabHost.Count - 1; Log.Add(LogLevel.Info, this.GetType().Name, "Added new worksheet \"" + newPipeline.PipelineName + "\""); } }
public void OnProjectDataChangged(ProjectChangedEventArgs e) { if (e != null) { if (e.refresh) { pipelines.Clear(); if (project.LoadedPipelines != null && project.LoadedPipelines.Count != 0) { foreach (PipelineNodeWrapper wrapper in project.LoadedPipelines) { PipelineView newPipeline = new PipelineView(project); newPipeline.Initialize(pipelineScroller, wrapper.pNodes, wrapper.scrollX, wrapper.scrollY); newPipeline.PipelineName = wrapper.name; pipelines.Add(newPipeline.PipelineName, newPipeline); newPipeline.DataChanged += delegate(object sender, SaveStateEventArgs e2) { MainWindow mainWindow = pipelineShelf.ParentWindow as MainWindow; if (mainWindow != null) { mainWindow.MarkAsUnsaved(); } }; if (wrapper.active) { CurrentPipeline = newPipeline; } } if (CurrentPipeline == null) { CurrentPipeline = pipelines.Values.ToArray()[0]; } } else { CurrentPipeline = new PipelineView(project); CurrentPipeline.Initialize(pipelineScroller); pipelines.Add(currentPipeline.PipelineName, currentPipeline); } } else if (e.addedFiles != null && e.addedFiles.Length > 0) { } } }
public PipelineNode(Project project, PipelineView parent, string algoType, Rectangle bound) { this.project = project; this.parent = parent; mNodes = new List<MarkerNode>(); Initialize(); AlgorithmType = algoType; this.bound = bound; int i = 0; foreach (Compatible c in algorithm.Input) { this.Add(new MarkerNode(this, c, i, true)); i++; } i = 0; foreach (Compatible c in algorithm.Output) { this.Add(new MarkerNode(this, c, i, false)); i++; } isInitialized = true; }
public void NotifyPipelineStop(PipelineView pipeline) { Log.Add(LogLevel.Info, this.GetType().Name, "Stop executing pipeline! Worksheet \"" + pipeline.PipelineName + "\"."); if (pipelineFinished != null) { pipelineFinished(pipeline, null); } }