Example #1
0
        public PacketLogControl()
        {
            // Create a default list
            _packets = new LogPacketCollection();
            _autoScroll = false;
            _currentCol = null;
            components = new Container();

            InitializeComponent();

            UpdateConfig(DocumentControl.GetConfigItem<PacketLogControlConfig>(DEFAULT_CONFIG_NAME, true));
        }
Example #2
0
        private void listLogPackets_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            PacketLogColumn col = (PacketLogColumn)listLogPackets.Columns[e.Column].Tag;

            if (col == _currentCol)
            {
                _sortAscending = !_sortAscending;
            }
            else
            {
                _sortAscending = true;
            }

               _currentCol = col;

               SortPackets(col, _sortAscending);
               listLogPackets.Invalidate();
        }
Example #3
0
 public void Sort(PacketLogColumn col)
 {
 }
Example #4
0
        void SortPackets(PacketLogColumn column, bool ascending)
        {
            lock(_packets)
            {
                LogPacket[] packets = null;

                packets = column.OrderBy(_packets, ascending).ToArray();

                _packets.Clear();
                foreach (LogPacket p in packets)
                {
                    _packets.Add(p);
                }
            }
        }