📄 channelmenu.h
字号:
/*
* Openmysee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _CCHANNELMENU_H
#define _CCHANNELMENU_H
#pragma once
#include <vector>
#include "TrayIconMenu.h"
class HttpRequest;
class CXML;
class CChannelMenu
{
protected:
CChannelMenu(void);
~CChannelMenu(void);
public:
static CChannelMenu* CreateInstance(BOOL useChannel);
static CChannelMenu* GetInstance();
static void ReleaseInstance();
// void NotifyUpdateChannel();
void UpdateChannelNow();
BOOL ShowRButtonTIMenu(HWND hparent);
LPCTSTR GetChannelByCmdID(DWORD m_cmdID);
void OnPopupMenu(HMENU hmenu, int popuppos);
void SetChannelRunning(BOOL b){channelrunning = b;}
protected:
int UserNetworkPos; //使用者的网络位置(教育网,电信网还是网通)
BOOL PostAddPoint(); //增加积分
BOOL GetChannelXML(); //获得XML文件内容存放在strXMLFile里面
BOOL ParseChannelXML(HMENU hmenu); //生成一个频道地址的索引和一个频道的菜单
BOOL useChannel; //是否使用频道菜单
volatile BOOL channelthreadStop; //终止频道菜单管理线程的标记
volatile LONG channeldataOK; //频道数据获取完成的标记
volatile LONG updatechannel; //立刻更新频道请求的标记
volatile BOOL channelrunning; //是否有频道在播放
BOOL ParseDataOK; //在一次菜单处理过程中,频道数据已被正确解析过的标记
private:
CCritSec m_critsec_XMLFile;
std::string strXMLFile;
mystring xmlurl;
mystring pointcookieurl;
mystring pointurl;
struct ChannelData
{
mystring name;
mystring url;
mystring desc;
};
std::vector<CChannelMenu::ChannelData> channellist;
HMENU h_channelmenu;
void MakePopupItem(CXML* pXML, HMENU hmenu, int isubgroup);
HANDLE h_MenuThread;
static unsigned int CALLBACK _GetMenuThreadProc(void* lpParameter);
CTrayIconMenu* pTrayIconMenu;
HttpRequest* pHttpSession;
};
enum TRAYCHANNELCMDID
{
TRAYWM_ABOUT = WM_APP + 1,
TRAYWM_EXIT,
TRAYWM_HELP,
TRAYWM_UPDATE,
TRAYWM_HOMEPAGE,
TRAYWM_EMAIL,
TRAYWM_NETWORK,
TRAYWM_UPDATECHANNEL = WM_APP + 40,
TRAYWM_NETWORKSTART = WM_APP + 50,
TRAYWM_NETWORKEND = WM_APP + 60,
TRAYWM_CHANNELSTART = WM_APP + 200,
TRAYWM_CHANNELEND = WM_APP + 1200,
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -