Beispiel #1
0
        public static void GifNotification(DisplayWindow window, int displayTime, string imagineFile, string soundFile, int textheight, string content)
        {
            int oWidth  = window.Width;
            int oHeight = window.Height;

            ImagineRequest imagineRender = new ImagineRequest()
            {
                x      = 0,
                y      = 0,
                width  = oWidth,
                height = oHeight - (textheight * 2),
            };

            imagineRender.SetFromFile(imagineFile);

            TextRequest textRender = new TextRequest()
            {
                x          = 5,
                y          = oHeight - (textheight * 2),
                width      = oWidth - 5,
                height     = textheight,
                autoResize = true,
                text       = content,
            };

            SoundRequest soundRequest = new SoundRequest()
            {
                file = soundFile
            };

            RenderRequest request = new RenderRequest(displayTime, soundRequest, imagineRender, textRender);

            window.EnqueueRenders(request);
        }