- Implemented functionality to handle multiple image captures with adjustable time gaps using the new `MultipleImageOpacity` class. - Enhanced `RoiCfgCtrl` and `RoiCfg` to integrate multi-image configuration. - Updated CJMS11 camera to support sequential image handling and delegate events for multiple images. - Introduced UI elements for specifying image count and time gap in the configuration panel. - Extended `GrabImagesOp` and event arguments to handle and store multiple grabbed images. - Refactored project to include `MultipleImageOpacity` utility in TBF solution.
167 lines
3.7 KiB
C#
167 lines
3.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using TBF.Rig.Network.Camera.CJMS11;
|
|
|
|
namespace TBF.Rig.Network.Telnet
|
|
{
|
|
/// <summary>
|
|
/// Type of argument of MeasuredDataEventHandler
|
|
/// </summary>
|
|
public class MeasuredDataEventArgs : EventArgs
|
|
{
|
|
public string MeasuredData; /// Fatal error description messages.
|
|
|
|
public MeasuredDataEventArgs(string measuredData)
|
|
{
|
|
MeasuredData = measuredData;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of FatalEventHandler
|
|
/// </summary>
|
|
public class FatalEventArgs : EventArgs
|
|
{
|
|
public string FatalErrorText; /// Fatal error description messages.
|
|
|
|
public FatalEventArgs(string text)
|
|
{
|
|
FatalErrorText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of NotificationEventHandler
|
|
/// </summary>
|
|
public class NotificationEventArgs : EventArgs
|
|
{
|
|
public string NotificationText; /// String identifying this notification more closely.
|
|
|
|
public NotificationEventArgs(string text)
|
|
{
|
|
NotificationText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of PromptReceviedEventHandler
|
|
/// </summary>
|
|
public class PromptReceivedEventArgs : EventArgs
|
|
{
|
|
public string Response; /// Response to a command from the telnet server ...
|
|
/// ... without the terminal prompt string.
|
|
|
|
public PromptReceivedEventArgs(string text)
|
|
{
|
|
Response = text;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Type of argument of PromptReceviedEventHandler
|
|
/// </summary>
|
|
public class PromptReceivedJMSEventArgs : EventArgs
|
|
{
|
|
public string Response; /// Response to a command from the telnet server ...
|
|
/// ... without the terminal prompt string.
|
|
public JmsMessage Message; /// Message received from the server.
|
|
|
|
public PromptReceivedJMSEventArgs(string text, JmsMessage message)
|
|
{
|
|
Response = text;
|
|
Message = message;
|
|
}
|
|
}
|
|
|
|
public class PromptReceivedImageEventArgs : EventArgs
|
|
{
|
|
public Image image; /// server image.
|
|
public int idxCamera; /// camera index.
|
|
|
|
public PromptReceivedImageEventArgs(int idxCamera, Image image)
|
|
{
|
|
this.image = image;
|
|
this.idxCamera = idxCamera;
|
|
}
|
|
}
|
|
|
|
public class PromptReceivedImagesEventArgs : EventArgs
|
|
{
|
|
public Image image; /// server image.
|
|
public int idxCamera; /// camera index.
|
|
public int idxImage; /// image index.
|
|
public int imageCounts; /// number of images.
|
|
|
|
public PromptReceivedImagesEventArgs(int idxCamera, Image image, int idxImage, int imageCounts)
|
|
{
|
|
this.image = image;
|
|
this.idxCamera = idxCamera;
|
|
this.idxImage = idxImage;
|
|
this.imageCounts = imageCounts;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of VtTextChangedEventHandler
|
|
/// </summary>
|
|
public class VtTextChangedEventArgs : EventArgs
|
|
{
|
|
public string VtText; // Virtual terminal text.
|
|
|
|
public VtTextChangedEventArgs(string text)
|
|
{
|
|
VtText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Used as a part of AuxBrdUpgItemMessage
|
|
/// </summary>
|
|
public enum Category
|
|
{
|
|
Error,
|
|
Warning,
|
|
Success,
|
|
}
|
|
/// <summary>
|
|
/// A pair containing Aux Board Upgrade item identification and a message
|
|
/// (fatal error, error, warning or success message).
|
|
/// </summary>
|
|
public class AuxBrdUpgItemMessage
|
|
{
|
|
public Category Category; /// Error, Warning or Success
|
|
public string Label; /// Identifies the aux.board upgrade item
|
|
public string Message; /// The message
|
|
|
|
public AuxBrdUpgItemMessage(Category category, string label, string message)
|
|
{
|
|
Category = category;
|
|
Label = label;
|
|
Message = message;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Type of argument of SummaryEventArgs
|
|
/// </summary>
|
|
public class SummaryEventArgs : EventArgs
|
|
{
|
|
public IList<AuxBrdUpgItemMessage> SummaryMessages; /// Event description messages.
|
|
|
|
public SummaryEventArgs(IList<AuxBrdUpgItemMessage> summaryMessages)
|
|
{
|
|
this.SummaryMessages = summaryMessages;
|
|
}
|
|
}
|
|
}
|