Exemplo n.º 1
0
        public ExecutorWindow(ExperimentGraph experimentGraph, Core hydrologyCore)
        {
            InitializeComponent();

            this.experimentGraph = experimentGraph;
            this.hydrologyCore = hydrologyCore;

            RunExecutor();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Core core = new Core();

            Experiment experiment = new Experiment();
            experiment.StartFrom("experiment/initial")
                .Then(core.Algorithm("RepresentationCheck").InitFromFolder("experiment/alg1/input/"))
                .Then(core.Algorithm("Statistics").InitFromFolder("experiment/alg2/input/"));

            Console.WriteLine("Starting experiment");
            experiment.Run();
            Console.WriteLine("Experiment finished");
            Console.ReadKey();
        }
Exemplo n.º 3
0
        private void Init()
        {
            HydrologyCore = new Core();
            IList<Type> algTypes = HydrologyCore.AlgorithmTypes.Values.ToList();
            FolderDialog = new System.Windows.Forms.FolderBrowserDialog();
            FileDialog = new OpenFileDialog() { Multiselect = false };

            // add algorithm buttons to toolkit
            foreach (Type type in algTypes)
            {
                Button b = new Button();
                b.Tag = type.Name;
                var attr = type.GetCustomAttribute(typeof(NameAttribute)) as NameAttribute;
                b.Content = attr.Name;
                b.Style = (Style)this.FindResource("AlgButtonStyle");
                b.Click += algButton_Click;
                b.PreviewMouseDown += Button_PreviewMouseDown;
                b.PreviewMouseMove += algButton_PreviewMouseMove;
                b.PreviewMouseUp += Button_PreviewMouseUp;
                AlgorithmButtonsPanel.Children.Add(b);
            }
        }