Esempio n. 1
0
        public Arrow(BaseNodeControl from, Point startRelative, Point end)
        {
            InitializeComponent();

            From = from;
            StartRelative = startRelative;

            End = end;
        }
Esempio n. 2
0
        public Arrow(BaseNodeControl from, Point startRelative, BaseNodeControl to, Point endRelative)
        {
            InitializeComponent();

            From = from;
            To = to;
            StartRelative = startRelative;
            EndRelative = endRelative;
        }
Esempio n. 3
0
 public IExperimentNode CreateExperimentNode(BaseNodeControl node)
 {
     if (node is RunProcessNodeControl)
         return hydrologyCore.RunProcess((node as RunProcessNodeControl).ProcessName);
     if (node is AlgorithmNodeControl)
     {
         var algNode = node as AlgorithmNodeControl;
         DataTable algParams = algNode.ParamsTable.Copy();
         return hydrologyCore.Algorithm(algNode.AlgorithmType.Name).InitFromFolder(algNode.InitPath).SetParams(algParams);
     }
     if (node is LoopControl)
     {
         var loopNode = node as LoopControl;
         var chain = loopNode.LoopBody.CreateExecutionChain();
         var body = new List<IExperimentNode>();
         foreach (var p in chain)
         {
             IExperimentNode experimentNode = CreateExperimentNode(p);
             if (experimentNode != null) body.Add(experimentNode);
         }
         return hydrologyCore.Loop(body, loopNode.VarName, loopNode.StartValue, loopNode.EndValue, loopNode.Step);
     }
     return null;
 }