📄 ~rightlogin.~h
字号:
#if !defined(AFX_RIGHTLOGIN_H__FD5B8DBD_3DD1_44D9_BBDC_F67E83C55977__INCLUDED_)
#define AFX_RIGHTLOGIN_H__FD5B8DBD_3DD1_44D9_BBDC_F67E83C55977__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// RightLogin.h : header file
//
#include "../net/channel_info.h"
#include "../net/ip_alias.h"
#include "../utils/TransButton.h"
#include "../utils/transgroup.h"
#include "../utils/filter_accel.h"
#include "../utils/HScrollListBox.h"
#include "../utils/Label.h"
#include "../utils/Separator.h"
#include "dlgfont.h"
#include "em_dlg.h"
#include "net.h"
/////////////////////////////////////////////////////////////////////////////
// CRightLogin dialog
#include "../utils/update_data.h"
class video_channel;
class CRightLogin : public em_dlg<accel_dlg<CDialog> >
{
NET_HANDLE net;
void close_all();
void login(LPCTSTR ipport, LPCTSTR password);
void logout();
static CRightLogin* self;
MSG1(on_login);
MSG1(on_channel_opened);
MSG1(on_channel_closed);
MSG1(on_alarm);
//virtual void on_login_success(IPPORT_TYPE, ULONG channel_count, int privilege);
//virtual void on_logout_success(IPPORT_TYPE);
//virtual void on_channel_opened(IPPORT_TYPE, ULONG mip, USHORT mport, ULONG channel);
//virtual void on_channel_closed(IPPORT_TYPE, ULONG channel);
// 从notif_channel通知
// virtual bool on_close_chnl(int channel, channel_info& ref);
// virtual bool on_open(int index, void* vc_new);
// virtual bool on_close(int index);
friend PRIVILEGE get_priv(ULONG ip, USHORT port);
friend void fill_combo(CComboBox*);
friend void get_addr(LPCTSTR alias, ULONG& ip, USHORT& port);
friend void set_net_opt(LPCTSTR alias, DWORD opt, void* stuff, OPT_SET_CALLEE cb);
friend void get_net_opt(LPCTSTR alias, DWORD opt, int channel, OPT_GET_CALLEE cb);
friend int get_chnls(LPCTSTR alias);
friend int get_chnls(ULONG ip, USHORT port);
friend CString get_alias(const ip_port& ipp);
friend void start_bk(LPCTSTR alias, void* opt, BACKUP_CALLEE cb);
friend void stop_bk();
friend video_channel* who_opened_it(LPCTSTR alias, int channel);
channel_mgr cmgr; // 图像通道管理器
ip_alias_mgr ipmgr; // IP别名管理器
CString alias(const channel_info& ci);
ip_port current_sel_ipp();
void update_list();
/// @param ci 频道信息
/// @param channel 频道号
void open_channel(channel_info& ci, int channel);
LRESULT on_mute(WPARAM, LPARAM);
// Construction
public:
CRightLogin(CWnd* pParent = NULL); // standard constructor
static CRightLogin* the_one();
// Dialog Data
//{{AFX_DATA(CRightLogin)
enum { IDD = IDD_RIGHT_LOGIN };
CTransButton m_btn_rclose;
CLabel m_10;
CLabel m_l3;
CLabel m_l2;
CLabel m_l1;
CSeparator m_s;
CTransButton m_btn_close;
CTransButton m_btn_alias;
CTransButton m_btn_logout;
CTransButton m_btn_login;
CTransGroup m_grp2;
CTransGroup m_grp1;
CHScrollListBox m_lstLogged;
CLabel m_8;
CLabel m_7;
CLabel m_6;
CLabel m_5;
CLabel m_3;
CLabel m_2;
CLabel m_1;
CString m_loginip;
CString m_password;
CString m_strChannelIndex;
CString m_strChannelIP;
CString m_strVideoTitle;
CString m_priv;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CRightLogin)
protected:
virtual BOOL PreTranslateMessage(MSG* pMSG);
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
void OnRightClickList();
LRESULT OnConnect(WPARAM, LPARAM);
LRESULT on_open_vod(WPARAM, LPARAM);
LRESULT on_close_vod(WPARAM, LPARAM);
LRESULT on_set_vod_speed(WPARAM, LPARAM);
LRESULT on_get_vod_speed(WPARAM, LPARAM);
LRESULT on_local_rec(WPARAM, LPARAM);
LRESULT on_get_local_rec(WPARAM, LPARAM);
LRESULT on_snapshot(WPARAM, LPARAM);
LRESULT on_video_wnd(WPARAM, LPARAM);
LRESULT on_update_wnd(WPARAM, LPARAM);
// Generated message map functions
//{{AFX_MSG(CRightLogin)
virtual BOOL OnInitDialog();
afx_msg void OnClose();
afx_msg void OnLogin();
afx_msg void OnDestroy();
afx_msg void OnLogout();
afx_msg void OnAlias();
afx_msg LRESULT OnUpdateData(WPARAM, LPARAM);
afx_msg void OnSelchangeList();
afx_msg void OnChangeLoginip();
afx_msg void OnCloseRemote();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_RIGHTLOGIN_H__FD5B8DBD_3DD1_44D9_BBDC_F67E83C55977__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -