Part1
Edit SZO Mailing
This commit is contained in:
parent
845afe8e75
commit
00c55b8a63
Binary file not shown.
Binary file not shown.
@ -5,25 +5,36 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using SupportClasses;
|
||||
|
||||
namespace DataClients
|
||||
{
|
||||
public class FileClient
|
||||
{
|
||||
private char split = '/';
|
||||
//private char split = '\\';
|
||||
private char split = _Directory.Slash;
|
||||
//private string dir = @"Y:\data";
|
||||
//private string dir = @"C:\data";
|
||||
private string dir = @"/archive_rmt/data";
|
||||
private string dir;
|
||||
public string Dir {
|
||||
get { return dir; }
|
||||
set { dir = value; }
|
||||
}
|
||||
|
||||
|
||||
public FileClient()
|
||||
{
|
||||
TempDir.StartCkeckDir();
|
||||
fileClient(@"/archive_rmt/data");
|
||||
//fileClient(@"Y:\data");
|
||||
//fileClient(@"C:\data");
|
||||
}
|
||||
public FileClient(string directory)
|
||||
{
|
||||
fileClient(directory);
|
||||
}
|
||||
private void fileClient(string directory)
|
||||
{
|
||||
TempDir.StartCkeckDir();
|
||||
dir = directory;
|
||||
Dir = directory;
|
||||
}
|
||||
|
||||
public byte[] GetFile(DateTime time, ushort vdp, ushort index)
|
||||
@ -39,7 +50,8 @@ namespace DataClients
|
||||
if (!TempDir.IsExist(name)) return new byte[0];
|
||||
while (TempDir.IsProtect(name)) Thread.Sleep(1000);
|
||||
TempDir.AddProtect(name);
|
||||
Stream fs = File.OpenRead(tmpFileName);
|
||||
using (var fs = (Stream)File.OpenRead(tmpFileName))
|
||||
{
|
||||
var result = new List<byte>();
|
||||
try
|
||||
{
|
||||
@ -49,26 +61,27 @@ namespace DataClients
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
Console.WriteLine(e.StackTrace);
|
||||
Logger.Add("Can't read file: " + name, Logger.Level.error);
|
||||
Logger.Add(e.Message, Logger.Level.error);
|
||||
Logger.Add(e.StackTrace, Logger.Level.error);
|
||||
return new byte[0];
|
||||
}
|
||||
finally
|
||||
{
|
||||
TempDir.RemoveProtect(name);
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckArchive(DateTime time, ushort vdp)
|
||||
{
|
||||
var tmp =
|
||||
var a =
|
||||
dir + split +
|
||||
time.Year.ToString("D4") + split +
|
||||
time.Month.ToString("D2") + split +
|
||||
time.Day.ToString("D2") + split +
|
||||
vdp.ToString("D2");
|
||||
return (File.Exists(tmp + ".tar") || File.Exists(tmp + ".tar.gz"));
|
||||
return (File.Exists(a + ".tar") || File.Exists(a + ".tar.gz"));
|
||||
}
|
||||
private bool ExtractArchive(DateTime time, ushort vdp)
|
||||
{
|
||||
@ -92,44 +105,33 @@ namespace DataClients
|
||||
}
|
||||
private void ExtractTarGZ(String gzArchiveName, String destFolder)
|
||||
{
|
||||
Stream inStream = File.OpenRead(gzArchiveName);
|
||||
Stream gzipStream = new GZipInputStream(inStream);
|
||||
using (var a = (Stream)File.OpenRead(gzArchiveName))
|
||||
using (var b = (Stream)new GZipInputStream(a))
|
||||
try
|
||||
{
|
||||
TarArchive tarArchive = TarArchive.CreateInputTarArchive(gzipStream);
|
||||
tarArchive.ExtractContents(destFolder);
|
||||
tarArchive.Close();
|
||||
using (var c = TarArchive.CreateInputTarArchive(b))
|
||||
c.ExtractContents(destFolder);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Can't extract: " + gzArchiveName);
|
||||
Console.WriteLine(e.Message);
|
||||
Console.WriteLine(e.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
gzipStream.Close();
|
||||
inStream.Close();
|
||||
Logger.Add("Can't extract: " + gzArchiveName, Logger.Level.error);
|
||||
Logger.Add(e.Message, Logger.Level.error);
|
||||
Logger.Add(e.StackTrace, Logger.Level.error);
|
||||
}
|
||||
}
|
||||
private void ExtractTar(String tarFileName, String destFolder)
|
||||
{
|
||||
Stream inStream = File.OpenRead(tarFileName);
|
||||
using (var a = (Stream)File.OpenRead(tarFileName))
|
||||
try
|
||||
{
|
||||
TarArchive tarArchive = TarArchive.CreateInputTarArchive(inStream);
|
||||
tarArchive.ExtractContents(destFolder);
|
||||
tarArchive.Close();
|
||||
using (var b = TarArchive.CreateInputTarArchive(a))
|
||||
b.ExtractContents(destFolder);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Can't extract: " + tarFileName);
|
||||
Console.WriteLine(e.Message);
|
||||
Console.WriteLine(e.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
inStream.Close();
|
||||
Logger.Add("Can't extract: " + tarFileName, Logger.Level.error);
|
||||
Logger.Add(e.Message, Logger.Level.error);
|
||||
Logger.Add(e.StackTrace, Logger.Level.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ namespace DataClients
|
||||
netClient = new NetClient();
|
||||
fileClient = new FileClient();
|
||||
}
|
||||
public STPClient(NetClient nc, FileClient fc)
|
||||
{
|
||||
netClient = nc;
|
||||
fileClient = fc;
|
||||
}
|
||||
public Pasport GetPasport(string link)
|
||||
{
|
||||
var result = new Pasport();
|
||||
@ -107,28 +112,26 @@ namespace DataClients
|
||||
var result = new List<TechCycle>();
|
||||
var cursor = start;
|
||||
byte[] subRes = new byte[0];
|
||||
TechCycle currTechCycle = new TechCycle()
|
||||
{
|
||||
start = start,
|
||||
index = TechCycle.Operation.unloading_loading
|
||||
};
|
||||
|
||||
do
|
||||
{
|
||||
cursor = cursor.AddDays(-1);
|
||||
subRes = GetFile(cursor, vdp, 3);
|
||||
} while (subRes.Length == 0 && cursor > start.AddDays(-10));
|
||||
|
||||
TechCycle a = new TechCycle()
|
||||
{
|
||||
start = start,
|
||||
index = TechCycle.Operation.unloading_loading
|
||||
};
|
||||
|
||||
{
|
||||
if (subRes.Length > 0)
|
||||
{
|
||||
var b = STPConverter.TechCycle(subRes);
|
||||
if (b.Length > 0) a = b.Last();
|
||||
if (b.Length > 0) currTechCycle = b.Last();
|
||||
}
|
||||
a.start = start;
|
||||
}
|
||||
|
||||
cursor = start.AddDays(-1);
|
||||
do
|
||||
{
|
||||
cursor = cursor.AddDays(1);
|
||||
@ -138,23 +141,42 @@ namespace DataClients
|
||||
{
|
||||
if (e.start <= start)
|
||||
{
|
||||
a = e;
|
||||
currTechCycle = e;
|
||||
continue;
|
||||
}
|
||||
if (e.start >= end)
|
||||
{
|
||||
a.end = end;
|
||||
result.Add(a);
|
||||
currTechCycle.end = e.start;
|
||||
result.Add(currTechCycle);
|
||||
currTechCycle = e;
|
||||
break;
|
||||
}
|
||||
if (e.start > start && e.start < end)
|
||||
{
|
||||
a.end = e.start;
|
||||
result.Add(a);
|
||||
a = e;
|
||||
currTechCycle.end = e.start;
|
||||
if (result.Count > 0 && result[result.Count - 1].index == currTechCycle.index)
|
||||
result[result.Count - 1].end = currTechCycle.end;
|
||||
else
|
||||
result.Add(currTechCycle);
|
||||
currTechCycle = e;
|
||||
}
|
||||
}
|
||||
|
||||
} while (cursor <= end);
|
||||
|
||||
{
|
||||
if (result.Count == 0)
|
||||
{
|
||||
currTechCycle.start = start;
|
||||
currTechCycle.end = end;
|
||||
result.Add(currTechCycle);
|
||||
}
|
||||
else if (result[result.Count - 1].end < end)
|
||||
{
|
||||
currTechCycle.end = end;
|
||||
result.Add(currTechCycle);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -246,6 +268,7 @@ namespace DataClients
|
||||
var cycle = new TechCycle();
|
||||
cycle.index = (DataClients.TechCycle.Operation)UInt32.Parse(substr[0]);
|
||||
cycle.start = Converter.ConvertUnixTimeToDateTime(Int32.Parse(substr[2]));
|
||||
if (result.Count > 0) result[result.Count - 1].end = cycle.start;
|
||||
result.Add(cycle);
|
||||
}
|
||||
return result.ToArray();
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SupportClasses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -10,7 +11,7 @@ namespace DataClients
|
||||
{
|
||||
public static class TempDir
|
||||
{
|
||||
private static readonly char split = '/';
|
||||
private static readonly char split = _Directory.Slash;
|
||||
private static string dir = Directory.GetCurrentDirectory() + split + "temp";
|
||||
private static List<string> protect = new List<string>();
|
||||
private static Task checkTask = null;
|
||||
|
@ -31,7 +31,11 @@
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
@ -71,6 +75,66 @@
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"projectName": "SupportClasses",
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Microsoft\\Xamarin\\NuGet\\",
|
||||
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
@ -61,6 +61,16 @@
|
||||
"rid": "win"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETStandard,Version=v2.0",
|
||||
"compile": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -295,12 +305,18 @@
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../SupportClasses/SupportClasses.csproj",
|
||||
"msbuildProject": "../SupportClasses/SupportClasses.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETStandard,Version=v2.0": [
|
||||
"NETStandard.Library >= 2.0.3",
|
||||
"SharpZipLib >= 1.2.0",
|
||||
"SupportClasses >= 1.0.0",
|
||||
"System.Text.Encoding.CodePages >= 4.7.1"
|
||||
]
|
||||
},
|
||||
@ -336,7 +352,11 @@
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "7BT9QmMgOwS6t99cv7fCXOBzEuqVwmhl2HP4ljC3vr6o2Uq2GZQULmiLXAJ9NJ7T4nDLaRlmIbUCNZp+mmA0Dw==",
|
||||
"dgSpecHash": "sLKZfVMkCNEVT7uyfvutFp/QvWP0nA+zkfgEmrlynF90hQbh8SrlMNp5eIIAuw5br+yO5vuezeQKEiVCZ9c1Qw==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\GIT\\ASCKU_PC\\DataClients\\DataClients.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
112
Mailing/SZOEveryday.cs
Normal file
112
Mailing/SZOEveryday.cs
Normal file
@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DataClients;
|
||||
|
||||
namespace Mailing
|
||||
{
|
||||
public class SZOWork
|
||||
{
|
||||
public TechCycle tc = new TechCycle();
|
||||
public DateTime tStart = DateTime.Now;
|
||||
public DateTime tEnd = DateTime.Now;
|
||||
public TimeSpan workTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return tEnd - tStart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class SZOEveryday
|
||||
{
|
||||
public static List<SZOWork> GetSZOWorks(DateTime timeStart, DateTime timeEnd, ushort vdp)
|
||||
{
|
||||
var result = new List<SZOWork>();
|
||||
var a = new STPClient();
|
||||
int[] chk1 = {
|
||||
(int)TechCycle.Operation.cooling_ingot,
|
||||
(int)TechCycle.Operation.cooling_reflow,
|
||||
(int)TechCycle.Operation.cooling_welding
|
||||
};
|
||||
int[] chk2 =
|
||||
{
|
||||
(int)TechCycle.Operation.end_tech_cycle,
|
||||
(int)TechCycle.Operation.unloading_loading,
|
||||
(int)TechCycle.Operation.looking_welding,
|
||||
(int)TechCycle.Operation.unloading_kit
|
||||
};
|
||||
|
||||
var tc = a.GetTechCycle(timeStart, timeEnd, vdp);
|
||||
var ad = a.GetAnalogDiscret(timeStart, timeEnd, vdp);
|
||||
foreach(var cycle in tc)
|
||||
{
|
||||
if (!chk1.Contains((int)cycle.index) && !chk2.Contains((int)cycle.index))
|
||||
continue;
|
||||
if (chk1.Contains((int)cycle.index))
|
||||
{
|
||||
var test =
|
||||
(from l in ad.an[13]
|
||||
where l.Item1 >= cycle.start &&
|
||||
l.Item1 <= cycle.end &&
|
||||
l.Item2 >= 30
|
||||
select l).ToArray();
|
||||
if (test.Length == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
for(var i = 0; i < ad.di[22].Length; i++)
|
||||
{
|
||||
var ts = ad.di[22][i].Item1;
|
||||
var te = (i == ad.di[22].Length) ?
|
||||
(ad.di[22][i].Item1 < timeEnd) ?
|
||||
timeEnd :
|
||||
ad.di[22][i].Item1 :
|
||||
ad.di[22][i + 1].Item1;
|
||||
var v = ad.di[22][i].Item2;
|
||||
|
||||
if (
|
||||
ts <= cycle.end &&
|
||||
te >= cycle.start &&
|
||||
v.HasValue &&
|
||||
v.Value
|
||||
)
|
||||
{
|
||||
var t1 = ts > cycle.start ? ts : cycle.start;
|
||||
var t2 = te > cycle.end ? cycle.end : te;
|
||||
var res = t2 - t1;
|
||||
if (res.TotalMinutes < 15)
|
||||
continue;
|
||||
result.Add(new SZOWork()
|
||||
{
|
||||
tc = cycle,
|
||||
tStart = t1,
|
||||
tEnd = t2
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void GetPDF(DateTime time)
|
||||
{
|
||||
timeStart = new DateTime(time.Year, time.Month, time.Day, 0, 0, 0);
|
||||
timeEnd = new DateTime(time.Year, time.Month, time.Day, 0, 0, 0).AddDays(1);
|
||||
GetData();
|
||||
PDFGenSZO.AddHeader("Контроль работы водокольцевых насосов SZO ", timeStart, timeEnd);
|
||||
foreach (var e in resFull)
|
||||
PDFGenSZO.AddSZOTable(e.Key, e.Value);
|
||||
PDFGenSZO.AddTotalTime();
|
||||
PDFGenSZO.Print(time);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -31,7 +31,11 @@
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
@ -417,6 +421,66 @@
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"projectName": "SupportClasses",
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Microsoft\\Xamarin\\NuGet\\",
|
||||
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -84,6 +84,7 @@
|
||||
"framework": ".NETStandard,Version=v2.0",
|
||||
"dependencies": {
|
||||
"SharpZipLib": "1.2.0",
|
||||
"SupportClasses": "1.0.0",
|
||||
"System.Text.Encoding.CodePages": "4.7.1"
|
||||
},
|
||||
"compile": {
|
||||
@ -148,6 +149,16 @@
|
||||
"runtime": {
|
||||
"bin/placeholder/PdfSharp.Charting.dll": {}
|
||||
}
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETStandard,Version=v2.0",
|
||||
"compile": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -305,6 +316,11 @@
|
||||
"type": "project",
|
||||
"path": "../PdfSharp.Charting/PdfSharp.Charting.csproj",
|
||||
"msbuildProject": "../PdfSharp.Charting/PdfSharp.Charting.csproj"
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../SupportClasses/SupportClasses.csproj",
|
||||
"msbuildProject": "../SupportClasses/SupportClasses.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "SpajZEf7/VRQUrDXoiTHU8aXoyHn3smrZZdD0UCJW8X2gPLouW0OsXdBb8ylFplsopwQkajR3U66biGjk4fcOQ==",
|
||||
"dgSpecHash": "aHXTDIdLXP3oCdoTOAZ3VxpMEL7w4L9jxOAPSRPH9V3GgSJDIXxeqEjy8iqnhq7VTeVDHqq2QYHRPL2wp3RrJg==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\GIT\\ASCKU_PC\\Mailing\\Mailing.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,13 +3,14 @@ using System.IO;
|
||||
|
||||
namespace SupportClasses
|
||||
{
|
||||
public static class Direct
|
||||
public static class _Directory
|
||||
{
|
||||
public static char Slash
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
var p = (int)Environment.OSVersion.Platform;
|
||||
if ((p == 4) || (p == 6) || (p == 128))
|
||||
return '/';
|
||||
else
|
||||
return '\\';
|
||||
@ -21,9 +22,9 @@ namespace SupportClasses
|
||||
{
|
||||
get
|
||||
{
|
||||
if (String.IsNullOrEmpty(tempDir))
|
||||
if (string.IsNullOrEmpty(tempDir))
|
||||
{
|
||||
tempDir = Directory.GetCurrentDirectory() + Direct.Slash + "temp";
|
||||
tempDir = Directory.GetCurrentDirectory() + Slash + "temp";
|
||||
Directory.CreateDirectory(tempDir);
|
||||
}
|
||||
return tempDir;
|
||||
|
@ -1,11 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SupportClasses
|
||||
{
|
||||
public static class Logger
|
||||
{
|
||||
public enum Level { info,}
|
||||
public enum Level { fatal, error, warning, info, debug};
|
||||
public static Level[] show = { Level.info, Level.warning, Level.debug};
|
||||
public static void Add (string msg, Level l = Level.info)
|
||||
{
|
||||
if (show.Contains(l))
|
||||
{
|
||||
Console.Write(DateTime.Now.ToString(@"yyyy.MM.dd HH:mm:ss.ff") + "\t");
|
||||
Console.WriteLine(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -31,7 +31,11 @@
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
@ -418,6 +422,66 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"projectName": "SupportClasses",
|
||||
"projectPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\SupportClasses.csproj",
|
||||
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\GIT\\ASCKU_PC\\SupportClasses\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Microsoft\\Xamarin\\NuGet\\",
|
||||
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\GIT\\ASCKU_PC\\Tests\\Tests.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
|
@ -84,6 +84,7 @@
|
||||
"framework": ".NETStandard,Version=v2.0",
|
||||
"dependencies": {
|
||||
"SharpZipLib": "1.2.0",
|
||||
"SupportClasses": "1.0.0",
|
||||
"System.Text.Encoding.CodePages": "4.7.1"
|
||||
},
|
||||
"compile": {
|
||||
@ -165,6 +166,16 @@
|
||||
"runtime": {
|
||||
"bin/placeholder/PdfSharp.Charting.dll": {}
|
||||
}
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETStandard,Version=v2.0",
|
||||
"compile": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/SupportClasses.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -327,6 +338,11 @@
|
||||
"type": "project",
|
||||
"path": "../PdfSharp.Charting/PdfSharp.Charting.csproj",
|
||||
"msbuildProject": "../PdfSharp.Charting/PdfSharp.Charting.csproj"
|
||||
},
|
||||
"SupportClasses/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../SupportClasses/SupportClasses.csproj",
|
||||
"msbuildProject": "../SupportClasses/SupportClasses.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "bgcV9wNTqjPJ+z+j2HnkfQSdCVelCqwYd1WkmQSoLDFRHDbnRNexT7l1lQZ5ipiwzaqTKo+QW7rZKfEU5GiVcQ==",
|
||||
"dgSpecHash": "/uQWWLVSo6XokPZZUrTOSR8rFH5d2Vvq9lYHOcuqdChMgd7SVFHxYZsKAf9wrUNUGjeQpa1buFJ4tgUKP5t3fg==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\GIT\\ASCKU_PC\\Tests\\Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
Loading…
Reference in New Issue
Block a user