Resizing of camera pictures using '+' and '-' buttons implemented. TODO: Full screen mode, ver. 2.17.699
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UiControls
|
||||
{
|
||||
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();
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user