private void WriteToItemCanvasLog(IVisualItemMore visualItem) { var rowCol = visualItem.ShowRowCol( ); SpecialLogFile.AppendTextLine( "write to canvas. " + rowCol.ToString() + " " + visualItem.ToString()); }
private void LogBadData(InputByteArray inputArray) { SpecialLogFile.AppendTextLine("Invalid data received from telnet server. " + "Bytes remaining:" + inputArray.RemainingLength); SpecialLogFile.AppendTextLine(inputArray.ToString()); SpecialLogFile.AppendTextLine("input buffer bytes:"); var buf = inputArray.DataBytes; foreach (var textLine in buf.ToHexReport(16)) { SpecialLogFile.AppendTextLine(textLine); } }
private void ThrowInvalidDataReceivedException(InputByteArray inputArray) { SpecialLogFile.AppendTextLine("Invalid data received from telnet server."); SpecialLogFile.AppendTextLine(inputArray.ToString()); SpecialLogFile.AppendTextLine("input buffer bytes:"); var buf = inputArray.DataBytes; foreach (var textLine in buf.ToHexReport(16)) { SpecialLogFile.AppendTextLine(textLine); } throw new Exception("Invalid data received from telnet server. " + "Data dumped to c:\\downloads\\SpecialLog.txt."); }
public MainWindow() { InitializeComponent(); this.ShutdownFlag = new ExtendedManualResetEvent(); this.FromThread = null; SpecialLogFile.ClearFile(); this.Closed += new EventHandler(MainWindow_Closed); this.Loaded += new RoutedEventHandler(MainWindow_Loaded); this.Closing += MainWindow_Closing; this.cbFontSize.ItemsSource = new List <double>() { 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72 }; }