|
@@ -31,6 +31,12 @@ LRESULT CFrameWnd::InstalledMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOO
|
|
|
|
|
|
void CFrameWnd::OpenApp_Click()
|
|
|
{
|
|
|
+ if (IsNeedReStartSystem)
|
|
|
+ {
|
|
|
+ ReStartSystem();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
wstring s = PathCore::smPath_Install + L"\\" + Product::smName_Application;
|
|
|
auto histance = ShellExecute(NULL, L"open", s.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
|
|
assert(histance > (HINSTANCE)HINSTANCE_ERROR);
|
|
@@ -42,3 +48,14 @@ void CFrameWnd::Thread_OpenApp( ThreadData threadData)
|
|
|
{
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+void CFrameWnd::ReStartSystem()
|
|
|
+{
|
|
|
+ if (IsNeedReStartSystem)
|
|
|
+ {
|
|
|
+ if (MSGID_OK == MessageBoxWnd::Show(m_hWnd, MessageContentType::ReStartSystem))
|
|
|
+ {
|
|
|
+ system("shutdown -i -r");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|