Пример #1
0
        public PictureTaker(Camera cam)
        {
            InitializeComponent();
            Count = 3;
            _cam = cam;

            Rectangle screen = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
            this.WindowState = FormWindowState.Normal;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.FormBorderStyle = FormBorderStyle.None;
            this.Size = new Size(_cam.Width + 200, _cam.Height + 125);

            picboxPhoto.Size = new Size(_cam.Width, _cam.Height);
            picboxPhoto.Location = new Point(this.Width / 2 - _cam.Width / 2, this.Height - cam.Height -10);

            lblCount.Location = new Point(this.Width / 2 - lblCount.Width / 2, 15);
            Application.Idle += refreshImage;
        }
Пример #2
0
        private void initGraphic()
        {
            topScoreDisplay = new List<Panel>();

            // Let's put the screen to full size
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;

            Rectangle screen = Screen.GetBounds(this);
            pnlGameDrawingZone.Size = new Size(900, 1080);
            pnlGameDrawingZone.Location = new Point(100, -15);

            pnlTopScore.Size = new Size(600, screen.Height);
            pnlTopScore.Location = new Point(1000, -15);

            lblTopScore.Location = new Point(90, 15);

            _cam = new Camera(768,480);
        }