コード例 #1
0
ファイル: Form1.cs プロジェクト: marylucey97/SyAutoH
        private void EvUpdate(object ob, EventArgs args)
        {
            lock (this)
            {
                // if (bBusyList == true)
                // {
                //     return;
                // }

                // bBusyList = true;
                try
                {
                    InfoCall info = ob as InfoCall;

                    listLog.BeginUpdate();
                    listLog.Items.Clear();
                    LogMsg[] msgList = logClient.GetLog(info.nStart, info.nCount, info.types, info.ids, "");
                    if (null == msgList)
                    {
                        listLog.EndUpdate();
                        return;
                    }

                    if (msgList.Length <= 0)
                    {
                        listLog.EndUpdate();
                        return;
                    }

                    m_nPageStartID = info.nStart;

                    foreach (LogMsg msg in msgList)
                    {
                        ListViewItem item = new ListViewItem();
                        item.Text = msg.nID.ToString();
                        //Int64 ntime = 0
                        m_nPageEndID = msg.nID;
                        item.SubItems.Add(msg.lTime.ToString());
                        item.SubItems.Add(msg.nEventID.ToString());
                        item.SubItems.Add(msg.strMsg);
                        item.SubItems.Add(msg.strUser);
                        item.SubItems.Add(msg.nType.ToString());
                        listLog.Items.Add(item);
                        //Invalidate();
                    }

                    listLog.EndUpdate();

                    RefreshAlarmView();
                }
                catch (System.Exception)
                {
                }

                //bBusyList = false;
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: tornadocean/SyAutoH
 private void AddMsgList(int nStart, int nCount)
 {
     int[] ids = GetIDFilter(tBOnlineIDS.Text);
     string strType = GetTypeFilter();
     int[] types = GetIDFilter(strType);
     InfoCall info = new InfoCall();
     info.nStart = nStart;
     info.nCount = nCount;
     info.types = types;
     info.ids = ids;
     this.UpdateList.Invoke(info, null);
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: marylucey97/SyAutoH
        private void AddMsgList(int nStart, int nCount)
        {
            int[]  ids     = GetIDFilter(tBOnlineIDS.Text);
            string strType = GetTypeFilter();

            int[]    types = GetIDFilter(strType);
            InfoCall info  = new InfoCall();

            info.nStart = nStart;
            info.nCount = nCount;
            info.types  = types;
            info.ids    = ids;
            this.UpdateList.Invoke(info, null);
        }