ProjectSetupActions.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 JobStatuses(IPanelHost host)
  13. {
  14. host.CreateSetupActionIfCanView<JobStatus>("Job Statuses", PRSDesktop.Resources.view, (action) =>
  15. {
  16. var list = new MasterList(typeof(JobStatus));
  17. list.ShowDialog();
  18. });
  19. }
  20. public static void DocumentMilestones(IPanelHost host)
  21. {
  22. host.CreateSetupAction("Document MileStones", PRSDesktop.Resources.revision, (action) =>
  23. {
  24. var list = new MasterList(typeof(JobDocumentSetMileStoneType));
  25. list.ShowDialog();
  26. });
  27. }
  28. public static void JobScopeStatuses(IPanelHost host)
  29. {
  30. host.CreateSetupActionIfCanView<JobScope>("Job Scope Statuses", PRSDesktop.Resources.view, (action) =>
  31. {
  32. var list = new MasterList(typeof(JobScopeStatus));
  33. list.ShowDialog();
  34. });
  35. }
  36. public static void JobRetentionTypes(IPanelHost host)
  37. {
  38. host.CreateSetupActionIfCanView<JobRetentionType>("Job Retention Types", PRSDesktop.Resources.view, (action) =>
  39. {
  40. var list = new MasterList(typeof(JobRetentionType));
  41. list.ShowDialog();
  42. });
  43. }
  44. public static void DrawingTemplates(IPanelHost host)
  45. {
  46. host.CreateSetupAction("Drawing Templates", PRSDesktop.Resources.doc_misc, (action) =>
  47. {
  48. var list = new MasterList(typeof(DrawingTemplate));
  49. list.ShowDialog();
  50. });
  51. }
  52. public static void JobSpreadsheetTemplates(IPanelHost host)
  53. {
  54. host.CreateSetupActionIfCanView<JobSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  55. {
  56. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Job>();
  57. });
  58. }
  59. public static void SetoutGroups(IPanelHost host)
  60. {
  61. host.CreateSetupActionIf<CanConfigureFactoryFloor>("Setout Groups", PRSDesktop.Resources.draw, (action) =>
  62. {
  63. var list = new MasterList(typeof(SetoutGroup));
  64. list.ShowDialog();
  65. });
  66. }
  67. }