protected void Init()
        {
            //-- Enable the buttons
            try
            {
                //-- Set the service status and the command timer
                SetServiceStatus();
                CommandTimer.Start();

                //-- Enable the buttons
                EnableButtons();
            }
            catch (Exception Exc)
            {
                ShowErrorMessage(Exc);
                Close();
            }

            Start();
        }
        protected void CheckCommand()
        {
            int nCmdCod = Global.IntegerNull;

            //--- Stop the command timer
            CommandTimer.Stop();

            //--- Get the status registry key
            nCmdCod = (int)Library.Registry.Registry.GetKeyValue
                      (
                Registry.CurrentUser,
                RegKeyPath_SvcSim,
                RegValName_SvcSim_Cmd,
                RegistryValueKind.DWord,
                false,
                false
                      );

            //--- Get the command code
            if (nCmdCod == CmdCod_Start)
            {
                Start();
            }
            else if (nCmdCod == CmdCod_Stop)
            {
                Stop();
            }

            //--- Set the none command if command exists
            if (nCmdCod != CmdCod_None)
            {
                Library.Registry.Registry.SetKeyValue(Registry.CurrentUser, RegKeyPath_SvcSim, RegValName_SvcSim_Cmd, CmdCod_None, RegistryValueKind.DWord);
            }

            //--- Start the command timer
            CommandTimer.Start();
        }