DataStructs.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. namespace NTERA.Core.Interop
  3. {
  4. public enum ConsoleRedraw
  5. {
  6. None = 0,
  7. Normal = 1
  8. }
  9. public enum DisplayLineAlignment
  10. {
  11. LEFT = 0,
  12. CENTER = 1,
  13. RIGHT = 2
  14. }
  15. public enum InputType
  16. {
  17. EnterKey = 1,//Enterキーかクリック
  18. AnyKey = 2,//なんでもいいから入力
  19. IntValue = 3,//整数値。OneInputかどうかは別の変数で
  20. StrValue = 4,//文字列。
  21. Void = 5//入力不能。待つしかない→スキップ中orマクロ中ならなかったことになる
  22. }
  23. // 1819追加 入力・表示系とData、Process系の結合を弱くしよう計画の一つ
  24. // できるだけ間にクッションをおいていきたい。最終的には別スレッドに
  25. //クラスを毎回使い捨てるのはどうなんだろう 使いまわすべきか
  26. public class InputRequest
  27. {
  28. public InputRequest()
  29. {
  30. ID = LastRequestID++;
  31. }
  32. public readonly Int64 ID;
  33. public InputType InputType;
  34. public bool NeedValue => (InputType == InputType.IntValue || InputType == InputType.StrValue);
  35. public bool OneInput = false;
  36. public bool StopMesskip = false;
  37. public bool IsSystemInput = false;
  38. public bool HasDefValue = false;
  39. public long DefIntValue;
  40. public string DefStrValue;
  41. public long Timelimit = -1;
  42. public bool DisplayTime;
  43. public string TimeUpMes;
  44. static Int64 LastRequestID;
  45. }
  46. }