예제 #1
0
        void ProgramStarted()
        {
            sensor = new SensorProximidad(extender);

            Debug.Print("Program Started");


            camera.BitmapStreamed += camera_BitmapStreamed;


            controlWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.controlWindow));
            camaraWindow  = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.camaraWindow));
            GlideTouch.Initialize();


            btn_start           = (Button)controlWindow.GetChildByName("start");
            btn_stop            = (Button)controlWindow.GetChildByName("stop");
            btn_start.TapEvent += btn_start_TapEvent;
            btn_stop.TapEvent  += btn_stop_TapEvent;

            sensor.ObjectOn  += sensor_ObjectOn;
            sensor.ObjectOff += sensor_ObjectOff;

            Glide.MainWindow = controlWindow;
        }
예제 #2
0
        // This method is run when the mainboard is powered up or reset.
        void ProgramStarted()
        {
            /*******************************************************************************************
            *  Modules added in the Program.gadgeteer designer view are used by typing
            *  their name followed by a period, e.g.  button.  or  camera.
            *
            *  Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
            *   button.ButtonPressed +=<tab><tab>
            *
            *  If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
            *   GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
            *   timer.Tick +=<tab><tab>
            *   timer.Start();
            *******************************************************************************************/


            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");

            //Carga las ventanas
            controlWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.controlWindow));
            camaraWindow  = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.camaraWindow));
            GlideTouch.Initialize();

            sensor_prox = new SensorProximidad(extender);

            //Inicializa los botones en la interface
            btn_start           = (Button)controlWindow.GetChildByName("start");
            btn_stop            = (Button)controlWindow.GetChildByName("stop");
            btn_start.TapEvent += btn_start_TapEvent;
            btn_stop.TapEvent  += btn_stop_TapEvent;

            actual = Estado.ESTADO_1;

            camera.CameraConnected += camera_CameraConnected;
            camera.BitmapStreamed  += camera_BitmapStreamed;
            //Selecciona mainWindow como la ventana de inicio
            Glide.MainWindow = controlWindow;

            sensor_prox.ObjectOn  += sensor_prox_ObjectOn;
            sensor_prox.ObjectOff += sensor_prox_ObjectOff;
        }
예제 #3
0
        // This method is run when the mainboard is powered up or reset.
        void ProgramStarted()
        {
            /*******************************************************************************************
            Modules added in the Program.gadgeteer designer view are used by typing
            their name followed by a period, e.g.  button.  or  camera.

            Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
                button.ButtonPressed +=<tab><tab>

            If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
                GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
                timer.Tick +=<tab><tab>
                timer.Start();
            *******************************************************************************************/

            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");

            //Carga las ventanas
            controlWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.controlWindow));
            camaraWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.camaraWindow));
            GlideTouch.Initialize();
            sensor = new SensorProximidad(extender);

            //Inicializa los botones en la interface

            camera.BitmapStreamed += camera_BitmapStreamed;
            text  = (TextBlock)controlWindow.GetChildByName("status");
            btn_start = (Button)controlWindow.GetChildByName("start");
            btn_stop = (Button)controlWindow.GetChildByName("stop");
            sensor.ObjectOn += sensor_ObjectOn;
            sensor.ObjectOff += sensor_ObjectOff;
            btn_start.TapEvent += btn_start_TapEvent;
            btn_stop.TapEvent += btn_stop_TapEvent;

            //Selecciona mainWindow como la ventana de inicio
            Glide.MainWindow = controlWindow;
        }