コード例 #1
0
        public LightSelector()
        {
            InitializeComponent();
            mState = new LightState(10);

            int counter = 1;
            foreach (Light l in mState.Lights)
            {
                mListbox.Items.Add("Light" + counter.ToString());
                counter++;
            }
            mObjectCollection = mListbox.Items;
        }
コード例 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Loading specific UI Modules.
            ModuleCatalog.Instance.Add(ModuleOptions.LightSelector, new LightSelectorViewFactory());
            ModuleCatalog.Instance.Add(ModuleOptions.Snake, new SnakeViewFactory());
            ModuleCatalog.Instance.Add(ModuleOptions.AmpSine, new AmpSineViewFactory());
            ModuleCatalog.Instance.Add(ModuleOptions.Thunder, new ThunderViewFactory());
            ModuleCatalog.Instance.Add(ModuleOptions.Room, new RoomViewFactory());

            LightState state = new LightState(11);
            MainFormView view = new MainFormView();
            view.StartPosition = FormStartPosition.CenterScreen;
            MainFormPresenter pres = new MainFormPresenter(view, state);

            LoginScreen login = new LoginScreen(view);
            login.StartPosition = FormStartPosition.CenterScreen;
            login.ShowDialog(view);

            Application.Run(view);
        }
コード例 #3
0
        public MainWindow()
        {
            InitializeComponent();

            var colorList = new List<Color> { Colors.Black, Colors.Green };
            this.bitmapWave = new WriteableBitmap(WaveImageWidth, WaveImageHeight, 96, 96, PixelFormats.Indexed1, new BitmapPalette(colorList));

            this.pixels = new byte[WaveImageWidth];
            for (int i = 0; i < this.pixels.Length; i++)
            {
                this.pixels[i] = 0xff;
            }

            imgWav.Source = this.bitmapWave;

            SensorChooser.KinectSensorChanged += this.SensorChooserKinectSensorChanged;

            mKinectExplorer = new KinectExplorerWindow();
            mKinectExplorer.KinectStart();

            mLightState = new LightState(6);

            kinect = KinectSensor.KinectSensors.FirstOrDefault(s => s.Status == KinectStatus.Connected); // Get first Kinect Sensor
            kinect.SkeletonStream.Enable(); // Enable skeletal tracking
            this.skeletonData = new Skeleton[kinect.SkeletonStream.FrameSkeletonArrayLength];
            kinect.SkeletonFrameReady += new EventHandler<SkeletonFrameReadyEventArgs>(sensor_SkeletonFrameReady);
        }
コード例 #4
0
        public ActionResult ColorPick2(int r, int g, int b)
        {
            LightState s = new LightState(10);

            return null;
        }
コード例 #5
0
        public override RoomPresenter Create(LightState pState)
        {
            IRoom view = ModuleCatalog.Instance.GetView <IRoom>(ModuleOptions.Room);

            return(new RoomPresenter(view, pState));
        }