publish aicam server.

This commit is contained in:
2025-07-10 11:30:03 +08:00
parent 21211fa726
commit e2cb50d1e7
3 changed files with 146 additions and 13 deletions
@@ -7,6 +7,7 @@ using Hi.Common.FileLines;
using System.Windows;
using Hi.Disp;
using Hi.MachiningSteps;
using Hi.HiNcKits;
namespace Sample.Machining
{
@@ -25,21 +26,14 @@ namespace Sample.Machining
[STAThread]
static void Main(string[] args)
{
#region Initialize Environment
License.LogInAll();
DispEngine.Init();
MongoServer.Default = MongoServer.Run(new MongoRunnerOptions()
{
MongoPort = 28100
});
#endregion
SingleUserApp.AppBegin();
#region Load Machining Project
var projectPath = "C:/HiNC-Projects/DemoStandardPath/Main.hincproj";
Console.WriteLine($"Load Project: {projectPath}");
MachiningProject machiningProject = MachiningProject.LoadFile(projectPath);
machiningProject.ShellApi.MachiningStepSelected += (MachiningStep step) =>
machiningProject.RuntimeController.MachiningStepSelected += (MachiningStep step) =>
{
var sourceCommand = step.SourceCommand;
Console.WriteLine($"Step Selected: MRR = {step.Mrr_mm3ds} At \"{sourceCommand?.FilePath}\" (Line {sourceCommand?.GetLineNo()}) \"{sourceCommand?.Line}\"");
@@ -64,9 +58,7 @@ namespace Sample.Machining
app.Exit += (o, e) =>
{
machiningProject.Dispose();
MongoServer.Default.Dispose();
DispEngine.FinishDisp();
License.LogOutAll();
SingleUserApp.AppEnd();
Console.WriteLine($"App exit.");
};
app.Run(new RenderingWindow()