// Process a shell message void HandleShell(Debugger.Message msg) { int spc = msg.Text.IndexOf(' '); if (spc < 0) { return; } string kind = msg.Text.Substring(0, spc); string arg = msg.Text.Substring(spc + 1, msg.Text.Length - spc - 1); if (kind.Equals("power-sample-us")) { int period = XmlConvert.ToInt32(arg); powerData = new SampleQueue(period, 131072); if (PowerChanged != null) { PowerChanged(this, null); } } else if (kind.Equals("power-samples")) { if (powerData != null) { int[] samples = DecodeSamples(arg); powerData.Push(samples); if (PowerChanged != null) { PowerChanged(this, null); } } } }
public MessageEventArgs(Debugger.Message m) { Message = m; }