Files
Saxonite/Workspace/SaxoniteStandardBase/Base/Procs/SaxProcess_Base.cs
T
andy 9f22b522df v1.3.0 Restructure Saxonite workspace and upgrade to .NET 10 (#1)
Move Saxonite’s projects into a dedicated `Workspace` folder and align the solution with .NET 10 and the current Common workspace. Update encryption integration, test project structure and coverage, and repository guidance and upgrade notes.

- Relocate application and library projects while retaining Git rename history.
- Split tests into Admin, Online, and Shared projects; add representative behavioral and serialization tests.
- Update Common integration, application version, and repository documentation.

Application version: 1.3.0

Reviewed-on: #1
Co-authored-by: andy <andy@sarand.com>
2026-10-16 18:24:16 +01:00

92 lines
3.4 KiB
C#

using Sarand.Net.Standard.Proc.Procs;
using Saxonite.Net.Standard.Base.Mgr.Support;
using Saxonite.Net.Standard.Base.Mgr;
using System;
using System.Collections.Generic;
using System.Text;
using Saxonite.Net.Standard.Base.App;
using Sarand.Net.Standard.Proc.Excel;
using Saxonite.Net.Standard.Base.Mgr.Reference;
using Sarand.Net.Standard.Base.Dbas;
namespace Saxonite.Net.Standard.Base.Procs
{
//=======================================================================
public abstract class SaxProcess_Base : SaProcess
{
//-------------------------------------------------------------------
// Definitions.
public new class Config : SaProcess.Config
{
protected Config(SaxSessionContext sessionContext, DbUpdateInfo dbUpdateInfo) : base(dbUpdateInfo)
{
this.SessionContext = sessionContext;
}
public SaxSessionContext SessionContext { get; }
}
//-------------------------------------------------------------------
// Data members.
private SaxInternals internals;
private Config config;
//-------------------------------------------------------------------
// Construction.
protected SaxProcess_Base(Config config) : base(config)
{
this.config = config;
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (internals != null) internals.Dispose();
internals = null;
}
base.Dispose(disposing);
}
//-------------------------------------------------------------------
// Properties.
public SaxInternals Internals { get { if (internals == null) internals = new SaxInternals(config.SessionContext); return internals; } }
// Managers.
public SaxReferenceMgr ReferenceMgr { get { return Internals.ReferenceMgr; } }
public SaxAccountMgr AccountMgr { get { return Internals.AccountMgr; } }
public SaxActivityMgr ActivityMgr { get { return Internals.ActivityMgr; } }
public SaxItemDataMgr ItemDataMgr { get { return Internals.ItemDataMgr; } }
public SaxReferenceGolfMgr ReferenceGolfMgr { get { return Internals.ReferenceGolfMgr; } }
public SaxSupportMgr SupportMgr { get { return Internals.SupportMgr; } }
//-------------------------------------------------------------------
// Excel Spreadsheet utilities.
//-------------------------------------------------------------------
protected virtual SaMsExcelColumnHeading_Config GetExcelColumnHeadingConfig()
{
SaMsExcelColumnHeading_Config configHeading = new SaMsExcelColumnHeading_Config();
configHeading.FontAttr.Name = "Arial";
configHeading.FontAttr.HeightInPoints = 10;
configHeading.FontAttr.ColourIndex = SaXlColourIndex.DarkBlue;
configHeading.FontAttr.Bold = true;
configHeading.HeadingTextWrap = true;
configHeading.ForegroundColourIndex = SaXlColourIndex.LightYellow;
configHeading.BorderWeight = SaXlBorderWeight.Medium;
return configHeading;
}
protected virtual SaMsExcelStyleAttr GetExcelDefaultWorkbookStyle()
{
SaMsExcelStyleAttr styleAttr = new SaMsExcelStyleAttr();
styleAttr.FontAttr.Name = "Arial";
styleAttr.FontAttr.HeightInPoints = 9;
styleAttr.FontAttr.ColourIndex = SaXlColourIndex.Black;
styleAttr.HorizontalAlignment = (short)XlHAlign.xlHAlignLeft;
styleAttr.VerticalAlignment = (short)XlVAlign.xlVAlignTop;
styleAttr.WrapText = true;
return styleAttr;
}
//-------------------------------------------------------------------
}
//=======================================================================
}