ProjectSetupActions.cs 2.0 KB

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