Merge branch 'release/WinFormNuget01'

This commit is contained in:
Samuele Locatelli
2024-08-07 09:14:41 +02:00
34 changed files with 1463 additions and 53 deletions
+120 -16
View File
@@ -1,6 +1,8 @@
variables:
VERS_MAIN: '1.0'
NEXUS_PATH: 'LiMan'
APP_NAME: 'LiMan.UI'
NUGET_PATH: 'C:\Tools\nuget.exe'
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
@@ -37,19 +39,6 @@ variables:
#cd "$env:APP_NAME\bin\publish\net6.0"
# # helper creazione hash files x EXE
# .hashBuildExe: &hashBuildExe
# - |
# $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
# $MD5 = Get-FileHash $Target -Algorithm MD5
# $SHA1 = Get-FileHash $Target -Algorithm SHA1
# New-Item $Target".md5"
# New-Item $Target".sha1"
# $MD5.Hash | Set-Content -Path $Target".md5"
# $SHA1.Hash | Set-Content -Path $Target".sha1"
# echo "Created HASH files for $Target"
# helper creazione hash files x IIS
.hashBuild: &hashBuild
- |
@@ -91,11 +80,58 @@ variables:
# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
# image: mcr.microsoft.com/dotnet/sdk:6.0
# helper x fix version number
.version-fix: &version-fix
- |
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format ddHH)
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
$env:NEW_COPYRIGHT = "EgalWare @ 2021-" + (get-date -format yyyy)
#$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
#$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
#$newContenuto = $newContenuto -replace 'EgalWare © 2021', $env:NEW_COPYRIGHT
#$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
# display versioni generate
$resoconto = "Effettuato fix file VersGen | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
Write-Output $resoconto;
echo "Replace completati"
# helper x fix nuspec file
.nuspec-fix: &nuspec-fix
- |
echo "Modifica dati file nuspec Release"
$currRelease = $env:NUM_REL
$currDebug = $env:NUM_DEB
$find = "<version>(.|\n)*?</version>";
$fileNameRel = "$env:APP_NAME.Release.nuspec";
$replRel = "<version>" + $currRelease + "</version>";
$nuspDataRel = Get-Content $fileNameRel;
$nuspDataRelUpd = $nuspDataRel -replace $find, $replRel;
$nuspDataRelUpd = $nuspDataRelUpd -replace "#copyright#", $replCopy;
$nuspDataRelUpd = $nuspDataRelUpd -replace "#releaseNotes#", "Build $adesso";
Set-Content -Path $fileNameRel -Value $nuspDataRelUpd;
echo "Modifica dati file nuspec Debug"
$fileNameDeb = "$env:APP_NAME.Debug.nuspec";
$replDeb = "<version>" + $currDebug + "</version>";
$nuspDataDeb = Get-Content $fileNameDeb;
$nuspDataDebUpd = $nuspDataDeb -replace $find, $replDeb;
$nuspDataDebUpd = $nuspDataDebUpd -replace "#copyright#", $replCopy;
$nuspDataDebUpd = $nuspDataDebUpd -replace "#releaseNotes#", "Build $adesso";
Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd;
echo "replace completati"
stages:
- build
- deploy
- release
# --------------------------------
# BUILD
# --------------------------------
UI:build:
stage: build
tags:
@@ -125,8 +161,25 @@ Transfer:build:
- dotnet restore LiMan.sln
script:
- dotnet build LiMan.Transfer/LiMan.Transfer.csproj
EgwProxy.LiMan:build:
stage: build
tags:
- win
variables:
APP_NAME: EgwProxy.LiMan
SOL_NAME: EgwProxy.LiMan
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
script:
- echo $CI_COMMIT_BRANCH
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# --------------------------------
# DEPLOY
# --------------------------------
UI:IIS01:deploy:
stage: deploy
tags:
@@ -206,7 +259,58 @@ Transfer:deploy:
- *hashBuild
- *nexusUpload
EgwProxy.LiMan:deploy:
stage: deploy
needs: ["EgwProxy.LiMan:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: EgwProxy.LiMan
SOL_NAME: EgwProxy.LiMan
only:
refs:
- develop
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln" -verbosity quiet'
- *version-fix
- *nuspec-fix
script:
# - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- dotnet build "$env:APP_NAME\$env:APP_NAME.csproj"
- '& Remove-Item *.nupkg'
- '& $env:NUGET_PATH pack "$env:APP_NAME.Debug.nuspec"'
- '& "$env:NUGET_PATH" setapikey $NUGET_API_KEY -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
# --------------------------------
# RELEASE
# --------------------------------
EgwProxy.LiMan:release:
stage: release
needs: ["EgwProxy.LiMan:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: EgwProxy.LiMan
SOL_NAME: EgwProxy.LiMan
only:
refs:
- SDK
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln" -verbosity quiet'
- *version-fix
- *nuspec-fix
script:
- dotnet build "$env:APP_NAME\$env:APP_NAME.csproj"
- '& Remove-Item *.nupkg'
- '& $env:NUGET_PATH pack "$env:APP_NAME.Release.nuspec"'
- '& "$env:NUGET_PATH" setapikey $NUGET_API_KEY -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
# UI:installer:
# stage: installer
# tags:
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.3" newVersion="8.0.0.3" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,60 @@
<?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>{5DADD362-4B14-45AD-AB0A-B30361D7449B}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>EgwProxy.LiMan.ConsoleTest</RootNamespace>
<AssemblyName>EgwProxy.LiMan.ConsoleTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<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="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EgwProxy.LiMan\EgwProxy.LiMan.csproj">
<Project>{1b8191a0-dd4e-4320-878b-246a9b61c368}</Project>
<Name>EgwProxy.LiMan</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+76
View File
@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwProxy.LiMan.ConsoleTest
{
internal class Program
{
static void Main(string[] args)
{
string separator = "-----------------";
string codApp = "EgtBeamWall";
string answ = "";
#if DEBUG
string srvUrl = "localhost:5003";
#else
string srvUrl = "liman.egalware.com/ELM.API";
#endif
Console.WriteLine(separator);
Console.WriteLine("EgwProxy.LiMan | Console test app");
Console.WriteLine(separator);
Console.WriteLine("premere un tasto per continuare...");
Console.ReadLine();
// per prima cosa instanzio (cablato) la classe di comnicazione
var commLib = new DataSyncro(srvUrl);
// test ping
Console.WriteLine("Premere ENT per check ping");
answ = Console.ReadLine();
bool servOk = commLib.CheckRemote();
string esito = servOk ? "OK" : "KO";
Console.WriteLine($"Esito controllo server: {esito}");
// chiamo e mostro elenco
var listAll = commLib.ReleaseGetAll(codApp);
// mostro elenco
Console.WriteLine(separator);
Console.WriteLine("Elenco versioni completo:");
Console.WriteLine(separator);
Console.WriteLine("");
foreach (var item in listAll)
{
Console.WriteLine($"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd}");
}
Console.WriteLine(separator);
Console.WriteLine("premere un tasto per continuare...");
Console.WriteLine("");
Console.ReadLine();
Console.WriteLine(separator);
Console.WriteLine("Elenco versioni filtrato:");
Console.WriteLine(separator);
Console.WriteLine("");
Console.WriteLine("Inserire versione minima richiesta (default: 0.0.0.0)");
answ = Console.ReadLine();
answ = string.IsNullOrEmpty(answ) ? "0.0.0.0" : answ;
while (!string.IsNullOrEmpty(answ))
{
var listFilt = commLib.ReleaseGetFilt(codApp, answ);
foreach (var item in listFilt)
{
Console.WriteLine($"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd}");
}
Console.WriteLine(separator);
Console.WriteLine("");
Console.WriteLine("Inserire versione minima richiesta (se vuoto esce)");
answ = Console.ReadLine();
}
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EgwProxy.LiMan.ConsoleTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EgwProxy.LiMan.ConsoleTest")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5dadd362-4b14-45ad-ab0a-b30361d7449b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>EgwProxy.LiMan</id>
<version>#version#</version>
<title>EgwProxy.LiMan</title>
<authors>Samuele E. Locatelli, EgalWare</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<description>Libreria per comunicazione REST con server LiMan - beta/unstable</description>
<releaseNotes>#releaseNotes#</releaseNotes>
<copyright>#copyright#</copyright>
<tags>EgwProxy.LiMan LiMan Rest</tags>
<dependencies>
<dependency id="RestSharp" version="111.2.0.0" />
<dependency id="Newtonsoft.Json" version="13.0.0.0" />
</dependencies>
</metadata>
<files>
<file src="EgwProxy.LiMan\bin\Debug\EgwProxy.LiMan*.dll" target="lib" />
<file src="EgwProxy.LiMan\bin\Debug\EgwProxy.LiMan*.config" target="lib" />
<file src="EgwProxy.LiMan\bin\Debug\EgwProxy.LiMan*.pdb" target="lib" />
</files>
</package>
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>EgwProxy.LiMan</id>
<version>#version#</version>
<title>EgwProxy.LiMan</title>
<authors>Samuele E. Locatelli, EgalWare</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<description>Libreria per comunicazione REST con server LiMan</description>
<releaseNotes>#releaseNotes#</releaseNotes>
<copyright>#copyright#</copyright>
<tags>EgwProxy.LiMan LiMan Rest</tags>
<dependencies>
<dependency id="RestSharp" version="111.2.0.0" />
<dependency id="Newtonsoft.Json" version="13.0.0.0" />
</dependencies>
</metadata>
<files>
<file src="EgwProxy.LiMan\bin\Debug\EgwProxy.LiMan*.dll" target="lib" />
<file src="EgwProxy.LiMan\bin\Debug\EgwProxy.LiMan*.config" target="lib" />
</files>
</package>
+12
View File
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.9.34902.65
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.LiMan", "EgwProxy.LiMan\EgwProxy.LiMan.csproj", "{1B8191A0-DD4E-4320-878B-246A9B61C368}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.LiMan.ConsoleTest", "EgwProxy.LiMan.ConsoleTest\EgwProxy.LiMan.ConsoleTest.csproj", "{5DADD362-4B14-45AD-AB0A-B30361D7449B}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestWinFormVB", "TestWinFormVB\TestWinFormVB.vbproj", "{CC0A7D8F-0888-45F5-B791-FCD90349CD21}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +19,14 @@ Global
{1B8191A0-DD4E-4320-878B-246A9B61C368}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B8191A0-DD4E-4320-878B-246A9B61C368}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B8191A0-DD4E-4320-878B-246A9B61C368}.Release|Any CPU.Build.0 = Release|Any CPU
{5DADD362-4B14-45AD-AB0A-B30361D7449B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DADD362-4B14-45AD-AB0A-B30361D7449B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DADD362-4B14-45AD-AB0A-B30361D7449B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DADD362-4B14-45AD-AB0A-B30361D7449B}.Release|Any CPU.Build.0 = Release|Any CPU
{CC0A7D8F-0888-45F5-B791-FCD90349CD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC0A7D8F-0888-45F5-B791-FCD90349CD21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC0A7D8F-0888-45F5-B791-FCD90349CD21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC0A7D8F-0888-45F5-B791-FCD90349CD21}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+190 -24
View File
@@ -7,7 +7,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
@@ -15,6 +17,8 @@ namespace EgwProxy.LiMan
{
public class DataSyncro
{
#region Public Constructors
/// <summary>
/// Inizializza la libreria di comunicazione con il token assegnato
/// </summary>
@@ -26,27 +30,10 @@ namespace EgwProxy.LiMan
rcOptions = new RestClientOptions { BaseUrl = new Uri(apiUrl), Timeout = TimeSpan.FromMilliseconds(callTimeout) };
Log.Info($"DataSyncro initialized | api: {apiUrl} | timeout: {callTimeout}");
}
/// <summary>
/// Istanza logger
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// URL dell'API x chiamate gestione licenze
/// </summary>
private string apiUrl = $"";
#endregion Public Constructors
private int callTimeout = 10000;
/// <summary>
/// Opzioni standard di chiamata
/// </summary>
private RestClientOptions rcOptions = new RestClientOptions();
/// <summary>
/// Indirizzo server (URL con eventuale porta)
/// </summary>
private string servAddr = $"";
#region Public Methods
/// <summary>
/// Elenco Release applicazione
@@ -71,30 +58,209 @@ namespace EgwProxy.LiMan
}
return answ;
}
/// <summary>
/// Effettua chiamata test sul server (ping), se fallisse riprova fino a maxTry volte
/// </summary>
/// <param name="maxTry">num tentativi in caso di KO</param>
/// <param name="waitTime">tempo di attesa medio tra tentativi in ms</param>
/// <returns></returns>
public bool CheckRemote(int maxTry = 5, int waitTime = 200)
{
bool res = false;
int numTry = 0;
IPAddress address = IPAddress.Loopback;
string srvIp = servAddr;
if (servAddr.Contains(":"))
{
srvIp = servAddr.Substring(0, servAddr.IndexOf(":"));
}
while (!res && numTry < maxTry)
{
res = pingAddress(srvIp, callTimeout) == IPStatus.Success;
numTry++;
if (!res)
{
Thread.Sleep(waitTime);
}
}
return res;
}
/// <summary>
/// Test ping x indirizzo indicato
/// </summary>
/// <param name="tgtAddr">Indirizzo da pingare</param>
/// <returns></returns>
public static IPStatus pingAddress(string tgtAddr)
{
IPStatus answ = IPStatus.Unknown;
IPAddress address;
PingReply reply;
using (Ping pingSender = new Ping())
{
address = IPAddress.Loopback;
int pingMsTimeout = 500;
IPAddress.TryParse(tgtAddr, out address);
try
{
// se != null --> uso tgtAddr...
if (address != null)
{
reply = pingSender.Send(address, pingMsTimeout);
}
else
{
reply = pingSender.Send(tgtAddr, pingMsTimeout);
}
}
catch
{
reply = pingSender.Send(IPAddress.Loopback, pingMsTimeout);
}
answ = reply.Status;
}
return answ;
}
/// <summary>
/// Test ping x indirizzo indicato
/// </summary>
/// <param name="tgtAddr">Indirizzo da pingare</param>
/// <param name="timeout">Timeout chiamata in ms</param>
/// <returns></returns>
public static IPStatus pingAddress(string tgtAddr, int timeout)
{
IPStatus answ = IPStatus.Unknown;
IPAddress address;
PingReply reply;
using (Ping pingSender = new Ping())
{
address = IPAddress.Loopback;
int pingMsTimeout = timeout;
IPAddress.TryParse(tgtAddr, out address);
try
{
// se != null --> uso tgtAddr...
if (address != null && address != IPAddress.Loopback)
{
reply = pingSender.Send(address, pingMsTimeout);
}
else
{
reply = pingSender.Send(tgtAddr, pingMsTimeout);
}
answ = reply.Status;
}
catch (Exception exc)
{
answ = IPStatus.Unknown;
Log.Error($"Errore in ping:{Environment.NewLine}{exc}");
}
}
return answ;
}
/// <summary>
/// Versione Async Elenco Release applicazione
/// </summary>
/// <param name="CodApp">CodApp richiesta</param>
/// <returns></returns>
public async Task<List<ReleaseDTO>> ReleaseGetAllAsync(int MatID)
public async Task<List<ReleaseDTO>> ReleaseGetAllAsync(string CodApp)
{
List<ReleaseDTO> answ = new List<ReleaseDTO>();
using (RestClient client = new RestClient(rcOptions))
{
string CodAppEnc = HttpUtility.UrlEncode(RestToken);
var request = new RestRequest($"Inventory/{CodAppEnc}?MatCloudId={MatID}", Method.Get);
string CodAppEnc = HttpUtility.UrlEncode(CodApp);
var request = new RestRequest($"Release/{CodAppEnc}", Method.Get);
var response = await client.GetAsync(request);
// controllo risposta
if (response.StatusCode == HttpStatusCode.OK)
{
// contenuto serializzato
string rawData = $"{response.Content}";
answ = JsonConvert.DeserializeObject<List<MaterialDTO>>(rawData);
answ = JsonConvert.DeserializeObject<List<ReleaseDTO>>(rawData);
}
}
return await Task.FromResult(answ);
}
/// <summary>
/// Elenco Release applicazione
/// </summary>
/// <param name="CodApp">CodApp richiesta</param>
/// <param name="VersMin">Versione minima richiesta</param>
/// <returns></returns>
public List<ReleaseDTO> ReleaseGetFilt(string CodApp, string VersMin)
{
List<ReleaseDTO> answ = new List<ReleaseDTO>();
using (RestClient client = new RestClient(rcOptions))
{
string CodAppEnc = HttpUtility.UrlEncode(CodApp);
var request = new RestRequest($"Release/filt/{CodAppEnc}?VersMin={VersMin}", Method.Get);
var response = client.Get(request);
// controllo risposta
if (response.StatusCode == HttpStatusCode.OK)
{
// contenuto serializzato
string rawData = $"{response.Content}";
answ = JsonConvert.DeserializeObject<List<ReleaseDTO>>(rawData);
}
}
return answ;
}
/// <summary>
/// Versione Async Elenco Release applicazione
/// </summary>
/// <param name="CodApp">CodApp richiesta</param>
/// <param name="VersMin">Versione minima richiesta</param>
/// <returns></returns>
public async Task<List<ReleaseDTO>> ReleaseGetFiltAsync(string CodApp, string VersMin)
{
List<ReleaseDTO> answ = new List<ReleaseDTO>();
using (RestClient client = new RestClient(rcOptions))
{
string CodAppEnc = HttpUtility.UrlEncode(CodApp);
var request = new RestRequest($"Release/filt/{CodAppEnc}?VersMin={VersMin}", Method.Get);
var response = await client.GetAsync(request);
// controllo risposta
if (response.StatusCode == HttpStatusCode.OK)
{
// contenuto serializzato
string rawData = $"{response.Content}";
answ = JsonConvert.DeserializeObject<List<ReleaseDTO>>(rawData);
}
}
return await Task.FromResult(answ);
}
#endregion Public Methods
#region Private Fields
/// <summary>
/// Istanza logger
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// URL dell'API x chiamate gestione licenze
/// </summary>
private string apiUrl = $"";
private int callTimeout = 10000;
/// <summary>
/// Opzioni standard di chiamata
/// </summary>
private RestClientOptions rcOptions = new RestClientOptions();
/// <summary>
/// Indirizzo server (URL con eventuale porta)
/// </summary>
private string servAddr = $"";
#endregion Private Fields
}
}
}
+3 -2
View File
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EgwProxy.LiMan</RootNamespace>
<AssemblyName>EgwProxy.LiMan</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
@@ -42,7 +42,7 @@
<HintPath>..\packages\NLog.5.0.1\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=111.2.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.111.2.0\lib\netstandard2.0\RestSharp.dll</HintPath>
<HintPath>..\packages\RestSharp.111.2.0\lib\net471\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -83,6 +83,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataSyncro.cs" />
<Compile Include="RestPayload.cs" />
<Compile Include="DTO\ReleaseDTO.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+5 -1
View File
@@ -10,6 +10,10 @@
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.3" newVersion="8.0.0.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
+2 -2
View File
@@ -3,7 +3,7 @@
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
<package id="NLog" version="5.0.1" targetFramework="net462" />
<package id="RestSharp" version="111.2.0" targetFramework="net462" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
@@ -11,5 +11,5 @@
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" />
<package id="System.Text.Json" version="8.0.3" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" requireReinstallation="true" />
</packages>
File diff suppressed because one or more lines are too long
+1
View File
@@ -1188,6 +1188,7 @@ namespace LiMan.DB.Controllers
}
return dbResult;
}
/// <summary>
/// Elenco release (completo) dato un applicativo applicativi
/// </summary>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2408.0618</h4>
<h4>Versione: 1.1.2408.0619</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2408.0618
1.1.2408.0619
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2408.0618</version>
<version>1.1.2408.0619</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>1.1.2408.0618</Version>
<Version>1.1.2408.0619</Version>
<RootNamespace>LiMan.UI</RootNamespace>
<AssemblyName>LiMan.UI</AssemblyName>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2408.0618</h4>
<h4>Versione: 1.1.2408.0619</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.1.2408.0618
1.1.2408.0619
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2408.0618</version>
<version>1.1.2408.0619</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.3" newVersion="8.0.0.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-110.2.0.0" newVersion="110.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+132
View File
@@ -0,0 +1,132 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtOut = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.txtMinVers = New System.Windows.Forms.TextBox()
Me.txtCodApp = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(12, 12)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(133, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Server Test"
Me.Button1.UseVisualStyleBackColor = True
'
'txtOut
'
Me.txtOut.Location = New System.Drawing.Point(181, 58)
Me.txtOut.Multiline = True
Me.txtOut.Name = "txtOut"
Me.txtOut.Size = New System.Drawing.Size(607, 380)
Me.txtOut.TabIndex = 1
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(12, 56)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(133, 23)
Me.Button2.TabIndex = 2
Me.Button2.Text = "Get All Releases"
Me.Button2.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(12, 95)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(133, 23)
Me.Button3.TabIndex = 3
Me.Button3.Text = "Get Vers From"
Me.Button3.UseVisualStyleBackColor = True
'
'txtMinVers
'
Me.txtMinVers.Location = New System.Drawing.Point(449, 14)
Me.txtMinVers.Name = "txtMinVers"
Me.txtMinVers.Size = New System.Drawing.Size(133, 20)
Me.txtMinVers.TabIndex = 4
Me.txtMinVers.Text = "2.5.5.0"
'
'txtCodApp
'
Me.txtCodApp.Location = New System.Drawing.Point(226, 12)
Me.txtCodApp.Name = "txtCodApp"
Me.txtCodApp.Size = New System.Drawing.Size(133, 20)
Me.txtCodApp.TabIndex = 5
Me.txtCodApp.Text = "EgtBeamWall"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(178, 17)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(45, 13)
Me.Label1.TabIndex = 6
Me.Label1.Text = "CodApp"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(398, 17)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(51, 13)
Me.Label2.TabIndex = 7
Me.Label2.Text = "Min Vers:"
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtCodApp)
Me.Controls.Add(Me.txtMinVers)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.txtOut)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Button1 As Button
Friend WithEvents txtOut As TextBox
Friend WithEvents Button2 As Button
Friend WithEvents Button3 As Button
Friend WithEvents txtMinVers As TextBox
Friend WithEvents txtCodApp As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents Label2 As Label
End Class
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+68
View File
@@ -0,0 +1,68 @@
Imports EgwProxy.LiMan
Public Class Form1
#If DEBUG Then
' Indirizzo server (DEBUG)
Private servAddr As String = "localhost:5003"
#Else
' Indirizzo server (DEBUG)
Private servAddr As String = "liman.egalware.com/ELM.API"
#End If
Private commLib As DataSyncro
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' esegue test comunicazione server (ping, alive)
commLib = New DataSyncro(servAddr)
Dim servOk As Boolean
servOk = commLib.CheckRemote()
Dim esito As String = ""
If (servOk) Then
esito = "Test Ping: OK"
Else
esito = "Test Ping: KO"
End If
txtOut.Text = esito
End Sub
Private Async Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
' recupera e mostra dati elenco materiali
commLib = New DataSyncro(servAddr)
Dim result As String = ""
Dim matList = Await commLib.ReleaseGetAllAsync(txtCodApp.Text)
If matList IsNot Nothing Then
For Each item In matList
result += $"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd}{Environment.NewLine}"
Next
End If
txtOut.Text = result
End Sub
Private Async Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
' recupera e mostra dati elenco materiali
commLib = New DataSyncro(servAddr)
Dim result As String = ""
Dim matList = Await commLib.ReleaseGetFiltAsync(txtCodApp.Text, txtMinVers.Text)
If matList IsNot Nothing Then
For Each item In matList
result += $"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd}{Environment.NewLine}"
Next
End If
txtOut.Text = result
End Sub
End Class
+44
View File
@@ -0,0 +1,44 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.TestWinFormVB.Form1
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Me.MinimumSplashScreenDisplayTime = 0
Return MyBase.OnInitialize(commandLineArgs)
End Function
End Class
End Namespace
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
+35
View File
@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("TestWinFormVB")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("TestWinFormVB")>
<Assembly: AssemblyCopyright("Copyright © 2024")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("d3ec7cd6-0656-4548-b9e8-c06050d8be8d")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
+63
View File
@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("TestWinFormVB.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace
+117
View File
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+73
View File
@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.TestWinFormVB.My.MySettings
Get
Return Global.TestWinFormVB.My.MySettings.Default
End Get
End Property
End Module
End Namespace
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+169
View File
@@ -0,0 +1,169 @@
<?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>{CC0A7D8F-0888-45F5-B791-FCD90349CD21}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>TestWinFormVB.My.MyApplication</StartupObject>
<RootNamespace>TestWinFormVB</RootNamespace>
<AssemblyName>TestWinFormVB</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>TestWinFormVB.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>TestWinFormVB.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408-beta.709\lib\EgwProxy.LiMan.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.3.2\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=111.2.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.111.2.0\lib\net471\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.3\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EgwProxy.LiMan" version="1.0.2408-beta.709" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
<package id="NLog" version="5.3.2" targetFramework="net462" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
<package id="System.Text.Json" version="8.0.3" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" requireReinstallation="true" />
</packages>