First commit CMS-Connect M154

This commit is contained in:
Nicola Carminati
2019-02-19 20:04:31 +01:00
parent 69a6a939b3
commit c690f175f5
16 changed files with 1408 additions and 450 deletions
+1
View File
@@ -18,6 +18,7 @@
<autoOpenCmsClient>false</autoOpenCmsClient>
<MTCFolderPath>C:\CMS\MTC\ADAPTER\</MTCFolderPath>
<MTCApplicationName>SCMA</MTCApplicationName>
<CMSConnectReady>true</CMSConnectReady>
<maxAlarmsRows>50000</maxAlarmsRows>
<alarmToDelete>5000</alarmToDelete>
</serverConfig>
@@ -28,6 +28,7 @@
<xs:element name="autoOpenCmsClient" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
<xs:element name="MTCFolderPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="MTCApplicationName" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="CMSConnectReady" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
<xs:element name="maxAlarmsRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
<xs:element name="alarmToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
</xs:all>
+2 -1
View File
@@ -247,7 +247,8 @@ namespace Step.Config
MTCFolderPath = x.Element("MTCFolderPath").Value,
MTCApplicationName = x.Element("MTCApplicationName").Value,
MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").Value),
AlarmToDelete = Convert.ToInt32(x.Element("alarmToDelete").Value)
AlarmToDelete = Convert.ToInt32(x.Element("alarmToDelete").Value),
CMSConnectReady = Convert.ToBoolean(x.Element("CMSConnectReady").Value)
}).FirstOrDefault();
}
+97 -93
View File
@@ -1,94 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DE54FF4C-8390-4489-882A-1BC7D99EF185}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Core</RootNamespace>
<AssemblyName>Step.Core</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library">
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TeamDev.SDK.6">
<HintPath>..\Libs\TeamDev.SDK.6.dll</HintPath>
</Reference>
<Reference Include="TeamDev.SDK.WPF">
<HintPath>..\Libs\TeamDev.SDK.WPF.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ThreadsFunctions.cs" />
<Compile Include="ThreadsHandler.cs" />
<Compile Include="ThreadsSiemensHmi.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Config\Step.Config.csproj">
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
<Name>Step.Config</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
<Name>Step.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Step.NC\Step.NC.csproj">
<Project>{b2366b08-96bd-4f6b-b748-b45089b87a14}</Project>
<Name>Step.NC</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Utils\Step.Utils.csproj">
<Project>{cbeb631b-abfa-4042-9779-c0060b0dfefe}</Project>
<Name>Step.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Resources\SinumerikHmi.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DE54FF4C-8390-4489-882A-1BC7D99EF185}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Core</RootNamespace>
<AssemblyName>Step.Core</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library">
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TeamDev.SDK.6">
<HintPath>..\Libs\TeamDev.SDK.6.dll</HintPath>
</Reference>
<Reference Include="TeamDev.SDK.WPF">
<HintPath>..\Libs\TeamDev.SDK.WPF.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ThreadsFunctions.cs" />
<Compile Include="ThreadsHandler.cs" />
<Compile Include="ThreadsSiemensHmi.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Config\Step.Config.csproj">
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
<Name>Step.Config</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Database\Step.Database.csproj">
<Project>{357d5ee1-ffc8-489b-9232-22cf474d9a6f}</Project>
<Name>Step.Database</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
<Name>Step.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Step.NC\Step.NC.csproj">
<Project>{b2366b08-96bd-4f6b-b748-b45089b87a14}</Project>
<Name>Step.NC</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Utils\Step.Utils.csproj">
<Project>{cbeb631b-abfa-4042-9779-c0060b0dfefe}</Project>
<Name>Step.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Resources\SinumerikHmi.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+94 -49
View File
@@ -1,6 +1,7 @@
using CMS_CORE_Library.Models;
using Step.Config;
using Step.Core;
using Step.Database.Controllers;
using Step.Model.DTOModels;
using Step.Model.DTOModels.AlarmModels;
using Step.Model.DTOModels.Scada;
@@ -807,65 +808,109 @@ public static class ThreadsFunctions
}
foreach (M154DataModel m154 in data)
{
string stringVal = "Path_" + m154.Process + "_";
string val = "";
// Check if command is MTC
if (m154.Parameters[0] == "MTC")
{
if(ServerStartupConfig.CMSConnectReady)
{
// Convert tag string in Pascal Case and add to result string
switch (m154.Parameters[1].ToLower())
if (m154.Parameters.Count() >= 2 && m154.Parameters[0] == "SOUR")
{
case "currprog":
stringVal += "CurrProg";
break;
case "partid":
stringVal += "PartId";
break;
default:
stringVal += m154.Parameters[1];
break;
}
// Set value
if (m154.Parameters.Count() > 2)
val = m154.Parameters[2];
// Create MTC Directory if not exist
if (!Directory.Exists(ServerStartupConfig.MTCFolderPath))
Directory.CreateDirectory(ServerStartupConfig.MTCFolderPath);
string outputFileName = ServerStartupConfig.MTCFolderPath + "\\DATA\\CmsGeneralStatus.mtc";
// Create file if not exits
if (!File.Exists(outputFileName))
using (var f = File.Create(outputFileName)) { };
// Read file
List<string> fileLines = File.ReadAllLines(outputFileName).ToList();
string[] parametersInLine;
bool found = false;
for (int i = 0; i < fileLines.Count() && !found; i++)
{
// Get tag & value from row
parametersInLine = fileLines[i].Split('|');
if (parametersInLine[0] == stringVal)
// Convert tag string in Pascal Case and add to result string
switch (m154.Parameters[1].ToLower())
{
found = true;
fileLines[i] = stringVal + "|" + val;
}
}
// If tag doesn't exists, append new line
if (!found)
fileLines.Add(stringVal + "|" + val);
case "currprog":
if (m154.Parameters.Count() < 3)
return;
RedisController.WriteProductionName(m154.Process, m154.Parameters[2]);
break;
// Write file
File.WriteAllLines(outputFileName, fileLines.ToArray());
case "repstarget":
if (m154.Parameters.Count() < 3)
return;
RedisController.WriteProductionRepsTarget(m154.Process, m154.Parameters[2]);
break;
case "repsdone":
if (m154.Parameters.Count() < 3)
return;
RedisController.WriteProductionRepsDone(m154.Process, m154.Parameters[2]);
break;
default:
string notif = m154.Parameters[1];
if (m154.Parameters.Count() > 2)
notif += m154.Parameters[2];
RedisController.WriteProductionNotification(m154.Process, notif);
break;
}
}
// Write ack
libraryError = ncHandler.WriteM154Ack((int)m154.Process);
if (libraryError.IsError())
ManageLibraryError(libraryError);
}
else //MTC
{
string stringVal = "Path_" + m154.Process + "_";
string val = "";
// Check if command is MTC
if (m154.Parameters[0] == "MTC")
{
// Convert tag string in Pascal Case and add to result string
switch (m154.Parameters[1].ToLower())
{
case "currprog":
stringVal += "CurrProg";
break;
case "partid":
stringVal += "PartId";
break;
default:
stringVal += m154.Parameters[1];
break;
}
// Set value
if (m154.Parameters.Count() > 2)
val = m154.Parameters[2];
// Create MTC Directory if not exist
if (!Directory.Exists(ServerStartupConfig.MTCFolderPath))
Directory.CreateDirectory(ServerStartupConfig.MTCFolderPath);
string outputFileName = ServerStartupConfig.MTCFolderPath + "\\DATA\\CmsGeneralStatus.mtc";
// Create file if not exits
if (!File.Exists(outputFileName))
using (var f = File.Create(outputFileName)) { };
// Read file
List<string> fileLines = File.ReadAllLines(outputFileName).ToList();
string[] parametersInLine;
bool found = false;
for (int i = 0; i < fileLines.Count() && !found; i++)
{
// Get tag & value from row
parametersInLine = fileLines[i].Split('|');
if (parametersInLine[0] == stringVal)
{
found = true;
fileLines[i] = stringVal + "|" + val;
}
}
// If tag doesn't exists, append new line
if (!found)
fileLines.Add(stringVal + "|" + val);
// Write file
File.WriteAllLines(outputFileName, fileLines.ToArray());
// Write ack
libraryError = ncHandler.WriteM154Ack((int)m154.Process);
if (libraryError.IsError())
ManageLibraryError(libraryError);
}
}
}
}
}
+10 -10
View File
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+29 -29
View File
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add description=".Net Framework Data Provider for MySQL" invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add description=".Net Framework Data Provider for MySQL" invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,43 @@
using Step.Database.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Step.Database.Controllers
{
public static class RedisController
{
private const String redisNotificationAddress = "Machine:ProductionProcesses:%NN%:Notification";
private const String redisProdNameAddress = "Machine:ProductionProcesses:%NN%:Programs:01:Name";
private const String redisRepsTargetAddress = "Machine:ProductionProcesses:%NN%:Programs:01:RepsTarget";
private const String redisRepsDoneAddress = "Machine:ProductionProcesses:%NN%:Programs:01:RepsDone";
public static void WriteProductionNotification(uint ProductionProcess, string Notification)
{
string redisHash = redUtil.man.redHash(redisNotificationAddress).Replace("%NN%", ProductionProcess.ToString());
redUtil.man.setRSV(redisHash, Notification);
}
public static void WriteProductionName(uint ProductionProcess, string Name)
{
string redisHash = redUtil.man.redHash(redisProdNameAddress).Replace("%NN%", ProductionProcess.ToString());
redUtil.man.setRSV(redisHash, Name);
}
public static void WriteProductionRepsTarget(uint ProductionProcess, string RepsTarget)
{
string redisHash = redUtil.man.redHash(redisRepsTargetAddress).Replace("%NN%", ProductionProcess.ToString());
redUtil.man.setRSV(redisHash, RepsTarget);
}
public static void WriteProductionRepsDone(uint ProductionProcess, string RepsDone)
{
string redisHash = redUtil.man.redHash(redisRepsDoneAddress).Replace("%NN%", ProductionProcess.ToString());
redUtil.man.setRSV(redisHash, RepsDone);
}
}
}
+805
View File
@@ -0,0 +1,805 @@
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
namespace Step.Database.Redis
{
public class redUtil
{
/// <summary>
/// wrapper di log
/// </summary>
public static Logger lg;
private const string baseHash = "SOUR";
public redUtil()
{
lg = LogManager.GetCurrentClassLogger();
}
/// <summary>
/// Metodo accesso statico
/// </summary>
public static redUtil man = new redUtil();
#region gestione valori in RedisCache
/// <summary>
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto...
/// </summary>
public string redHash(string keyName)
{
string answ = keyName;
try
{
answ = string.Format("{0}:{1}", baseHash, keyName);
}
catch
{ }
return answ;
}
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
return ConnectionMultiplexer.Connect("127.0.0.1,abortConnect=false,ssl=false");
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private static Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
return ConnectionMultiplexer.Connect("127.0.0.1,abortConnect=false,ssl=false,allowAdmin=true");
});
/// <summary>
/// Oggetto statico connessione redis
/// </summary>
public static ConnectionMultiplexer connRedis
{
get
{
return lazyConnection.Value;
}
}
/// <summary>
/// Oggetto statico connessione redis
/// </summary>
public static ConnectionMultiplexer connRedisAdmin
{
get
{
return lazyConnectionAdmin.Value;
}
}
/// <summary>
/// Restituisce info dei server connessi...
/// </summary>
/// <returns></returns>
public IServer[] redServInfo()
{
IServer[] answ = new IServer[1];
if (connRedisAdmin.IsConnected)
{
try
{
answ = new IServer[connRedisAdmin.GetEndPoints().Length];
int i = 0;
foreach (var ep in connRedisAdmin.GetEndPoints())
{
var server = connRedisAdmin.GetServer(ep);
answ[i] = server;
i++;
}
}
catch (Exception exc)
{
lg.Error("Eccezione in redServInfo: " + exc.ToString());
}
}
else
{
lg.Error("Server REDIS Admin non disponibile");
}
return answ;
}
/// <summary>
/// Restituisce una chiave salvata in RedisCache
/// </summary>
/// <param name="chiave"></param>
/// <returns></returns>
public string getRSV(string chiave)
{
string answ = "";
if (connRedis.IsConnected)
{
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.StringGet(chiave);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc));
}
}
else
{
lg.Error("Server REDIS non disponibile per getRSV");
}
return answ;
}
/// <summary>
/// Salva una chiave in RedisCache
/// </summary>
/// <param name="chiave"></param>
/// <param name="valore"></param>
/// <returns></returns>
public bool setRSV(string chiave, string valore)
{
bool answ = false;
if (connRedis.IsConnected)
{
try
{
IDatabase cache = connRedis.GetDatabase();
cache.StringSet(chiave, valore);
answ = true;
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc));
}
}
else
{
lg.Error("Server REDIS non disponibile (setRSV)");
}
return answ;
}
/// <summary>
/// Salva una chiave in RedisCache
/// </summary>
/// <param name="chiave"></param>
/// <param name="valore"></param>
/// <param name="TTL_sec">in secondi</param>
/// <returns></returns>
public bool setRSV(string chiave, string valore, int TTL_sec)
{
bool answ = false;
if (connRedis.IsConnected)
{
try
{
IDatabase cache = connRedis.GetDatabase();
TimeSpan expT = new TimeSpan(0, 0, TTL_sec);
// salvo con expyry...
cache.StringSet(chiave, valore, expT);
answ = true;
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc));
}
}
else
{
lg.Error("Server REDIS non disponibile (setRSV:TTL)");
}
return answ;
}
/// <summary>
/// Incrementa un contatore in Redis
/// </summary>
/// <param name="chiave"></param>
/// <returns></returns>
public long setRCntI(string chiave)
{
long answ = 0;
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.StringIncrement(chiave, 1);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in setRCI:{0}{1}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
/// Decrementa un contatore in Redis
/// </summary>
/// <param name="chiave"></param>
/// <returns></returns>
public long setRCntD(string chiave)
{
long answ = 0;
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.StringDecrement(chiave, 1);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in setRCD:{0}{1}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
/// Restituisce una chiave COUNTER in RedisCache
/// </summary>
/// <param name="chiave"></param>
/// <returns></returns>
public int getRCnt(string chiave)
{
int answInt = 0;
string answ = "";
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.StringGet(chiave);
answInt = Convert.ToInt32(answ);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc));
}
return answInt;
}
/// <summary>
/// Resetta (elimina) un contatore in Redis
/// </summary>
/// <param name="chiave"></param>
/// <returns></returns>
public bool resetRCnt(string chiave)
{
bool answ = false;
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.KeyDelete(chiave);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in resetRCnt:{0}{1}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
/// Restituisce un set KVP (Key Value Pair) salvati in RedisCache
/// </summary>
/// <param name="chiavi"></param>
/// <returns></returns>
public RedisValue[] getRKeys(RedisKey[] chiavi)
{
RedisValue[] answ = null;
try
{
IDatabase cache = connRedis.GetDatabase();
answ = cache.StringGet(chiavi);
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in getRKeys:{0}{1}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
/// Salva un set KVP (Key Value Pair) in RedisCache
/// </summary>
/// <param name="valori">Set KVP chiave-valore da salvare</param>
/// <returns></returns>
public bool setRKeys(KeyValuePair<RedisKey, RedisValue>[] valori)
{
bool answ = false;
try
{
IDatabase cache = connRedis.GetDatabase();
cache.StringSet(valori);
answ = true;
}
catch (Exception exc)
{
lg.Info(string.Format("Errore in setRKeys:{0}{1}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
/// Verifica se ci siano valori nella hash indicata...
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool redHashPresent(RedisKey key)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
answ = cache.HashGetAll(key).Length > 0;
}
catch
{ }
return answ;
}
/// <summary>
/// Verifica se ci siano valori nella hash indicata (string)
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool redHashPresentSz(string key)
{
bool answ = false;
try
{
RedisKey chiave = key;
answ = redHashPresent(chiave);
}
catch
{ }
return answ;
}
/// <summary>
/// Recupera tutti i valori dalla hash
/// </summary>
/// <param name="hashKey"></param>
/// <returns></returns>
public KeyValuePair<string, string>[] redGetHash(string hashKey)
{
KeyValuePair<string, string>[] answ = new KeyValuePair<string, string>[1];
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
HashEntry[] valori = cache.HashGetAll(chiave);
answ = new KeyValuePair<string, string>[valori.Length];
int i = 0;
foreach (HashEntry item in valori)
{
answ[i] = new KeyValuePair<string, string>(item.Name, item.Value);
i++;
}
}
catch
{ }
return answ;
}
/// <summary>
/// Recupera tutti i valori dalla hash in formato Dictionary
/// </summary>
/// <param name="hashKey"></param>
/// <returns></returns>
public Dictionary<string, string> redGetHashDict(string hashKey)
{
Dictionary<string, string> answ = new Dictionary<string, string>();
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
HashEntry[] valori = cache.HashGetAll(chiave);
foreach (HashEntry item in valori)
{
answ.Add(item.Name, item.Value);
}
}
catch
{ }
return answ;
}
/// <summary>
/// Recupera UN SINGOLO VALORE dalla hash per un dato field
/// </summary>
/// <param name="hashKey"></param>
/// <param name="hashField"></param>
/// <returns></returns>
public string redGetHashField(string hashKey, string hashField)
{
string answ = "";
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
RedisValue campo = hashField;
RedisValue valOut = cache.HashGet(chiave, campo);
answ = valOut.ToString();
}
catch
{ }
return answ;
}
/// <summary>
/// Salvataggio di una hash di valori
/// </summary>
/// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param>
/// <returns></returns>
public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields)
{
bool answ = false;
if (connRedis.IsConnected)
{
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
HashEntry[] valori = new HashEntry[hashFields.Length];
int i = 0;
foreach (KeyValuePair<string, string> kvp in hashFields)
{
valori[i] = new HashEntry(kvp.Key, kvp.Value);
i++;
}
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
}
else
{
lg.Error("Server REDIS non disponibile (redSaveHash)");
}
return answ;
}
/// <summary>
/// Salvataggio di una hash di valori
/// </summary>
/// <param name="hashKey">chiave</param>
/// <param name="hashListKVP">valori come lista KVP</param>
/// <returns></returns>
public bool redSaveHashList(string hashKey, List<KeyValuePair<string, string>> hashListKVP)
{
bool answ = false;
if (connRedis.IsConnected)
{
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
HashEntry[] valori = new HashEntry[hashListKVP.Count];
int i = 0;
foreach (KeyValuePair<string, string> kvp in hashListKVP)
{
valori[i] = new HashEntry(kvp.Key, kvp.Value);
i++;
}
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
}
else
{
lg.Error("Server REDIS non disponibile (redSaveHashList)");
}
return answ;
}
/// <summary>
/// Salvataggio di una hash di valori in formato Dictionary
/// </summary>
/// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param>
/// <returns></returns>
public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
HashEntry[] valori = new HashEntry[hashFields.Count];
int i = 0;
foreach (KeyValuePair<string, string> kvp in hashFields)
{
valori[i] = new HashEntry(kvp.Key, kvp.Value);
i++;
}
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
return answ;
}
/// <summary>
/// Salvataggio di una hash di valori
/// </summary>
/// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param>
/// <returns></returns>
public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
answ = redSaveHash(hashKey, hashFields);
if (expireSeconds > 0)
{
cache.KeyExpire(chiave, DateTime.Now.AddSeconds(expireSeconds));
}
//answ = true;
}
catch
{ }
return answ;
}
/// <summary>
/// Salvataggio di una hash di valori in formato Dictionary
/// </summary>
/// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param>
/// <returns></returns>
public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = hashKey;
answ = redSaveHashDict(hashKey, hashFields);
if (expireSeconds > 0)
{
cache.KeyExpire(chiave, DateTime.Now.AddSeconds(expireSeconds));
}
//answ = true;
}
catch
{ }
return answ;
}
/// <summary>
/// Elimina una key (hash, string)
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool redDelKey(string key)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
try
{
RedisKey chiave = key;
cache.KeyDelete(chiave);
answ = true;
}
catch
{ }
return answ;
}
/// <summary>
/// Flush completo cache redis
/// </summary>
/// <param name="keyPattern">** = tutti</param>
/// <returns></returns>
public bool redFlushKey(string keyPattern)
{
bool answ = false;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
// se vuoto = ALL...
keyPattern = keyPattern == "" ? "**" : keyPattern;
try
{
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern))
{
cache.KeyDelete(key);
}
}
answ = true;
}
catch (Exception exc)
{
lg.Error(string.Format("Eccezione: {0}", exc));
}
return answ;
}
/// <summary>
/// Conta num oggetti cache redis che rispondono a pattern
/// </summary>
/// <param name="keyPattern">** = tutti</param>
/// <returns></returns>
public int redCountKey(string keyPattern)
{
int answ = 0;
// cerco se ci sia valore in redis...
IDatabase cache = connRedis.GetDatabase();
// se vuoto = ALL...
keyPattern = keyPattern == "" ? "**" : keyPattern;
try
{
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern))
{
answ++;
}
}
}
catch (Exception exc)
{
lg.Error(string.Format("Eccezione: {0}", exc));
}
return answ;
}
/// <summary>
/// Restituisce numero record in Redis DB
/// </summary>
public long numRecRedis
{
get
{
long answ = 0;
try
{
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
answ += server.DatabaseSize();
}
}
catch
{ }
return answ;
}
}
/// <summary>
/// Restituisce oggetti cache redis che rispondono a pattern
/// </summary>
/// <param name="keyPattern">** = tutti</param>
/// <param name="orderBy">Tipo di ordinamento per kvp</param>
/// <returns></returns>
public List<KeyValuePair<string, int>> redGetCounterByKey(string keyPattern, kvpOrderBy orderBy)
{
int numAnsw = redCountKey(keyPattern);
RedisKey[] chiavi = new RedisKey[numAnsw];
List<KeyValuePair<string, int>> answ = new List<KeyValuePair<string, int>>();
// se vuoto = ALL...
keyPattern = keyPattern == "" ? "**" : keyPattern;
// recupero in primis elenco chiavi
try
{
int i = 0;
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern))
{
chiavi[i] = key;
i++;
}
}
}
catch (Exception exc)
{
lg.Error(string.Format("Eccezione: {0}", exc));
}
// ora recupero valori!
var valori = getRKeys(chiavi);
int currVal = 0;
// popolo rispsota
try
{
for (int i = 0; i < numAnsw; i++)
{
Int32.TryParse(valori[i], out currVal);
answ.Add(new KeyValuePair<string, int>(chiavi[i], currVal));
}
}
catch
{ }
// se richiesto riordino...
switch (orderBy)
{
case kvpOrderBy.KeyAsc:
answ.Sort(CompareKey);
break;
case kvpOrderBy.KeyDesc:
answ.Sort(CompareKeyDesc);
break;
case kvpOrderBy.ValAsc:
answ.Sort(CompareVal);
break;
case kvpOrderBy.ValDesc:
answ.Sort(CompareValDesc);
break;
default:
break;
}
return answ;
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x VALORE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
public int CompareVal(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Value.CompareTo(y.Value);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
/// <summary>
/// Effettua comaprazione x VALORE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
public int CompareValDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Value.CompareTo(x.Value);
}
/// <summary>
/// Tipologia di ordinamento x liste KVP
/// </summary>
public enum kvpOrderBy
{
/// <summary>
/// Ordinamento ASCending per KEY
/// </summary>
KeyAsc,
/// <summary>
/// Ordinamento DESCending per KEY
/// </summary>
KeyDesc,
/// <summary>
/// Ordinamento ASCending per VAL
/// </summary>
ValAsc,
/// <summary>
/// Ordinamento DESCending per VAL
/// </summary>
ValDesc
}
#endregion
}
}
+169 -126
View File
@@ -1,127 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{357D5EE1-FFC8-489B-9232-22CF474D9A6F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Database</RootNamespace>
<AssemblyName>Step.Database</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library">
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.Entity.6.9.10\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Helpers.Crypto, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\System.Web.Helpers.Crypto.3.2.3\lib\net40\System.Web.Helpers.Crypto.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\AlarmsController.cs" />
<Compile Include="Controllers\FunctionsAccessController.cs" />
<Compile Include="Controllers\MachinesController.cs" />
<Compile Include="Controllers\MaintenancesController.cs" />
<Compile Include="Controllers\QueueController.cs" />
<Compile Include="Controllers\NcToolManagerController.cs" />
<Compile Include="Controllers\SessionsController.cs" />
<Compile Include="Controllers\UsersController.cs" />
<Compile Include="Controllers\MachinesUsersController.cs" />
<Compile Include="Controllers\UserSoftkeysController.cs" />
<Compile Include="DatabaseContext.cs" />
<Compile Include="Migrations\201902121508312_InitMigration.cs" />
<Compile Include="Migrations\201902121508312_InitMigration.Designer.cs">
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Config\Step.Config.csproj">
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
<Name>Step.Config</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375dd-06d3-49bb-8130-d9ddb34c429d}</Project>
<Name>Step.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Utils\Step.Utils.csproj">
<Project>{cbeb631b-abfa-4042-9779-c0060b0dfefe}</Project>
<Name>Step.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="docs\MySqlCommand.xml" />
<Content Include="docs\MySqlCommandBuilder.xml" />
<Content Include="docs\MySqlConnection.xml" />
<Content Include="docs\MySqlConnectionStringBuilder.xml" />
<Content Include="docs\MySqlDataAdapter.xml" />
<Content Include="docs\MySqlDataReader.xml" />
<Content Include="docs\MySqlException.xml" />
<Content Include="docs\MySqlHelper.xml" />
<Content Include="docs\MySqlParameter.xml" />
<Content Include="docs\MySqlParameterCollection.xml" />
<Content Include="docs\MySqlTransaction.xml" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Migrations\201902121508312_InitMigration.resx">
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{357D5EE1-FFC8-489B-9232-22CF474D9A6F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Database</RootNamespace>
<AssemblyName>Step.Database</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library">
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.Entity.6.9.10\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.1.0.7\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.0.519\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.PerformanceCounter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.PerformanceCounter.4.5.0\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.4.5.1\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Channels, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.4.5.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Helpers.Crypto, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\System.Web.Helpers.Crypto.3.2.3\lib\net40\System.Web.Helpers.Crypto.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\AlarmsController.cs" />
<Compile Include="Controllers\FunctionsAccessController.cs" />
<Compile Include="Controllers\MachinesController.cs" />
<Compile Include="Controllers\MaintenancesController.cs" />
<Compile Include="Controllers\QueueController.cs" />
<Compile Include="Controllers\NcToolManagerController.cs" />
<Compile Include="Controllers\RedisController.cs" />
<Compile Include="Controllers\SessionsController.cs" />
<Compile Include="Controllers\UsersController.cs" />
<Compile Include="Controllers\MachinesUsersController.cs" />
<Compile Include="Controllers\UserSoftkeysController.cs" />
<Compile Include="DatabaseContext.cs" />
<Compile Include="Migrations\201902121508312_InitMigration.cs" />
<Compile Include="Migrations\201902121508312_InitMigration.Designer.cs">
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Redis\redUtil.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Config\Step.Config.csproj">
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
<Name>Step.Config</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375dd-06d3-49bb-8130-d9ddb34c429d}</Project>
<Name>Step.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Step.Utils\Step.Utils.csproj">
<Project>{cbeb631b-abfa-4042-9779-c0060b0dfefe}</Project>
<Name>Step.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="docs\MySqlCommand.xml" />
<Content Include="docs\MySqlCommandBuilder.xml" />
<Content Include="docs\MySqlConnection.xml" />
<Content Include="docs\MySqlConnectionStringBuilder.xml" />
<Content Include="docs\MySqlDataAdapter.xml" />
<Content Include="docs\MySqlDataReader.xml" />
<Content Include="docs\MySqlException.xml" />
<Content Include="docs\MySqlHelper.xml" />
<Content Include="docs\MySqlParameter.xml" />
<Content Include="docs\MySqlParameterCollection.xml" />
<Content Include="docs\MySqlTransaction.xml" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Migrations\201902121508312_InitMigration.resx">
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+19 -8
View File
@@ -1,9 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net462" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
<package id="MySql.Data" version="6.10.4" targetFramework="net462" />
<package id="MySql.Data.Entity" version="6.9.10" targetFramework="net462" />
<package id="System.Web.Helpers.Crypto" version="3.2.3" targetFramework="net462" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net462" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
<package id="MySql.Data" version="6.10.4" targetFramework="net462" />
<package id="MySql.Data.Entity" version="6.9.10" targetFramework="net462" />
<package id="NLog" version="4.5.11" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="1.0.7" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.0.519" targetFramework="net462" />
<package id="System.Buffers" version="4.4.0" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="4.5.0" targetFramework="net462" />
<package id="System.IO.Pipelines" version="4.5.1" targetFramework="net462" />
<package id="System.Memory" version="4.5.1" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net462" />
<package id="System.Threading.Channels" version="4.5.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net462" />
<package id="System.Web.Helpers.Crypto" version="3.2.3" targetFramework="net462" />
</packages>
+1 -1
View File
@@ -18,7 +18,7 @@ namespace Step.Model.ConfigModels
public string MTCFolderPath { get; set; }
public string MTCApplicationName { get; set; }
public Boolean CMSConnectReady { get; set; }
public int MaxAlarmsRows { get; set; }
public int AlarmToDelete { get; set; }
+10 -10
View File
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+119 -115
View File
@@ -1,116 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Utils</RootNamespace>
<AssemblyName>Step.Utils</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.12\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TeamDev.SDK.6">
<HintPath>..\Libs\TeamDev.SDK.6.dll</HintPath>
</Reference>
<Reference Include="TeamDev.SDK.WPF">
<HintPath>..\Libs\TeamDev.SDK.WPF.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ExceptionManager.cs" />
<Compile Include="LanguageController.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StepLogger.cs" />
<Compile Include="SupportFunctions.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="docs\MySqlCommand.xml" />
<Content Include="docs\MySqlCommandBuilder.xml" />
<Content Include="docs\MySqlConnection.xml" />
<Content Include="docs\MySqlConnectionStringBuilder.xml" />
<Content Include="docs\MySqlDataAdapter.xml" />
<Content Include="docs\MySqlDataReader.xml" />
<Content Include="docs\MySqlException.xml" />
<Content Include="docs\MySqlHelper.xml" />
<Content Include="docs\MySqlParameter.xml" />
<Content Include="docs\MySqlParameterCollection.xml" />
<Content Include="docs\MySqlTransaction.xml" />
<Content Include="languages\en.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="languages\IT.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="languages\zh.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="languageValidator.xsd">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="NLog.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
<Name>Step.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Step.Utils</RootNamespace>
<AssemblyName>Step.Utils</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CMS_CORE_Library, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TeamDev.SDK.6">
<HintPath>..\Libs\TeamDev.SDK.6.dll</HintPath>
</Reference>
<Reference Include="TeamDev.SDK.WPF">
<HintPath>..\Libs\TeamDev.SDK.WPF.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ExceptionManager.cs" />
<Compile Include="LanguageController.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StepLogger.cs" />
<Compile Include="SupportFunctions.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="docs\MySqlCommand.xml" />
<Content Include="docs\MySqlCommandBuilder.xml" />
<Content Include="docs\MySqlConnection.xml" />
<Content Include="docs\MySqlConnectionStringBuilder.xml" />
<Content Include="docs\MySqlDataAdapter.xml" />
<Content Include="docs\MySqlDataReader.xml" />
<Content Include="docs\MySqlException.xml" />
<Content Include="docs\MySqlHelper.xml" />
<Content Include="docs\MySqlParameter.xml" />
<Content Include="docs\MySqlParameterCollection.xml" />
<Content Include="docs\MySqlTransaction.xml" />
<Content Include="languages\en.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="languages\IT.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="languages\zh.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="languageValidator.xsd">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="NLog.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Step.Model\Step.Model.csproj">
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
<Name>Step.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+5 -5
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySql.Data" version="6.10.4" targetFramework="net462" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
<package id="NLog" version="4.4.12" targetFramework="net461" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySql.Data" version="6.10.4" targetFramework="net462" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
<package id="NLog" version="4.5.11" targetFramework="net462" />
</packages>
+3 -3
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>