Files
Mapo-IOB-WIN/IOB-WIN-NEXT/AdapterFormNext.cs
T
Samuele Locatelli 41ddf3f64c Kawasaki
- progetto nuovo
- spostamento dll su ExtLib livello superiore
- prima compilazione
2025-01-22 12:36:36 +01:00

125 lines
4.1 KiB
C#

using IOB_UT_NEXT;
using IOB_WIN_NEXT.Iob;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOB_WIN_NEXT
{
public class AdapterFormNext : IOB_WIN_FORM.AdapterForm
{
#region Public Constructors
/// <summary>
/// Avvio MainForm
/// </summary>
/// <param name="codIOB"></param>
public AdapterFormNext(string codIOB) : base(codIOB)
{
}
#endregion Public Constructors
#region Protected Methods
/// <summary>
/// carica IOB richiesto
/// </summary>
protected override void loadIobType()
{
if (IOBConf != null)
{
switch (tipoScelto)
{
case tipoAdapter.SIMULA:
iobObj = new IOB_WIN_FORM.Iob.Simula(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.BECKHOFF:
case tipoAdapter.BECKHOFF_CPA:
iobObj = new IobBeckhoff.BeckhoffCpa(this, IOBConf);
btnStart.Enabled = true;
break;
#if false
case tipoAdapter.FILE_GEN:
iobObj = new IobFile.FileGen(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.FILE_EUROM63:
iobObj = new IobFile.FileEurom63(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.FILE_SOITAAB:
iobObj = new IobFile.IobFileSoitaab(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.KAWASAKI:
iobObj = new Iob.Kawasaki(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.IcoelDb:
iobObj = new IobSql.IcoelDb(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.MITSUBISHI:
iobObj = new Mitsubishi(this, IOBConf);
btnStart.Enabled = true;
break;
#endif
case tipoAdapter.OMRON:
iobObj = new Iob.Omron(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.OSAI_OPEN:
case tipoAdapter.OSAI_CNDEX:
case tipoAdapter.OSAI_VB6:
// versione EgwProxy.OsaiCncLib
iobObj = new Iob.OSAI(this, IOBConf);
btnStart.Enabled = true;
break;
#if false
case tipoAdapter.SQLSERVER_LANTEK:
iobObj = new IobSql.SqlServLantek(this, IOBConf);
btnStart.Enabled = true;
break;
case tipoAdapter.SQLSERVER_PAMA:
iobObj = new IobSql.SqlServPama(this, IOBConf);
btnStart.Enabled = true;
break;
#endif
case tipoAdapter.ND:
default:
iobObj = new IOB_WIN_FORM.Iob.Simula(this, IOBConf);
btnStart.Enabled = false;
break;
}
lblCncText = $"CNC: {IOBConf.tipoIob} [{IOBConf.cncIpAddr}:{IOBConf.cncPort}]";
lblSrvUrlText = $"SRV: {IOBConf.serverData.MPIP} | URL: {IOBConf.serverData.MPURL}{IOBConf.serverData.CMDBASE}";
// aggancio evento refresh
iobObj.eh_refreshed += IobObj_eh_refreshed;
// carico i default values su interfaccia
setDefaults();
displayTaskAndLog($"Caricata conf per adapter {tipoScelto}");
}
}
#endregion Protected Methods
}
}