예제 #1
0
 private void Init()
 {
     try
     {
         HandleError(OpenNI.Initialize());
         NiTE.Initialize();
         OpenNI.OnDeviceConnected    += OpenNiOnDeviceConnectionStateChanged;
         OpenNI.OnDeviceDisconnected += OpenNiOnDeviceConnectionStateChanged;
         OpenNI.OnDeviceStateChanged += OpenNiOnDeviceStateChanged;
         UpdateDevicesList();
         notify.Visible = !Settings.Default.AutoNotification;
         ReadSettings();
     }
     catch (Exception ex)
     {
         MessageBox.Show(
             string.Format("Fatal Error: {0}", ex.Message),
             @"Execution Error",
             MessageBoxButtons.OK,
             MessageBoxIcon.Error);
         Environment.Exit(1);
     }
 }
예제 #2
0
 private void FrmMainFormClosed(object sender, FormClosedEventArgs e)
 {
     OpenNI.Shutdown();
     NiTE.Shutdown();
 }
예제 #3
0
 private void FrmMainFormClosing(object sender, FormClosingEventArgs e)
 {
     userTracker?.Dispose();
     NiTE.Shutdown();
     OpenNI.Shutdown();
 }
예제 #4
0
 private void FrmMainFormClosing(object sender, FormClosingEventArgs e)
 {
     NiTE.Shutdown();
     OpenNI.Shutdown();
 }