Beispiel #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            log.Info("Application Starting");
            log.Info(String.Format("Using config file : {0}", configFile));
            log.Info("----------------------------------------------------");

            //Get the config file
            log.Debug("Setup configuration");
            SystemConfig systemConfig = new SystemConfig(configFile);

            //Set up all the objects and delegates necesary to run the program
            log.Debug("Setup objects");
            _physicalLayer = new PhysicalLayer(systemConfig.getDeviceConfig());
            LogicalLayer logicalLayer = new LogicalLayer(_physicalLayer);

            _physicalLayer.setDelegate(logicalLayer);
            _uiHandle       = new UIHandle_LLSL(logicalLayer);
            _sequencerLayer = new SequencerLayer(_uiHandle, logicalLayer, systemConfig.getSequencerConfig());

            //Setup main window
            log.Debug("Setup main window");
            MainWindow wnd = new MainWindow();

            logicalLayer.setUIDelegate(wnd);
            _sequencerLayer.setUIDelegate(wnd);
            wnd.setDelegate(_uiHandle);
            wnd.Show();
        }