Exemplo n.º 1
0
        public override void SetContext(SignRender c)
        {
            int   height = c.Configuration.Height - 3;
            SizeF sz     = c.MeasureText(height, Text);

            Width = (int)sz.Width;
        }
Exemplo n.º 2
0
 public void Render(SignRender r)
 {
     r.PrepareBitmapBackground(ref Bmp);
     g = Graphics.FromImage(Bmp);
     Render();
     r.DrawBackground(Bmp);
 }
Exemplo n.º 3
0
        void SetIdentify(bool enable)
        {
            ResponseObject.UseConfigureDisplay = enable;
            if (enable)
            {
                // Generate configuration image;
                SignRender r = new SignRender();
                r.SetConfiguration(ResponseObject.Target.CurrentConfiguration());

                r.Clear();

                lock (Elements)
                {
                    int index = 1;
                    foreach (EditElement e in Elements)
                    {
                        string text = index.ToString();

                        SizeF sz = r.MeasureText(12, text);

                        r.DrawTextAbsolute(12, text, Color.White,
                                           e.Location.X + (e.Location.Width - sz.Width) / 2,
                                           e.Location.Y + (e.Location.Height - sz.Height) / 2);

                        index++;
                    }
                }

                UpdateFrameInternal(r.SignOutput);
                ResponseObject.Target.SendImage(r.SignOutput);
            }
        }
Exemplo n.º 4
0
 public void SetConfiguration(SignConfiguration c)
 {
     lock (this)
     {
         if (Render == null)
         {
             Render = new SignRender();
         }
         Render.SetConfiguration(c);
     }
 }
Exemplo n.º 5
0
 public SignAnimate()
 {
     Render     = null;
     FrameTimer = new Timer(FrameTick);
     SetAnimationRate(30);
 }
Exemplo n.º 6
0
        public override void Render(SignRender r)
        {
            int height = r.Configuration.Height - 3;

            r.DrawText(height, Text, TextColor);
        }
Exemplo n.º 7
0
 public virtual void Render(SignRender r)
 {
 }
Exemplo n.º 8
0
 public virtual void SetContext(SignRender r)
 {
 }