예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="from"></param>
        /// <param name="to"></param>
        /// <param name="bs"></param>
        public LogItem Add(DateTime dt, string from, string to, byte[] bs, DataDirection dataDirection)
        {
            LogItem item = new LogItem();

            item.DT            = dt;
            item.From          = from;
            item.TO            = to;
            item.Bytes         = bs;
            item.DataDirection = dataDirection;

            this.Items.Add(item);
            return(item);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dd"></param>
        /// <returns></returns>
        private DataGridViewCellStyle GetCellStyle(DataDirection dd)
        {
            DataGridViewCellStyle obj = _cellStyleHashTable[dd] as DataGridViewCellStyle;

            if (obj == null)
            {
                DataGridViewCellStyle style = new DataGridViewCellStyle(this.dataGridView1.DefaultCellStyle);
                style.BackColor         = dd.BackColor;
                _cellStyleHashTable[dd] = style;
                return(style);
            }
            else
            {
                return(obj);
            }
        }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <param name="bs"></param>
 public LogItem Add(string from, string to, byte[] bs, DataDirection dataDirection)
 {
     return(this.Add(DateTime.Now, from, to, bs, dataDirection));
 }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bs"></param>
        public void AddLog(string from, string to, byte[] bs, DataDirection dd)
        {
            LogItem item = this.LogManager.Add(from, to, bs, dd);

            this.AddLog(item);
        }
예제 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="dd"></param>
 /// <returns></returns>
 private DataGridViewCellStyle GetCellStyle(DataDirection dd)
 {
     DataGridViewCellStyle obj = _cellStyleHashTable[dd] as DataGridViewCellStyle;
     if (obj == null)
     {
         DataGridViewCellStyle style = new DataGridViewCellStyle(this.dataGridView1.DefaultCellStyle);
         style.BackColor = dd.BackColor;
         _cellStyleHashTable[dd] = style;
         return style;
     }
     else
     {
         return obj;
     }
 }
예제 #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="bs"></param>
 public void AddLog(string from, string to, byte[] bs, DataDirection dd)
 {
     LogItem item = this.LogManager.Add(from, to, bs, dd);
     this.AddLog(item);
 }