2017-10-16 10:21:45 +00:00
|
|
|
|
///
|
2019-09-16 08:51:25 +00:00
|
|
|
|
/// Copyright (c) 2017 Senus Slovensko a.s.
|
2017-10-16 10:21:45 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
using TBF.Resources;
|
|
|
|
|
|
|
2019-09-16 08:51:25 +00:00
|
|
|
|
namespace TBF.UI.Camera
|
2017-10-16 10:21:45 +00:00
|
|
|
|
{
|
|
|
|
|
|
public partial class CameraPictureFullCtrl : UserControl, ICameraPicture
|
|
|
|
|
|
{
|
|
|
|
|
|
private DateTime imageTimeStamp;
|
|
|
|
|
|
|
|
|
|
|
|
public Image NewImage
|
|
|
|
|
|
{
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
pictureBox.Image = value;
|
|
|
|
|
|
imageTimeStamp = DateTime.Now;
|
|
|
|
|
|
ledPictureBox.BackColor = Color.Red;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Image Image
|
|
|
|
|
|
{
|
|
|
|
|
|
set { pictureBox.Image = value; }
|
|
|
|
|
|
get { return pictureBox.Image; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DateTime TimeStamp
|
|
|
|
|
|
{
|
|
|
|
|
|
set { imageTimeStamp = value; }
|
|
|
|
|
|
get { return imageTimeStamp; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string Caption
|
|
|
|
|
|
{
|
|
|
|
|
|
set { captionLabel.Text = value; }
|
|
|
|
|
|
get { return captionLabel.Text; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public CameraPictureFullCtrl()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
2019-09-16 08:51:25 +00:00
|
|
|
|
captionLabel.Text = Strings.No_info_available;
|
2017-10-16 10:21:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|