예제 #1
0
		public void Add(CommandInfo cmd)
		{
			lock (_cmds)
			{
				_cmds.Enqueue(cmd);
			}
		}
예제 #2
0
		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);
			}
		}
예제 #3
0
		public void Add(CommandInfo.CommandTypeOption type, string data)
		{
			CommandInfo cmd = new CommandInfo(type, data);
			Add(cmd);
		}
예제 #4
0
		public static void Execute(CommandInfo cmd)
		{
			if (cmd.CommandType == CommandInfo.CommandTypeOption.MouseMove)
			{
				MouseMove(cmd.Data);
			}
		}