Пример #1
0
        private void AddRow(LogDataSet.LogRow logRow)
        {
            Monitor.Enter(logItemDictionary);

            if (logRow.LogId > 0 && !logItemDictionary.ContainsKey(logRow.LogId))
            {
                var item = new LogListItem(logRow.LogId, logRow.DateTime, logRow.Number, logRow.Text, logRow.Success);
                logListView.Items.Add(item);
                logItemDictionary[logRow.LogId] = item;
            }

            Monitor.Exit(logItemDictionary);
        }
Пример #2
0
        private void BuildAndSendResponseDataStream(
            AidKey AidKey, ScreenContent ScreenContent, TelnetLogList LogList = null)
        {
            // send response data stream up to the server.
            {
                var ra = BuildResponseByteStream(
                    ScreenContent,
                    AidKey, ScreenContent.CaretRowCol, ScreenContent.HowRead);
                ra = ra.Append(EOR_Command.Build());

                // send response stream back to server.
                TelnetConnection.WriteToHost(LogList, ra, this.Client.GetStream());

                // blank line in the log file.
                var logItem = new LogListItem(Direction.Read, "", true);
                this.LogList.AddItem(logItem);
            }
        }