private void showInputForm(Dataweb.NShape.Shape inShape) { if ((inShape != null) && (inShape.Template.Name == "Input" || inShape.Template.Name == "Operate")) { ModelInPutForm mpForm = new ModelInPutForm(); mpForm.StartPosition = FormStartPosition.CenterParent; mpForm.Initial(inShape.Data, true); mpForm.ShowDialog(); if (mpForm.DialogResult == DialogResult.OK) { string label = string.Empty; inShape.Data = mpForm.GetInfo(ref label); if (inShape.Template.Name == "Input") { EllipseBase eb = (EllipseBase)inShape; eb.SetCaptionText(0, label); } if (inShape.Template.Name == "Operate") { DiamondBase db = (DiamondBase)inShape; db.SetCaptionText(0, label); } display1.Refresh(); } } }
private void showOutputForm(Dataweb.NShape.Shape outShape) { if ((outShape != null) && (outShape.Template.Name == "Output")) { ModelOutPutForm moform = new ModelOutPutForm(); moform.StartPosition = FormStartPosition.CenterParent; moform.ShowDialog(); if (moform.DialogResult == DialogResult.OK) { string label = moform.result; EllipseBase eb = (EllipseBase)outShape; eb.SetCaptionText(0, label); display1.Refresh(); } } }