예제 #1
0
        public void Write(params object[] values)
        {
            _packet.WriteObjects(values);
            try
            {
                BeginUpdate();
                ListViewItem item = null;
                SuppressItemSelectedEvent = true;

                foreach (object value in values)
                {
                    string valueString = value.ToString();
                    byte[] data        = HMessage.GetBytes(value);
                    string encoded     = HMessage.ToString(data);
                    string typeName    = value.GetType().Name.Replace("Int32", "Integer");

                    item             = FocusAdd(typeName, valueString, encoded);
                    item.ToolTipText = string.Format(CHUNK_TIP, typeName, valueString, data.Length, encoded);
                }

                SuppressItemSelectedEvent = false;
                OnItemSelected(new ListViewItemSelectionChangedEventArgs(item, item.Index, true));
            }
            finally { EndUpdate(); }
        }