internal static void PrintLogo()
		{
			ColorConsole c = null;
			try
			{
				c = new ColorConsole();
				c.SetColor(COL_NETZ);
			}
			catch{}
		
			Puts(" __________________________________________ ");
			Puts("|                                          |");
			Puts("| .NETZ - .NET Executables Compressor      |");
			Puts("| Copyright (C) 2004-" + GetYear() + " Vasian Cepa      |");
			Puts2("| [v" + Utils.NetzVersion);
			Puts("]  " + EMAIL +  "            |");
			Puts("|__________________________________________|");
			Puts(string.Empty);

			try
			{
				if(c != null) c.Reset();
			}
			catch{}
		}
		public static void LogWarn(string s)
		{
			ColorConsole c = null;
			try
			{
				c = new ColorConsole();
				c.SetColor(ColorConsole.FOREGROUND_RED | ColorConsole.FOREGROUND_BLUE
					| ColorConsole.FOREGROUND_INTENSITY);
			}
			catch{}
			Log(s);
			if(c != null) c.Reset();
		}
		public static void LogErr(string s)
		{
			ColorConsole c = null;
			try
			{
				c = new ColorConsole();
				c.SetColor(ColorConsole.FOREGROUND_RED
					| ColorConsole.FOREGROUND_INTENSITY);
			}
			catch{}
			Log(Environment.NewLine + "# Error: " + s);
			if(c != null) c.Reset();
		}
Example #4
0
		private static void ProcessFile(int i, InputFile file, ColorConsole c)
		{
			FileInfo fi = new FileInfo(file.File);
			lastLength = fi.Length;
			if(c != null) c.SetColor(Help.COL_NETZ);
			Logger.Log2((i < 10 ? " " : string.Empty) + i.ToString() + "|  ");
			if(c != null) c.Reset();
			Logger.Log(file.File);
			Logger.Log2(Netz.LOGPREFIX + Utils.FormatFileSize(fi.Length));
			fi = null;
			if(file.File.ToLower().EndsWith(".exe"))
			{
				ProcessExeFile(file.File);
			}
			else if(file.File.ToLower().EndsWith(".dll"))
			{
				ProcessDllFile(file);
			}
			else throw new Exception("E1010 Unsupported file type suffix");
		}
Example #5
0
		private static void ProcessFiles(ArrayList files)
		{
			ColorConsole c = null;
			try
			{
				c = new ColorConsole();
			}
			catch{}

			for(int i = 0; i < files.Count; ++i)
			{
				InputFile file = (InputFile)files[i];
				try
				{
					ProcessFile(i + 1, file, c);
				}
				catch(Exception ex)
				{
					PrintErr(file.File, ex);
				}
			}
		}