Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

SVG Artiste - An SVG Editor

, 3 Aug 2010 CPOL
A Vector based tool to create and edit SVG images
SVGArtiste2_exe.zip
SvgArtiste.exe
SvgArtiste.vshost.exe.manifest
SVGLib.dll
Crom.Controls.dll
Draw.dll
SVGArtiste2_SampleSVGDrawings.zip
mercialago18.svg
SVGArtiste.svg
SVGArtiste2_src.zip
SVGLib
SVGLib.csproj.user
SVGLib.ndoc
SvgArtiste2.suo
Crom.Controls
Dock16x16.bmp
Internal
Docking
ControlCollections
Controls
DockButtons
Forms
Engine
Enums
EventArgs
Helpers
SharedHelpers
Properties
Public
Docking
Enums
EventArgs
Helpers
Renderers
TabbedDocument
Controls
Enums
Helpers
Renderers
Base
Draw
Command
Draw.csproj.user
RulerControl
Ruler.bmp
SvgArtiste2
Properties
Settings.settings
Resources
cancel.png
Ellipse.cur
exit.png
exit1.png
Line.cur
new.png
new_page.png
open.png
open1.png
pan.cur
pan_close.cur
Pencil.cur
Rectangle.cur
save.png
save_as.png
save_as1.png
Text.cur
SVGArtiste.csproj.user
Tools
Forms
UserControls
// --------------------------------------------------------------------------------
// Name:     ErrH
//
// Author:   Maurizio Bigoloni <big71@fastwebnet.it>
//           See the ReleaseNote.txt file for copyright and license information.
//
// Remarks:
//
// --------------------------------------------------------------------------------

using System;
using System.Diagnostics;

namespace SVGLib
{
	/// <summary>
	/// Summary description for ErrH.
	/// </summary>
	public class ErrH
	{
		public enum _LogMode
		{
			Trace,
			EventLog,
			MessageBox
		}

		public enum _LogPriority
		{
			Info,
			Warning,
			Error
		}

		/*private static _LogMode m_logmodeError = _LogMode.MessageBox;
		private static _LogMode m_logmodeWarning = _LogMode.Trace;
		private static _LogMode m_logmodeInfo = _LogMode.Trace;*/
 
		
		private string m_sClass;
		private string m_sMethod;

		public ErrH(string sClass, string sMethod)
		{
			m_sClass = sClass;
			m_sMethod = sMethod;

			Log("Enter Method", _LogPriority.Info);
		}

		~ErrH()
		{
			
		}

		public static void Log(string sClass, string sMethod, string sMessage, _LogPriority prio)
		{
			string sMessageToLog;
			bool bLogToEventLog = false;
			bool bLogToMessageBox = false;

			sMessageToLog = Priority(prio) + Where(sClass, sMethod) + sMessage + ".";

			Trace.WriteLine(sMessageToLog);

			if ( bLogToEventLog )
			{
				// todo
			}

			if ( bLogToMessageBox )
			{
				// todo
			}
		}

		public void Log(string sMessage, _LogPriority prio)
		{
			string sMessageToLog;
			bool bLogToEventLog = false;
			bool bLogToMessageBox = false;

			sMessageToLog = Priority(prio) + Where() + sMessage + ".";

			Trace.WriteLine(sMessageToLog);

			if ( bLogToEventLog )
			{
				// todo
			}

			if ( bLogToMessageBox )
			{
				// todo
			}
		}

		public void LogParameter(string sName, string sValue)
		{
			Log("Parameter " + sName + " = " + sValue, _LogPriority.Info);
		}

		public void LogEnd(bool bSuccess)
		{
			if ( bSuccess )
			{
				Log("Method Succeeded", _LogPriority.Info);
			}
			else
			{
				Log("Method Failed", _LogPriority.Info);
			}
		}

		public void LogException(Exception e)
		{
			Log("A exception was catched. Message:" + e.Message , _LogPriority.Error);
		}

		public void LogUnhandledException()
		{
			Log("An unhandled exception was catched", _LogPriority.Error);
		}

		private static string Priority(_LogPriority prio)
		{
			string sPriority = "";

			switch ( prio )
			{
				case _LogPriority.Info:
					sPriority = "INF ";
					break;

				case _LogPriority.Warning:
					sPriority = "WAR ";
					break;

				case _LogPriority.Error:
					sPriority = "ERR ";
					break;
			}

			return sPriority;
		}

		private static string Where(string sClass, string sMethod)
		{
			return "Class:" + sClass + ". Method:" + sMethod + ". ";
		}

		private string Where()
		{
			return "Class:" + m_sClass + ". Method:" + m_sMethod + ". ";
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ajay Britto
Engineer
Singapore Singapore
He is a Microsoft technology enthusiast, who wish to create applications which others find useful.He loves making small tools and getting involved in architecting bigger systems.

He is currently working as a professional developer in a software development firm in .Net technologies.
 
He likes reading technical blogs, contributing to opensource and most importantly, enjoying life.
 
His ambition is to be an impressive software maker.

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 3 Aug 2010
Article Copyright 2010 by Ajay Britto
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid