Esempio n. 1
0
        // Load Properties and test connection
        private async void frmMain_LoadAsync(object sender, EventArgs e)
        {
            // Testing HoloLens IP
            try
            {
                txtHoloLensIP.Text = Properties.Settings.Default.HoloLensIP;
                // TODO test and get HoloLens FaceInformation Server IP config
            }
            catch (Exception ex)
            {
                Debug.Write(ex);
                label6.ForeColor = Color.Red;
            }

            // Testing FaceInformationServer IP
            try
            {
                txtServerURL.Text = Properties.Settings.Default.hosts;
                var result = await RestfulClient.setBaseAddressAsync(txtServerURL.Text);

                updateStatusAsync();
            } catch (Exception ex)
            {
                Debug.Write(ex);
                label5.ForeColor = Color.Red;
            }
        }
Esempio n. 2
0
        private async void updateStatusAsync()
        {
            try
            {
                var result = await RestfulClient.setBaseAddressAsync(txtServerURL.Text);

                if (result)
                {
                    label5.ForeColor = Color.Green;
                }
                else
                {
                    label5.ForeColor = Color.Red;
                }
            } catch (Exception ex)
            {
                Debug.Write(ex);
                label5.ForeColor = Color.Red;
            }
        }