⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delegatefunc.cs

📁 是一款式CSDN阅读器,可以方便CSDN用户阅读自己感兴趣的内容!
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace feiyun0112.cnblogs.com.CSDNReader.Functions
{
    public delegate void RefreshTopicsDelegate(int intRoomID,bool blnNoRead,bool blnCountChanged);
    public delegate void ShowTopicsDelegate(string strTopicID);
    public delegate void OpenedTopicDelegate(string strTopicID);
    public delegate void LoginDelegate();
    public delegate void RefreshInfoDelegate(string strInfo);

    /// <summary>
    /// 定义的所有事件,为了方便,都用的是static
    /// </summary>
    class DelegateFunc
    {
        public static event RefreshTopicsDelegate RefreshTopicsEvent;
        public static void OnRefreshTopics(int intRoomID, bool blnNoRead, bool blnCountChanged)
        {
            if (RefreshTopicsEvent != null)
            {
                RefreshTopicsEvent(intRoomID, blnNoRead, blnCountChanged);
            }
        }

        public static event ShowTopicsDelegate ShowTopicsEvent;
        public static void OnShowTopics(string strTopicID)
        {
            if (ShowTopicsEvent != null)
            {
                ShowTopicsEvent(strTopicID);
            }
        }

        public static event OpenedTopicDelegate OpenedTopicEvent;
        public static void OnOpenedTopic(string strTopicID)
        {
            if (OpenedTopicEvent != null)
            {
                OpenedTopicEvent(strTopicID);
            }
        }

        public static event LoginDelegate LoginEvent;
        public static void OnLogin()
        {
            if (LoginEvent != null)
            {
                LoginEvent();
            }
        }

        public static event RefreshInfoDelegate RefreshInfoEvent;
        public static void OnRefreshInfo(string strInfo)
        {
            if (RefreshInfoEvent != null)
            {
                RefreshInfoEvent(strInfo);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -