Ejemplo n.º 1
0
        private void ProgressChanged_Handler(object sender, ProgressChangedEventArgs e)
        {
            int frameId = e.ProgressPercentage;

            if (frameId != 0)
            {
                this.Title = String.Format("Plan ID:[{0}], Msg ID:[{1}], Frame ID:[{2}], RTC={3}",
                                           ctrl.Ssr.signStatusEntry[0].planId,
                                           ctrl.Ssr.signStatusEntry[0].msgId,
                                           ctrl.Ssr.signStatusEntry[0].frameId,
                                           ctrl.Ssr.datetime);
                if (ctrl.Frames[frameId] is SignSetTextFrame)
                {
                    virtualSign.AllOff();
                }
                else if (ctrl.Frames[frameId] is SignSetGraphicsFrame)
                {
                    virtualSign.Display((ctrl.Frames[frameId] as SignSetGraphicsFrame).pixels);
                }
                else if (ctrl.Frames[frameId] is SignSetHighResolutionGraphicsFrame)
                {
                    virtualSign.Display((ctrl.Frames[frameId] as SignSetHighResolutionGraphicsFrame).pixels);
                }
                else
                {
                    throw new Exception("Frame is unknown");
                }
            }
        }
Ejemplo n.º 2
0
        private void RedrawCanvas(Color[,] mc)
        {
            gridFrmFrameContent.Children.Clear();
            gridFrmFrameContent.Children.Add(canvas);
            VirtualSign virtualSign = new VirtualSign(canvas, pixelWidth, pixelHeight);

            virtualSign.Display(mc);
        }
Ejemplo n.º 3
0
        private void LoadGfx(int[,] gfxFrame)
        {
            for (int x = 0; x < pixelWidth; x++)
            {
                for (int y = 0; y < pixelHeight; y++)
                {
                    bmpPixels[x, y] = new System.Windows.Media.Color
                    {
                        A = 255,
                        R = (byte)(gfxFrame[x, y] >> 16),
                        G = (byte)(gfxFrame[x, y] >> 8),
                        B = (byte)(gfxFrame[x, y])
                    };
                }
            }
            gridFrmFrameContent.Children.Clear();
            gridFrmFrameContent.Children.Add(canvas);
            VirtualSign virtualSign = new VirtualSign(canvas, pixelWidth, pixelHeight);

            virtualSign.Display(bmpPixels);
        }