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); } }
public void SetConfiguration(SignConfiguration c) { lock (this) { if (Render == null) { Render = new SignRender(); } Render.SetConfiguration(c); } }