From 26346a8146f1474f1cded6509e6f3c7053a7b659 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:55:26 +0000 Subject: Utilisateur : Fcolin Date : 6/02/06 Heure : 17:12 Archivé dans $/CSharp/Ivy/Ivy Commentaire: utilisation generale de traceDEbug et System.Diagnostics (vss 45) --- CSharp/Ivy/IvyPPC/Ivy.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'CSharp/Ivy/IvyPPC') diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index c8bf9d2..0624b1a 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -71,7 +71,7 @@ namespace IvyBus [Bindable(true)] [DefaultValue(false)] #endif - public bool VerboseDebug + public static bool VerboseDebug { get { @@ -237,7 +237,7 @@ namespace IvyBus } #if (!PocketPC) - [CategoryAttibute("Ivy")] + [Category("Ivy")] [DefaultValue(null)] #endif public Control SyncControl @@ -271,7 +271,7 @@ namespace IvyBus private static readonly string DEFAULT_DOMAIN = "127.255.255.255:" + DEFAULT_PORT; private const string libVersion = "2.0.0"; internal int protocolVersion = 3; - private bool debug = false; + private static bool debug = false; private static ushort serial = 0; /* an unique ID for each regexp */ private MyTcpListener app; private List watchers; @@ -436,7 +436,7 @@ namespace IvyBus Thread.Sleep(100); #else // Wait for readyness - while ( serverThread.ThreadState != ThreadState.Running || !app.IsActive()) + while ( serverThread.ThreadState != System.Threading.ThreadState.Running || !app.IsActive()) { traceDebug( " Ivy Threading start in progress..." ); Thread.Sleep( 100 ); @@ -920,10 +920,7 @@ namespace IvyBus } catch (IOException e) { - - traceDebug("Error IvyServer exception: " + e.Message); - Console.WriteLine("Ivy server socket reader caught an exception " + e.Message); - // e.printStackTrace(); + traceDebug("Ivy server socket reader caught an exception: " + e.Message); } catch (SocketException e) { @@ -934,11 +931,10 @@ namespace IvyBus traceDebug("Ivy service Thread stopped"); } - - internal void traceDebug(string s) + [Conditional("DEBUG")] + private void traceDebug(string s) { - if (debug) - Console.WriteLine("-->ivy<-- " + s); + Trace.WriteLineIf(debug, "-->ivy<-- " + s); } internal class Domain -- cgit v1.1