public MainWindow() { data = new WyprostujSieBackground.Data(true, true); using (MyProjectInstaller mpi = new MyProjectInstaller(ExpectedState.Stop, data.configFolder)) kinect = new WyprostujSieBackground.Kinect(true); kalmanFilters = new WyprostujSieBackground.KalmanFilter[3]; notifications = new Notifications(); InitializeComponent(); this.autorunChB.IsChecked = MyProjectInstaller.Installed(); this.autorunChB.IsEnabled = IsAdmin; if (!IsAdmin) { notifications.AddNotif(Properties.Resources.adminNotif.ToString(), Brushes.Yellow, "admin"); } SetValuaes(); if (!Files.CopyFiles(data.configFolder)) { this.notifications.AddNotif(Properties.Resources.errorFilesCopy, Brushes.Yellow, "files"); } dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Interval = TimeSpan.FromSeconds(5); dispatcherTimer.Tick += SetStatus; dispatcherTimer.Start(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { kinect.newData -= UpdateScreen; kinect = null; using (MyProjectInstaller mpi = new MyProjectInstaller(ExpectedState.Start, data.configFolder)) { }; }