private void DebugBalance(String msg)
{
// Filter out repeat messages
int level = 5;
if (fLastMsg != null) {
if (msg.Equals(fLastMsg)) {
level = 8;
} else {
String[] mWords = msg.Split(new Char[] {' '});
String[] lWords = fLastMsg.Split(new Char[] {' '});
int n = Math.Min(mWords.Length, lWords.Length);
int i = 0;
for (i = 0; i < n; ++i) {
if (!mWords[i].Equals(lWords[i])) break;
}
if ((i+1) >= 5) level = 8;
}
}
DebugWrite("^5(AUTO)^9 " + msg, level);
fLastMsg = msg;
}