2023-06-26 12:55:04 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2023 Sensus Slovensko a.s.
|
|
|
|
|
|
///
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Common;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.Rig.DataEntry
|
|
|
|
|
|
{
|
2023-12-12 17:43:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Action of a DataEntry field
|
|
|
|
|
|
/// </summary>
|
2023-06-26 12:55:04 +00:00
|
|
|
|
public enum Ac
|
|
|
|
|
|
{
|
|
|
|
|
|
[Description("Clear")] Clear, /// Clear when the form is open, save on OK
|
|
|
|
|
|
[Description("Last from history")] HistoryLast,
|
|
|
|
|
|
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK
|
|
|
|
|
|
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
|
2023-11-28 13:52:13 +00:00
|
|
|
|
[Description("Set")] Set, /// Set to 'yes' when the form is open
|
2023-06-26 12:55:04 +00:00
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-12 17:43:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Content of a DataEntry field
|
|
|
|
|
|
/// </summary>
|
2023-06-26 12:55:04 +00:00
|
|
|
|
public enum Ct
|
|
|
|
|
|
{
|
|
|
|
|
|
[Description("None")] None,
|
|
|
|
|
|
[Description("Serial nr.")] SerialNr,
|
|
|
|
|
|
[Description("Serial nr. aux")] SerialNrAux,
|
|
|
|
|
|
[Description("Radio address")] RadioAddress,
|
|
|
|
|
|
[Description("Year of calibration")] YearOfCalibration,
|
|
|
|
|
|
[Description("Start state")] StartState,
|
2023-11-28 13:52:13 +00:00
|
|
|
|
[Description("Start state aux")] StartStateAux,
|
2023-06-26 12:55:04 +00:00
|
|
|
|
[Description("End state")] EndState,
|
2023-11-28 13:52:13 +00:00
|
|
|
|
[Description("End state aux")] EndStateAux,
|
2023-06-26 12:55:04 +00:00
|
|
|
|
[Description("Archive path")] ArchivePath,
|
|
|
|
|
|
[Description("WM Order")] WmOrder,
|
|
|
|
|
|
[Description("Batch order")] BatchOrder,
|
|
|
|
|
|
[Description("Batch and WM order")] BatchAndWmOrder,
|
|
|
|
|
|
[Description("WM Remark")] WmRemark,
|
|
|
|
|
|
[Description("Batch remark")] BatchRemark,
|
|
|
|
|
|
[Description("Batch and WM remark")] BatchAndWmRemark,
|
2023-11-28 13:52:13 +00:00
|
|
|
|
[Description("Print label")] PrintLabel,
|
2023-06-26 12:55:04 +00:00
|
|
|
|
#if ORACLE_DB
|
|
|
|
|
|
[Description("Prefix")] Prefix,
|
|
|
|
|
|
[Description("Suffix")] Suffix,
|
|
|
|
|
|
#endif
|
|
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-12 17:43:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Function of the multi purpose button
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum MultiPurposeBtnFunction
|
|
|
|
|
|
{
|
|
|
|
|
|
None,
|
|
|
|
|
|
AutoSN,
|
|
|
|
|
|
PrintLabelsOnOff,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-28 13:52:13 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Identifies image instance
|
|
|
|
|
|
///
|
|
|
|
|
|
public enum Tst
|
|
|
|
|
|
{
|
|
|
|
|
|
Start,
|
|
|
|
|
|
End,
|
|
|
|
|
|
Both,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
/// Image rotation
|
|
|
|
|
|
///
|
|
|
|
|
|
public enum Rotation
|
|
|
|
|
|
{
|
|
|
|
|
|
R0,
|
|
|
|
|
|
R90,
|
|
|
|
|
|
R180,
|
|
|
|
|
|
R270,
|
|
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-06-26 12:55:04 +00:00
|
|
|
|
public class DEItem
|
|
|
|
|
|
{
|
|
|
|
|
|
public readonly Ct Content;
|
|
|
|
|
|
public readonly string Caption;
|
|
|
|
|
|
public readonly Ac Action;
|
|
|
|
|
|
public readonly int Width;
|
|
|
|
|
|
|
|
|
|
|
|
public DEItem(Ct content, string caption, Ac action, int width)
|
|
|
|
|
|
{
|
|
|
|
|
|
Content = content;
|
|
|
|
|
|
Caption = caption;
|
|
|
|
|
|
Action = action;
|
|
|
|
|
|
Width = width;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static IList<DEItem> items = new List<DEItem>();
|
|
|
|
|
|
///
|
|
|
|
|
|
public static void ClearItems() { items.Clear(); }
|
|
|
|
|
|
public static void AddItem(DEItem item) { items.Add(item); }
|
|
|
|
|
|
public static void AddItem(Ct content, string caption, Ac action, int width)
|
|
|
|
|
|
{
|
|
|
|
|
|
items.Add(new DEItem(content, caption, action, width));
|
|
|
|
|
|
}
|
|
|
|
|
|
public static IList<DEItem> GetItems() { return items; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static IList<DEItem> columns = new List<DEItem>();
|
|
|
|
|
|
///
|
|
|
|
|
|
public static void ClearColumns() { columns.Clear(); }
|
|
|
|
|
|
public static void AddColumn(DEItem column) { columns.Add(column); }
|
|
|
|
|
|
public static void AddColumn(Ct content, string caption, Ac action, int width)
|
|
|
|
|
|
{
|
|
|
|
|
|
columns.Add(new DEItem(content, caption, action, width));
|
|
|
|
|
|
}
|
|
|
|
|
|
public static IList<DEItem> GetColumns() { return columns; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static IList<DEItem> summaryColumns = new List<DEItem>();
|
|
|
|
|
|
///
|
|
|
|
|
|
public static void ClearSummaryColumns() { summaryColumns.Clear(); }
|
|
|
|
|
|
public static void AddSummaryColumn(DEItem column) { summaryColumns.Add(column); }
|
|
|
|
|
|
public static void AddSummaryColumn(Ct content, string caption, Ac action, int width)
|
|
|
|
|
|
{
|
|
|
|
|
|
summaryColumns.Add(new DEItem(content, caption, action, width));
|
|
|
|
|
|
}
|
|
|
|
|
|
public static IList<DEItem> GetSummaryColumns() { return summaryColumns; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|