71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
using Aurora;
|
|
using Aurora.Api;
|
|
using Aurora.View;
|
|
using AuroraUIComponent.Sequence;
|
|
using AuroraUIComponent.UserControls.SequenceDrawer;
|
|
using CoreUnit.Scanner.UserControl.ScannerCanvas;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reactive.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
using VisionCommon;
|
|
using WeldingCommon.Sequences;
|
|
using WeldingCommon.Utils;
|
|
using static WeldingCommon.Views.UCScannerObjectTeachingViewModel;
|
|
|
|
namespace WeldingCommon.Views
|
|
{
|
|
public class UCCommonAutoRunViewModel : NotifyPropertyChangedBase
|
|
{
|
|
private readonly Logger Log = new Logger("UCCommonAutoRunViewModel");
|
|
|
|
|
|
protected readonly IAuroraEnvironment _Aurora;
|
|
|
|
public UCWorkPosViewModel WorkPosViewModel { get; }
|
|
|
|
//private UCSequenceDiagram _ContentDiagram;
|
|
//public UCSequenceDiagram ContentDiagram { get => _ContentDiagram; set => SetProperty(ref _ContentDiagram, value); }
|
|
|
|
private ScannerCanvasUserCtrl _ScannerCanvasUserCtrl;
|
|
|
|
public UCCommonAutoRunViewModel(IAuroraEnvironment aurora, string sequenceId)
|
|
{
|
|
_Aurora = aurora;
|
|
|
|
WorkPosViewModel = new UCWorkPosViewModel(aurora, sequenceId);
|
|
|
|
//ContentDiagram = new UCSequenceDiagram();
|
|
//ContentDiagram.SequenceID = sequenceId;
|
|
////ContentDiagram.DiagramType = eDiagramType.Layered;
|
|
//ContentDiagram.DiagramType = eDiagramType.Tree;
|
|
//ContentDiagram.LineType = eLineType.Straight;
|
|
//ContentDiagram.ShowSubSequence = false;
|
|
//ContentDiagram.SetVisibleKeys(new List<string>());
|
|
}
|
|
|
|
public virtual async void OnAutoRunStartRequest(object obj = null)
|
|
{
|
|
#warning Auto Sequence를 동작 시키기 전에 바로 확인하는 시나리오라면 여기서 처리하면 될 것 같습니다.
|
|
//var mainPage = CommonHelper.GetMainPage();
|
|
//_ScannerCanvasUserCtrl = mainPage.ScannerCanvasCtrlTeaching;
|
|
|
|
//if (RecipeUpdate != null) {
|
|
// RecipeUpdate(Log, _Aurora, _ScannerCanvasUserCtrl);
|
|
//} else {
|
|
// //Log.W("Check Machine Type");
|
|
// Log.W("Check OnAutoRunStartRequest and need function!!");
|
|
//}
|
|
}
|
|
|
|
public virtual void OnAutoRunStopRequest()
|
|
{
|
|
// RunState 가 start 일 경우만 멈춤을 실행
|
|
}
|
|
|
|
}
|
|
}
|