mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
minor changes
svn path=/trunk/; revision=1822
This commit is contained in:
parent
5ac5ed1e37
commit
05a5575ff1
4 changed files with 64 additions and 65 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: RegistryExplorer.cpp,v 1.6 2001/04/16 05:11:54 narnaoud Exp $
|
||||
/* $Id: RegistryExplorer.cpp,v 1.7 2001/04/24 22:53:00 narnaoud Exp $
|
||||
*
|
||||
* regexpl - Console Registry Explorer
|
||||
*
|
||||
|
@ -85,62 +85,59 @@ BOOL WINAPI HandlerRoutine(DWORD dwCtrlType)
|
|||
//int _tmain(/*int argc, TCHAR* argv[], TCHAR* envp[]*/)
|
||||
int main ()
|
||||
{
|
||||
CShellCommandsLinkedList CommandsList(Console);
|
||||
|
||||
CShellCommandExit ExitCommand;
|
||||
CommandsList.AddCommand(&ExitCommand);
|
||||
|
||||
CShellCommandVersion VersionCommand;
|
||||
CommandsList.AddCommand(&VersionCommand);
|
||||
|
||||
CShellCommandHelp HelpCommand(CommandsList);
|
||||
CommandsList.AddCommand(&HelpCommand);
|
||||
|
||||
CShellCommandDir DirCommand(Tree);
|
||||
CommandsList.AddCommand(&DirCommand);
|
||||
|
||||
CShellCommandChangeKey ChangeKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&ChangeKeyCommand);
|
||||
|
||||
CShellCommandValue ValueCommand(Tree);
|
||||
CommandsList.AddCommand(&ValueCommand);
|
||||
|
||||
CShellCommandOwner OwnerCommand(Tree);
|
||||
CommandsList.AddCommand(&OwnerCommand);
|
||||
|
||||
CShellCommandDACL DACLCommand(Tree);
|
||||
CommandsList.AddCommand(&DACLCommand);
|
||||
|
||||
CShellCommandSACL SACLCommand(Tree);
|
||||
CommandsList.AddCommand(&SACLCommand);
|
||||
|
||||
//CShellCommandDOKA DOKACommand(Tree);
|
||||
//CommandsList.AddCommand(&DOKACommand);
|
||||
|
||||
CShellCommandConnect ConnectCommand(Tree);
|
||||
CommandsList.AddCommand(&ConnectCommand);
|
||||
|
||||
CShellCommandNewKey NewKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&NewKeyCommand);
|
||||
|
||||
CShellCommandDeleteKey DeleteKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&DeleteKeyCommand);
|
||||
|
||||
CShellCommandSetValue SetValueCommand(Tree);
|
||||
CommandsList.AddCommand(&SetValueCommand);
|
||||
|
||||
CShellCommandDeleteValue DeleteValueCommand(Tree);
|
||||
CommandsList.AddCommand(&DeleteValueCommand);
|
||||
|
||||
CArgumentParser Parser;
|
||||
|
||||
int nRetCode = 0;
|
||||
int nRetCode = 0;
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
CSettings *pSettings = NULL;
|
||||
CPrompt *pPrompt = NULL;
|
||||
|
||||
CShellCommandsLinkedList CommandsList(Console);
|
||||
|
||||
CShellCommandExit ExitCommand;
|
||||
CommandsList.AddCommand(&ExitCommand);
|
||||
|
||||
CShellCommandVersion VersionCommand;
|
||||
CommandsList.AddCommand(&VersionCommand);
|
||||
|
||||
CShellCommandHelp HelpCommand(CommandsList);
|
||||
CommandsList.AddCommand(&HelpCommand);
|
||||
|
||||
CShellCommandDir DirCommand(Tree);
|
||||
CommandsList.AddCommand(&DirCommand);
|
||||
|
||||
CShellCommandChangeKey ChangeKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&ChangeKeyCommand);
|
||||
|
||||
CShellCommandValue ValueCommand(Tree);
|
||||
CommandsList.AddCommand(&ValueCommand);
|
||||
|
||||
CShellCommandOwner OwnerCommand(Tree);
|
||||
CommandsList.AddCommand(&OwnerCommand);
|
||||
|
||||
CShellCommandDACL DACLCommand(Tree);
|
||||
CommandsList.AddCommand(&DACLCommand);
|
||||
|
||||
CShellCommandSACL SACLCommand(Tree);
|
||||
CommandsList.AddCommand(&SACLCommand);
|
||||
|
||||
CShellCommandConnect ConnectCommand(Tree);
|
||||
CommandsList.AddCommand(&ConnectCommand);
|
||||
|
||||
CShellCommandNewKey NewKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&NewKeyCommand);
|
||||
|
||||
CShellCommandDeleteKey DeleteKeyCommand(Tree);
|
||||
CommandsList.AddCommand(&DeleteKeyCommand);
|
||||
|
||||
CShellCommandSetValue SetValueCommand(Tree);
|
||||
CommandsList.AddCommand(&SetValueCommand);
|
||||
|
||||
CShellCommandDeleteValue DeleteValueCommand(Tree);
|
||||
CommandsList.AddCommand(&DeleteValueCommand);
|
||||
|
||||
CArgumentParser Parser;
|
||||
|
||||
pSettings = new CSettings();
|
||||
if (!pSettings)
|
||||
{
|
||||
|
@ -215,7 +212,7 @@ GetCommand:
|
|||
blnCommandExecutionInProgress = FALSE;
|
||||
|
||||
// Set command line color
|
||||
Console.SetTextAttribute(pSettings->GetPromptTextAttributes());
|
||||
Console.SetTextAttribute(pSettings->GetCommandTextAttributes());
|
||||
if (!Console.ReadLine())
|
||||
goto Abort;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: RegistryExplorer.h,v 1.6 2001/04/16 05:11:54 narnaoud Exp $ */
|
||||
/* $Id: RegistryExplorer.h,v 1.7 2001/04/24 22:53:00 narnaoud Exp $ */
|
||||
|
||||
#ifndef _REGISTRY_EXPLORER_H__INCLUDED
|
||||
#define _REGISTRY_EXPLORER_H__INCLUDED
|
||||
|
@ -49,9 +49,11 @@
|
|||
|
||||
#define COMMAND_NA_ON_ROOT _T(" is not applicable to root key.\n")
|
||||
|
||||
#define SETTINGS_REGISTRY_KEY _T("SOFTWARE\\Registry Explorer")
|
||||
#define SETTINGS_REGISTRY_KEY _T("Software\\Registry Explorer\\")
|
||||
#define NORMAL_TEXT_ATTRIBUTES_VALUE_NAME _T("Normal Text Color")
|
||||
#define PROMPT_TEXT_ATTRIBUTES_VALUE_NAME _T("Prompt Text Color")
|
||||
#define COMMAND_TEXT_ATTRIBUTES_VALUE_NAME _T("Command Text Color")
|
||||
#define PROMPT_VALUE_NAME _T("Prompt")
|
||||
|
||||
#define DEFAULT_ESCAPE_CHAR _T('^')
|
||||
|
||||
#endif //#ifndef _REGISTRY_EXPLORER_H__INCLUDED
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: Settings.cpp,v 1.1 2001/04/16 05:03:29 narnaoud Exp $
|
||||
/* $Id: Settings.cpp,v 1.2 2001/04/24 22:53:00 narnaoud Exp $
|
||||
*
|
||||
* regexpl - Console Registry Explorer
|
||||
*
|
||||
|
@ -28,14 +28,14 @@
|
|||
#include "Prompt.h"
|
||||
|
||||
#define DEFAULT_NORMAL_TEXT_ATTRIBUTES FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED
|
||||
#define DEFAULT_PROMPT_TEXT_ATTRIBUTES FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED
|
||||
#define DEFAULT_COMMAND_TEXT_ATTRIBUTES FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED
|
||||
|
||||
CSettings::CSettings()
|
||||
{
|
||||
m_pszPrompt = NULL;
|
||||
|
||||
m_wNormalTextAttributes = DEFAULT_NORMAL_TEXT_ATTRIBUTES;
|
||||
m_wPromptTextAttributes = DEFAULT_PROMPT_TEXT_ATTRIBUTES;
|
||||
m_wCommandTextAttributes = DEFAULT_COMMAND_TEXT_ATTRIBUTES;
|
||||
}
|
||||
|
||||
CSettings::~CSettings()
|
||||
|
@ -107,14 +107,14 @@ HRESULT CSettings::Load(LPCTSTR pszLoadKey)
|
|||
}
|
||||
|
||||
dwSize = sizeof(DWORD);
|
||||
nError = RegQueryValueEx(hKey,PROMPT_TEXT_ATTRIBUTES_VALUE_NAME,NULL,&dwType,(BYTE *)&w,&dwSize);
|
||||
nError = RegQueryValueEx(hKey,COMMAND_TEXT_ATTRIBUTES_VALUE_NAME,NULL,&dwType,(BYTE *)&w,&dwSize);
|
||||
if (nError != ERROR_SUCCESS || dwType != REG_DWORD)
|
||||
{
|
||||
hr = S_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_wPromptTextAttributes = (WORD)w;
|
||||
m_wCommandTextAttributes = (WORD)w;
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
@ -140,7 +140,7 @@ WORD CSettings::GetNormalTextAttributes()
|
|||
return m_wNormalTextAttributes;
|
||||
}
|
||||
|
||||
WORD CSettings::GetPromptTextAttributes()
|
||||
WORD CSettings::GetCommandTextAttributes()
|
||||
{
|
||||
return m_wPromptTextAttributes;
|
||||
return m_wCommandTextAttributes;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: Settings.h,v 1.1 2001/04/16 05:03:29 narnaoud Exp $ */
|
||||
/* $Id: Settings.h,v 1.2 2001/04/24 22:53:00 narnaoud Exp $ */
|
||||
|
||||
#ifndef OPTIONS_H__a7382d2d_96b4_4472_974d_801281bd5327___INCLUDED
|
||||
#define OPTIONS_H__a7382d2d_96b4_4472_974d_801281bd5327___INCLUDED
|
||||
|
@ -12,12 +12,12 @@ public:
|
|||
HRESULT Store(LPCTSTR pszStoreKey);
|
||||
LPCTSTR GetPrompt();
|
||||
WORD GetNormalTextAttributes();
|
||||
WORD GetPromptTextAttributes();
|
||||
WORD GetCommandTextAttributes();
|
||||
private:
|
||||
HRESULT Clean();
|
||||
LPTSTR m_pszPrompt;
|
||||
WORD m_wNormalTextAttributes;
|
||||
WORD m_wPromptTextAttributes;
|
||||
WORD m_wCommandTextAttributes;
|
||||
};
|
||||
|
||||
#endif // #ifndef OPTIONS_H__a7382d2d_96b4_4472_974d_801281bd5327___INCLUDED
|
||||
|
|
Loading…
Reference in a new issue