Table of Contents

Class HiNcHost

Namespace
Hi.HiNcKits
Assembly
HiNc.dll

Rich HiNC Service. Host class for HiNC functionality that provides project management, path resolution, and MongoDB integration.

public class HiNcHost : IDisposable
Inheritance
HiNcHost
Implements
Inherited Members
Extension Methods

Constructors

HiNcHost(ProxyProjectService)

Initializes a new instance of the HiNcHost class with a proxy project service.

public HiNcHost(ProxyProjectService proxyProjectService)

Parameters

proxyProjectService ProxyProjectService

The proxy project service to use.

HiNcHost(string, int, string)

Initializes a new instance of the HiNcHost class.

public HiNcHost(string adminDirectory, int mongodbPort, string displayEngineFontFile)

Parameters

adminDirectory string

The admin directory path.

mongodbPort int

The MongoDB port number (kept for backward compatibility).

displayEngineFontFile string

The default value will be alternative if the value is null.

Fields

HiNcUserDbMetaName

Gets the name of the HiNC user database metadata.

public const string HiNcUserDbMetaName = "UserDbMeta"

Field Value

string

HiNcUserDbName

Gets the name of the HiNC user database.

public const string HiNcUserDbName = "HiNcUserDb"

Field Value

string

Properties

AdminDirectory

Admin absolute directory.

public string AdminDirectory { get; set; }

Property Value

string

AdminExtendedNamedPath

Gets the admin extended named path.

public ExtendedNamedPath AdminExtendedNamedPath { get; }

Property Value

ExtendedNamedPath

AdminNamedPath

Gets the admin named path.

public NamedPath AdminNamedPath { get; }

Property Value

NamedPath

CacheDbId

Gets the cache database ID.

public static string CacheDbId { get; set; }

Property Value

string

IdentityStorage

Gets the SQLite identity storage instance (for user authentication).

public SqliteIdentityStorage IdentityStorage { get; }

Property Value

SqliteIdentityStorage

LocalProjectService

Gets the local project service from the proxy project service.

public LocalProjectService LocalProjectService { get; }

Property Value

LocalProjectService

MachiningProject

Gets the machining project from the local project service.

public MachiningProject MachiningProject { get; }

Property Value

MachiningProject

ProjectDirectory

Project Absolute Directory.

public string ProjectDirectory { get; }

Property Value

string

ProjectExtendedNamedPath

Gets the project extended named path.

public ExtendedNamedPath ProjectExtendedNamedPath { get; }

Property Value

ExtendedNamedPath

ProjectNamedPath

Gets the project named path.

public NamedPath ProjectNamedPath { get; }

Property Value

NamedPath

ProjectRelativeDirectory

Gets the relative project directory path.

public string ProjectRelativeDirectory { get; }

Property Value

string

RelativeProjectPath

Gets the relative project path from the proxy project service.

public string RelativeProjectPath { get; }

Property Value

string

ResourceDir

Resource absolute directory.

public string ResourceDir { get; }

Property Value

string

ResourceExtendedNamedPath

Gets the resource extended named path.

public ExtendedNamedPath ResourceExtendedNamedPath { get; }

Property Value

ExtendedNamedPath

ResourceNamedPath

Gets the resource named path.

public NamedPath ResourceNamedPath { get; }

Property Value

NamedPath

ResourceRelDir

Relative directory from AdminDirectory for resource.

public string ResourceRelDir { get; set; }

Property Value

string

StepStorage

Gets the SQLite step storage instance (for milling step data).

public SqliteStepStorage StepStorage { get; }

Property Value

SqliteStepStorage

Methods

CloseProject()

Closes the current project.

public Task CloseProject()

Returns

Task

A task representing the asynchronous operation

CopyResourceIfNotExisted()

Copies resources if they don't already exist in the target location.

public void CopyResourceIfNotExisted()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

GetExtendedNamedPathByNamePath(string)

Gets an extended named path by its name path.

public ExtendedNamedPath GetExtendedNamedPathByNamePath(string namePath)

Parameters

namePath string

The name path to look up.

Returns

ExtendedNamedPath

The extended named path for the specified name path, or null if not found.

GetExtendedNamedPathByPath(string)

Gets an extended named path by its path.

public ExtendedNamedPath GetExtendedNamedPathByPath(string path)

Parameters

path string

The path to look up.

Returns

ExtendedNamedPath

The extended named path with the specified path, or null if not found.

GetExtendedNamedPathByUriPara(string)

GetExtendedNamedPath By blazor page parameter.

public ExtendedNamedPath GetExtendedNamedPathByUriPara(string uriPara)

Parameters

uriPara string

Returns

ExtendedNamedPath

GetExtendedNamedPathList(params BasePathEnum[])

Gets a list of extended named paths for the specified base path types.

public List<ExtendedNamedPath> GetExtendedNamedPathList(params BasePathEnum[] basePathEnums)

Parameters

basePathEnums BasePathEnum[]

The base path types to include.

Returns

List<ExtendedNamedPath>

A list of extended named paths.

GetNamedPathByName(string)

Gets a named path by its name.

public NamedPath GetNamedPathByName(string name)

Parameters

name string

The name of the path to retrieve

Returns

NamedPath

The named path with the specified name, or null if not found

GetNamedPathByPath(string)

Gets a named path by its path.

public NamedPath GetNamedPathByPath(string path)

Parameters

path string

The path to look up.

Returns

NamedPath

The named path with the specified path, or null if not found.

GetNamedPathList(params BasePathEnum[])

Gets a list of named paths for the specified base path types.

public List<NamedPath> GetNamedPathList(params BasePathEnum[] basePathEnums)

Parameters

basePathEnums BasePathEnum[]

The base path types to include.

Returns

List<NamedPath>

A list of named paths.

LoadProjectByRelativePath(string)

Loads a project from the specified relative file path.

public void LoadProjectByRelativePath(string relativeFilePathFromAdminRoot)

Parameters

relativeFilePathFromAdminRoot string

The relative file path from the admin directory root

NewProjectByRelFile(string)

Creates a new project from a relative file path.

public void NewProjectByRelFile(string relFilePath)

Parameters

relFilePath string

The relative file path from the admin directory

ReloadProject()

Reloads the current project.

public void ReloadProject()

SaveAsProject(string)

Saves the current project to a specified relative file path.

public void SaveAsProject(string relativeFilePath)

Parameters

relativeFilePath string

The relative file path from the admin directory root

SaveProject()

Save project in the current path.

public void SaveProject()

ShowMessageBoard(string, string, BootstrapTheme)

Shows a message board with specified title, message and theme.

public void ShowMessageBoard(string title, string message, BootstrapTheme bootstrapThemeColor)

Parameters

title string

The title of the message board

message string

The message to display

bootstrapThemeColor BootstrapTheme

The bootstrap theme color for the message board

Events

OnShownMessageBoard

Event raised when a message board is shown.

public event ShowMessageBoardDelegate OnShownMessageBoard

Event Type

ShowMessageBoardDelegate