📄 frmremotecontrol.cs
字号:
#region Using directives
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
#endregion
namespace UI
{
/// <summary>
/// Summary description for frmMouseControl.
/// </summary>
public class frmRemoteControl : System.Windows.Forms.Form
{
private Label lbl1;
private Label lbl2;
private Label lbl3;
private Label lbl4;
private Label lbl6;
private Label lbl8;
private Label lblStar;
private Label lblSharp;
private Label lbl5;
private Label lbl7;
private Label lbl9;
private Label lbl0;
private string filePath = @"\Storage\fypIcon\";
#region const int of KeyEvent
/// <summary>
/// Menu Choice
/// </summary>
/// Reordered at 19 March
private const int MCE_MENU = 1;
private const int TV_MENU = 2;
private const int VIDEO_MENU = 3;
private const int MOUSE_MENU = 4;
private const int NUM_MENU = 5;
private const int TEXT_INPUT_MENU = 8;
private const int PPT_MENU = 6;
private const int ACRO_MENU = 7;
/// <summary>
/// Mouse
/// </summary>
private const int MOUSE_ENTER = 100;
private const int MOUSE_UP = 101;
private const int MOUSE_ALT = 102;
private const int MOUSE_LEFT = 103;
private const int MOUSE_RIGHT = 105;
private const int MOUSE_DOWN = 107;
private const int MOUSE_SPEED = 109;
/// <summary>
/// Video
/// </summary>
private const int VIDEO_REC = 200;
private const int VIDEO_STOP = 202;
private const int VIDEO_REW = 203;
private const int VIDEO_PLAY = 204;
private const int VIDEO_FWD = 205;
private const int VIDEO_REPLAY = 206;
private const int VIDEO_PAUSE = 207;
private const int VIDEO_SKIP = 208;
/// <summary>
/// TV
/// </summary>
private const int TV_VOL_UP = 300;
private const int TV_VOL_MUTE = 301;
private const int TV_CHAN_UP = 302;
private const int TV_VOL_DOWN = 303;
private const int TV_CHAN_DOWN = 305;
/// <summary>
/// PPT
/// </summary>
/// Added at March 19
private const int PPT_START = 400;
private const int PPT_STOP = 401;
private const int PPT_PREVIOUS = 402;
private const int PPT_NEXT = 403;
private const int PPT_FIRST = 404;
private const int PPT_LAST = 405;
//no 406
private const int PPT_EXIT = 407;
private const int PPT_MAXMIN = 410;
/// <summary>
/// Number
/// </summary>
private const int NUM_0 = 500;
private const int NUM_1 = 501;
private const int NUM_2 = 502;
private const int NUM_3 = 503;
private const int NUM_4 = 504;
private const int NUM_5 = 505;
private const int NUM_6 = 506;
private const int NUM_7 = 507;
private const int NUM_8 = 508;
private const int NUM_9 = 509;
/// <summary>
/// MCE Navigate
/// </summary>
/// Added var at 19 March
private const int MCE_MY_TV = 600;
private const int MCE_UP = 601;
private const int MCE_MY_MUSIC = 602;
private const int MCE_LEFT = 603;
private const int MCE_OK = 604;
private const int MCE_RIGHT = 605;
private const int MCE_MY_PICTURES = 606;
private const int MCE_DOWN = 607;
private const int MCE_MY_VIDEO = 608;
private const int MCE_BACK = 609;
private const int MCE_MAXMIN = 610;
private const int MCE_INFO = 611;
private const int MCE_OPEN = 612;
private const int MCE_CLOSE = 613;
private const int MCE_CLEAR = 614;
/// <summary>
/// Acrobat Control
/// </summary>
private const int ACRO_UP = 701;
private const int ACRO_DOWN = 702;
private const int ACRO_LEFT = 703;
private const int ACRO_RIGHT = 704;
private const int ACRO_PAGEUP = 705;
private const int ACRO_PAGEDOWN = 706;
private const int ACRO_FULLSCREEN = 707;
private const int ACRO_ZOOM = 708;
private const int ACRO_MAXMIN = 709;
//private const int ACRO_MIN = 710;
private const int ACRO_CLOSE = 710;
/// <summary>
/// System Control
/// </summary>
private const int SYSTEM_LOGOUT = 801;
private const int SYSTEM_REBOOT = 802;
private const int SYSTEM_SHUTDOWN = 803;
/// <summary>
/// Mouse Speed setting
/// </summary>
private const int MOUSE_SPEED_1 = 901;
private const int MOUSE_SPEED_2 = 902;
private const int MOUSE_SPEED_3 = 903;
private const int MOUSE_SPEED_4 = 904;
private const int MOUSE_SPEED_5 = 905;
private const int MOUSE_SPEED_6 = 906;
private const int MOUSE_SPEED_7 = 907;
#endregion
#region string KeyEvent
private string strMOUSE_MENU = "Mouse Menu";
private string strVIDEO_MENU = "Playback Menu";
private string strTV_MENU = "Sound Menu";
private string strPPT_MENU = "PPT Menu";
private string strACRO_MENU = "Acrobat Menu";
private string strNUM_MENU = "Number Menu";
private string strMCE_MENU = "MCE Menu";
private string strTEXT_INPUT_MENU = "Text Input Menu";
/// <summary>
/// Mouse
/// </summary>
private string strMOUSE_ENTER = "Mouse Left Click";
private string strMOUSE_UP = "Move Cursor Up";
private string strMOUSE_ALT = "Mouse Right Click";
private string strMOUSE_LEFT = "Move Cursor Left";
private string strMOUSE_RIGHT = "Move Cursor Right";
private string strMOUSE_DOWN = "Move Cursor Down";
private string strMOUSE_SPEED = "Set Mouse Speed";
/// <summary>
/// Video
/// </summary>
private string strVIDEO_REC = "Record";
private string strVIDEO_STOP = "Stop";
private string strVIDEO_REW = "Rewind";
private string strVIDEO_PLAY = "Play";
private string strVIDEO_FWD = "Fast Forward";
private string strVIDEO_REPLAY = "Replay";
private string strVIDEO_PAUSE = "Pause";
private string strVIDEO_SKIP = "Skip";
/// <summary>
/// TV
/// </summary>
private string strTV_VOL_UP = "Volume Up";
private string strTV_VOL_MUTE = "Volume Mute";
private string strTV_CHAN_UP = "Channel Up";
private string strTV_VOL_DOWN = "Volume Down";
private string strTV_CHAN_DOWN = "Channel Down";
/// <summary>
/// PPT
/// </summary>
/// Added on March 19
private string strPPT_START = "Start slideshow";
private string strPPT_STOP = "Stop slideshow";
private string strPPT_PREVIOUS = "Previous slide";
private string strPPT_NEXT = "Next slide";
private string strPPT_FIRST = "First slide";
private string strPPT_LAST = "Last slide";
private string strPPT_EXIT = "PPT Exit";
private string strPPT_MAXMIN = "PPT Maximize/Minimize";
/// <summary>
/// ACROBAT
/// </summary>
private string strACRO_PREVIOUS = "Previous page";
private string strACRO_NEXT = "Next slide";
private string strACRO_UP = "Move up";
private string strACRO_DOWN = "Move down";
private string strACRO_LEFT = "Move left";
private string strACRO_RIGHT = "Move right";
private string strACRO_EXIT = "Acrobat reader Exit";
private string strACRO_MAXMIN = "Acrobat reader Maximize/Minimize";
//private string strACRO_MIN = "Acrobat reader Minimize";
private string strACRO_ZOOM = "Zoom";
/// <summary>
/// Number
/// </summary>
private string strNUM_0 = "0";
private string strNUM_1 = "1";
private string strNUM_2 = "2";
private string strNUM_3 = "3";
private string strNUM_4 = "4";
private string strNUM_5 = "5";
private string strNUM_6 = "6";
private string strNUM_7 = "7";
private string strNUM_8 = "8";
private string strNUM_9 = "9";
/// <summary>
/// MCE Navigate
/// </summary>
/// Added var at 19 March
private string strMCE_MY_TV = "Show My TV";
private string strMCE_UP = "Move Up";
private string strMCE_MY_MUSIC = "Show My Music";
private string strMCE_LEFT = "Move Left";
private string strMCE_OK = "OK";
private string strMCE_RIGHT = "Move Right";
private string strMCE_MY_PICTURES = "Show My Pictures";
private string strMCE_DOWN = "Move Down";
private string strMCE_MY_VIDEO = "Show My Video";
private string strMCE_BACK = "Back";
private string strMCE_MAXMIN = "MCE Maximize/Minimize";
private string strMCE_INFO = "MCE get more info";
private string strMCE_OPEN = "MCE Open";
private string strMCE_CLOSE = "MCE Close";
private string strMCE_CLEAR = "Clear";
#endregion
private MenuItem menuItemMainMenu;
private int menuChoice = 1;
private const int MAX_NUM_MENU = 7;
/// <summary>
/// Main menu for the form.
/// </summary>
private System.Windows.Forms.MainMenu mainMenuRC;
private PictureBox pictureBox1;
private PictureBox pictureBox2;
private PictureBox pictureBox3;
private PictureBox pictureBox4;
private PictureBox pictureBox5;
private PictureBox pictureBox6;
private PictureBox pictureBox7;
private PictureBox pictureBox8;
private PictureBox pictureBox9;
private PictureBox pictureBoxStar;
private PictureBox pictureBox0;
private PictureBox pictureBoxSharp;
BTHWrapper.BTHConnector _connector;
private Label lblTop;
private PictureBox pictureBoxDpad;
private MenuItem menuItem1;
private MenuItem menuItem2;
Status _Status = new Status();
frmPreview _frmPreview;
frmFileBrower _frmBrower;
frmMouseSpeed _frmMouseSpeed;
private ImageList imageListPPT;
private ImageList imageListTV;
private ImageList imageListSYS;
private ImageList imageListVIDEO;
private ImageList imageListACRO;
private ImageList imageListNUM;
private ImageList imageListMCE;
private ImageList imageListMOUSE;
private ImageList imageListDPAD;
frmSendText _frmSendText;
public frmRemoteControl(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()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -