Ejemplo n.º 1
0
        public static Window Start(Action baseStartup)
        {
            InstrumentMonitorView instMonView = new InstrumentMonitorView();
            InstrumentMonitorViewModel instMonViewModel = new InstrumentMonitorViewModel();

            instMonView.DataContext = instMonViewModel;

            return instMonView;
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            //The following glueing logic is configurable with any dependency inversion supported frameworks ( such as spring.net)
            //Setup Pricing Sources
            var techPricingSource    = new SimulatedPricingSource(mySupportedForPricingSource1);
            var nonTechPricingSource = new SimulatedPricingSource(mySupportedForPricingSource2);

            //Adding to Composite Pricing Source
            var compositePricingSource = new CompositePricingSource(new List <IPricingSource>()
            {
                techPricingSource, nonTechPricingSource
            });

            //Creating PricingEngine with Composite pricing source.
            var pricingEngine = new PricingEngine.Impl.PricingEngine(compositePricingSource, 300);

            myStockMonitorViewModel = new InstrumentMonitorViewModel(pricingEngine);
            DataContext             = myStockMonitorViewModel;
        }