EventArgs.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Drawing;
  3. namespace FastReport.FastQueryBuilder
  4. {
  5. internal class AddTableEventArgs : EventArgs
  6. {
  7. public AddTableEventArgs(Table table, Point position, string alias = "")
  8. {
  9. if (table == null)
  10. new Exception("The table should not be nill");
  11. this.table = table;
  12. this.position = position;
  13. this.alias = alias;
  14. }
  15. public Table table;
  16. public Point position;
  17. public string alias;
  18. public ITableView tableView;
  19. }
  20. internal delegate void AddTableEventHandler(object sender, AddTableEventArgs ate);
  21. internal class AddLinkEventArgs : EventArgs
  22. {
  23. public AddLinkEventArgs(Field from, Field to)
  24. {
  25. this.fieldFrom = from;
  26. this.fieldTo = to;
  27. useDefaults = true;
  28. }
  29. public AddLinkEventArgs(Field from, Field to, QueryEnums.JoinTypes joinType, QueryEnums.WhereTypes whereType)
  30. {
  31. this.fieldFrom = from;
  32. this.fieldTo = to;
  33. this.joinType = joinType;
  34. this.whereType = whereType;
  35. }
  36. public Field fieldFrom;
  37. public Field fieldTo;
  38. public QueryEnums.JoinTypes joinType;
  39. public QueryEnums.WhereTypes whereType;
  40. public bool useDefaults;
  41. }
  42. internal delegate void AddLinkEventHandler(object sender, AddLinkEventArgs ate);
  43. internal class CheckFieldEventArgs : EventArgs
  44. {
  45. public CheckFieldEventArgs(Field field)
  46. {
  47. if (field == null)
  48. new Exception("The field should not be nill");
  49. this.field = field;
  50. }
  51. public Field field;
  52. public bool value;
  53. }
  54. internal delegate void CheckFieldEventHandler(object sender, CheckFieldEventArgs ate);
  55. }