476 lines
21 KiB
C#
476 lines
21 KiB
C#
|
|
using Aurora;
|
|
using Aurora.Api;
|
|
using Aurora.Api.Manager;
|
|
using Aurora.Api.Services;
|
|
using Aurora.View;
|
|
using Aurora.View.Alarm;
|
|
using Aurora.View.AutoBackup;
|
|
using AuroraACS;
|
|
using AuroraACS.Views;
|
|
using AuroraCellTracker;
|
|
using AuroraCellTracker.Views;
|
|
using AuroraChiller;
|
|
using AuroraHeightSensor;
|
|
using AuroraHeightSensor.Keyence;
|
|
using AuroraHeightSensor.Keyence.Views;
|
|
using AuroraIO;
|
|
using AuroraIO.View;
|
|
using AuroraLaser;
|
|
using AuroraLaserScanner;
|
|
using AuroraLBAD;
|
|
using AuroraLBAD.Services;
|
|
using AuroraLight;
|
|
using AuroraLight.View;
|
|
using AuroraMassFlowMeter;
|
|
using AuroraMassFlowMeter.MFC;
|
|
using AuroraMotionBoard.Ajin;
|
|
using AuroraMotionBoard.Ajin.Views;
|
|
using AuroraOCT;
|
|
using AuroraOCT.Trumpf;
|
|
using AuroraOCT.Trumpf.Views;
|
|
using AuroraOCT.Views;
|
|
using AuroraPLC;
|
|
using AuroraPLC.Views;
|
|
using CoreUnit.Scanner.UserControl.ScannerCanvas;
|
|
using DB;
|
|
using DB.Recipe;
|
|
using GUI;
|
|
using Hermes;
|
|
using ILSOS_PrismaticGun.Alarm;
|
|
using ILSOS_PrismaticGun.Device;
|
|
using ILSOS_PrismaticGun.Device.ACS;
|
|
using ILSOS_PrismaticGun.Models;
|
|
using ILSOS_PrismaticGun.Process;
|
|
using ILSOS_PrismaticGun.Recipes;
|
|
using ILSOS_PrismaticGun.Sequences;
|
|
using ILSOS_PrismaticGun.Sequences.Monitoring;
|
|
using ILSOS_PrismaticGun.Sequences.SubSequence;
|
|
using ILSOS_PrismaticGun.Settings;
|
|
using ILSOS_PrismaticGun.Views;
|
|
using ILSOS_PrismaticGun.Views.Recipe;
|
|
using OpenCvSharp.Flann;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reactive.Disposables;
|
|
using System.Reactive.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Documents;
|
|
using WeldingCommon;
|
|
using WeldingCommon.Alarm;
|
|
using WeldingCommon.Devices;
|
|
using WeldingCommon.Recipes;
|
|
using WeldingCommon.Sequences;
|
|
using WeldingCommon.Settings;
|
|
using WeldingCommon.Utils;
|
|
using WeldingCommon.Views;
|
|
using WeldingCommon.Views.Recipes.History;
|
|
using WeldingCommon.Vision.Factory;
|
|
using static WeldingCommon.Vision.Factory.VisionFactory;
|
|
using OCT = AuroraOCT.Trumpf.OCT;
|
|
using OCTConfig = AuroraOCT.Trumpf.OCTConfig;
|
|
|
|
using AlarmManager_PrismaticGun = ILSOS_PrismaticGun.Alarm.AlarmManager_PrismaticGun;
|
|
|
|
namespace ILSOS_PrismaticGun
|
|
{
|
|
internal class EquipmentSetup : CommonEquipmentSetup, IEquipmentSetup
|
|
{
|
|
private PrismaticGunACS _acs;
|
|
private IPrismaticGunACS _motion;
|
|
|
|
public override void BuildMainStatusView(MainStatusBuilder builder)
|
|
{
|
|
//base.BuildMainStatusView(builder);
|
|
|
|
builder
|
|
.AddLanguage("en-US", "ko-KR")
|
|
.AddDeviceActiveStatus(CommonDeviceIds.Laser)
|
|
.AddDeviceActiveStatus(CommonDeviceIds.IODevice)
|
|
.AddDeviceActiveStatus(CommonDeviceIds.PLCDevice)
|
|
.AddDeviceActiveStatus(CommonDeviceIds.SmcChiller)
|
|
.AddDeviceActiveStatus(DeviceIds.ACS)
|
|
.AddDeviceActiveStatus(DeviceIds.AJIN)
|
|
.AddDeviceActiveStatus(DeviceIds.MassFlowMeterStageA)
|
|
.AddDeviceActiveStatus(DeviceIds.MassFlowMeterStageB)
|
|
.AddDeviceActiveStatus(DeviceIds.HeightSensor);
|
|
}
|
|
|
|
public override string GetEquipmentName()
|
|
{
|
|
return "ILSOS PrismaticGun";
|
|
}
|
|
|
|
public override void OnSetAlarm(int code, bool isHeavy)
|
|
{
|
|
base.OnSetAlarm(code, isHeavy);
|
|
|
|
if (isHeavy) {
|
|
AlarmManager_PrismaticGun.StopSequenceByAlarm(code);
|
|
}
|
|
}
|
|
|
|
public override async void OnStartUp()
|
|
{
|
|
var equipSetting = AuroraEnv.SettingEntry[AuroraSettings.Equipment] as EquipmentInfo;
|
|
if (equipSetting.AutomaticallyConnectDevices) {
|
|
await ActivateDevices();
|
|
}
|
|
|
|
// 위에 Activate를 실행하고 이벤트를 넣어야 이벤트에 의한 중복 Activate가 안됩니다.
|
|
Observable.Merge(AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_DEVICE_ACTIVATED),
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_DEVICE_DEACTIVATED))
|
|
.Select(msg => msg.Param as string)
|
|
.Where(x => x == DeviceIds.ACS)
|
|
.ObserveOnDispatcher()
|
|
.Subscribe(x => OnACSActivateChanged());
|
|
|
|
Observable.Merge(AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_DEVICE_ACTIVATED),
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_DEVICE_DEACTIVATED))
|
|
.Select(msg => msg.Param as string)
|
|
.Where(x => x == CommonDeviceIds.Laser)
|
|
.ObserveOnDispatcher()
|
|
.Subscribe(x => OnLaserActivateChanged());
|
|
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_ALARM_RESET_ALARM)
|
|
.Select(msg => msg.Param)
|
|
.Subscribe(ClearAlarm);
|
|
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_ALARM_RESET_ALL_ALARM)
|
|
.Select(msg => msg.Param)
|
|
.Subscribe(ClearAllAlarm);
|
|
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_RECIPE_ACTIVATED)
|
|
.Select(x => (RecipeInfo)x.Param)
|
|
.Subscribe(info => OnActivatedRecipeChange(info));
|
|
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_SETTING_CHANGED)
|
|
.Subscribe(UpdateSettingChanged);
|
|
|
|
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_PERMISSION_CHANGED)
|
|
.Select(msg => msg.Param)
|
|
.Subscribe(LoginChanged);
|
|
|
|
_motion = _acs = AuroraEnv.DeviceManager[DeviceIds.ACS] as PrismaticGunACS;
|
|
|
|
//AuroraEx.RegisterRmsHandler<RMSHandlerForMainWelder>();
|
|
//AuroraEnv.RecipeManager.RmsHandler().RegistryDeviceHandler(AuroraEnv);
|
|
//AuroraEnv.RecipeManager.RmsHandler().Start();
|
|
|
|
// [Singleton Instance] Recipe Change History
|
|
AuroraEnv.RecipeManager.RchHandler().RegistryDeviceHandler(AuroraEnv);
|
|
|
|
//AuroraEnv.SequenceEntry[SequenceIds.StatusMonitor].Start();
|
|
//AuroraEnv.SequenceEntry[CommonSequenceIds.AlarmMonitor].Start();
|
|
//AuroraEnv.SequenceEntry[CommonSequenceIds.PLCMonitor].Start();
|
|
|
|
base.OnStartUp();
|
|
}
|
|
|
|
private void LoginChanged(object obj)
|
|
{
|
|
var userId = ApplicationExt.CurrUserID;
|
|
var currentPermissionLevel = ApplicationExt.PermissionLevel;
|
|
}
|
|
|
|
private void UpdateSettingChanged(EventMessage message)
|
|
{
|
|
var setting = message.Param as string;
|
|
switch (setting) {
|
|
case CommonSettingIds.Sequence:
|
|
//_acs.RemarkUseStageB(true);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void OnActivatedRecipeChange(RecipeInfo info)
|
|
{
|
|
}
|
|
|
|
public override void OnShutDown()
|
|
{
|
|
// 모니터링 시퀀스 먼저 종료
|
|
SequenceManagerForMainWelder.Instance.Terminate();
|
|
|
|
base.OnShutDown();
|
|
}
|
|
private void ClearAllAlarm(object obj)
|
|
{
|
|
_acs.ClearAlarms();
|
|
|
|
if (_acs.HasHeavyAlarm | _acs.HasLightAlarm)
|
|
_motion.ResetAlarm();
|
|
|
|
}
|
|
|
|
// Common에 AlarmManager가 있는데, 그걸 못써서.. 일단 이렇게 함
|
|
private void ClearAlarm(object obj)
|
|
{
|
|
|
|
}
|
|
|
|
public override void OnPostDeviceActivated(string dev)
|
|
{
|
|
base.OnPostDeviceActivated(dev);
|
|
|
|
switch (dev) {
|
|
case DeviceIds.ACS:
|
|
if (_acs == null)
|
|
_acs = AuroraEnv.DeviceManager[dev] as PrismaticGunACS;
|
|
|
|
var setting = AuroraEnv.SettingEntry[CommonSettingIds.Sequence] as SequenceSetting;
|
|
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
//private IDisposable OnAJINActivateChanged()
|
|
//{
|
|
// var isActivated = AuroraEnv.DeviceManager[DeviceIds.AJIN].IsActivated;
|
|
// if (isActivated) {
|
|
// AuroraEnv.DeviceManager[MotorIds.ALineZ].Activate();
|
|
// AuroraEnv.DeviceManager[MotorIds.BLineZ].Activate();
|
|
// } else {
|
|
// AuroraEnv.DeviceManager[MotorIds.ALineZ].Deactivate();
|
|
// AuroraEnv.DeviceManager[MotorIds.BLineZ].Deactivate();
|
|
// }
|
|
|
|
// return Disposable.Empty;
|
|
//}
|
|
|
|
public IDisposable OnACSActivateChanged()
|
|
{
|
|
var isActivated = AuroraEnv.DeviceManager[DeviceIds.ACS].IsActivated;
|
|
if (isActivated)
|
|
{
|
|
AuroraEnv.DeviceManager[CommonDeviceIds.IODevice].Activate();
|
|
foreach (var motorId in MotorIds.GetMotorList()) {
|
|
AuroraEnv.DeviceManager[motorId].Activate();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
AuroraEnv.DeviceManager[CommonDeviceIds.IODevice].Deactivate();
|
|
foreach (var motorId in MotorIds.GetMotorList()) {
|
|
AuroraEnv.DeviceManager[motorId].Deactivate();
|
|
}
|
|
}
|
|
|
|
return Disposable.Empty;
|
|
}
|
|
|
|
public IDisposable OnLaserActivateChanged()
|
|
{
|
|
var isActivated = AuroraEnv.DeviceManager[CommonDeviceIds.Laser].IsActivated;
|
|
if (isActivated) {
|
|
var Setting = AuroraEnv.SettingEntry[CommonSettingIds.LaserPowerCalParam] as LaserPowerCalParam;
|
|
Setting.Initialize(Setting.PowerCalibrationCenterBeamCSVFile, Setting.PowerCalibrationRingBeamCSVFile);
|
|
return Disposable.Empty;
|
|
}
|
|
else {
|
|
AuroraEnv.DeviceManager[CommonDeviceIds.OCT].Deactivate();
|
|
return Disposable.Empty;
|
|
}
|
|
}
|
|
|
|
public override void RegisterDevices(IDeviceRegistry registry)
|
|
{
|
|
// Common영역 복붙. 왜냐하면, Scanner 안 쓰므로 공통부를 그대로 사용할 수 없음.
|
|
var equipSetting = AuroraEnv.SettingEntry[AuroraSettings.Equipment] as EquipmentInfo;
|
|
var isSimul = ApplicationExt.IsSimulation;
|
|
var setting = AuroraEnv.SettingEntry[AuroraSettings.Equipment] as EquipmentInfo;
|
|
var systemParameterILSOS = AuroraEnv.SettingEntry[CommonSettingIds.SystemParameter] as SystemParameter;
|
|
|
|
//IODevice는 AjinIO가 아니라 IOUnit으로 받아오는것으로 수정해야 함
|
|
#warning ACS IO Board로 변경
|
|
//registry.Register(CommonDeviceIds.IODevice, () => new IODevice(AuroraEnv, CommonDeviceIds.IODevice, isSimul), new IOUnitConfig());
|
|
var laser = new Laser(CommonDeviceIds.Laser, isSimul);
|
|
registry.Register(CommonDeviceIds.Laser, () => laser, new LaserConfig());
|
|
|
|
#warning Vision에서도 Light를 사용하는데... 중복으로 있는게 맞는지? >> 설비마다 설치된 Light가 다른데 Device를 어떻게 가져와서 사용하는거지
|
|
VisionFactory.RegisterDevices(registry);
|
|
|
|
#warning MainWelder에서 사용하는건지?? >> 일단 주석
|
|
//registry.Register(CommonDeviceIds.Light, () => new LightDevice(CommonDeviceIds.Light, eLight.ERI, isSimul), new LightConfig(),
|
|
// device => new UCLight() { DataContext = new UCLightViewModel(AuroraEnv, CommonDeviceIds.Light) });
|
|
|
|
// TODO: SystemParameterManager.Initialize 할 위치 찾자. 여기는 조금....
|
|
//SystemParameterManager.Initialize(AuroraEnv);
|
|
|
|
AlarmManager.Init(AuroraEnv);
|
|
|
|
var ACS = new PrismaticGunACS(ApplicationExt.IsSimulation);
|
|
registry.Register(DeviceIds.ACS, () => ACS, new ACSDeviceConfig());
|
|
|
|
//registry.Register(CommonDeviceIds.IODevice, () => new PrismaticGunACSIO(AuroraEnv, CommonDeviceIds.IODevice, ApplicationExt.IsSimulation, ACS), new IOUnitConfig());
|
|
|
|
//var motorX1 = new ACSMotor(MotorIds.AxisX1, ACS, 1, (int)MotorIds.eMotorIdx.AxisX1);
|
|
//registry.Register(MotorIds.AxisX1
|
|
// , () => motorX1
|
|
// , new ACSMotorConfig(MotorIds.AxisX1)
|
|
// , motor => new UCACSMotor(AuroraEnv.DeviceManager, motor.DeviceId));
|
|
|
|
var motorX2 = new ACSMotor(MotorIds.AxisX2, ACS, 1, (int)MotorIds.eMotorIdx.AxisX2);
|
|
registry.Register(MotorIds.AxisX2
|
|
, () => motorX2
|
|
, new ACSMotorConfig(MotorIds.AxisX2)
|
|
, motor => new UCACSMotor(AuroraEnv.DeviceManager, motor.DeviceId));
|
|
|
|
var motorY1 = new ACSMotor(MotorIds.AxisY1, ACS, 3, (int)MotorIds.eMotorIdx.AxisY1);
|
|
registry.Register(MotorIds.AxisY1
|
|
, () => motorY1
|
|
, new ACSMotorConfig(MotorIds.AxisY1)
|
|
, motor => new UCACSMotor(AuroraEnv.DeviceManager, motor.DeviceId));
|
|
|
|
var motorY2 = new ACSMotor(MotorIds.AxisY2, ACS, 4, (int)MotorIds.eMotorIdx.AxisY2);
|
|
registry.Register(MotorIds.AxisY2
|
|
, () => motorY2
|
|
, new ACSMotorConfig(MotorIds.AxisY2)
|
|
, motor => new UCACSMotor(AuroraEnv.DeviceManager, motor.DeviceId));
|
|
|
|
var motorZ = new ACSMotor(MotorIds.AxisZ, ACS, 5, (int)MotorIds.eMotorIdx.AxisZ);
|
|
registry.Register(MotorIds.AxisZ
|
|
, () => motorZ
|
|
, new ACSMotorConfig(MotorIds.AxisZ)
|
|
, motor => new UCACSMotor(AuroraEnv.DeviceManager, motor.DeviceId));
|
|
}
|
|
|
|
public override void RegisterRecipes(RecipeRegister register)
|
|
{
|
|
register(RecipeIds.StageAMainRecipe, new ILSOS_PrismaticGun.Recipes.MainRecipe(),
|
|
(recipe, item) => new ILSOS_PrismaticGun.Views.Recipe.UCMainRecipe() {
|
|
DataContext = new UCMainRecipeViewModel(AuroraEnv, recipe, item, RecipeIds.StageAMainRecipe)
|
|
});
|
|
|
|
VisionFactory.RegisterRecipe(register);
|
|
//base.RegisterRecipes(register);
|
|
}
|
|
|
|
public override void RegisterModels(ModelRegister register)
|
|
{
|
|
}
|
|
|
|
public override void RegisterSequences(SequenceRegister register)
|
|
{
|
|
SequenceManagerForMainWelder.Instance.Init(AuroraEnv);
|
|
SequenceManagerForMainWelder.Instance.RegisterSequence(AuroraEnv, register);
|
|
VisionFactory.RegisterSequences(AuroraEnv, register);
|
|
}
|
|
|
|
public override void RegisterSettings(SettingRegister register) {
|
|
base.RegisterSettings(register);
|
|
|
|
var Setting = AuroraEnv.SettingEntry[CommonSettingIds.LaserPowerCalParam] as LaserPowerCalParam;
|
|
Setting.Initialize(Setting.PowerCalibrationCenterBeamCSVFile, Setting.PowerCalibrationRingBeamCSVFile);
|
|
|
|
register(SettingIds.TeachingPos, new ILSOS_PrismaticGun.Settings.TeachingPositionSetting());
|
|
|
|
register(SettingIds.ManualLaser, new ILSOS_PrismaticGun.Settings.ManualLaserSetting());
|
|
VisionFactory.RegisterSetting(AuroraEnv, register);
|
|
}
|
|
|
|
public override void RegisterServices(IServiceRegistry register)
|
|
{
|
|
//Stream 사용 시에만 등록하도록 하자
|
|
var equipSetting = AuroraEnv.SettingEntry[AuroraSettings.Equipment] as EquipmentInfo;
|
|
|
|
if (equipSetting.UseStream) {
|
|
//LBAD
|
|
register.Register(CommonServiceIds.StreamLBADClient, () => new StreamLBADClient(CommonStreamServiceNames.LBADRPC), new StreamClientConfig());
|
|
|
|
#region StreamTest
|
|
//PubSub
|
|
register.Register(CommonServiceIds.StreamPubTest, () => new StreamPub(CommonStreamServiceNames.PubSubTest), new StreamPubConfig());
|
|
register.Register(CommonServiceIds.StreamSubTest, () => new StreamSub(CommonStreamServiceNames.PubSubTest), new StreamSubConfig());
|
|
|
|
//RPC
|
|
register.Register(CommonServiceIds.StreamServerTest, () => new StreamServer(CommonStreamServiceNames.LBADRPC), new StreamServerConfig());
|
|
register.Register(CommonServiceIds.StreamClientTest, () => new StreamClient(CommonStreamServiceNames.LBADRPC), new StreamClientConfig());
|
|
|
|
//MessageBroadcasting
|
|
register.Register(CommonServiceIds.StreamBroadcastPub, () => new StreamBroadcastPub(), new StreamBroadcastPubConfig());
|
|
register.Register(CommonServiceIds.StreamBroadcastSub, () => new StreamBroadcastSub(), new StreamBroadcastSubConfig());
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
// Views는 장비별로 별도로 등록하자.
|
|
public override void RegisterViews(IViewManager manager)
|
|
{
|
|
// Manager Create >> Main UI화면에서 Manager에 있는 데이터를 로드함
|
|
ProcessManager.Instance.Init(AuroraEnv);
|
|
|
|
base.RegisterViews(manager);
|
|
|
|
// Auto Run UI 구성 필요
|
|
// Auto Run
|
|
var MainAutoRun = new MainMenu(CommonViewIds.AutoRun, MenuIcon.GetMenuIcon(eMenuIcon.HOME), PermissionLevel.NONE, false);
|
|
// 수정필요 Jeongin
|
|
MainAutoRun.AddSubMenu(CommonViewIds.AutoRun, new UCMainAutoRun(new UCMainAutoRunViewModel(AuroraEnv, SequenceIds.SeqWeldingCellStageA)));
|
|
manager.RegisterMainMenu(MainAutoRun);
|
|
|
|
// Recipe
|
|
MainMenu recipe = new MainMenu(CommonViewIds.Recipe, MenuIcon.GetMenuIcon(eMenuIcon.RECIPE), PermissionLevel.NONE, true);
|
|
recipe.AddSubMenu(CommonViewIds.Recipe, new UCRecipe());
|
|
recipe.AddSubMenu(CommonViewIds.RecipeChangeHistory, new UCRecipeChangeHistory() { DataContext = new UCRecipeChangeHistoryViewModel(AuroraEnv) });
|
|
manager.RegisterMainMenu(recipe);
|
|
|
|
// Manual
|
|
var manual = new MainMenu(CommonViewIds.Manual, MenuIcon.GetMenuIcon(eMenuIcon.CAMERA), PermissionLevel.NONE, true);
|
|
manual.AddSubMenu(ViewIds.StageManual, new UCStageManual(AuroraEnv, AuroraEnv.DeviceManager));
|
|
|
|
// Manual - For Test
|
|
//manual.AddSubMenu(CommonViewIds.TestDevice, new UCTestDevice(new UCTestDeviceViewModel(AuroraEnv)));
|
|
//manual.AddSubMenu(CommonViewIds.TestSequence, new UCTestSequence(new UCTestSequenceViewModel(AuroraEnv)));
|
|
manager.RegisterMainMenu(manual);
|
|
|
|
// Calibration은 필요 없어보임.
|
|
////Calibration
|
|
//var calibration = new MainMenu(CommonViewIds.Calibration, MenuIcon.GetMenuIcon(eMenuIcon.SCANNER), PermissionLevel.LEVEL3, true);
|
|
//calibration.AddSubMenu(CommonViewIds.Scanner, new UCScannerCalibration(new UCScannerCalibrationViewModel(AuroraEnv)));
|
|
////calibration.AddSubMenu(CommonViewIds.Power, new UCPowerCalibration(AuroraEnv)); // 불필요
|
|
////calibration.AddSubMenu(CommonViewIds.PowerCalProfile, new UCPowerProfile(AuroraEnv, CommonDeviceIds.Laser)); // 불필요
|
|
//calibration.AddSubMenu(CommonViewIds.PixelResolution, new UCCameraPixelResolution(new UCCameraPixelResolutionViewModel(AuroraEnv)));
|
|
//manager.RegisterMainMenu(calibration);
|
|
|
|
//// Monitoring
|
|
//var monitoring = new MainMenu(CommonViewIds.Monitoring, MenuIcon.GetMenuIcon(eMenuIcon.MONITORING), PermissionLevel.NONE, true);
|
|
//monitoring.AddSubMenu(CommonViewIds.IOInterfaceView, new UCIOInterfaceView(AuroraEnv, CommonDeviceIds.IODevice));
|
|
//manager.RegisterMainMenu(monitoring);
|
|
|
|
// Device
|
|
var device = new MainMenu(CommonViewIds.Device, MenuIcon.GetMenuIcon(eMenuIcon.GEAR), PermissionLevel.LEVEL3, false);
|
|
device.AddSubMenu(CommonViewIds.Device, new DeviceSettingView()); // "CommonViewIds.Setting" 는 EquipDef.cs 에서 정의한 ViewId
|
|
manager.RegisterMainMenu(device);
|
|
|
|
//Setting
|
|
var setting = new MainMenu(CommonViewIds.Setting, MenuIcon.GetMenuIcon(eMenuIcon.SETTING), PermissionLevel.LEVEL1, true);
|
|
setting.AddSubMenu(CommonViewIds.Setting, new EquipSettingView());
|
|
setting.AddSubMenu(CommonViewIds.LogSetting, new LogSettingView());
|
|
setting.AddSubMenu(CommonViewIds.AutoBackupView, new AutoBackupView2() { DataContext = new AutoBackupViewModel() });
|
|
manager.RegisterMainMenu(setting);
|
|
|
|
// Alarm
|
|
MainMenu alarm = new MainMenu(CommonViewIds.Alarm, MenuIcon.GetMenuIcon(eMenuIcon.BARCODE), PermissionLevel.NONE, true)
|
|
.AddSubMenu(CommonViewIds.History, new AlarmHistoryView())
|
|
.AddSubMenu(CommonViewIds.Description, new AlarmDescView());
|
|
manager.RegisterMainMenu(alarm);
|
|
|
|
var equipSetting = AuroraEnv.SettingEntry[AuroraSettings.Equipment] as EquipmentInfo;
|
|
if (equipSetting.UseStream) {
|
|
MainMenu service = new MainMenu(CommonViewIds.StreamDevice, MenuIcon.GetMenuIcon(eMenuIcon.DEVICE))
|
|
.AddSubMenu(CommonViewIds.StreamDevice, new UCServiceSettingView());
|
|
manager.RegisterMainMenu(service);
|
|
}
|
|
|
|
// Vision (미사용)
|
|
//VisionFactory.RegisterViews(manager);
|
|
}
|
|
}
|
|
}
|