MCPcopy Create free account
hub / github.com/cinience/RedisStudio / OnUpdate

Method OnUpdate

RedisStudio/MainFrameWhd.cpp:331–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331LRESULT CMainFrameWnd::OnUpdate(HWND hwnd, WPARAM wParam, LPARAM lParam)
332{
333 std::string *data = (std::string*) (wParam);
334 StringStream ss(data->c_str());
335 Document document;
336 if (document.ParseStream<0>(ss).HasParseError())
337 {
338 delete data;
339 return TRUE;
340 }
341 bool needNotice = false;
342 if (document.HasMember("Notice"))
343 {
344 needNotice = document["Notice"].GetBool();
345 }
346 if (needNotice)
347 {
348 std::string version;
349 if (document.HasMember("Version"))
350 {
351 version = document["Version"].GetString();
352 }
353 if (version > VERSION)
354 {
355 UserMessageBox(GetHWND(), 20000, Base::CharacterSet::ANSIToUnicode(version).c_str(), MB_ICONINFORMATION);
356 //::ShellExecute(NULL, NULL, _T("https://github.com/cinience/RedisStudio/releases"), NULL, NULL, NULL);
357 }
358 }
359 delete data;
360 return TRUE;
361}
362
363DWORD WINAPI CMainFrameWnd::BackgroundWork( LPVOID lpParameter )
364{

Callers

nothing calls this directly

Calls 2

UserMessageBoxFunction · 0.85
HasParseErrorMethod · 0.45

Tested by

no test coverage detected