using System; using Comal.Classes; using InABox.Configuration; using InABox.Core; using InABox.DynamicGrid; using InABox.Wpf; namespace PRSDesktop; public class ServicePanelSettings : 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 ServicePanel : MasterDetailPanel { protected override string MasterCaption => "Service Jobs"; protected override string DetailCaption => "Job Details"; protected override string MasterColumnsTag => "Service"; protected override void CreatePages() { CreatePage>("Details"); CreatePage>(Security.CanView, "Orders"); CreatePage>(Security.CanView, "Picking Lists"); CreatePage>(Security.CanView, "Assignments"); CreatePage>(Security.CanView, "Forms"); CreatePage>(Security.CanView, "Invoices"); } protected override void AfterLoadSettings(ServicePanelSettings settings) { } protected override void BeforeSaveSettings(ServicePanelSettings settings) { } public override string SectionName => "Service"; public override void CreateToolbarButtons(IPanelHost host) { ProjectSetupActions.JobStatuses(host); // host.CreateSetupAction(new PanelAction() // { // Caption = "Job Settings", // Image = PRSDesktop.Resources.specifications, // OnExecute = action => // { // if (DynamicGridUtils.Edit(Settings)) // SaveSettings(); // } // }); } }