Beispiel #1
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            SignalLookup lookup = new SignalLookup();
            Mapper       mapper = new Mapper(lookup);

            s_window = this;

            m_algorithmMessageBoxWrapper    = new RichTextBoxWrapper(AlgorithmMessageBox);
            m_subscriberStatusBoxWrapper    = new RichTextBoxWrapper(SubscriberStatusBox);
            m_subscriberMessageBoxWrapper   = new RichTextBoxWrapper(SubscriberMessageBox);
            m_concentratorStatusBoxWrapper  = new RichTextBoxWrapper(ConcentratorStatusBox);
            m_concentratorMessageBoxWrapper = new RichTextBoxWrapper(ConcentratorMessageBox);

            m_concentrator = new Concentrator(mapper);
            m_concentrator.ProcessException += Concentrator_ProcessException;
            m_concentrator.FramesPerSecond   = 30;
            m_concentrator.LagTime           = 3;
            m_concentrator.LeadTime          = 1;
            m_concentrator.Start();

            m_subscriber = new Subscriber(m_concentrator);
            m_subscriber.StatusMessage    += Subscriber_StatusMessage;
            m_subscriber.ProcessException += Subscriber_ProcessException;
            m_subscriber.Start();

            new Action(UpdateStatus).DelayAndExecute(1000);
        }
Beispiel #2
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            s_window = this;

            m_algorithmMessageBoxWrapper    = new RichTextBoxWrapper(this, AlgorithmMessageLabel, AlgorithmMessageBox);
            m_subscriberStatusBoxWrapper    = new RichTextBoxWrapper(this, SubscriberStatusLabel, SubscriberStatusBox);
            m_subscriberMessageBoxWrapper   = new RichTextBoxWrapper(this, SubscriberMessageLabel, SubscriberMessageBox);
            m_concentratorStatusBoxWrapper  = new RichTextBoxWrapper(this, ConcentratorStatusLabel, ConcentratorStatusBox);
            m_concentratorMessageBoxWrapper = new RichTextBoxWrapper(this, ConcentratorMessageLabel, ConcentratorMessageBox);

            m_concentrator.ProcessException       += Concentrator_ProcessException;
            m_concentrator.FramesPerSecond         = SystemSettings.FramesPerSecond;
            m_concentrator.LagTime                 = SystemSettings.LagTime;
            m_concentrator.LeadTime                = SystemSettings.LeadTime;
            m_concentrator.RoundToNearestTimestamp = true;
            m_concentrator.Start();

            m_subscriber.StatusMessage    += Subscriber_StatusMessage;
            m_subscriber.ProcessException += Subscriber_ProcessException;
            m_subscriber.Start();

            new Action(UpdateStatus).DelayAndExecute(1000);
        }