Exemple #1
0
        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();
        }
Exemple #2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     kinect.newData -= UpdateScreen;
     kinect          = null;
     using (MyProjectInstaller mpi = new MyProjectInstaller(ExpectedState.Start, data.configFolder)) { };
 }