refactor(Sample.Wpf): adapt demos for SessionStepBuilt/WorkpieceService/CatchExceptions changes
Made-with: Cursor
This commit is contained in:
parent
58f3a19232
commit
da83e59432
@ -2,6 +2,7 @@
|
|||||||
using Hi.HiNcKits;
|
using Hi.HiNcKits;
|
||||||
using Hi.Licenses;
|
using Hi.Licenses;
|
||||||
using Hi.WpfPlus.Disp;
|
using Hi.WpfPlus.Disp;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace Sample.Disp;
|
namespace Sample.Disp;
|
||||||
|
|||||||
@ -7,6 +7,7 @@ using Hi.MachiningProcs;
|
|||||||
using Hi.Numerical.Acts;
|
using Hi.Numerical.Acts;
|
||||||
using Hi.WpfPlus.Disp;
|
using Hi.WpfPlus.Disp;
|
||||||
using HiMachining.Milling;
|
using HiMachining.Milling;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using Hi.Common.FileLines;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Hi.MachiningSteps;
|
using Hi.MachiningSteps;
|
||||||
using Hi.HiNcKits;
|
using Hi.HiNcKits;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Sample.Machining
|
namespace Sample.Machining
|
||||||
{
|
{
|
||||||
@ -32,10 +33,11 @@ namespace Sample.Machining
|
|||||||
localProjectService.LoadProject(projectPath);
|
localProjectService.LoadProject(projectPath);
|
||||||
MachiningProject machiningProject = localProjectService.MachiningProject;
|
MachiningProject machiningProject = localProjectService.MachiningProject;
|
||||||
|
|
||||||
localProjectService.RuntimeApi.MachiningStepSelected += (MachiningStep step) =>
|
localProjectService.RuntimeApi.SessionStepSelected += (MachiningStep step) =>
|
||||||
{
|
{
|
||||||
var sourceCommand = step.SourceCommand;
|
var sourceCommand = step.SourceCommand;
|
||||||
Console.WriteLine($"Step Selected: MRR = {step.Mrr_mm3ds} At \"{sourceCommand?.FilePath}\" (Line {sourceCommand?.GetLineNo()}) \"{sourceCommand?.Line}\"");
|
var indexedFileLine = sourceCommand.GetSentence().FirstIndexedFileLine;
|
||||||
|
Console.WriteLine($"Step Selected: MRR = {step.Mrr_mm3ds} At \"{indexedFileLine?.FilePath}\" (Line {indexedFileLine?.GetLineNo()}) \"{indexedFileLine?.Line}\"");
|
||||||
};
|
};
|
||||||
localProjectService.PacePlayer.Start();
|
localProjectService.PacePlayer.Start();
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user