Skip to content

Commit

Permalink
改进一个载入文本颜色设置时的细节问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyang219 committed Apr 21, 2018
1 parent 613faa8 commit ffb5e42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion TrafficMonitor/IniHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ bool CIniHelper::GetIntArray(const wchar_t * AppName, const wchar_t * KeyName, i
index = str.find(L',', index + 1);
if (index0 == index)
{
values[i] = default_value;
if(i!=0)
values[i] = values[i - 1]; //如果后面已经没有数据,则填充为前一个数据
else
values[i] = default_value;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion TrafficMonitor/TrafficMonitorDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void CTrafficMonitorDlg::LoadConfig()
m_position_y = ini.GetInt(_T("config"), _T("position_y"), -1);
m_auto_select = ini.GetBool(_T("connection"), _T("auto_select"), true);
//theApp.m_main_wnd_data.text_color = ini.GetInt(_T("config"), _T("text_color"), 16384);
ini.GetIntArray(_T("config"), _T("text_color"), (int*)theApp.m_main_wnd_data.text_colors, MAIN_WND_COLOR_NUM, 0);
ini.GetIntArray(_T("config"), _T("text_color"), (int*)theApp.m_main_wnd_data.text_colors, MAIN_WND_COLOR_NUM, 16384);
theApp.m_main_wnd_data.specify_each_item_color = ini.GetBool(_T("config"), _T("specify_each_item_color"), false);
theApp.m_hide_main_window = ini.GetBool(_T("config"), _T("hide_main_window"), false);
m_connection_name = CCommon::UnicodeToStr(ini.GetString(L"connection", L"connection_name", L"").c_str());
Expand Down

0 comments on commit ffb5e42

Please sign in to comment.