⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmpreview.cs

📁 通过手机蓝牙控制个人电脑上的幻灯片的播放
💻 CS
字号:
#region Using directives

using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using System.IO;
#endregion

namespace UI
{
    /// <summary>
    /// Summary description for frmTVTunerMulti.
    /// </summary>
    public class frmPreview : System.Windows.Forms.Form
    {
        private PictureBox pictureBox1;
        private MenuItem menuItem1;
        private MenuItem menuItem2;
        BTHWrapper.BTHConnector _connector;
        /// <summary>
        /// Main menu for the form.
        /// </summary>
        private System.Windows.Forms.MainMenu mainMenu1;

        public frmPreview(BTHWrapper.BTHConnector inConn)
        {
            _connector = inConn;
            InitializeComponent();
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.Add(this.menuItem1);
            this.mainMenu1.MenuItems.Add(this.menuItem2);
            // 
            // menuItem1
            // 
            this.menuItem1.Text = "Return";
            this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
            // 
            // menuItem2
            // 
            this.menuItem2.Text = "Capture";
            this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
            // 
            // pictureBox1
            // 
            this.pictureBox1.Location = new System.Drawing.Point(14, 0);
            this.pictureBox1.Size = new System.Drawing.Size(212, 266);
            // 
            // frmPreview
            // 
            this.BackColor = System.Drawing.SystemColors.InfoText;
            this.ClientSize = new System.Drawing.Size(240, 266);
            this.Controls.Add(this.pictureBox1);
            this.Menu = this.mainMenu1;
            this.Text = "Screen Capture";

        }

        #endregion

        private void menuItem2_Click(object sender, EventArgs e)
        {
            _connector.SendMessage("PIC");
            byte[] ba = Convert.FromBase64String(_connector.RecvData());
            MemoryStream stream = new MemoryStream(ba);
            Bitmap bm = new Bitmap(stream);
            pictureBox1.Image = bm;
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            /// <summary>
            /// SignalOut to change to this channel
            /// </summary>
            this.Dispose();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -