Esempio n. 1
0
        public DataManager(ÄstrandClient astrandClient, IClientMessageReceiver receiver) //current observer is datamanager itself, rather than the client window
        {
            this.clientMessage = new ClientMessage();

            this.astrandClient    = astrandClient;
            this.heartrateMonitor = new HeartrateMonitor(this);

            this.receiver = receiver;
        }
Esempio n. 2
0
        public MainWindow(ÄstrandClient astrandClient)
        {
            InitializeComponent();

            this.astrandClient = astrandClient;
            this.astrandClient.SetConnector(this);

            this.runningTests = new List <TestData>();
            this.testNames    = new List <string>();

            this.astrandClient.Transmit(new Message(Message.ID.GET_TESTS, Message.State.OK, null));

            this.Closed += MainWindow_Closed;
        }
Esempio n. 3
0
        public MainWindow(ÄstrandClient astrandClient)
        {
            InitializeComponent();

            this.astrandClient = astrandClient;
            this.astrandClient.SetConnector(this);

            this.dataManager = new DataManager(this.astrandClient, this);

            this.liveChartControl = new LiveChartControl("Hartslag", "", "sl/pm", 40, 250, 180, 20, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true);
            Grid.SetColumn(this.liveChartControl, 1);
            grd_DataGrid.Children.Add(this.liveChartControl);

            this.bikeIsConnected = false;
            this.testInProgress  = false;

            this.Closed += MainWindow_Closed;
            this.KeyUp  += MainWindow_KeyUp;
        }
Esempio n. 4
0
 private void Connect_Click(object sender, RoutedEventArgs e)
 {
     if (!String.IsNullOrEmpty(txb_Ip.Text) || !String.IsNullOrEmpty(txb_Port.Text))
     {
         this.astrandClient = new ÄstrandClient(txb_Ip.Text, int.Parse(txb_Port.Text), this, null);
         if (!this.astrandClient.Connect())
         {
             lbl_Error.Content    = "Kon geen connectie leggen, host is niet gevonden!";
             lbl_Error.Visibility = Visibility.Visible;
         }
         else
         {
             stk_Connect.Visibility = Visibility.Collapsed;
             stk_Content.Visibility = Visibility.Visible;
         }
     }
     else
     {
         lbl_Error.Content    = "Ip en Poort mogen niet leeg zijn!";
         lbl_Error.Visibility = Visibility.Visible;
     }
 }