mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:21:38 +00:00
fix stop / pause / resume
svn path=/trunk/; revision=28545
This commit is contained in:
parent
213b5a62d7
commit
28fcd88033
20 changed files with 110 additions and 64 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
BOOL
|
||||
static BOOL
|
||||
Control(PMAIN_WND_INFO Info,
|
||||
HWND hProgDlg,
|
||||
DWORD Control)
|
||||
|
@ -131,3 +131,67 @@ Control(PMAIN_WND_INFO Info,
|
|||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
BOOL DoStop(PMAIN_WND_INFO Info)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
HWND hProgDlg;
|
||||
|
||||
hProgDlg = CreateProgressDialog(Info->hMainWnd,
|
||||
Info->CurrentService->lpServiceName,
|
||||
IDS_PROGRESS_INFO_STOP);
|
||||
|
||||
if (hProgDlg)
|
||||
{
|
||||
ret = Control(Info,
|
||||
hProgDlg,
|
||||
SERVICE_CONTROL_STOP);
|
||||
|
||||
SendMessage(hProgDlg, WM_DESTROY, 0, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL DoPause(PMAIN_WND_INFO Info)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
HWND hProgDlg;
|
||||
|
||||
hProgDlg = CreateProgressDialog(Info->hMainWnd,
|
||||
Info->CurrentService->lpServiceName,
|
||||
IDS_PROGRESS_INFO_PAUSE);
|
||||
|
||||
if (hProgDlg)
|
||||
{
|
||||
ret = Control(Info,
|
||||
hProgDlg,
|
||||
SERVICE_CONTROL_STOP);
|
||||
|
||||
SendMessage(hProgDlg, WM_DESTROY, 0, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL DoResume(PMAIN_WND_INFO Info)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
HWND hProgDlg;
|
||||
|
||||
hProgDlg = CreateProgressDialog(Info->hMainWnd,
|
||||
Info->CurrentService->lpServiceName,
|
||||
IDS_PROGRESS_INFO_RESUME);
|
||||
|
||||
if (hProgDlg)
|
||||
{
|
||||
ret = Control(Info,
|
||||
hProgDlg,
|
||||
SERVICE_CONTROL_STOP);
|
||||
|
||||
SendMessage(hProgDlg, WM_DESTROY, 0, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,6 +214,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ÐåàêòÎÑ ñå îïèòâà äà ïóñíå ñëåäíàòà óñëóãà"
|
||||
IDS_PROGRESS_INFO_STOP "ÐåàêòÎÑ ñå îïèòâà äà ñïðå ñëåäíàòà óñëóãà"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Óñëóãàòà å óñïåøíî ñúçäàäåíà"
|
||||
IDS_CREATE_REQ "Ïîëåòàòà, îòáåëÿçàíè ñúñ \nçâåçäè÷êà ñà íåàçàäúëæèòåëíè"
|
||||
IDS_DELETE_STOP "Òðÿáâà ðú÷íî äà ñïðåòå óñëóãàòà, ïðåäè äà ÿ èçòðèåòå!"
|
||||
|
|
|
@ -210,6 +210,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS versucht den folgenden Dienst zu starten"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS versucht den folgenden Dienst zu beenden"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Dienst wurde erfolgreich erstellt"
|
||||
IDS_CREATE_REQ "Mit einem Sternchen gekennzeichnete Felder sind erforderlich"
|
||||
IDS_DELETE_STOP "Sie müssen den Dienst manuell beenden, bevor er gelöscht werden kann!"
|
||||
|
|
|
@ -208,8 +208,10 @@ END
|
|||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service"
|
||||
IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Service Created Succesfully"
|
||||
IDS_CREATE_REQ "Fields marked with an\nasterix are mandatory"
|
||||
IDS_DELETE_STOP "You must manually stop the service before deleting!"
|
||||
|
|
|
@ -214,6 +214,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS essaye de démarrer le service suivant"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS essaye d'arrêter le service suivant"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Service créé"
|
||||
IDS_CREATE_REQ "Les champs marqués d'une astérisque\nasont obligatoires"
|
||||
IDS_DELETE_STOP "Vous devez arrêter le service avant de le supprimer!"
|
||||
|
|
|
@ -210,6 +210,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS sedang mencoba untuk memulai layanan berikut"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS sedang mencoba untuk menghentikan layanan berikut"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Layanan Dibuat Dengan Sukses"
|
||||
IDS_CREATE_REQ "Field yang ditandai dengan\nbintang adalah mandatori"
|
||||
IDS_DELETE_STOP "Anda harus menghentikan layanan sebelum menghapus!"
|
||||
|
|
|
@ -210,6 +210,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS sta avviando il seguente servizio"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS sta fermando il seguente servizio"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Servizio creato regolarmente"
|
||||
IDS_CREATE_REQ "I campi marcati con un asterisco\nsono obbligatori"
|
||||
IDS_DELETE_STOP "Devi fermare il servizio prima di cancellare!"
|
||||
|
|
|
@ -217,6 +217,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS usiłuje uruchomić następującą usługę"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS usiłuje zatrzymać następującą usługę"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Usługa utworzona pomyślnie"
|
||||
IDS_CREATE_REQ "Pole zaznaczone wraz z \ nasterix jest obowiązkowy"
|
||||
IDS_DELETE_STOP "Musisz ręcznie zatrzymać usługę przed usuwaniem!"
|
||||
|
|
|
@ -209,6 +209,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS пытается запустить службу"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS пытается остановить службу"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Создание службы успешно завершено"
|
||||
IDS_CREATE_REQ "* = обязательные поля"
|
||||
IDS_DELETE_STOP "Вы должны вручную остановить службу перед удалением!"
|
||||
|
|
|
@ -219,6 +219,8 @@ STRINGTABLE DISCARDABLE
|
|||
BEGIN
|
||||
IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service"
|
||||
IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service"
|
||||
IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following service"
|
||||
IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following service"
|
||||
IDS_CREATE_SUCCESS "Service Created Succesfully"
|
||||
IDS_CREATE_REQ "Fields marked with an\nasterix are mandatory"
|
||||
IDS_DELETE_STOP "You must manually stop the service before deleting!"
|
||||
|
|
|
@ -644,24 +644,16 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
|||
break;
|
||||
|
||||
case ID_STOP:
|
||||
{
|
||||
if (DoStop(Info))
|
||||
SetMenuAndButtonStates(Info);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_PAUSE:
|
||||
{
|
||||
//Control(Info,
|
||||
// SERVICE_CONTROL_PAUSE);
|
||||
}
|
||||
DoPause(Info);
|
||||
break;
|
||||
|
||||
case ID_RESUME:
|
||||
{
|
||||
//Control(Info,
|
||||
// SERVICE_CONTROL_CONTINUE );
|
||||
}
|
||||
DoResume(Info);
|
||||
break;
|
||||
|
||||
case ID_RESTART:
|
||||
|
|
|
@ -60,23 +60,26 @@ HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow);
|
|||
BOOL DoStart(PMAIN_WND_INFO Info);
|
||||
|
||||
/* stop */
|
||||
BOOL DoStop(PMAIN_WND_INFO Info);
|
||||
|
||||
|
||||
/* control */
|
||||
BOOL Control(PMAIN_WND_INFO Info, HWND hProgDlg, DWORD Control);
|
||||
BOOL DoStop(PMAIN_WND_INFO Info);
|
||||
BOOL DoPause(PMAIN_WND_INFO Info);
|
||||
BOOL DoResume(PMAIN_WND_INFO Info);
|
||||
|
||||
/* progress.c */
|
||||
HWND CreateProgressDialog(HWND hParent, LPTSTR lpServiceName);
|
||||
HWND CreateProgressDialog(HWND hParent, LPTSTR lpServiceName, UINT Event);
|
||||
VOID IncrementProgressBar(HWND hProgDlg);
|
||||
VOID CompleteProgressBar(HWND hProgDlg);
|
||||
|
||||
/* query.c */
|
||||
ENUM_SERVICE_STATUS_PROCESS* GetSelectedService(PMAIN_WND_INFO Info);
|
||||
BOOL SetDescription(LPTSTR, LPTSTR);
|
||||
LPTSTR GetDescription(LPTSTR);
|
||||
LPTSTR GetExecutablePath(PMAIN_WND_INFO Info);
|
||||
BOOL RefreshServiceList(PMAIN_WND_INFO Info);
|
||||
//DWORD GetServiceList(PMAIN_WND_INFO Info);
|
||||
|
||||
/* reg */
|
||||
BOOL SetDescription(LPTSTR, LPTSTR);
|
||||
LPTSTR GetDescription(LPTSTR);
|
||||
|
||||
/* propsheet.c */
|
||||
LONG APIENTRY OpenPropSheet(PMAIN_WND_INFO Info);
|
||||
|
|
|
@ -96,7 +96,8 @@ ProgressDialogProc(HWND hDlg,
|
|||
|
||||
HWND
|
||||
CreateProgressDialog(HWND hParent,
|
||||
LPTSTR lpServiceName)
|
||||
LPTSTR lpServiceName,
|
||||
UINT Event)
|
||||
{
|
||||
HWND hProgDlg;
|
||||
TCHAR ProgDlgBuf[100];
|
||||
|
@ -113,7 +114,7 @@ CreateProgressDialog(HWND hParent,
|
|||
|
||||
/* write the info to the progress dialog */
|
||||
LoadString(hInstance,
|
||||
IDS_PROGRESS_INFO_STOP,
|
||||
Event,
|
||||
ProgDlgBuf,
|
||||
sizeof(ProgDlgBuf) / sizeof(TCHAR));
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 822 B |
Binary file not shown.
Before Width: | Height: | Size: 822 B |
|
@ -164,11 +164,13 @@
|
|||
|
||||
|
||||
/* progress bar */
|
||||
#define IDD_DLG_PROGRESS 7000
|
||||
#define IDC_SERVCON_PROGRESS 7001
|
||||
#define IDC_SERVCON_INFO 7002
|
||||
#define IDC_SERVCON_NAME 7003
|
||||
#define IDS_PROGRESS_INFO_START 7004
|
||||
#define IDS_PROGRESS_INFO_STOP 7005
|
||||
#define IDD_DLG_PROGRESS 7000
|
||||
#define IDC_SERVCON_PROGRESS 7001
|
||||
#define IDC_SERVCON_INFO 7002
|
||||
#define IDC_SERVCON_NAME 7003
|
||||
#define IDS_PROGRESS_INFO_START 7004
|
||||
#define IDS_PROGRESS_INFO_STOP 7005
|
||||
#define IDS_PROGRESS_INFO_PAUSE 7006
|
||||
#define IDS_PROGRESS_INFO_RESUME 7007
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ IDB_START BITMAP DISCARDABLE "res/start.bmp"
|
|||
IDB_STOP BITMAP DISCARDABLE "res/stop.bmp"
|
||||
IDB_PAUSE BITMAP DISCARDABLE "res/pause.bmp"
|
||||
IDB_RESTART BITMAP DISCARDABLE "res/restart.bmp"
|
||||
IDB_HELP BITMAP DISCARDABLE "res/help.bmp"
|
||||
IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp"
|
||||
|
||||
#include "lang/bg-BG.rc"
|
||||
#include "lang/de-DE.rc"
|
||||
|
@ -29,5 +27,3 @@ IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp"
|
|||
#include "lang/pl-PL.rc"
|
||||
#include "lang/ru-RU.rc"
|
||||
#include "lang/th-TH.rc"
|
||||
|
||||
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
<file>query.c</file>
|
||||
<file>reg.c</file>
|
||||
<file>servman.c</file>
|
||||
<file>start.c</file>
|
||||
<file>stop.c</file>
|
||||
<file>start.c</file>
|
||||
</compilationunit>
|
||||
<file>servman.rc</file>
|
||||
<pch>precomp.h</pch>
|
||||
|
|
|
@ -130,7 +130,8 @@ DoStart(PMAIN_WND_INFO Info)
|
|||
BOOL bRet = FALSE;
|
||||
|
||||
hProgDlg = CreateProgressDialog(Info->hMainWnd,
|
||||
Info->CurrentService->lpServiceName);
|
||||
Info->CurrentService->lpServiceName,
|
||||
IDS_PROGRESS_INFO_START);
|
||||
|
||||
if (hProgDlg)
|
||||
{
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Services
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: base/applications/mscutils/servman/stop.c
|
||||
* PURPOSE: Stops a service
|
||||
* COPYRIGHT: Copyright 2005-2007 Ged Murphy <gedmurphy@reactos.org>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
BOOL DoStop(PMAIN_WND_INFO Info)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
HWND hProgDlg;
|
||||
|
||||
hProgDlg = CreateProgressDialog(Info->hMainWnd,
|
||||
Info->CurrentService->lpServiceName);
|
||||
|
||||
if (hProgDlg)
|
||||
{
|
||||
ret = Control(Info,
|
||||
hProgDlg,
|
||||
SERVICE_CONTROL_STOP);
|
||||
|
||||
SendMessage(hProgDlg, WM_DESTROY, 0, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue