示例#1
0
 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();
         }
     }
 }
示例#2
0
 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();
         }
     }
 }
示例#3
0
 private void showSQLForm(Dataweb.NShape.Shape operShape)
 {
     if (inputShape != null && inputShape.Data.Split('|').Length == 2)
     {
         string      dataPath   = inputShape.Data.Split('|')[1];
         IFeatureSet featureSet = MultiPlan.CommonMethod.GetFeatureSetByPath(dataPath);
         SQLBuilder2 sqlBuilder = new SQLBuilder2(featureSet);
         sqlBuilder.ShowDialog();
         if (sqlBuilder.DialogResult == DialogResult.OK)
         {
             operShape.Data = "SQL";
             DiamondBase db = (DiamondBase)operShape;
             db.SetCaptionText(0, sqlBuilder.sqlExpression);
             display1.Refresh();
         }
     }
 }
示例#4
0
 private void showOperateForm(Dataweb.NShape.Shape operShape)
 {
     if ((operShape != null) && (operShape.Template.Name == "Operate"))
     {
         ModelOperateForm opForm = new ModelOperateForm();
         opForm.StartPosition = FormStartPosition.CenterParent;
         opForm.ShowDialog();
         if (opForm.DialogResult == DialogResult.OK)
         {
             if (opForm.result == "SQL")
             {
                 showSQLForm(operShape);
             }
             else if (opForm.result == "相交分析")
             {
                 showInputForm(operShape);
             }
         }
     }
 }
示例#5
0
 /// <summary>
 /// 图中插入图形
 /// </summary>
 private void display1_ShapesInserted(object sender, Dataweb.NShape.Controllers.DiagramPresenterShapesEventArgs e)
 {
     if (state == 1)
     {
         //标记出流程输入点
         foreach (var item in e.Shapes)
         {
             if (item is Dataweb.NShape.Shape)
             {
                 inputShape = item as Dataweb.NShape.Shape;
                 return;
             }
         }
     }
     else if (state == 2)
     {
     }
     else if (state == 3)
     {
     }
 }
示例#6
0
 private void showConnectForm(Dataweb.NShape.Shape connShape)
 {
     if ((connShape != null) && (connShape.Template.Name == "Connect"))
     {
         ModelConnectForm mcform = new ModelConnectForm();
         mcform.StartPosition = FormStartPosition.CenterParent;
         mcform.ShowDialog();
         if (mcform.DialogResult == DialogResult.OK)
         {
             string label = mcform.result;
             if (label == "Yes")
             {
                 connShape.LineStyle = project1.Design.LineStyles["Green"];
             }
             else if (label == "No")
             {
                 connShape.LineStyle = project1.Design.LineStyles["Red"];
             }
             display1.Refresh();
         }
     }
 }