예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     client             = new Client(this);
     this.kinectAdapter = new KinectAdapter(this);
     client.ChangeStatusEventHandler  += OnChangeStatus;
     ipAddressesComboBox.ItemsSource   = client.getPossibleIpAddresses();
     ipAddressesComboBox.SelectedIndex = 0;
     portTxtBox.Text = "" + Client.DEFAULT_PORT;
 }
예제 #2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (IsConnected)
            {
                Disconnect();
            }

            if (this.kinectAdapter != null)
            {
                this.kinectAdapter.Dispose();
                this.kinectAdapter = null;
            }
        }