using System; using Comal.Classes; using InABox.Configuration; using InABox.Core; using InABox.DynamicGrid; using InABox.Wpf; namespace PRSDesktop; public class QuotePanelSettings : 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 QuotePanel : 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, "Documents"); CreatePage>(Security.CanView, "Spreadsheets"); CreatePage>(Security.CanView, "Diagrams"); CreatePage>(Security.CanView, "Takeoffs"); CreatePage>(Security.CanView, "Designs"); CreatePage>(Security.CanView, "Cost Sheets"); CreatePage>(Security.CanView, "Proposals"); CreatePage>(Security.CanView, "Contracts"); } protected override void AfterLoadSettings(QuotePanelSettings settings) { } protected override void BeforeSaveSettings(QuotePanelSettings settings) { } public override string SectionName => "Quotes"; public override void CreateToolbarButtons(IPanelHost host) { QuoteSetupActions.Standard(host); // host.CreateSetupAction(new PanelAction() // { // Caption = "Job Settings", // Image = PRSDesktop.Resources.specifications, // OnExecute = action => // { // if (DynamicGridUtils.Edit(Settings)) // SaveSettings(); // } // }); } }