delegatefunc.cs
来自「是一款式CSDN阅读器,可以方便CSDN用户阅读自己感兴趣的内容!」· CS 代码 · 共 64 行
CS
64 行
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 + =
减小字号Ctrl + -
显示快捷键?