コード例 #1
0
ファイル: DeskTopScreenShot.cs プロジェクト: WildGenie/Camera
        public void initialButtons()
        {
            //初始化按钮
            cancel = new CameraButtons();
            this.Controls.Add(cancel);
            cancel.BackIcon = Properties.Resources.Cancel;
            cancel.Size     = cancel.getSize();
            cancel.Location = new Point(this.Width - cancel.Width * 4, this.Height - cancel.Height * 3 / 2);
            cancel.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;

            clipboard = new CameraButtons();
            this.Controls.Add(clipboard);
            clipboard.BackIcon = Properties.Resources.Clipboard;
            clipboard.Size     = clipboard.getSize();
            clipboard.Location = new Point(this.Width - cancel.Width * 6, this.Height - cancel.Height * 3 / 2);
            clipboard.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;

            cur_Page = new CameraButtons();
            this.Controls.Add(cur_Page);
            cur_Page.BackIcon = Properties.Resources.Cur_Page;
            cur_Page.Size     = cur_Page.getSize();
            cur_Page.Location = new Point(this.Width - cancel.Width * 8, this.Height - cancel.Height * 3 / 2);
            cur_Page.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;

            //注册鼠标单击事件
            this.cancel.MouseClick    += cancel_Click;
            this.clipboard.MouseClick += clipboard_Click;
            this.cur_Page.MouseClick  += cur_Page_Click;
        }
コード例 #2
0
ファイル: DeskTopScreenShot.cs プロジェクト: qucc/Camera
        public void initialButtons()
        {
            //初始化按钮
            cancel = new CameraButtons();
            this.Controls.Add(cancel);
            cancel.BackIcon = Properties.Resources.Cancel;
            cancel.Size = cancel.getSize();
            cancel.Location = new Point(this.Width - cancel.Width * 4, this.Height - cancel.Height * 3 / 2);
            cancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

            clipboard = new CameraButtons();
            this.Controls.Add(clipboard);
            clipboard.BackIcon = Properties.Resources.Clipboard;
            clipboard.Size = clipboard.getSize();
            clipboard.Location = new Point(this.Width - cancel.Width * 6, this.Height - cancel.Height * 3 / 2);
            clipboard.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

            cur_Page = new CameraButtons();
            this.Controls.Add(cur_Page);
            cur_Page.BackIcon = Properties.Resources.Cur_Page;
            cur_Page.Size = cur_Page.getSize();
            cur_Page.Location = new Point(this.Width - cancel.Width * 8, this.Height - cancel.Height * 3 / 2);
            cur_Page.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

            //注册鼠标单击事件
            this.cancel.MouseClick += cancel_Click;
            this.clipboard.MouseClick += clipboard_Click;
            this.cur_Page.MouseClick += cur_Page_Click;
        }
コード例 #3
0
ファイル: CameraCapture.cs プロジェクト: WildGenie/Camera
        public void initCaptureUI()
        {
            if (transparencyPanel == null)
            {
                transparencyPanel = new TransparencyPanel();
            }
            transparencyPanel.Dock   = DockStyle.Fill;
            transparencyPanel.Parent = this.videoSourcePlayer;
            this.videoSourcePlayer.Controls.Add(transparencyPanel);
            transparencyPanel.BringToFront();

            //返回按钮
            if (return_Btn == null)
            {
                this.return_Btn = new CameraButtons();
            }
            //return_Btn.Parent = this.transparencyPanel;
            this.transparencyPanel.Controls.Add(return_Btn);

            return_Btn.BackIcon = Properties.Resources._9;
            return_Btn.Location = new System.Drawing.Point(48, 29);
            return_Btn.Anchor   = AnchorStyles.Left | AnchorStyles.Top;
            return_Btn.Size     = return_Btn.getSize();

            //切换相机
            if (cameraSwitched_Btn == null)
            {
                this.cameraSwitched_Btn = new CameraButtons();
            }
            // videoSourcePlayer.Controls.Add(cameraSwitched_Btn);
            this.transparencyPanel.Controls.Add(cameraSwitched_Btn);
            cameraSwitched_Btn.BackIcon = Properties.Resources._8;
            cameraSwitched_Btn.Location = new System.Drawing.Point(210, 389);
            cameraSwitched_Btn.Size     = cameraSwitched_Btn.getSize();
            cameraSwitched_Btn.Anchor   = AnchorStyles.Right | AnchorStyles.Bottom;

            //添加事件
            this.return_Btn.MouseClick         += return_Btn_Click;
            this.cameraSwitched_Btn.MouseClick += CameraSwitched_Click;
            this.transparencyPanel.MouseClick  += videoSourcePlayer_Click;
        }
コード例 #4
0
ファイル: CroppedForm.cs プロジェクト: WildGenie/Camera
        public void initPreviewUI()
        {
            //裁剪按钮
            if (cropped_Btn == null)
            {
                this.cropped_Btn = new CameraButtons();
            }
            this.Controls.Add(cropped_Btn);
            cropped_Btn.BackIcon = Properties.Resources._7;
            cropped_Btn.Size     = cropped_Btn.getSize();
            cropped_Btn.Location = new System.Drawing.Point(this.Width - cropped_Btn.Width * 8, this.Height - cropped_Btn.Height * 3 / 2);
            cropped_Btn.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;

            //确定按钮
            if (ok_Btn == null)
            {
                this.ok_Btn = new CameraButtons();
            }
            this.Controls.Add(ok_Btn);
            ok_Btn.BackIcon = Properties.Resources._3;
            ok_Btn.Location = new System.Drawing.Point(this.Width - cropped_Btn.Width * 6, this.Height - cropped_Btn.Height * 3 / 2);
            ok_Btn.Size     = ok_Btn.getSize();
            ok_Btn.Anchor   = AnchorStyles.Right | AnchorStyles.Bottom;

            //取消按钮
            if (cancelled_Btn == null)
            {
                this.cancelled_Btn = new CameraButtons();
            }
            this.Controls.Add(cancelled_Btn);
            cancelled_Btn.BackIcon = Properties.Resources._4;
            cancelled_Btn.Location = new System.Drawing.Point(this.Width - cropped_Btn.Width * 4, this.Height - cropped_Btn.Height * 3 / 2);
            cancelled_Btn.Size     = cancelled_Btn.getSize();
            cancelled_Btn.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;

            this.ok_Btn.MouseClick        += OK_Click;
            this.cropped_Btn.MouseClick   += crop_Click;
            this.cancelled_Btn.MouseClick += cancelled_Click;
        }