Beispiel #1
0
        /// <summary>
        /// Met à jour le modèle sélectionné, affiche son nom, sa description et rafraîchit le panel
        /// </summary>
        private void updateModele()
        {
            // set modele's hand to the selected modele
            modeleHand = (MyHand)cbxModele.SelectedItem;

            // if there is modele hand saved
            if (modeleHand != null)
            {
                // show name, description and picture
                lblName.Text        = modeleHand.Name;
                lblDescription.Text = modeleHand.Description;
                if (modeleHand.Image != null)
                {
                    pbxModele.Image = stringToImage(modeleHand.Image);
                }
                else
                {
                    pbxModele.Image = Properties.Resources.no_image_available;
                }
            }
            else
            {
                lblName.Text        = "Aucun modèle";
                lblDescription.Text = "Aucun modèle n'est chargé. Créez-en ou sélectionnez-en un !";
                pbxModele.Image     = Properties.Resources.no_image_available;
            }

            lblName.Visible        = true;
            lblDescription.Visible = true;

            pnlModelHand.Invalidate();
        }
Beispiel #2
0
        /// <summary>
        /// create new modele form
        /// </summary>
        /// <param name="fingersNormPos">finger's normalized position</param>
        /// <param name="palmNormPos">palm's normalized position</param>
        public frmNewModele(MyHand handToSave)
        {
            InitializeComponent();
            DoubleBuffered = true;

            leapController = new LeapController();
            paint          = new Paint();
            paint.GetPanelSize(pnlModele.Width, pnlModele.Height);
            serialization = new Serialization();

            this.currentPosition = handToSave;
        }
Beispiel #3
0
        /// <summary>
        /// default constructor
        /// </summary>
        /// <param name="modelHand">the position to edit</param>
        public frmEdit(MyHand modelHand)
        {
            InitializeComponent();

            handToEdit      = modelHand;
            nameHandToEdit  = modelHand.Name;
            imageHandToEdit = modelHand.Image;

            serialization = new Serialization();

            tbxName.Text        = modelHand.Name;
            tbxDescription.Text = modelHand.Description;
        }
Beispiel #4
0
 /// <summary>
 /// Refresh panel on each tick
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void timer1_Tick(object sender, EventArgs e)
 {
     userHand = leapController.UserHand;
     pnlUserHand.Invalidate();
 }