Esempio n. 1
0
        public static bool Handle(IWin32Window owner, ErrorState error)
        {
            switch (error)
            {
            case ErrorState.None:
                break;

            case ErrorState.Generic:
                MessageBoxExInt.ShowError(owner, ErrorMessage.Generic);
                break;

            case ErrorState.CDKey:
                MessageBoxExInt.ShowError(owner, ErrorMessage.CDKey);
                break;

            case ErrorState.CDGuid:
                MessageBoxExInt.ShowError(owner, ErrorMessage.CDGuid);
                break;

            case ErrorState.Registry:
                MessageBoxExInt.ShowError(owner, ErrorMessage.Registry);
                break;

            case ErrorState.RegistryEmpty:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryEmpty);
                break;

            case ErrorState.RegistryRoot:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryRoot);
                break;

            case ErrorState.RegistryPeak:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryPeak);
                break;

            case ErrorState.RegistrySecuritySet:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistrySecuritySet);
                break;

            case ErrorState.RegistrySecurityGet:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistrySecurityGet);
                break;

            case ErrorState.RegistryUnauthorizedAccess:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryUnauthorizedAccess);
                break;

            case ErrorState.RegistryIO:
                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryIO);
                break;

            case ErrorState.GameHandle:
                MessageBoxExInt.ShowError(owner, ErrorMessage.GameHandle);
                break;

            case ErrorState.Injection:
                MessageBoxExInt.ShowError(owner, ErrorMessage.Injection);
                break;

            case ErrorState.DllNotFound:
                MessageBoxExInt.ShowError(owner, ErrorMessage.DllNotFound);
                break;
            }

            return(error != ErrorState.None);
        }
Esempio n. 2
0
 private void menuItem_Fix_Click(object sender, EventArgs e)
 {
     MessageBoxExInt.ShowError(contextMenu_RetriveControlCdKey(contextMenu_Global.SourceControl));
 }
Esempio n. 3
0
        public static ErrorContainer HandleContainer(IWin32Window owner, ErrorState error)
        {
            ErrorContainer c = new ErrorContainer();

            c.State   = ErrorState.None;
            c.Color   = ErrorColor.None;
            c.Message = null;
            c.Tip     = null;

            switch (error)
            {
            case ErrorState.None:
            {
                break;
            }

            case ErrorState.Generic:
            {
                c.State   = ErrorState.Generic;
                c.Color   = ErrorColor.Generic;
                c.Message = ErrorMessage.Generic;
                c.Tip     = ErrorTip.Generic;

                MessageBoxExInt.ShowError(owner, ErrorMessage.Generic);
                break;
            }

            case ErrorState.CDKey:
            {
                c.State   = ErrorState.CDKey;
                c.Color   = ErrorColor.CDKey;
                c.Message = ErrorMessage.CDKey;
                c.Tip     = ErrorTip.CDKey;

                MessageBoxExInt.ShowError(owner, ErrorMessage.CDKey);
                break;
            }

            case ErrorState.CDGuid:
            {
                c.State   = ErrorState.CDGuid;
                c.Color   = ErrorColor.CDGuid;
                c.Message = ErrorMessage.CDGuid;
                c.Tip     = ErrorTip.CDGuid;

                MessageBoxExInt.ShowError(owner, ErrorMessage.CDGuid);
                break;
            }

            case ErrorState.Registry:
            {
                c.State   = ErrorState.Registry;
                c.Color   = ErrorColor.Registry;
                c.Message = ErrorMessage.Registry;
                c.Tip     = ErrorTip.Registry;

                MessageBoxExInt.ShowError(owner, ErrorMessage.Registry);
                break;
            }

            case ErrorState.RegistryEmpty:
            {
                c.State   = ErrorState.RegistryEmpty;
                c.Color   = ErrorColor.RegistryEmpty;
                c.Message = ErrorMessage.RegistryEmpty;
                c.Tip     = ErrorTip.RegistryEmpty;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryEmpty);
                break;
            }

            case ErrorState.RegistryRoot:
            {
                c.State   = ErrorState.RegistryRoot;
                c.Color   = ErrorColor.RegistryRoot;
                c.Message = ErrorMessage.RegistryRoot;
                c.Tip     = ErrorTip.RegistryRoot;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryRoot);
                break;
            }

            case ErrorState.RegistryPeak:
            {
                c.State   = ErrorState.RegistryPeak;
                c.Color   = ErrorColor.RegistryPeak;
                c.Message = ErrorMessage.RegistryPeak;
                c.Tip     = ErrorTip.RegistryPeak;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryPeak);
                break;
            }

            case ErrorState.RegistrySecuritySet:
            {
                c.State   = ErrorState.RegistrySecuritySet;
                c.Color   = ErrorColor.RegistrySecuritySet;
                c.Message = ErrorMessage.RegistrySecuritySet;
                c.Tip     = ErrorTip.RegistrySecuritySet;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistrySecuritySet);
                break;
            }

            case ErrorState.RegistrySecurityGet:
            {
                c.State   = ErrorState.RegistrySecurityGet;
                c.Color   = ErrorColor.RegistrySecurityGet;
                c.Message = ErrorMessage.RegistrySecurityGet;
                c.Tip     = ErrorTip.RegistrySecurityGet;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistrySecurityGet);
                break;
            }

            case ErrorState.RegistryUnauthorizedAccess:
            {
                c.State   = ErrorState.RegistryUnauthorizedAccess;
                c.Color   = ErrorColor.RegistryUnauthorizedAccess;
                c.Message = ErrorMessage.RegistryUnauthorizedAccess;
                c.Tip     = ErrorTip.RegistryUnauthorizedAccess;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryUnauthorizedAccess);
                break;
            }

            case ErrorState.RegistryIO:
            {
                c.State   = ErrorState.RegistryIO;
                c.Color   = ErrorColor.RegistryIO;
                c.Message = ErrorMessage.RegistryIO;
                c.Tip     = ErrorTip.RegistryIO;

                MessageBoxExInt.ShowError(owner, ErrorMessage.RegistryIO);
                break;
            }

            case ErrorState.GameHandle:
            {
                c.State   = ErrorState.GameHandle;
                c.Color   = ErrorColor.GameHandle;
                c.Message = ErrorMessage.GameHandle;
                c.Tip     = ErrorTip.GameHandle;

                MessageBoxExInt.ShowError(owner, ErrorMessage.GameHandle);
                break;
            }

            case ErrorState.Injection:
            {
                c.State   = ErrorState.Injection;
                c.Color   = ErrorColor.Injection;
                c.Message = ErrorMessage.Injection;
                c.Tip     = ErrorTip.Injection;

                MessageBoxExInt.ShowError(owner, ErrorMessage.Injection);
                break;
            }

            case ErrorState.DllNotFound:
            {
                c.State   = ErrorState.DllNotFound;
                c.Color   = ErrorColor.DllNotFound;
                c.Message = ErrorMessage.DllNotFound;
                c.Tip     = ErrorTip.DllNotFound;

                MessageBoxExInt.ShowError(owner, ErrorMessage.DllNotFound);
                break;
            }
            }

            return(c);
        }