using System; using Comal.Classes; using InABox.Configuration; using InABox.Core; using InABox.DynamicGrid; using InABox.Wpf; namespace PRSDesktop; public class ProjectsPanelSettings : BaseObject, IUserConfigurationSettings, IMasterDetailSettings { [NullEditor] public DynamicSplitPanelView ViewType { get; set; } = DynamicSplitPanelView.Combined; [NullEditor] public double AnchorWidth { get; set; } = 300; [NullEditor] public Guid MasterID { get; set; } } public class ProjectsPanel : MasterDetailPanel { protected override string MasterCaption => "Project List"; protected override string DetailCaption => "Project Details"; protected override string MasterColumnsTag => "Projects"; protected override void CreatePages() { CreatePage>("Details"); CreatePage>(Security.CanView, "Scopes"); CreatePage>(Security.CanView, "Documents"); CreatePage>(Security.CanView, "Stages"); CreatePage>(Security.CanView, "ITPs"); CreatePage>(Security.CanView, "Product Mappings"); CreatePage>(Security.CanView, "Product Styles"); CreatePage>(Security.CanView, "BOM"); CreatePage>(Security.CanView, "Requisitions"); CreatePage>(Security.CanView, "Orders"); CreatePage>(Security.CanView, "Designs"); CreatePage>(Security.CanView, "Manufacturing"); CreatePage>(Security.CanView, "Dispatch"); CreatePage>(Security.CanView, "Deliveries"); CreatePage>(Security.CanView, "OnSite"); CreatePage>(Security.CanView, "Tasks"); CreatePage>(Security.CanView, "EquipmentTab"); CreatePage>(Security.CanView, "Employees"); CreatePage>(Security.CanView, "Trackers"); CreatePage>(Security.CanView, "Assignments"); CreatePage>(Security.CanView, "Timesheets"); CreatePage>(Security.CanView, "Forms"); CreatePage>(Security.CanView, "Invoices"); CreatePage>(Security.CanView, "Spreadsheets"); CreatePage>(Security.CanView, "Summary"); } protected override void AfterLoadSettings(ProjectsPanelSettings settings) { } protected override void BeforeSaveSettings(ProjectsPanelSettings settings) { } public override string SectionName => "Projects"; public override void CreateToolbarButtons(IPanelHost host) { ProjectSetupActions.JobStatuses(host); ProjectSetupActions.DocumentMilestones(host); ProjectSetupActions.JobScopeStatuses(host); ProjectSetupActions.DrawingTemplates(host); host.CreateSetupSeparator(); ProjectSetupActions.JobSpreadsheetTemplates(host); host.CreateSetupSeparator(); ProjectSetupActions.SetoutGroups(host); // host.CreateSetupAction(new PanelAction() // { // Caption = "Job Settings", // Image = PRSDesktop.Resources.specifications, // OnExecute = action => // { // if (DynamicGridUtils.Edit(Settings)) // SaveSettings(); // } // }); } }