コード例 #1
0
        /// <summary>
        /// 轮循执行时执行的逻辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void Refersh(Object sender, ElapsedEventArgs args)
        {
            string id    = client.GetID();
            string title = client.GetTitle();

            if (TitleChanged != null)
            {
                if (!Snapshot.Equals(Snapshot.TitleItem, title))
                {
                    TitleChanged(this, new MonitorEventArgs(title));
                }
            }

            if (IDChanged != null)
            {
                if (!Snapshot.Equals(Snapshot.IDItem, id))
                {
                    IDChanged(this, new MonitorEventArgs(id));
                }
            }
        }