Exemplo n.º 1
0
        public TestHand()
        {
            InitializeComponent();
            ucHandMovement handMove = new ucHandMovement();

            handMove.Location = new Point(10, 10);
            handMove.Parent   = this;
        }
Exemplo n.º 2
0
        public Paint()
        {
            InitializeComponent();

            for (int i = 1; i < 14; i++)
            {
                MetroFramework.Controls.MetroTile _Tile = new MetroFramework.Controls.MetroTile();
                _Tile.Size = new Size(30, 30);
                _Tile.Tag  = i;
                _Tile.UseCustomBackColor = true;
                _Tile.BackColor          = listColor[i];
                _Tile.Click += (sender, e) =>
                {
                    mtitleCurrentColor.UseCustomBackColor = true;
                    mtitleCurrentColor.BackColor          = _Tile.BackColor;

                    mtitleCurrentColor.Refresh();
                };
                flColors.Controls.Add(_Tile);
            }
            mtitleCurrentColor.BackColor = Color.Blue;
            doubleBuffer = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, picPaint.CreateGraphics());
            Graphics g = Graphics.FromImage(doubleBuffer);

            g.Clear(Color.White);
            fillImage = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, picPaint.CreateGraphics());
            g         = Graphics.FromImage(fillImage);
            g.Clear(Color.White);
            grapList = new GraphicsList();
            pen      = pn_penWidth.CreateGraphics();

            #region Set for recognizer
            speechReg = new SpeechRecognition();
            #endregion

            #region Setup Handgesture
            ucHandGesture         = new ucHandMovement();
            ucHandGesture.Parent  = metroPanel1;
            ucHandGesture.Dock    = DockStyle.Bottom;
            ucHandGesture.Enabled = false;
            ucHandGesture.Visible = false;
            #endregion
        }