Пример #1
0
        public void selectColor(ref couleur couleurEquipe, GHIElectronics.NETMF.Glide.Display.Window windowA)
        {
            // Do one-time tasks here
            GlideTouch.Initialize();

            // Load the Window XML
            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.windowSelectColor));

            // Resize any loaded Window to the LCD's size.
            Glide.FitToScreen = true;

            // Assign the Window to MainWindow; rendering it to the LCD.
            Glide.MainWindow = window;
            Tween.SlideWindow(windowA, window, Direction.Up);
            // Get the Buttons
            GHIElectronics.NETMF.Glide.UI.Button boutonRed = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("boutonRed");
            GHIElectronics.NETMF.Glide.UI.Button boutonBlue = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("boutonBlue");

            // Set up event handlers
            boutonRed.TapEvent += new OnTap(buttonRed_TapEvent);
            boutonBlue.TapEvent += new OnTap(buttonBlue_TapEvent);

            while (m_couleur == couleur.NONE) ;
            couleurEquipe = m_couleur;
        }
Пример #2
0
        public void selectPos(ref short choix, GHIElectronics.NETMF.Glide.Display.Window windowA)
        {
            // Do one-time tasks here
            GlideTouch.Initialize();

            // Load the Window XML
            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.windowSelectPos));

            // Resize any loaded Window to the LCD's size.
            Glide.FitToScreen = true;

            // Assign the Window to MainWindow; rendering it to the LCD.
            Glide.MainWindow = window;
            Tween.SlideWindow(windowA, window, Direction.Up);
            // Get the Buttons
            GHIElectronics.NETMF.Glide.UI.Button bouton1 = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("bouton1");
            GHIElectronics.NETMF.Glide.UI.Button bouton2 = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("bouton2");
            GHIElectronics.NETMF.Glide.UI.Button bouton3 = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("bouton3");
            GHIElectronics.NETMF.Glide.UI.Button bouton4 = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("bouton4");
            GHIElectronics.NETMF.Glide.UI.Button bouton5 = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("bouton5");

            // Set up event handlers
            bouton1.TapEvent += new OnTap(bouton1_TapEvent);
            bouton2.TapEvent += new OnTap(bouton2_TapEvent);
            bouton3.TapEvent += new OnTap(bouton3_TapEvent);
            bouton4.TapEvent += new OnTap(bouton4_TapEvent);
            bouton5.TapEvent += new OnTap(bouton5_TapEvent);
            //Wait
            while (m_boutonSelect == false) ;
            //init selector
            m_boutonSelect = false;
            //return choix
            choix = m_choix;
        }
Пример #3
0
        public void principal(ref modeFonctionnement mode,ref couleur couleur, ref int choix)
        {
            // Do one-time tasks here
            GlideTouch.Initialize();

            // Load the Window XML
            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.windowPrincipal));

            // Resize any loaded Window to the LCD's size.
            Glide.FitToScreen = true;

            // Assign the Window to MainWindow; rendering it to the LCD.
            Glide.MainWindow = window;

            // Get the Buttons
            GHIElectronics.NETMF.Glide.UI.Button boutonJouer = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("boutonJouer");
            GHIElectronics.NETMF.Glide.UI.Button boutonHomologation = (GHIElectronics.NETMF.Glide.UI.Button)window.GetChildByName("boutonHomologation");

            // Set up event handlers
            boutonJouer.TapEvent += new OnTap(boutonJouer_TapEvent);
            boutonHomologation.TapEvent += new OnTap(boutonHomologation_TapEvent);
            // Wait
            while (m_boutonSelect == false) ;
            if (enAttendant == 1)
            {
                IhmColor.selectColor(ref m_couleur, window);
                IhmPos.selectPos(ref m_choix, window);
            }
            else
            {
            }

            // init selecteur
            m_boutonSelect = false;

            //---passage param
            // modeFonctionnement
            mode = m_mode;
            //couleur
            couleur = m_couleur;
            //choix position
            choix = m_choix;
        }