public override void ShowDialog(PropertyValue propertyValue, IInputElement commandSource)
        {
            ConditionWindow conWnd 
= new ConditionWindow();
            ModelPropertyEntryToOwnerActivityConverter converter 
= new ModelPropertyEntryToOwnerActivityConverter();
            ModelItem modelItem 
= (ModelItem)converter.Convert(propertyValue.ParentProperty, typeof(ModelItem), falsenull);
            
if (modelItem.Root.GetCurrentValue() is System.Activities.ActivityBuilder)
            {
                var aber 
= (modelItem.Root.GetCurrentValue() as System.Activities.ActivityBuilder);
                Dictionary
<string, Type> parameters = new Dictionary<string, Type>();
                
if (aber.Properties != null)
                {
                    
foreach (var pro in aber.Properties)
                    {
                        parameters.Add(pro.Name, pro.Type.GetGenericArguments()[
0]);
                    }
                }
                
if (aber.Implementation is System.Activities.Statements.Flowchart)
                {
                    var fc 
= aber.Implementation as System.Activities.Statements.Flowchart;
                    
if (fc.Variables != null)
                    {
                        
foreach (var va in fc.Variables)
                        {
                            parameters.Add(va.Name, va.Type);
                        }
                    }
                    XQSOFT.WF.BLL.Flow bllFlow 
= new WF.BLL.Flow();
                    var nodes 
= fc.Nodes.ToList();
                    var parents 
= bllFlow.GetGoEndByCurrent(nodes, fc.StartNode, modelItem.GetCurrentValue() as System.Activities.Statements.FlowNode);
                    conWnd.Nodes 
= parents;
                    conWnd.Parameters 
= parameters;
                }
            }

            
if (conWnd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                propertyValue.Value 
= conWnd.CurrentActivity;

            }
        }


相关文章:

  • 2021-07-03
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
猜你喜欢
  • 2022-12-23
  • 2021-05-01
  • 2022-02-20
  • 2021-10-31
  • 2021-06-22
  • 2022-01-29
  • 2021-08-23
相关资源
相似解决方案