/// /// Copyright (c) 2017 Sensus Metering Systems /// using System; using System.Drawing; using System.Windows.Forms; using TBF.Resources; namespace TBF.UiControls { public partial class CameraPictureCtrl : UserControl { private DateTime imageTimeStamp; public Image Image { set { pictureBox.Image = value; imageTimeStamp = DateTime.Now; ledPictureBox.BackColor = Color.Red; } } public string Caption { set { captionLabel.Text = value; } } public CameraPictureCtrl() { InitializeComponent(); captionLabel.Text = "No info available"; } public void UpdateLed(DateTime now) { ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500)) ? SystemColors.Control : Color.Red; } private void stopButton_Click(object sender, EventArgs e) { } private void saveButton_Click(object sender, EventArgs e) { } private void maxButton_Click(object sender, EventArgs e) { } } }