Esempio n. 1
0
		public void Add(CommandInfo cmd)
		{
			lock (_cmds)
			{
				_cmds.Enqueue(cmd);
			}
		}
		private void PictureBox1MouseMove(object sender, MouseEventArgs e)
		{
			if (pictureBox1.BackgroundImage != null)
			{
				int cursorX = e.X * pictureBox1.BackgroundImage.Width / pictureBox1.Width;
				int cursorY = e.Y * pictureBox1.BackgroundImage.Height / pictureBox1.Height;
				string data = cursorX + "," + cursorY;
				CommandInfo cmd = new CommandInfo(CommandInfo.CommandTypeOption.MouseMove, data);
				ViewerService.Commands.Add(cmd);
			}
		}
Esempio n. 3
0
		public void Add(CommandInfo.CommandTypeOption type, string data)
		{
			CommandInfo cmd = new CommandInfo(type, data);
			Add(cmd);
		}
Esempio n. 4
0
		public static void Execute(CommandInfo cmd)
		{
			if (cmd.CommandType == CommandInfo.CommandTypeOption.MouseMove)
			{
				MouseMove(cmd.Data);
			}
		}