Exemplo n.º 1
0
        // Your application's entry point. Here you can initialize your MVVM framework, DI
        // container, etc.
        private static void AppMain(Application app, string[] args)
        {
            var pipeline  = new PipeLine();
            var viewModel = new MainWindowViewModel(pipeline, PipeElementFactory.GetFactoryTypes());

            var window = new MainWindow
            {
                DataContext = viewModel,
            };

            app.Run(window);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class.
        /// </summary>
        public MainWindow()
        {
            this.PipeElements = new List <IElement>
            {
            };

            foreach (string factoryTypeName in PipeElementFactory.GetFactoryTypes())
            {
                var element = PipeElementFactory.Make(factoryTypeName, "template");
                if (element != null)
                {
                    this.PipeElements.Add(element);
                }
            }

            this.startPoint = default;

            this.Pipeline = new GraphicalPipeline(new PipeLine());

            this.DataContext = this;
            this.InitializeComponent();
        }