Skip to content

Commit

Permalink
Merge pull request zhongyang219#229 from bhz6344/master
Browse files Browse the repository at this point in the history
扩展鼠标双击动作,可打开自定义程序
  • Loading branch information
zhongyang219 authored May 23, 2019
2 parents 848aa89 + 44c2c0e commit 628092d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions TrafficMonitor/CommonData.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ struct PublicSettingData
bool hide_unit; //隐藏单位
bool hide_percent; //隐藏百分号
DoubleClickAction double_click_action; //鼠标双击动作
wstring double_click_exe; //鼠标双击动作为4时,打开的程序路径,默认任务管理器
};

#define MAIN_WND_COLOR_NUM 4 //主窗口颜色数量
Expand Down
2 changes: 1 addition & 1 deletion TrafficMonitor/TaskBarDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ void CTaskBarDlg::OnLButtonDblClk(UINT nFlags, CPoint point)
SendMessage(WM_COMMAND, ID_OPTIONS2); //双击后弹出“选项设置”对话框
break;
case DoubleClickAction::TASK_MANAGER:
ShellExecuteW(NULL, _T("open"), (theApp.m_system_dir+L"\\Taskmgr.exe").c_str(), NULL, NULL, SW_NORMAL); //打开任务管理器
ShellExecuteW(NULL, _T("open"), (theApp.m_taskbar_data.double_click_exe).c_str(), NULL, NULL, SW_NORMAL); //打开指定程序,默认任务管理器
break;
default:
break;
Expand Down
1 change: 1 addition & 0 deletions TrafficMonitor/TrafficMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void CTrafficMonitorApp::LoadConfig()
m_taskbar_data.separate_value_unit_with_space = ini.GetBool(_T("task_bar"), _T("separate_value_unit_with_space"), true);
m_taskbar_data.digits_number = ini.GetInt(_T("task_bar"), _T("digits_number"), 4);
m_taskbar_data.double_click_action = static_cast<DoubleClickAction>(ini.GetInt(_T("task_bar"), _T("double_click_action"), 0));
m_taskbar_data.double_click_exe = ini.GetString(L"task_bar", L"double_click_exe", (theApp.m_system_dir + L"\\Taskmgr.exe").c_str());

//其他设置
m_cfg_data.m_show_internet_ip = ini.GetBool(L"connection_details", L"show_internet_ip", false);
Expand Down

0 comments on commit 628092d

Please sign in to comment.