You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB

  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace SeleniumBrowser
  6. {
  7. public class CommandInfo
  8. {
  9. public const string EVENT_SETURL = "seturl";
  10. public const string EVENT_SETURL_INCOGNITO = "seturl_incognito";
  11. public const string EVENT_SENDKEY = "sendkey";
  12. public const string EVENT_PASTE = "paste";
  13. public const string EVENT_SLEEP = "sleep";
  14. public const string EVENT_POSITION_CLICK = "position_click";
  15. public const string EVENT_SETVALUETOUPLOADDLG = "setvaluetouploaddlg";
  16. public const string EVENT_CHECKWINDOWEXIST = "checkwindowexist";
  17. public const string EVENT_IMAGE_CLICK = "image_click";
  18. public const string EVENT_IMAGES_CLICK = "images_click";
  19. public const string EVENT_MOUSE_MOVE = "mouse_move";
  20. public const string EVENT_MOUSE_SCROLL = "mouse_scroll";
  21. public const string EVENT_FB_REMOVE_ALLMEDIA = "fb_remove_allmedia";
  22. private const string _ValuecKey = "_vk0x48";
  23. [JsonIgnore]
  24. public string Value
  25. {
  26. get { return Parameters.ContainsKey(_ValuecKey) ? Parameters[_ValuecKey] : null; }
  27. set { if (Parameters.ContainsKey(_ValuecKey)) { Parameters[_ValuecKey] = value; } else { Parameters.Add(_ValuecKey, value); } }
  28. }
  29. public Dictionary<string, string> Parameters { get; set; } = new Dictionary<string, string>();
  30. public int SleepAfterEvent { get; set; } = 1;
  31. public string Command { get; set; }
  32. public int WaitTargetMilliSecond { get; set; } = 1000;
  33. public int TargetNo { get; set; } = 0;
  34. public bool SetMainBrowserFocus { get; set; } = false;
  35. public int Repeat { get; set; } = 1;
  36. }
  37. }