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

            Width = (int)sz.Width;
        }
Beispiel #2
0
 public void Render(SignRender r)
 {
     r.PrepareBitmapBackground(ref Bmp);
     g = Graphics.FromImage(Bmp);
     Render();
     r.DrawBackground(Bmp);
 }
Beispiel #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);
            }
        }
Beispiel #4
0
 public void SetConfiguration(SignConfiguration c)
 {
     lock (this)
     {
         if (Render == null)
         {
             Render = new SignRender();
         }
         Render.SetConfiguration(c);
     }
 }
Beispiel #5
0
 public SignAnimate()
 {
     Render     = null;
     FrameTimer = new Timer(FrameTick);
     SetAnimationRate(30);
 }
Beispiel #6
0
        public override void Render(SignRender r)
        {
            int height = r.Configuration.Height - 3;

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