Beispiel #1
0
        public MainWindow()
        {
            log4net.Config.XmlConfigurator.Configure();
            InitializeComponent();

            if (Settings.Default.SimulateKinect)
            {
                _sensor = new KinnectSimulator();
            }
            else
            {
                _sensor = new KinectOpenNi2();
            }

            _workerImages.DoWork             += new DoWorkEventHandler(WorkerImages_DoWork);
            _workerImages.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerImages_RunWorkerCompleted);

            _network = new NetworkManager(Settings.Default.PhoneBumperGuid, this);
            _workerNetwork.DoWork += new DoWorkEventHandler(WorkerNetwork_DoWork);

            BumperSelected        = BumperType.AvgHighDepthColumns;
            UseCompression        = Settings.Default.UseCompression;
            GenerateAll           = Settings.Default.GenerateAll;
            BumperHeight          = Settings.Default.BumperHeight;
            BumperDistanceFromTop = Settings.Default.BumperDistanceFromTop;
            VerticalFlip          = Settings.Default.VerticalFlip;
            FrameWindowBorder     = Settings.Default.FrameWindowBorder;
            VisualAlerts          = Settings.Default.VisualAlerts;
            VisualAlertDistance   = Settings.Default.VisualAlertDistance;
            Brightness            = Settings.Default.Brightness;
        }
        public MainWindow()
        {
            log4net.Config.XmlConfigurator.Configure();
              InitializeComponent();

              if (Settings.Default.SimulateKinect)
            _sensor = new KinnectSimulator();
              else
            _sensor = new KinectOpenNi2();

              _workerImages.DoWork += new DoWorkEventHandler(WorkerImages_DoWork);
              _workerImages.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerImages_RunWorkerCompleted);

              _network = new NetworkManager(Settings.Default.PhoneBumperGuid, this);
              _workerNetwork.DoWork += new DoWorkEventHandler(WorkerNetwork_DoWork);

              BumperSelected = BumperType.AvgHighDepthColumns;
              UseCompression = Settings.Default.UseCompression;
              GenerateAll = Settings.Default.GenerateAll;
              BumperHeight = Settings.Default.BumperHeight;
              BumperDistanceFromTop = Settings.Default.BumperDistanceFromTop;
              VerticalFlip = Settings.Default.VerticalFlip;
              FrameWindowBorder = Settings.Default.FrameWindowBorder;
              VisualAlerts = Settings.Default.VisualAlerts;
              VisualAlertDistance = Settings.Default.VisualAlertDistance;
              Brightness = Settings.Default.Brightness;
        }