/// <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); }
/// <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); } }
/// <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)); }
/// <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); }
/// <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; } }