ProjectSetupActions.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using Comal.Classes;
  2. using InABox.DynamicGrid;
  3. using InABox.Wpf;
  4. using PRSDesktop.Components.Spreadsheet;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace PRSDesktop;
  10. public static class ProjectSetupActions
  11. {
  12. public static void JobStageTypes(IPanelHost host)
  13. {
  14. host.CreateSetupActionIfCanView<JobStageType>("Job Stage Types", PRSDesktop.Resources.view, (action) =>
  15. {
  16. var list = new MasterList(typeof(JobStageType));
  17. list.ShowDialog();
  18. });
  19. }
  20. public static void JobStatuses(IPanelHost host)
  21. {
  22. host.CreateSetupActionIfCanView<JobStatus>("Job Statuses", PRSDesktop.Resources.view, (action) =>
  23. {
  24. var list = new MasterList(typeof(JobStatus));
  25. list.ShowDialog();
  26. });
  27. }
  28. public static void DocumentMilestones(IPanelHost host)
  29. {
  30. host.CreateSetupAction("Document MileStones", PRSDesktop.Resources.revision, (action) =>
  31. {
  32. var list = new MasterList(typeof(JobDocumentSetMileStoneType));
  33. list.ShowDialog();
  34. });
  35. }
  36. public static void JobScopeStatuses(IPanelHost host)
  37. {
  38. host.CreateSetupActionIfCanView<JobScope>("Job Scope Statuses", PRSDesktop.Resources.view, (action) =>
  39. {
  40. var list = new MasterList(typeof(JobScopeStatus));
  41. list.ShowDialog();
  42. });
  43. }
  44. public static void JobRetentionTypes(IPanelHost host)
  45. {
  46. host.CreateSetupActionIfCanView<JobRetentionType>("Job Retention Types", PRSDesktop.Resources.view, (action) =>
  47. {
  48. var list = new MasterList(typeof(JobRetentionType));
  49. list.ShowDialog();
  50. });
  51. }
  52. public static void DrawingTemplates(IPanelHost host)
  53. {
  54. host.CreateSetupAction("Drawing Templates", PRSDesktop.Resources.doc_misc, (action) =>
  55. {
  56. var list = new MasterList(typeof(DrawingTemplate));
  57. list.ShowDialog();
  58. });
  59. }
  60. public static void JobSpreadsheetTemplates(IPanelHost host)
  61. {
  62. host.CreateSetupActionIfCanView<JobSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  63. {
  64. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Job>();
  65. });
  66. }
  67. public static void SetoutGroups(IPanelHost host)
  68. {
  69. host.CreateSetupActionIf<CanConfigureFactoryFloor>("Setout Groups", PRSDesktop.Resources.draw, (action) =>
  70. {
  71. var list = new MasterList(typeof(SetoutGroup));
  72. list.ShowDialog();
  73. });
  74. }
  75. }