ManufacturingSetupActions.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 ManufacturingSetupActions
  12. {
  13. public static void Standard(IPanelHost host)
  14. {
  15. host.CreateSetupActionIf<CanViewFactorySettings>("Factory Settings", PRSDesktop.Resources.factorysetup, (action) =>
  16. {
  17. var list = new MasterList(typeof(ManufacturingFactory));
  18. list.ShowDialog();
  19. });
  20. host.CreateSetupActionIfCanView<ManufacturingTemplate>("Manufacturing Templates", PRSDesktop.Resources.template, (action) =>
  21. {
  22. var list = new MasterList(typeof(ManufacturingTemplate), "Factory.Name", null, true);
  23. list.ShowDialog();
  24. });
  25. host.CreateSetupActionIfCanView<ManufacturingTrolley>("Manufacturing Trolleys", PRSDesktop.Resources.trolley, (action) =>
  26. {
  27. var list = new MasterList(typeof(ManufacturingTrolley));
  28. list.ShowDialog();
  29. });
  30. host.CreateSetupActionIfCanView<ManufacturingLostTime>("Lost Time Types", PRSDesktop.Resources.smiley, (action) =>
  31. {
  32. var list = new MasterList(typeof(ManufacturingLostTime));
  33. list.ShowDialog();
  34. });
  35. }
  36. }