Edit SZO Mailing
This commit is contained in:
2020-11-18 16:56:28 +05:00
parent 845afe8e75
commit 00c55b8a63
26 changed files with 483 additions and 90 deletions

View File

@@ -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;

View File

@@ -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);
}
}
}
}