Esempio n. 1
0
        protected void setupExceptionWithType(ImageHelperErrorType type)
        {
            switch (type)
            {
            case ImageHelperErrorType.WatcherCreate:
                ErrorCode    = 10;
                ErrorMessage = "Could not watch for MediaPortal screenshots.";
                break;

            case ImageHelperErrorType.WatcherEnable:
                ErrorCode    = 11;
                ErrorMessage = "Error starting to watch for MediaPortal screenshots.";
                break;

            case ImageHelperErrorType.DirectoryCreate:
                ErrorCode    = 20;
                ErrorMessage = "Could not create screenshot directory.";
                break;

            case ImageHelperErrorType.Timeout:
                ErrorCode    = 30;
                ErrorMessage = "Timeout while waiting for MediaPortal to take the screenshot.";
                break;

            case ImageHelperErrorType.ScreenshotRead:
                ErrorCode    = 40;
                ErrorMessage = "Could not read MediaPortal screenshot";
                break;

            default:
                ErrorCode    = 0;
                ErrorMessage = "An unexpected error occured.";
                break;
            }
        }
Esempio n. 2
0
        protected void setupExceptionWithType(ImageHelperErrorType type)
        {
            switch (type)
            {
                case ImageHelperErrorType.WatcherCreate:
                    ErrorCode = 10;
                    ErrorMessage = "Could not watch for MediaPortal screenshots.";
                    break;

                case ImageHelperErrorType.WatcherEnable:
                    ErrorCode = 11;
                    ErrorMessage = "Error starting to watch for MediaPortal screenshots.";
                    break;

                case ImageHelperErrorType.DirectoryCreate:
                    ErrorCode = 20;
                    ErrorMessage = "Could not create screenshot directory.";
                    break;

                case ImageHelperErrorType.Timeout:
                    ErrorCode = 30;
                    ErrorMessage = "Timeout while waiting for MediaPortal to take the screenshot.";
                    break;

                case ImageHelperErrorType.ScreenshotRead:
                    ErrorCode = 40;
                    ErrorMessage = "Could not read MediaPortal screenshot";
                    break;

                default:
                    ErrorCode = 0;
                    ErrorMessage = "An unexpected error occured.";
                    break;
            }
        }
Esempio n. 3
0
 public ImageHelperError(ImageHelperErrorType type)
 {
     setupExceptionWithType(type);
 }
Esempio n. 4
0
 public ImageHelperError(ImageHelperErrorType type)
 {
     setupExceptionWithType(type);
 }