/// <summary> /// Initializes a new instance of the <see cref="CreateVFUI"/> class. /// </summary> /// <param name="workstep">the workstep instance</param> /// <param name="args">the arguments</param> /// <param name="context">the underlying context in which this UI is being used</param> public CreateVFUI(CreateVF workstep, CreateVF.Arguments args, WorkflowContext context) { InitializeComponent(); this.workstep = workstep; this.args = args; this.context = context; if (args.VectorField != null) { textBoxK.Text = args.VectorField.koeff.ToString(); colorPicker1.Color = args.VectorField.arrowColor; textBoxN.Text = args.VectorField.partition.ToString(); if (args.VectorField.haveGrid == true) { comboBox1.SelectedItem = comboBox1.Items[0]; } else { comboBox1.SelectedItem = comboBox1.Items[1]; } textBoxStep.Text = ((int)args.VectorField.gridStep).ToString(); } workstep.CopyArgumentPackage(args, tmpargs); UpdateUiFormArgs(); }
/// <summary> /// This method runs once in the Module life. /// In this method, you can do registrations of the not UI related components. /// (eg: datasource, plugin) /// </summary> public void Integrate() { // TODO: Add VFMod.Integrate implementation // Register CreateVF CreateVF createvfInstance = new CreateVF(); PetrelSystem.WorkflowEditor.AddUIFactory<CreateVF.Arguments>(new CreateVF.UIFactory()); PetrelSystem.WorkflowEditor.Add(createvfInstance); this.wrapper = new Slb.Ocean.Petrel.Workflow.WorkstepProcessWrapper(createvfInstance); PetrelSystem.ProcessDiagram.Add(this.wrapper, "Plug-ins"); }