ProjectSetupActions.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Comal.Classes;
  2. using InABox.DynamicGrid;
  3. using PRSDesktop.Components.Spreadsheet;
  4. using System;
  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 DrawingTemplates(IPanelHost host)
  37. {
  38. host.CreateSetupAction("Drawing Templates", PRSDesktop.Resources.doc_misc, (action) =>
  39. {
  40. var list = new MasterList(typeof(DrawingTemplate));
  41. list.ShowDialog();
  42. });
  43. }
  44. public static void JobSpreadsheetTemplates(IPanelHost host)
  45. {
  46. host.CreateSetupActionIfCanView<JobSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  47. {
  48. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Job>();
  49. });
  50. }
  51. public static void SetoutGroups(IPanelHost host)
  52. {
  53. host.CreateSetupActionIf<CanConfigureFactoryFloor>("Setout Groups", PRSDesktop.Resources.draw, (action) =>
  54. {
  55. var list = new MasterList(typeof(SetoutGroup));
  56. list.ShowDialog();
  57. });
  58. }
  59. }