Exemplo n.º 1
0
 private void MsgRecived(object sender, MessageSenderEventArg e)
 {
     try
     {
         this.BeginInvoke(_Delegate_Log, e);
     }
     catch { }
     //Invoke(_Delegate_Log, e);
 }
Exemplo n.º 2
0
        private void SetLog(MessageSenderEventArg e)
        {
            ListViewItem Item = listView_Msg.Items.Add("");

            Item.ForeColor = e.TextColor;
            Item.SubItems.Add(string.Format("{0:yyyy-MM-dd} {1:HH:mm:ss}.{2:d03}", e.SaveTime, e.SaveTime, e.SaveTime.Millisecond)); //날짜/시간
            Item.SubItems.Add(e.InfoMsg);                                                                                            //정보
            Item.SubItems.Add(e.Message);                                                                                            //메세지

            int nCount = listView_Msg.Items.Count;

            if (nCount > m_nMaxCount)
            {
                listView_Msg.Items.RemoveAt(0);
                nCount -= 1;
            }

            listView_Msg.EnsureVisible(nCount - 1);
            listView_Msg.SelectedIndices.Add(nCount - 1);
        }