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; }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (IsConnected) { Disconnect(); } if (this.kinectAdapter != null) { this.kinectAdapter.Dispose(); this.kinectAdapter = null; } }