Key 입력 Offset Log 추가 & Apply 메서드 삭제
This commit is contained in:
parent
5a9579b887
commit
a73ee05068
@ -23,12 +23,16 @@ using CoreUnit.Scanner.UserControl.ScannerCanvas;
|
|||||||
using DB;
|
using DB;
|
||||||
using DB.Recipe;
|
using DB.Recipe;
|
||||||
using GUI;
|
using GUI;
|
||||||
|
using Hermes;
|
||||||
using ILSOS_CCW_H52A.Alarm;
|
using ILSOS_CCW_H52A.Alarm;
|
||||||
using ILSOS_CCW_H52A.Device;
|
using ILSOS_CCW_H52A.Device;
|
||||||
using ILSOS_CCW_H52A.Models;
|
using ILSOS_CCW_H52A.Models;
|
||||||
using ILSOS_CCW_H52A.Recipes;
|
using ILSOS_CCW_H52A.Recipes;
|
||||||
using ILSOS_CCW_H52A.Sequences;
|
using ILSOS_CCW_H52A.Sequences;
|
||||||
using ILSOS_CCW_H52A.Views;
|
using ILSOS_CCW_H52A.Views;
|
||||||
|
using System;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using WeldingCommon;
|
using WeldingCommon;
|
||||||
@ -39,9 +43,6 @@ using WeldingCommon.Utils;
|
|||||||
using WeldingCommon.Views;
|
using WeldingCommon.Views;
|
||||||
using WeldingCommon.Vision.Factory;
|
using WeldingCommon.Vision.Factory;
|
||||||
using static WeldingCommon.Vision.Factory.VisionFactory;
|
using static WeldingCommon.Vision.Factory.VisionFactory;
|
||||||
using System.Reactive.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace ILSOS_CCW_H52A
|
namespace ILSOS_CCW_H52A
|
||||||
{
|
{
|
||||||
@ -91,22 +92,20 @@ namespace ILSOS_CCW_H52A
|
|||||||
var seq = AuroraEnv.SequenceEntry[SequenceIds.SeqAutoRunCCWH52A] as ISequence;
|
var seq = AuroraEnv.SequenceEntry[SequenceIds.SeqAutoRunCCWH52A] as ISequence;
|
||||||
seq.RunStateChanged += AutoRunSeq_RunStateChanged;
|
seq.RunStateChanged += AutoRunSeq_RunStateChanged;
|
||||||
}
|
}
|
||||||
private void ApplyRecipeByState(bool bON)
|
|
||||||
{
|
|
||||||
Application.Current.Dispatcher.Invoke(() => {
|
|
||||||
if (bON == false)
|
|
||||||
WeldingRecipeManager.OnActiveReloaded();
|
|
||||||
else
|
|
||||||
WeldingRecipeManager.ReloadWeldingRecipe(WeldingRecipeManager.SelectedRecipe.name);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
private void AutoRunSeq_RunStateChanged(object sender, (string sequenceId, SequenceRunState state) e)
|
private void AutoRunSeq_RunStateChanged(object sender, (string sequenceId, SequenceRunState state) e)
|
||||||
{
|
{
|
||||||
//AutoRun 상황에서 Recipe Save Lock
|
//AutoRun 상황에서 Recipe Save Lock
|
||||||
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, e.state != SequenceRunState.Idle);
|
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, e.state != SequenceRunState.Idle);
|
||||||
bool AutoRunState = e.state == SequenceRunState.Running;
|
bool AutoRunState = e.state == SequenceRunState.Running;
|
||||||
ApplyRecipeByState(AutoRunState);
|
Application.Current.Dispatcher.Invoke(() => {
|
||||||
_UCRecipe.IsEnabled = e.state != SequenceRunState.Running;
|
if (AutoRunState)
|
||||||
|
WeldingRecipeManager.OnActiveReloaded();
|
||||||
|
else
|
||||||
|
WeldingRecipeManager.ReloadWeldingRecipe(WeldingRecipeManager.SelectedRecipe.name);
|
||||||
|
|
||||||
|
_UCRecipe.IsEnabled = e.state != SequenceRunState.Running;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
private void OnPermissionChanged(EventMessage message)
|
private void OnPermissionChanged(EventMessage message)
|
||||||
{
|
{
|
||||||
@ -114,7 +113,12 @@ namespace ILSOS_CCW_H52A
|
|||||||
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, !permissionOn);
|
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, !permissionOn);
|
||||||
|
|
||||||
// Login 권한이 없어지면 Active된 레시피로 변경하도록 함
|
// Login 권한이 없어지면 Active된 레시피로 변경하도록 함
|
||||||
ApplyRecipeByState(permissionOn);
|
Application.Current.Dispatcher.Invoke(() => {
|
||||||
|
if (!permissionOn)
|
||||||
|
WeldingRecipeManager.OnActiveReloaded();
|
||||||
|
else
|
||||||
|
WeldingRecipeManager.ReloadWeldingRecipe(WeldingRecipeManager.SelectedRecipe.name);
|
||||||
|
});
|
||||||
|
|
||||||
//LogOut 상황에서 Recipe Save Lock
|
//LogOut 상황에서 Recipe Save Lock
|
||||||
//LogOut 상황에서 Reicpe 화면 수정할 수 없도록 함
|
//LogOut 상황에서 Reicpe 화면 수정할 수 없도록 함
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
|
using Aurora.Api;
|
||||||
using CoreUnit.ScannerCanvasCoreUnit;
|
using CoreUnit.ScannerCanvasCoreUnit;
|
||||||
using GUI.Properties;
|
using GUI.Properties;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Drawing.Text;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace CoreUnit.Control.UserControl.Canvas
|
namespace CoreUnit.Control.UserControl.Canvas
|
||||||
@ -253,6 +256,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
public partial class CanvasCtrl : System.Windows.Forms.UserControl
|
public partial class CanvasCtrl : System.Windows.Forms.UserControl
|
||||||
{
|
{
|
||||||
public List<Color> scannerParamColorList = new List<Color>();
|
public List<Color> scannerParamColorList = new List<Color>();
|
||||||
|
public Logger Log = new Logger("CanvasCtrl");
|
||||||
|
|
||||||
// ´õºí¹öÆÛ Å×½ºÆ®
|
// ´õºí¹öÆÛ Å×½ºÆ®
|
||||||
private BufferedGraphicsContext context;
|
private BufferedGraphicsContext context;
|
||||||
@ -1660,6 +1664,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetOffsetValue != null) {
|
if (evtGetOffsetValue != null) {
|
||||||
float offsetValue = evtGetOffsetValue();
|
float offsetValue = evtGetOffsetValue();
|
||||||
Model.MoveObjects(new UnitPoint(0, offsetValue), Model.SelectedObjects, true);
|
Model.MoveObjects(new UnitPoint(0, offsetValue), Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key Up, Layer Move. [X : 0, {offsetValue}");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1668,6 +1673,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetOffsetValue != null) {
|
if (evtGetOffsetValue != null) {
|
||||||
float offsetValue = evtGetOffsetValue();
|
float offsetValue = evtGetOffsetValue();
|
||||||
Model.MoveObjects(new UnitPoint(0, -1 * offsetValue), Model.SelectedObjects, true);
|
Model.MoveObjects(new UnitPoint(0, -1 * offsetValue), Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key Down, Layer Move. [X : 0, {-1 * offsetValue}");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1676,6 +1682,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetOffsetValue != null) {
|
if (evtGetOffsetValue != null) {
|
||||||
float offsetValue = evtGetOffsetValue();
|
float offsetValue = evtGetOffsetValue();
|
||||||
Model.MoveObjects(new UnitPoint(offsetValue, 0), Model.SelectedObjects, true);
|
Model.MoveObjects(new UnitPoint(offsetValue, 0), Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key Right, Layer Move. [X : {offsetValue}, 0");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1684,6 +1691,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetOffsetValue != null) {
|
if (evtGetOffsetValue != null) {
|
||||||
double offsetValue = evtGetOffsetValue();
|
double offsetValue = evtGetOffsetValue();
|
||||||
Model.MoveObjects(new UnitPoint(-1 * offsetValue, 0), Model.SelectedObjects, true);
|
Model.MoveObjects(new UnitPoint(-1 * offsetValue, 0), Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key Left, Layer Move. [X : {-1 * offsetValue}, 0");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1692,6 +1700,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetAngleOffsetValue != null) {
|
if (evtGetAngleOffsetValue != null) {
|
||||||
float angleOffset = evtGetAngleOffsetValue();
|
float angleOffset = evtGetAngleOffsetValue();
|
||||||
((DataModel)Model).RotateObjects(-1 * (float)angleOffset, Model.SelectedObjects, true);
|
((DataModel)Model).RotateObjects(-1 * (float)angleOffset, Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key E, Angle Rotate");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1700,6 +1709,7 @@ namespace CoreUnit.Control.UserControl.Canvas
|
|||||||
if (evtGetAngleOffsetValue != null) {
|
if (evtGetAngleOffsetValue != null) {
|
||||||
float angleOffset = evtGetAngleOffsetValue();
|
float angleOffset = evtGetAngleOffsetValue();
|
||||||
((DataModel)Model).RotateObjects((float)angleOffset, Model.SelectedObjects, true);
|
((DataModel)Model).RotateObjects((float)angleOffset, Model.SelectedObjects, true);
|
||||||
|
Log.I($"Input Key Q, Angle Rotate");
|
||||||
DoInvalidate(true);
|
DoInvalidate(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user