ManufacturingSetupActions.cs 1.3 KB

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