Part1
Edit SZO Mailing
This commit is contained in:
@@ -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.
Reference in New Issue
Block a user