public DiscussionDashboard(UISharedRTClient sharedClient,
                                   StatusWnd stWnd,
                                   Discussions.Main.OnDiscFrmClosing closing)
        {
            this._discussion = SessionInfo.Get().discussion;
            _sharedClient = sharedClient;
            _closing = closing;
            _stWnd = stWnd;
            
            InitializeComponent();

            userCursor = new UserCursor(SessionInfo.Get().person.Name, CursorInputState.None);
            userCursor.usrId = SessionInfo.Get().person.Id;

            SetListeners(sharedClient, true);
            if(sharedClient.clienRt.IsConnected())
                OnJoin();

            ToLayerModeNoLayer();
        }  
Esempio n. 2
0
        private void _vmMain_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "HeaterTemperature":
            {
                HeaterTemp = _vmMain.HeaterTemperature;

                // Update the appropriate control.
            }

            break;

            case "PCRCyclerTempAtTemp":
            {
                this.Dispatcher.Invoke(() =>
                    {
                        if (_vmMain.PCRCyclerTempAtTemp)
                        {
                            tbPCRTemperature.Background = new SolidColorBrush(Colors.LightGreen);
                        }
                        else
                        {
                            tbPCRTemperature.Background = new SolidColorBrush(Colors.White);
                        }
                    });
            }
            break;

            case "PCRCyclerTempAtTemp2":
            {
                this.Dispatcher.Invoke(() =>
                    {
                        if (_vmMain.PCRCyclerTempAtTemp2)
                        {
                            tbPCRTemperature2.Background = new SolidColorBrush(Colors.LightGreen);
                        }
                        else
                        {
                            tbPCRTemperature2.Background = new SolidColorBrush(Colors.White);
                        }
                    });
            }
            break;

            case "PCRCyclerSetpoint":
            {
                PCRCyclerSetPoint = _vmMain.PCRCyclerSetpoint;
            }
            break;

            case "PCRCyclerTemp":
            {
                PCRCyclerTemp = _vmMain.PCRCyclerTemperature;
            }
            break;

            case "PCRCyclerTemp2":
            {
                PCRCyclerTemp2 = _vmMain.PCRCyclerTemperature2;
            }
            break;

            case "ProtocolExecutionLine":
            {
                Application.Current.Dispatcher.Invoke((Action) delegate
                    {
                        StatusWnd.Text += "\r\n" + _vmMain.ProtocolExecutionLine;
                        StatusWnd.ScrollToEnd();
                    }
                                                      );
            }
            break;
            }
        }