Compare commits

..
Author SHA1 Message Date
Milan Hanajik 040f0b05bb Reconfigured for Munich 2017-01-17 16:50:02 +01:00
381 changed files with 7535 additions and 30295 deletions
-2
View File
@@ -14,8 +14,6 @@ TBFSetup/Debug/
TBFSetup/Release/
Users/bin/
Users/obj/
UserManagement/bin/
UserManagement/obj/
Doc/
*.suo
*.bak
+5 -10
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -66,6 +66,7 @@
<ItemGroup>
<Compile Include="Data.cs" />
<Compile Include="DatabaseSettings.cs" />
<Compile Include="DBSettings.cs" />
<Compile Include="Entities\BenchPath.cs" />
<Compile Include="Entities\Component.cs" />
<Compile Include="Entities\ComponentProcedure.cs" />
@@ -92,6 +93,8 @@
<Compile Include="Entities\Watermeter.cs" />
<Compile Include="Entities\WMType.cs" />
<Compile Include="FluentCommon.cs" />
<Compile Include="Grp.cs" />
<Compile Include="IUser.cs" />
<Compile Include="Mappings\BenchPathMap.cs" />
<Compile Include="Mappings\ComponentMap.cs" />
<Compile Include="Mappings\ComponentProcedureMap.cs" />
@@ -124,19 +127,11 @@
<ItemGroup>
<EmbeddedResource Include="Resources\Strings.cs.resx" />
<EmbeddedResource Include="Resources\Strings.de.resx" />
<EmbeddedResource Include="Resources\Strings.pl.resx" />
<EmbeddedResource Include="Resources\Strings.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.ru.resx" />
<EmbeddedResource Include="Resources\Strings.zh-CN.resx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Users\Users.csproj">
<Project>{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}</Project>
<Name>Users</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
+31
View File
@@ -0,0 +1,31 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
namespace Config
{
/// <summary>
/// Database settings required to make a connection
/// </summary>
public class DBSettings : ICloneable
{
public Entities.DBType DbType;
public string ConnectionString;
public DBSettings()
{
}
public DBSettings(Entities.DBType dbType, string connectionString)
{
this.DbType = dbType;
this.ConnectionString = connectionString;
}
public object Clone()
{
return new DBSettings(DbType, ConnectionString);
}
}
}
+13 -3
View File
@@ -2,8 +2,12 @@
namespace Config
{
public class Data : Users.GlobalData
public class Data
{
/// Current user
public static IUser CurrentUser;
public static DateTime LastAuthorization = DateTime.Now;
public const string AdminUsername = "admin";
public const string AdminPassword = "staratura";
public const string SQLiteDbFName = "SQLite.db";
@@ -38,13 +42,13 @@ namespace Config
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#elif TURA_IPERL
#elif IPERLST
public const int WMsCount = 40;
public const int LineSize = 20;
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#elif TURA_SPECIAL
#elif IPERLST_SPECIAL
public const int WMsCount = 6;
public const int LineSize = 6;
public const int CompoundWMsCount = 1;
@@ -68,6 +72,12 @@ namespace Config
public const int CompoundWMsCount = 0;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#elif BERLIN
public const int WMsCount = 6;
public const int LineSize = 6;
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#endif
///
+10 -10
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Text;
@@ -15,18 +15,18 @@ namespace Config
// Public fields
public string BenchName;
public bool IsRealBench;
public Users.DBSettings ProceduresDBSettings; /// Config database settings
public Users.DBSettings WaterMetersDBSettings; /// Results database settings
public Users.DBSettings UsersDBSettings; /// Users database settings
public DBSettings ProceduresDBSettings; /// Config database settings
public DBSettings WaterMetersDBSettings; /// Results database settings
public DBSettings UsersDBSettings; /// Users database settings
// Constructor
public DatabaseSettings()
{
BenchName = String.Empty; /// Empty string (avoid null)
IsRealBench = false;
ProceduresDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty);
WaterMetersDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty);
UsersDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty);
ProceduresDBSettings = new DBSettings(Entities.DBType.MySql, string.Empty);
WaterMetersDBSettings = new DBSettings(Entities.DBType.MySql, string.Empty);
UsersDBSettings = new DBSettings(Entities.DBType.MySql, string.Empty);
}
public object Clone()
@@ -35,9 +35,9 @@ namespace Config
result.BenchName = BenchName;
result.IsRealBench = IsRealBench;
result.ProceduresDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
result.WaterMetersDBSettings = (Users.DBSettings)WaterMetersDBSettings.Clone();
result.UsersDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
result.ProceduresDBSettings = (DBSettings)ProceduresDBSettings.Clone();
result.WaterMetersDBSettings = (DBSettings)WaterMetersDBSettings.Clone();
result.UsersDBSettings = (DBSettings)ProceduresDBSettings.Clone();
return result;
}
+30 -42
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -38,6 +38,22 @@ namespace Config.Entities
}
}
/// <summary> Identifies the type of a database </summary>
public enum DBType
{
MySql, /// MySQL database
SQLite, /// SQLite
DbTypesCount,
}
/// <summary> Identifies the database based on the content </summary>
public enum DBKind
{
Config,
Results,
Count,
}
public enum ProcedureState
{
Active,
@@ -62,7 +78,6 @@ namespace Config.Entities
Compound,
HeatMeterVolume,
HeatMeterEnergy,
SingleOrCompound, /// Only used when querying results
}
public enum Medium
@@ -190,26 +205,6 @@ namespace Config.Entities
Count
}
public enum MassMethod : byte
{
#if LANG_DE
/// nemecky
[Description("Waage")] Scale,
[Description("Spanne")] Spread,
[Description("Standardabw.")] StdDev,
#elif LANG_CS
/// cesky
[Description("váhou")] Scale,
[Description("max.rozdíl")] Spread,
[Description("std.dev.")] StdDev,
#else
[Description("Scale")] Scale,
[Description("Spread")] Spread,
[Description("Std.dev.")] StdDev,
#endif
Count
}
public enum TestRedType
{
Fix,
@@ -250,26 +245,10 @@ namespace Config.Entities
Count,
}
public enum ItemCategory
public enum UnitsVolume
{
#if LANG_DE
[Description("Allgemein")] Other,
[Description("Prüfstanddaten")] BenchData,
[Description("Prüfstandergebnisse")] BenchResult,
[Description("Prüfpunktdaten")] TestData,
[Description("Prüfpunktergebnisse")] TestResult,
[Description("Wasserzelledaten")] MeterData,
[Description("Wasserzelleergebnisse")] MeterResult,
#else
[Description("Other")] Other,
[Description("Bench data")] BenchData,
[Description("Bench result")] BenchResult,
[Description("Test data")] TestData,
[Description("Test result")] TestResult,
[Description("Meter data")] MeterData,
[Description("Meter result")] MeterResult,
#endif
Count,
Liter,
CubicMtr,
}
/// <summary> Possible modes of operation of components and devices. </summary>
@@ -289,7 +268,7 @@ namespace Config.Entities
#else
[Description("Detected off")] DetectedOff = -2,
[Description("Detected on")] DetectedOn = -1,
[Description("Normal")] Normal = 0, /// Normal operation
[Description("normal")] Normal = 0, /// Normal operation
[Description("Auto detect")] AutoDetect, /// The component (device) will be auto-detected
[Description("Run-time error")] FailureDuringOperation, /// Failure during operation -> disabled
[Description("Off")] Off, /// The component is off
@@ -353,5 +332,14 @@ namespace Config.Entities
#endif
Count
}
public enum LoginMethod
{
UserName, /// = alias, abbreviation
FullName, /// = description
Number,
Count
}
}
+1
View File
@@ -2,6 +2,7 @@
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
namespace Config.Entities
{
+1 -1
View File
@@ -53,7 +53,7 @@ namespace Config.Entities
///
/// Default values
///
CreationUser = (Users.GlobalData.CurrentUser != null) ? Users.GlobalData.CurrentUser.UserName : null;
CreationUser = (Config.Data.CurrentUser != null) ? Config.Data.CurrentUser.UserName : null;
CreationTime = DateTime.Now;
LastChgUser = CreationUser;
LastChgTime = CreationTime;
+24 -24
View File
@@ -30,21 +30,21 @@ namespace Config.Entities
public virtual int Repeats { get; set; }
public virtual bool Emptying { get; set; }
public virtual bool Zeroing { get; set; }
public virtual float PumpPower { get; set; } /// Power of the pump in [%] in the range 0 .. 100.0f, use values 0% and 100% for non-FM pumps
public virtual int MassRepeats { get; set; } /// Number of mass. measurements at the beginning/end of test, 0 = default (=5)
public virtual float MassSpread { get; set; } /// Max spread of mass. measurements at the beginning/end of test, 0 = default
public virtual MassMethod MassMethod { get; set; } /// method of mass. measurement at the beginning/end of test: false=slow (precise), true=using immediate mass measurement and evaluation
public virtual int TimeBeforeFlow { get; set; } /// Delay time before the start of flow control in [s]
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
public virtual int TimePump2StartV { get; set; } /// Delay time from the start of the pump to opening the start valve in [s]
public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s]
public virtual double TolerRed { get; set; } /// = Filter
public virtual float PumpPower { get; set; } /// Power of the pump in [%] in the range 0 .. 100.0f, use values 0% and 100% for non-FM pumps
public virtual int MassRepeats { get; set; } /// Number of mass. measurements at the beginning/end of test, 0 = default (=5)
public virtual float MassSpread { get; set; } /// Max spread of mass. measurements at the beginning/end of test, 0 = default
public virtual bool MassMethod { get; set; } /// method of mass. measurement at the beginning/end of test: false=slow (precise), true=fast (immediate)
public virtual int TimeBeforeFlow { get; set; } /// Delay time before the start of flow control in [s]
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
public virtual int TimePump2StartV { get; set; }/// Delay time from the start of the pump to opening the start valve in [s]
public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s]
public virtual double TolerRed { get; set; } /// = Filter
public virtual TestRedType RedType { get; set; }
public virtual string FeedingPath { get; set; }
public virtual string BenchPath { get; set; }
public virtual string OutputPath { get; set; }
public virtual string MetersPath { get; set; }
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
public virtual string HeatMetersPath { get; set; }
#endif
public virtual string RelTransBefore { get; set; }
@@ -70,21 +70,21 @@ namespace Config.Entities
Repeats = 1;
Emptying = false;
Zeroing = false;
ErrLimLo = -2.0f; /// [%] lower error limit
ErrLimHi = 2.0f; /// [%] upper error limit
ErrLimLo = -2.0f; /// [%] lower error limit
ErrLimHi = 2.0f; /// [%] upper error limit
Uncertainty = 0;
PumpPower = 60.0f; /// [%]
MassRepeats = 0; /// default
MassSpread = 0; /// default
MassMethod = MassMethod.Scale; /// default
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s]
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
TolerRed = 0; /// = Filter parameter
RelTransBefore = string.Empty;
PumpPower = 60.0f; /// [%]
MassRepeats = 0; /// default
MassSpread = 0; /// default
MassMethod = false; /// default
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s]
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
TolerRed = 0; /// = Filter parameter
RelTransBefore = string.Empty;
RelTransBetween = string.Empty;
RelTransAfter = string.Empty;
RelTransAfter = string.Empty;
TransitionAfter = string.Empty;
}
@@ -129,7 +129,7 @@ namespace Config.Entities
result.BenchPath = BenchPath;
result.OutputPath = OutputPath;
result.MetersPath = MetersPath;
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
result.HeatMetersPath = HeatMetersPath;
#endif
result.RelTransBefore = RelTransBefore;
+5 -5
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015, 2017 Sensus Metering Systems
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -12,7 +12,7 @@ namespace Config.Entities
public virtual int ItemNr { get; set; } /// Order of the preparation step
public virtual int Duration { get; set; } /// Duration in seconds
public virtual string Message { get; set; } /// Message
public virtual string EndCondition { get; set; } /// Condition when transition step is finished (next to the duration)
public virtual StepCondition EndCondition { get; set; } /// Condition when transition step is finished (next to the duration)
public virtual string ValvesOpen { get; set; } /// List of valves to be opened
public virtual string ValvesClose { get; set; } /// List of valves to be closed
public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';'
@@ -24,8 +24,8 @@ namespace Config.Entities
public TransitionStep()
{
Duration = 5; /// sec.
EndCondition = "None";
Duration = 5; /// sec.
EndCondition = (int)StepCondition.None;
}
public TransitionStep(int itemNr, TransitionSequence sequence)
@@ -54,7 +54,7 @@ namespace Config.Entities
result += indent + "ItemNr = " + ItemNr.ToString() + ", ";
result += indent + "Duration = " + Duration.ToString() + ", ";
result += indent + "Message = " + Message + ", ";
result += indent + "EndCondition = " + EndCondition + ", ";
result += indent + "EndCondition = " + EndCondition.ToString() + ", ";
result += indent + "ValvesOpen = " + ValvesOpen + ", ";
result += indent + "ValvesClose = " + ValvesClose + ", ";
result += indent + "RegulValvesPct = " + RegulValvesPct + ", ";
+379 -2
View File
@@ -1,13 +1,20 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Diagnostics;
using Config.Resources;
using log4net;
namespace Config.Entities
{
public class User //: Users.IUser
public class User : IUser
{
static readonly ILog log = LogManager.GetLogger(typeof(User));
public virtual int Id { get; protected set; }
public virtual string UserName { get; set; } /// = name, alias, abbreviation
public virtual string FullName { get; set; } /// = description
@@ -16,9 +23,379 @@ namespace Config.Entities
public virtual DateTime LastPwChange { get; set; }
public virtual IList<Group> Groups { get; set; } //User can be a member of a list of groups
private bool powerUser; /// true for built-in users, power users have full access even with empty Groups list
public User()
{
this.powerUser = false;
Groups = new List<Group>();
#if IPERLST || IPERLST_SPECIAL
Number = 6;
#else
Number = 0;
#endif
}
public User(string userName, int number, bool powerUser)
{
UserName = userName;
Number = number;
this.powerUser = powerUser;
Groups = new List<Group>();
FullName = powerUser ? "Power user" : string.Empty;
}
public virtual void AddGroup(Group group)
{
Groups.Add(group);
}
/// ------------- Additional stuff not mapped into the database -------------
/// <summary>
/// Check whether user is a member of a group.
/// </summary>
/// <param name="groupId">Group GID</param>
/// <returns>true is user is a member of the specified group</returns>
public virtual bool IsMemberOf(Grp.GID groupId)
{
if (groupId == Grp.GID.None || powerUser)
{
return true;
}
else if (groupId >= 0 && (int)groupId < Grp.Count)
{
// for all group elements in User.groups
for (int i = 0; i < Groups.Count; ++i)
{
// element GID = parameter GroupId ?
if (((Group)Groups[i]).Gid == (int)groupId)
{
return true;
}
}
return false;
}
else
{
return false;
}
}
/// <summary>
/// Sets users password. It then will be encrypted.
/// </summary>
/// <param name="password">Password</param>
public virtual void SetPassword(string password)
{
this.Password = EncryptedPassword(password);
LastPwChange = DateTime.Now;
}
public virtual string EncryptedPassword(string password)
{
return getHash(password);
}
/// <summary>
/// Verifies users password. Used by static bool Authorisation(...)
/// </summary>
/// <param name="password">Password</param>
/// <returns>true if password is correct</returns>
public virtual bool CheckPassword(string password)
{
return (Password == EncryptedPassword(password));
}
/// <summary>
/// The FIRST of TWO possible user authorization method to be used
/// when a specific group membership is required (you can use Grp.GID.None).
/// If the user is not authorized, the current user remains to be a current user
/// (i.e. the access rights were not risen to a higher level).
/// If you require different behavior, use Unauthorize() before calling Authorize().
/// </summary>
/// <param name="userName">User name</param>
/// <param name="password">Password</param>
/// <param name="requiredGrupMembership"></param>
/// <returns>true = authorized</returns>
public virtual bool Authorize(string userName, string password, Grp.GID requiredGroupMembership)
{
if (Entities.User.IsPowerUser(userName, password))
{
Data.CurrentUser = this;
Data.LastAuthorization = DateTime.Now;
log.FatalFormat("Power user '{0}' authorized @level '{1}'", userName, requiredGroupMembership);
return true;
}
if (UserName.ToLower() == userName.ToLower())
{
if (IsMemberOf(requiredGroupMembership) && CheckPassword(password))
{
Data.CurrentUser = this;
Data.LastAuthorization = DateTime.Now;
log.FatalFormat("User '{0}' authorized @level '{1}'", userName, requiredGroupMembership);
return true;
}
else
{
return false;
}
}
return false;
}
/// <summary>
/// The SECOND of TWO possible user authorization method to be used when
/// no specific group membership is required.
/// </summary>
public virtual bool Authorize(string userName, string password)
{
return Authorize(userName, password, Grp.GID.None);
}
/// <summary>
/// The FIRST of TWO possible user authorization method to be used
/// when a specific group membership is required (you can use Grp.GID.None).
/// If the user is not authorized, the current user remains to be a current user
/// (i.e. the access rights were not risen to a higher level).
/// If you require different behavior, use Unauthorize() before calling Authorize().
/// </summary>
/// <param name="number">User ID number</param>
/// <param name="password">Password</param>
/// <param name="requiredGrupMembership"></param>
/// <returns>true = authorized</returns>
public virtual bool AuthorizeNumber(int number, string password, Grp.GID requiredGroupMembership)
{
if (Number == number)
{
if (IsMemberOf(requiredGroupMembership) && CheckPassword(password))
{
Data.CurrentUser = this;
Data.LastAuthorization = DateTime.Now;
log.FatalFormat("User ID={0} authorized @level '{1}'", number, requiredGroupMembership);
return true;
}
else
{
return false;
}
}
return false;
}
/// <summary>
/// The SECOND of TWO possible user authorization method to be used when
/// no specific group membership is required.
/// </summary>
public virtual bool AuthorizeNumber(int number, string password)
{
return AuthorizeNumber(number, password, Grp.GID.None);
}
/// <summary>
/// The FIRST of TWO possible user authorization method to be used
/// when a specific group membership is required (you can use Grp.GID.None).
/// If the user is not authorized, the current user remains to be a current user
/// (i.e. the access rights were not risen to a higher level).
/// If you require different behavior, use Unauthorize() before calling Authorize().
/// </summary>
/// <param name="fullName"></param>
/// <param name="password"></param>
/// <param name="requiredGrupMembership"></param>
/// <returns>true = authorized</returns>
public virtual bool AuthorizeFullName(string fullName, string password, Grp.GID requiredGroupMembership)
{
if (FullName.ToLower() == fullName.ToLower())
{
if (IsMemberOf(requiredGroupMembership) && CheckPassword(password))
{
Data.CurrentUser = this;
Data.LastAuthorization = DateTime.Now;
log.FatalFormat("User alias={0} authorized @level '{1}'", fullName, requiredGroupMembership);
return true;
}
else
{
return false;
}
}
return false;
}
/// <summary>
/// The SECOND of TWO possible user authorization method to be used when
/// no specific group membership is required.
/// </summary>
public virtual bool AuthorizeFullName(string fullName, string password)
{
return AuthorizeFullName(fullName, password, Grp.GID.None);
}
/// <summary>
/// Returns a 'User' with a given username from a database.
/// </summary>
/// <param name="username">User name for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User AuthorizeDummyUser(string username)
{
User user = new User();
user.UserName = username;
Data.CurrentUser = user;
return user;
}
/// <summary>
/// Returns a 'User' with a given username from an ARBITRARY database.
/// </summary>
/// <param name="username">User name for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByName(string userName, DBSettings dbSettings)
{
IList<User> listOfUsers = FluentCommon.CreateSessionFactory(DBKind.Config, dbSettings, false)
.OpenSession()
.CreateQuery("FROM User WHERE LOWER(UserName) = :username") /// Note: QueryOver<User>().Where(x => x.UserName.ToLower() == ... does not work
.SetParameter("username", userName.ToLower())
.List<User>();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// Returns a 'User' with a given username from the users database.
/// </summary>
/// <param name="username">User name for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByName(string userName)
{
IList<User> listOfUsers = FluentCommon.CreateSession(DBKind.Config)
.CreateQuery("FROM User WHERE LOWER(UserName) = :username") /// Note: QueryOver<User>().Where(x => x.UserName.ToLower() == ... does not work
.SetParameter("username", userName.ToLower())
.List<User>();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// Returns a 'User' with a given full name from an ARBITRARY database.
/// </summary>
/// <param name="fullName">Full name for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByFullName(string fullName, Config.DBSettings dbSettings)
{
IList<User> listOfUsers = FluentCommon.CreateSessionFactory(DBKind.Config, dbSettings, false)
.OpenSession()
.CreateQuery("FROM User WHERE LOWER(Description) = :fullname") /// Note: QueryOver<User>().Where(x => x.FullName.ToLower() == ... does not work
.SetParameter("fullname", fullName.ToLower())
.List<User>();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// Returns a 'User' with a given full name from the users database.
/// </summary>
/// <param name="fullName">Full name for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByFullName(string fullName)
{
IList<User> listOfUsers = FluentCommon.CreateSession(DBKind.Config)
.CreateQuery("FROM User WHERE LOWER(Description) = :fullname") /// Note: QueryOver<User>().Where(x => x.FullName.ToLower() == ... does not work
.SetParameter("fullname", fullName.ToLower())
.List<User>();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// Returns a 'User' with a given username from an ARBITRARY database.
/// </summary>
/// <param name="number">User ID number for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByNumber(int number, Config.DBSettings dbSettings)
{
IList<User> listOfUsers = FluentCommon.CreateSessionFactory(DBKind.Config, dbSettings, false)
.OpenSession()
.QueryOver<User>()
.Where(x => (x.Number == number))
.List();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// Returns a 'User' with a given username from the users database.
/// </summary>
/// <param name="number">User ID number for the query</param>
/// <returns>reference to a 'User' (if it exists) or null</returns>
public static User LoadUserByNumber(int number)
{
IList<User> listOfUsers = FluentCommon.CreateSession(DBKind.Config)
.QueryOver<User>()
.Where(x => (x.Number == number))
.List();
if (listOfUsers.Count > 0) return listOfUsers[0];
return null;
}
/// <summary>
/// returns an IList of all Users
/// </summary>
public static IList<User> GetAllUsers()
{
return FluentCommon.CreateSession(DBKind.Config)
.CreateQuery("FROM User")
.List<User>();
}
/// <summary>
/// Unauthorize, abandon current users authorization.
/// </summary>
public static void Unauthorize()
{
Data.CurrentUser = null;
Data.LastAuthorization = DateTime.Now;
}
/// <summary>
/// getHash encrypts a string
/// </summary>
/// <param name="text">the string to encrypt</param>
/// <returns></returns>
public static string getHash(string text)
{
byte[] bytes = Encoding.Unicode.GetBytes(text);
SHA512Managed hashstring = new SHA512Managed();
byte[] hash = hashstring.ComputeHash(bytes);
string hashString = string.Empty;
foreach (byte x in hash)
{
hashString += String.Format("{0:x2}", x);
}
return hashString;
}
/// <summary>
/// Returns 'true' when authentication data are valid for a power user.
/// </summary>
/// <param name="userName">User name</param>
/// <param name="password">Password</param>
/// <returns>true = authenticated, false = refused</returns>
public static bool IsPowerUser(string userName, string password)
{
return (userName.Equals("milan") && password.Equals("napajedla")) ||
(userName.Equals("igor") && password.Equals("ronko4")) ||
(userName.Equals("vlado") && password.Equals("luskovica.430")) ||
(userName.Equals("pakan") && password.Equals("kuriatko")) ||
(userName.Equals("evinic") && password.Equals("stivik55")) ||
(userName.Equals("gilles") && password.Equals("alibaba"));
}
}
}
+1 -1
View File
@@ -41,7 +41,7 @@ namespace Config.Entities
WMType procedure = new WMType()
{
CreateTime = DateTime.Now,
CreateUserName = Users.GlobalData.CurrentUser.UserName,
CreateUserName = Config.Data.CurrentUser.UserName,
CreateDescription = "A default water meter created.",
Name = "Watermeter",
PulseRate = 1000,
+1 -1
View File
@@ -29,7 +29,7 @@ namespace Config.Entities
/// </summary>
public static Watermeter LoadBySerialnr(string SerialNr)
{
IList<Watermeter> ListOfWatermeters = FluentCommon.CreateSession(Users.Entities.DBKind.Results)
IList<Watermeter> ListOfWatermeters = FluentCommon.CreateSession(DBKind.Results)
.CreateQuery("FROM Watermeter WHERE Serial = :SerialNrParameter")
.SetParameter("SerialNrParameter", SerialNr)
.List<Watermeter>();
+30 -30
View File
@@ -17,61 +17,61 @@ namespace Config
/// <summary>
/// Session factories for regular sessions.
/// </summary>
public static ISessionFactory[] SessionFactories = new ISessionFactory[(int)Users.Entities.DBKind.Count];
public static ISessionFactory[] SessionFactories = new ISessionFactory[(int)Entities.DBKind.Count];
/// <summary>
/// NHibernate session factory (to create the database session 'SessionFactory')
/// </summary>
/// <returns>A database session</returns>
static ISessionFactory CreateSessionFactory(Users.Entities.DBKind database)
static ISessionFactory CreateSessionFactory(Entities.DBKind database)
{
Users.Entities.DBType dbType;
Entities.DBType dbType;
string connectionString;
switch (database)
{
default:
case Users.Entities.DBKind.Config:
case Entities.DBKind.Config:
dbType = Data.CurrentBench.ProceduresDBSettings.DbType;
connectionString = Data.CurrentBench.ProceduresDBSettings.ConnectionString;
break;
case Users.Entities.DBKind.Results:
case Entities.DBKind.Results:
dbType = Data.CurrentBench.WaterMetersDBSettings.DbType;
connectionString = Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
break;
}
return CreateSessionFactory(database, dbType, connectionString, false);
return CreateSessionFactory(database, new DBSettings(dbType, connectionString), false);
}
/// <summary>
/// NHibernate session factory (to create the database session 'SessionFactory')
/// </summary>
/// <returns>A database session</returns>
public static ISessionFactory CreateSessionFactory(Users.Entities.DBKind database, Users.Entities.DBType dbType, string connectionString, bool createDB)
public static ISessionFactory CreateSessionFactory(Entities.DBKind database, DBSettings dbSettings, bool createDB)
{
try
{
FluentConfiguration cfg = Fluently.Configure();
switch (dbType)
switch (dbSettings.DbType)
{
default:
case Users.Entities.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
case Entities.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(dbSettings.ConnectionString));
break;
case Users.Entities.DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
case Entities.DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(dbSettings.ConnectionString));
break;
}
switch (database)
{
default:
case Users.Entities.DBKind.Config:
case Entities.DBKind.Config:
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
break;
case Users.Entities.DBKind.Results:
case Entities.DBKind.Results:
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
break;
}
@@ -112,17 +112,17 @@ namespace Config
}
/// Create a NHibernate session for the given database
public static ISession CreateSession(Users.Entities.DBKind database)
public static ISession CreateSession(Entities.DBKind database)
{
int ix = (int)database;
if (ix < 0 || ix >= (int)Users.Entities.DBKind.Count) return null;
if (ix < 0 || ix >= (int)Entities.DBKind.Count) return null;
if (SessionFactories[ix] == null) SessionFactories[ix] = CreateSessionFactory(database);
return SessionFactories[ix].OpenSession();
}
public static void SaveToDb(Users.Entities.DBKind database, object obj)
public static void SaveToDb(Entities.DBKind database, object obj)
{
SaveToDb(CreateSession(database), obj);
}
@@ -137,7 +137,7 @@ namespace Config
}
}
public static void DeleteFromDb(Users.Entities.DBKind database, object obj)
public static void DeleteFromDb(Entities.DBKind database, object obj)
{
DeleteFromDb(CreateSession(database), obj);
}
@@ -158,9 +158,9 @@ namespace Config
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
/// <param name="connectionString">Connection string</param>
/// <returns>true=success, false=error</returns>
public static bool CreateEmptyConfigDB(Users.Entities.DBType dbType, string connectionString)
public static bool CreateEmptyConfigDB(DBSettings dbSettings)
{
ISessionFactory sessionFactory = CreateSessionFactory(Users.Entities.DBKind.Config, dbType, connectionString, true);
ISessionFactory sessionFactory = CreateSessionFactory(Entities.DBKind.Config, dbSettings, true);
if (sessionFactory == null) return false;
/// Populate the database
@@ -171,16 +171,16 @@ namespace Config
///
/// Prepare all groups
///
var testers = new Users.Entities.Group((int)Users.Grp.GID.Testers, Strings.Tester);
var testingSpecialists = new Users.Entities.Group((int)Users.Grp.GID.TestingSpecialists, Strings.Testing_Specialist);
var headOfLab = new Users.Entities.Group((int)Users.Grp.GID.HeadOfLab, Strings.Head_of_Lab);
var maintenanceSpecialists = new Users.Entities.Group((int)Users.Grp.GID.MaintenanceSpecialists, Strings.Maintenance_Specialist);
var metrologists = new Users.Entities.Group((int)Users.Grp.GID.Metrologists, Strings.Metrologist);
var calibrationSpecialists = new Users.Entities.Group((int)Users.Grp.GID.CalibrationSpecialists, Strings.Calibration_Specialist);
var administrators = new Users.Entities.Group((int)Users.Grp.GID.Administrators, Strings.Administrator);
var testers = new Entities.Group { Gid = (int)Grp.GID.Testers, Name = Strings.Tester };
var testingSpecialists = new Entities.Group { Gid = (int)Grp.GID.TestingSpecialists, Name = Strings.Testing_Specialist };
var headOfLab = new Entities.Group { Gid = (int)Grp.GID.HeadOfLab, Name = Strings.Head_of_Lab };
var maintenanceSpecialists = new Entities.Group { Gid = (int)Grp.GID.MaintenanceSpecialists, Name = Strings.Maintenance_Specialist };
var metrologists = new Entities.Group { Gid = (int)Grp.GID.Metrologists, Name = Strings.Metrologist };
var calibrationSpecialists = new Entities.Group { Gid = (int)Grp.GID.CalibrationSpecialists, Name = Strings.Calibration_Specialist };
var administrators = new Entities.Group { Gid = (int)Grp.GID.Administrators, Name = Strings.Administrator };
/// Create the user 'admin' add his groups
var admin = new Users.Entities.User
var admin = new Entities.User
{
UserName = Data.AdminUsername,
FullName = Strings.Administrator,
@@ -214,9 +214,9 @@ namespace Config
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
/// <param name="connectionString">Connection string</param>
/// <returns>true=success, false=error</returns>
public static bool CreateEmptyResultsDB(Users.Entities.DBType dbType, string connectionString)
public static bool CreateEmptyResultsDB(DBSettings dbSettings)
{
ISessionFactory sessionFactory = CreateSessionFactory(Users.Entities.DBKind.Results, dbType, connectionString, true);
ISessionFactory sessionFactory = CreateSessionFactory(Entities.DBKind.Results, dbSettings, true);
if (sessionFactory == null) return false;
/// Populate the database
+6 -4
View File
@@ -1,15 +1,15 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Text;
using Users.Entities;
using Config.Entities;
using NHibernate;
using FluentNHibernate;
namespace Users
namespace Config
{
/// <summary>
/// Enum Grp.GID specifies GID-s of user groups.
@@ -31,7 +31,9 @@ namespace Users
Metrologists,
CalibrationSpecialists,
Administrators, // application / network / database administrator
Custom1,
Custom2,
Custom3,
NrOfGroups, // Number of groups (this is not a GroupID)
None, // Not a GroupID, can be used to indicate no group membership is required
Invalid = -1, // Not a GroupID, indicates a variable has not been properly set so far
+2 -5
View File
@@ -1,9 +1,6 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
///
using System;
using System;
namespace Users
namespace Config
{
public interface IUser
{
+1 -1
View File
@@ -6,7 +6,7 @@ using Config.Entities;
namespace Config.Mappings
{
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
class HeatMetersPathMap : ClassMap<HeatMetersPath>
{
public HeatMetersPathMap()
+2 -3
View File
@@ -27,8 +27,7 @@ namespace Config.Mappings
Map(x => x.PumpPower);
Map(x => x.MassRepeats);
Map(x => x.MassSpread);
Map(x => x.MassMethod)
.CustomType<byte>();
Map(x => x.MassMethod);
Map(x => x.TimeBeforeFlow);
Map(x => x.TimeFlow2Mass);
Map(x => x.TimePump2StartV)
@@ -45,7 +44,7 @@ namespace Config.Mappings
Map(x => x.BenchPath);
Map(x => x.OutputPath);
Map(x => x.MetersPath);
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
Map(x => x.HeatMetersPath);
#endif
Map(x => x.RelTransBefore);
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.12.499.0")]
[assembly: AssemblyFileVersion("2.12.499.0")]
[assembly: AssemblyVersion("2.12.424.0")]
[assembly: AssemblyFileVersion("2.12.424.0")]
-153
View File
@@ -1,153 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Administrator" xml:space="preserve">
<value>Administrator</value>
</data>
<data name="Calibration_Specialist" xml:space="preserve">
<value>Specjalista ds. kalibracji</value>
</data>
<data name="Head_of_Lab" xml:space="preserve">
<value>Kierownik Laboratorium</value>
</data>
<data name="Maintenance_Specialist" xml:space="preserve">
<value>Konserwator</value>
</data>
<data name="Metrologist" xml:space="preserve">
<value>Metrolog</value>
</data>
<data name="Tester" xml:space="preserve">
<value>Pracownik przeprowadzający testy</value>
</data>
<data name="Testing_Specialist" xml:space="preserve">
<value>Specjalista ds. testów</value>
</data>
<data name="Failed" xml:space="preserve">
<value>Niepowodzenie</value>
</data>
<data name="Passed" xml:space="preserve">
<value>OK</value>
</data>
<data name="Cannot_open_DB_Cause_0" xml:space="preserve">
<value>Nie można otworzyć \\r\\nCause:\\r\\n{0}</value>
</data>
<data name="Error" xml:space="preserve">
<value>Błąd</value>
</data>
</root>
-153
View File
@@ -1,153 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Administrator" xml:space="preserve">
<value>Администратор</value>
</data>
<data name="Calibration_Specialist" xml:space="preserve">
<value>Специалист по калибровке</value>
</data>
<data name="Head_of_Lab" xml:space="preserve">
<value>Руководитель лаборатории</value>
</data>
<data name="Maintenance_Specialist" xml:space="preserve">
<value>Специалист по техобслуживанию</value>
</data>
<data name="Metrologist" xml:space="preserve">
<value>Метролог</value>
</data>
<data name="Tester" xml:space="preserve">
<value>Контролер</value>
</data>
<data name="Testing_Specialist" xml:space="preserve">
<value>Специалист по тестированию</value>
</data>
<data name="Failed" xml:space="preserve">
<value>NOK</value>
</data>
<data name="Passed" xml:space="preserve">
<value>OK</value>
</data>
<data name="Cannot_open_DB_Cause_0" xml:space="preserve">
<value>Не удается открыть БД.\\r\\nCause:\\r\\n{0}</value>
</data>
<data name="Error" xml:space="preserve">
<value>Ошибка</value>
</data>
</root>
+19 -81
View File
@@ -9,7 +9,7 @@ namespace Config
{
public enum Unit
{
[Description("---")] None,
None,
[Description("l")] l, /// * 1 liter
[Description("m3")] m3, /// 1000 l
@@ -71,88 +71,26 @@ namespace Config
public enum Quantity
{
/// Quantities with units and conversions (double -> double)
#if LANG_DE
[Description("Volumen")] Volume,
[Description("Durchfluss")] Flow,
[Description("Masse")] Mass,
[Description("Zeit")] Time,
[Description("Temperatur")] Temperature,
[Description("Druck")] Pressure,
[Description("Feuchtigkeit")] Humidity,
[Description("Fehler")] Error,
[Description("Länge")] Length,
[Description("Dichte")] Density,
[Description("Energie")] Energy,
[Description("Impulse/l")] PulsePerLtr,
[Description("Impulse/kWh")] PulsePerKWh,
[Description("Volume")] Volume,
[Description("Flow")] Flow,
[Description("Mass")] Mass,
[Description("Time")] Time,
[Description("Temperature")] Temperature,
[Description("Pressure")] Pressure,
[Description("Humidity")] Humidity,
[Description("Error")] Error,
[Description("Length")] Length,
[Description("Density")] Density,
[Description("Energy")] Energy,
[Description("Pulse/l")] PulsePerLtr,
[Description("Pulse/kWh")] PulsePerKWh,
/// Quantities without units and conversions
[Description("Nummer")] Number,
[Description("Text")] String,
[Description("Boolean")] Boolean,
[Description("Datum und Uhrzeit")] DateTime,
#elif LANG_PL
[Description("Objętość")] Volume,
[Description("Przepływ")] Flow,
[Description("Masa")] Mass,
[Description("Czas")] Time,
[Description("Temperatura")] Temperature,
[Description("Ciśnienie")] Pressure,
[Description("Wilgotność")] Humidity,
[Description("Błąd")] Error,
[Description("Długość")] Length,
[Description("Gęstość")] Density,
[Description("Energia")] Energy,
[Description("Impulsy/litr")] PulsePerLtr,
[Description("Impulsy/kWh")] PulsePerKWh,
/// Quantities without units and conversions
[Description("Numer")] Number,
[Description("Tekst")] String,
[Description("Boolean")] Boolean,
[Description("Data i czas")] DateTime,
#elif LANG_CS
[Description("Objem")] Volume,
[Description("Průtok")] Flow,
[Description("Hmotnost")] Mass,
[Description("Čas")] Time,
[Description("Teplota")] Temperature,
[Description("Tlak")] Pressure,
[Description("Vlhkost")] Humidity,
[Description("Chyba")] Error,
[Description("Délka")] Length,
[Description("Hustota")] Density,
[Description("Energie")] Energy,
[Description("Pulzy/litr")] PulsePerLtr,
[Description("Pulzy/kWh")] PulsePerKWh,
/// Quantities without units and conversions
[Description("Počet")] Number,
[Description("Text")] String,
[Description("Boolean")] Boolean,
[Description("Datum a čas")] DateTime,
#else
[Description("Volume")] Volume,
[Description("Flow")] Flow,
[Description("Mass")] Mass,
[Description("Time")] Time,
[Description("Temperature")] Temperature,
[Description("Pressure")] Pressure,
[Description("Humidity")] Humidity,
[Description("Error")] Error,
[Description("Length")] Length,
[Description("Density")] Density,
[Description("Energy")] Energy,
[Description("Pulses/liter")] PulsePerLtr,
[Description("Pulses/kWh")] PulsePerKWh,
/// Quantities without units and conversions
[Description("Number")] Number,
[Description("String")] String,
[Description("Boolean")] Boolean,
[Description("Date and time")] DateTime,
#endif
Count,
[Description("Number")] Number,
[Description("String")] String,
[Description("Boolean")] Boolean,
[Description("Date and time")] DateTime,
Count,
}
public static class Units
+6 -78
View File
@@ -239,17 +239,17 @@ namespace DeviceTest
Program.LocalSettings.ComponentClassName = component1ClassNameComboBox.Text;
Program.LocalSettings.ComponentName = componentNameTextBox.Text;
Program.LocalSettings.ComponentParentName = (component1Cfg != null) ? component1Cfg.ParentName : string.Empty;
Program.LocalSettings.ComponentParentName = component1Cfg.ParentName;
Program.LocalSettings.ComponentSettings = (component1Cfg != null) ? component1Cfg.CreateDbEntity().Parameters : string.Empty;
Program.LocalSettings.Component2ClassName = component2ClassNameComboBox.Text;
Program.LocalSettings.Component2Name = component2NameTextBox.Text;
Program.LocalSettings.Component2ParentName = (component2Cfg != null) ? component2Cfg.ParentName : string.Empty;
Program.LocalSettings.Component2ParentName = component2Cfg.ParentName;
Program.LocalSettings.Component2Settings = (component2Cfg != null) ? component2Cfg.CreateDbEntity().Parameters : string.Empty;
Program.LocalSettings.Component3ClassName = component3ClassNameComboBox.Text;
Program.LocalSettings.Component3Name = component3NameTextBox.Text;
Program.LocalSettings.Component3ParentName = (component3Cfg != null) ? component3Cfg.ParentName : string.Empty;
Program.LocalSettings.Component3ParentName = component3Cfg.ParentName;
Program.LocalSettings.Component3Settings = (component3Cfg != null) ? component3Cfg.CreateDbEntity().Parameters : string.Empty;
Program.LocalSettings.Save();
@@ -261,19 +261,7 @@ namespace DeviceTest
if (className == "Keithley.TempMeter") radioButton1.Text = "ReadPressureOp";
else if (className == "Network.Camera.CLP1611") radioButton1.Text = "Livestream";
else if (className == "Network.Camera.Roi") radioButton1.Text = "RoiDetection";
else if (className == "Modbus.Easytherm")
{
radioButton1.Text = "SetTemperature(10)";
radioButton2.Text = "SetTemperature(20)";
}
else if (className == "Modbus.TankSelector")
{
radioButton1.Text = "SelectTank 1";
radioButton2.Text = "SelectTank 2";
radioButton3.Text = "SelectTank 3";
radioButton4.Text = "SelectTank -";
}
else radioButton1.Text = "spare";
else radioButton1.Text = "spare";
}
///
void UpdateOperations2(string className)
@@ -281,19 +269,7 @@ namespace DeviceTest
if (className == "Keithley.TempMeter") radioButton21.Text = "ReadPressureOp";
else if (className == "Network.Camera.CLP1611") radioButton21.Text = "Livestream";
else if (className == "Network.Camera.Roi") radioButton21.Text = "RoiDetection";
else if (className == "Modbus.Easytherm")
{
radioButton21.Text = "SetTemperature(10)";
radioButton22.Text = "SetTemperature(20)";
}
else if (className == "Modbus.TankSelector")
{
radioButton21.Text = "SelectTank 1";
radioButton22.Text = "SelectTank 2";
radioButton23.Text = "SelectTank 3";
radioButton24.Text = "SelectTank -";
}
else radioButton21.Text = "spare";
else radioButton21.Text = "spare";
}
///
void UpdateOperations3(string className)
@@ -301,19 +277,7 @@ namespace DeviceTest
if (className == "Keithley.TempMeter") radioButton31.Text = "ReadPressureOp";
else if (className == "Network.Camera.CLP1611") radioButton31.Text = "Livestream";
else if (className == "Network.Camera.Roi") radioButton31.Text = "RoiDetection";
else if (className == "Modbus.Easytherm")
{
radioButton31.Text = "SetTemperature(10)";
radioButton32.Text = "SetTemperature(20)";
}
else if (className == "Modbus.TankSelector")
{
radioButton31.Text = "SelectTank 1";
radioButton32.Text = "SelectTank 2";
radioButton33.Text = "SelectTank 3";
radioButton34.Text = "SelectTank -";
}
else radioButton31.Text = "spare";
else radioButton31.Text = "spare";
}
@@ -652,18 +616,6 @@ namespace DeviceTest
{
operation1 = (tbfComponent1forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
}
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
{
operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
}
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
//operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
//operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
//operation3 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation4 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
if (tbfComponent2forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
@@ -679,18 +631,6 @@ namespace DeviceTest
{
operation21 = (tbfComponent2forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
}
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
{
operation21 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
operation22 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
}
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
//operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
//operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
//operation23 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation24 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
if (tbfComponent3forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
@@ -706,18 +646,6 @@ namespace DeviceTest
{
operation31 = (tbfComponent3forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
}
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
{
operation31 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
operation32 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
}
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
//operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
//operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
//operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
while (workerThreadRunning)
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Results
ProtocolTitle = procedure.ProtocolTitle,
StartTime = DateTime.Now,
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
HeatMeter = (procedure.MetersKind == Config.Entities.MetersKind.HeatMeter),
#endif
};
+4 -4
View File
@@ -30,9 +30,9 @@ namespace Results
}
/// <summary> Database type (MySQL or SQLite) for all sessions </summary>
private static Users.Entities.DBType dbType;
private static Config.Entities.DBType dbType;
///
public static Users.Entities.DBType DbType
public static Config.Entities.DBType DbType
{
get { return dbType; }
set { dbType = value; SessionFactory = null; }
@@ -59,10 +59,10 @@ namespace Results
switch (dbType)
{
default:
case Users.Entities.DBType.SQLite:
case Config.Entities.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
case Users.Entities.DBType.MySql:
case Config.Entities.DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
break;
}
+7 -22
View File
@@ -21,7 +21,7 @@ namespace Results.Entities
public virtual bool Passed { get; set; }
public virtual int ResultCode { get; set; }
#if IPERL
#if IPERLST || IPERLST_SPECIAL
public virtual int SerialNrEx { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
public virtual double OrigCalibFactor { get; set; } /// iPerl calibration factor used during the test
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
@@ -32,12 +32,10 @@ namespace Results.Entities
public virtual double Diff2Hz8Hz { get; set; }
public virtual bool Hz2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
public virtual int Hz2Correction { get; set; } /// iPerl Q2 correction used during the test
#endif
#if ORACLE_DB
public virtual int Pruefindex { get; set; } /// Not mapped to DB !!! 0=unknown (saving to Oracle failed), >=1 ... pruefindex
public virtual int HydrPruefung { get; set; } /// Not mapped to DB !!!
#endif
public virtual WaterMeterData WaterMeterData { get; set; }
public virtual WaterMeterData WaterMeterData { get; set; }
public virtual Batch Batch { get; set; }
public virtual IList<MeterTestRslt> MeterTestRslts { get; set; }
@@ -94,7 +92,7 @@ namespace Results.Entities
public virtual MeterTestRslt GetMeterTestRslt(string testName)
{
return GetMeterTestRslt(testName, CompoundMeterId.SingleOrCompound);
return GetMeterTestRslt(testName, CompoundMeterId.Single);
}
public virtual MeterTestRslt GetMeterTestRslt(string testName, Config.Entities.CompoundMeterId meterId)
@@ -103,22 +101,9 @@ namespace Results.Entities
string testNameL = testName.ToLower();
foreach (var mtr in MeterTestRslts)
{
if (mtr.Name().ToLower().Equals(testNameL))
if ((mtr.CompoundMeterId == (byte)meterId) && mtr.Name().ToLower().Equals(testNameL))
{
if (mtr.CompoundMeterId == (byte)meterId)
{
return mtr;
}
else if (meterId == Config.Entities.CompoundMeterId.SingleOrCompound &&
mtr.CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Single)
{
return mtr;
}
else if (meterId == Config.Entities.CompoundMeterId.SingleOrCompound &&
mtr.CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Compound)
{
return mtr;
}
return mtr;
}
}
return null;
@@ -145,10 +130,10 @@ namespace Results.Entities
public override string ToString()
{
StringBuilder sb = new StringBuilder(80);
#if IPERL
#if IPERLST || IPERLST_SPECIAL
sb.AppendFormat("PCB:{0} S/N:{1} ", SerialNr, SerialNrEx);
#else
sb.AppendFormat("S/N:{0} ", SerialNr);
sb.AppendFormat("S/N:{0} ", SerialNr);
#endif
foreach (var tr in MeterTestRslts) sb.AppendFormat(" {0}:{1}%", tr.Name(), tr.Error.ToString("F2"));
+3 -3
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2016-2017 Sensus Metering Systems
/// Copyright (c) 2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -49,7 +49,7 @@ namespace Results.Entities
public virtual bool Compound { get; set; }
public virtual bool HeatMeter { get; set; }
#if ORACLE_DB
#if IPERLST || IPERLST_SPECIAL
public virtual int WMTypeId { get; set; }
public virtual int WMTypeRev { get; set; }
#endif
@@ -103,7 +103,7 @@ namespace Results.Entities
if (Compound != wmd.Compound) return false;
if (HeatMeter != wmd.HeatMeter) return false;
#if ORACLE_DB
#if IPERLST || IPERLST_SPECIAL
if (WMTypeId != wmd.WMTypeId) return false;
if (WMTypeRev != wmd.WMTypeRev) return false;
#endif
+81 -237
View File
@@ -3,7 +3,6 @@
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using log4net;
using Config.Entities;
@@ -21,50 +20,33 @@ namespace Results.Forms
{
Item,
Caption,
TestID,
Units,
Format,
Precision,
Width,
Alignment,
TestID,
Count,
Count,
}
Control[] editors; /// all editors except of units
ComboBox unitsCB; /// units combo box
Control[] editors;
public IList<WMeterRsltItemSpec> AvailableItems;
public IList<WMeterRsltItemSpec> SelectedItems;
public MetersKind MetersKind;
bool supressTestIDColumn;
public ResultsConfigDlg(bool supressTestIDColumn)
: this()
{
this.supressTestIDColumn = supressTestIDColumn;
}
public ResultsConfigDlg()
{
InitializeComponent();
}
void Localize()
{
Text = Strings.Configuration;
availableResultsLabel.Text = Strings.Available_results;
availableTabControl.TabPages[0].Text = "A...Z";
availableTabControl.TabPages[1].Text = Strings.Quantity;
availableTabControl.TabPages[2].Text = Strings.Category;
selectedResultsLabel.Text = Strings.Selected_results;
addButton.Text = Strings.Add;
removeButton.Text = Strings.Remove;
removeAllButton.Text = Strings.Remove_all;
@@ -81,18 +63,20 @@ namespace Results.Forms
/// Add columns to ListViewEx
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Item, Width = 120 });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Caption });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Test_ID });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Units });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Format });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Precision });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Width });
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Alignment });
if (!supressTestIDColumn)
{
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Test_ID });
}
/// Create controls used by ListViewEx to edit items
unitsCB = new ComboBox();
ComboBox unitsCB = new ComboBox();
unitsCB.Items.Add("---"); /// Use "---" instead of "None"
for (Config.Unit u = (Config.Unit)1; u < Config.Unit.Count; u++)
{
unitsCB.Items.Add(u.ToString().Replace("Pct", "%").Replace('p', '/'));
}
ComboBox alignmentCB = new ComboBox();
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++)
@@ -103,13 +87,13 @@ namespace Results.Forms
editors = new Control[]
{
null,
new TextBox(), /// caption
new TextBox(),
new TextBox(),
unitsCB,
new TextBox(), /// format
new TextBox(), /// precision
new TextBox(), /// width
new TextBox(),
new TextBox(),
new TextBox(),
alignmentCB,
new TextBox(), /// testID
};
foreach (var edi in editors)
{
@@ -123,28 +107,13 @@ namespace Results.Forms
selectedResultsListViewEx.SubItemClicked += new SubItemEventHandler(selectedResultsListViewEx_SubItemClicked);
selectedResultsListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(selectedResultsListViewEx_SubItemEndEditing);
//availableAlphabeticTreeView.ShowNodeToolTips = true;
//availableByQuantityTreeView.ShowNodeToolTips = true;
//availableByCategoryTreeView.ShowNodeToolTips = true;
RedrawAvailable();
RedrawSelected();
}
void selectedResultsListViewEx_SubItemClicked(object sender, SubItemEventArgs e)
{
if (e.SubItem == (int)Column.Units)
{
Config.Quantity quantity = (e.Item.Tag as WMeterRsltItemSpec).Quantity;
unitsCB.Items.Clear();
unitsCB.Items.Add(Config.Unit.None.ToDescription()); /// "---"
for (Config.Unit u = (Config.Unit)1; u < Config.Unit.Count; u++)
{
if (Config.Units.IsQuantity(u, quantity)) unitsCB.Items.Add(u.ToDescription());
}
selectedResultsListViewEx.StartEditing(unitsCB, e.Item, e.SubItem);
}
else if ((e.SubItem > 0) && (e.SubItem < (int)(supressTestIDColumn ? Column.TestID : Column.Count)))
if ((e.SubItem > 0) && (e.SubItem < (int)Column.Count))
{
selectedResultsListViewEx.StartEditing(editors[e.SubItem], e.Item, e.SubItem);
}
@@ -158,10 +127,15 @@ namespace Results.Forms
switch ((Column)e.SubItem)
{
case Column.Caption: item.Caption = e.DisplayText; return;
case Column.TestID: item.TestID = e.DisplayText; return;
case Column.Format: item.Format = e.DisplayText; return;
case Column.Precision: item.Precision = e.DisplayText; return;
case Column.Units:
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
if (editors[e.SubItem].Text == "---") { item.Units = 0; return; };
for (Config.Unit u = (Config.Unit)1; u < Config.Unit.Count; u++)
{
if (u.ToDescription().Equals(unitsCB.Text))
if (u.ToString().Replace("Pct", "%").Replace('p', '/').Equals(editors[e.SubItem].Text))
{
item.Units = u;
return; /// OK
@@ -169,19 +143,6 @@ namespace Results.Forms
}
break; /// Error
case Column.Format: item.Format = e.DisplayText; return;
case Column.Precision: item.Precision = e.DisplayText; return;
case Column.Width:
{
int width;
if (Int32.TryParse(editors[e.SubItem].Text, out width) && width >= 0)
{
item.Width = width;
return; /// OK
}
break; /// Error
}
case Column.Alignment:
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++)
{
@@ -192,10 +153,18 @@ namespace Results.Forms
}
}
break; /// Error
case Column.TestID: item.TestID = e.DisplayText; return;
default:
case Column.Width:
{
int width;
if (Int32.TryParse(editors[e.SubItem].Text, out width) && width >= 0)
{
item.Width = width;
return; /// OK
}
break; /// Error
}
default:
return; /// OK
}
@@ -204,110 +173,20 @@ namespace Results.Forms
return;
}
/// <summary>
/// Redraw available items (right hand side)
/// Redraw selected items (right hand side)
/// </summary>
void RedrawAvailable()
{
RedrawInAlphabeticOrder(availableAlphabeticTreeView);
RedrawByQuantity(availableByQuantityTreeView);
RedrawByCategory(availableByCategoryTreeView);
}
void RedrawInAlphabeticOrder(TreeView treeView)
{
treeView.Nodes.Clear();
IList<WMeterRsltItemSpec> alphabeticlList = WMeterRsltItemSpec.AllItems.OrderBy(x => x.Name).ToList();
///
foreach (var item in alphabeticlList)
availableResultsListBox.Items.Clear();
AvailableItems = new List<WMeterRsltItemSpec>();
foreach (var item in WMeterRsltItemSpec.AllItems)
{
TreeNode node = new TreeNode(item.Name);
node.Tag = item;
node.ToolTipText = item.ToolTipText;
availableAlphabeticTreeView.Nodes.Add(node);
AvailableItems.Add(item);
availableResultsListBox.Items.Add(item.Name);
}
}
void RedrawByQuantity(TreeView treeView)
{
treeView.Nodes.Clear();
IList<Config.Quantity> quantities = new List<Config.Quantity>();
for (Config.Quantity q = 0; q < Config.Quantity.Count; q++) quantities.Add(q);
IList<Config.Quantity> sortedQuantities = quantities.OrderBy(x => x.ToDescription()).ToList();
foreach (var q in sortedQuantities)
{
int n = 0;
foreach (var ri in WMeterRsltItemSpec.AllItems)
{
if (ri.Quantity == q) n++;
}
if (n > 0)
{
TreeNode[] array = new TreeNode[n];
int i = 0;
foreach (var ri in WMeterRsltItemSpec.AllItems)
{
if (ri.Quantity == q)
{
TreeNode node = new TreeNode(ri.Name);
node.Tag = ri;
node.ToolTipText = ri.ToolTipText;
array[i++] = node;
}
}
treeView.Nodes.Add(new TreeNode(q.ToDescription(), array));
}
}
}
void RedrawByCategory(TreeView treeView)
{
treeView.Nodes.Clear();
IList<ItemCategory> categories = new List<ItemCategory>();
for (ItemCategory c = 0; c < ItemCategory.Count; c++) categories.Add(c);
IList<ItemCategory> sortedCategories = categories.OrderBy(x => x.ToDescription()).ToList();
foreach (var c in sortedCategories)
{
int n = 0;
foreach (var ri in WMeterRsltItemSpec.AllItems)
{
if (ri.Category == c) n++;
}
if (n > 0)
{
TreeNode[] array = new TreeNode[n];
int i = 0;
foreach (var ri in WMeterRsltItemSpec.AllItems)
{
if (ri.Category == c)
{
TreeNode node = new TreeNode(ri.Name);
node.Tag = ri;
node.ToolTipText = ri.ToolTipText;
array[i++] = node;
}
}
treeView.Nodes.Add(new TreeNode(c.ToDescription(), array));
}
}
}
/// <summary>
/// Redraw selected items (right hand side)
/// </summary>
@@ -316,18 +195,15 @@ namespace Results.Forms
selectedResultsListViewEx.Items.Clear();
foreach (var item in SelectedItems)
{
ListViewItem lvi = new ListViewItem(item.Name); /// Item
ListViewItem lvi = new ListViewItem(item.Name); /// Item
lvi.Tag = item;
lvi.SubItems.Add(item.Caption); /// Header
lvi.SubItems.Add(item.Units.ToDescription()); /// Units
lvi.SubItems.Add(item.Format); /// Format
lvi.SubItems.Add(item.Precision); /// Precision
lvi.SubItems.Add(item.Width.ToString()); /// Width
lvi.SubItems.Add(item.Alignment.ToDescription()); /// Alignment
if (!supressTestIDColumn)
{
lvi.SubItems.Add(item.TestID); /// TestID
}
lvi.SubItems.Add(item.Caption); /// Header
lvi.SubItems.Add(item.TestID); /// TestID
lvi.SubItems.Add((item.Units == Config.Unit.None) ? "---" : item.Units.ToString().Replace("Pct", "%").Replace('p', '/')); /// Units
lvi.SubItems.Add(item.Format); /// Format
lvi.SubItems.Add(item.Precision); /// Precision
lvi.SubItems.Add(item.Width.ToString()); /// Width
lvi.SubItems.Add(item.Alignment.ToDescription()); /// Alignment
selectedResultsListViewEx.Items.Add(lvi);
}
@@ -337,65 +213,45 @@ namespace Results.Forms
{
}
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
{
/// Double click works when just one item is selected
if (availableResultsListBox.SelectedIndices.Count == 1)
{
var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[0]];
WMeterRsltItemSpec newItem = oriItem.Clone();
newItem.Caption = newItem.Name;
SelectedItems.Add(newItem);
RedrawAvailable();
RedrawSelected();
/// Select the last item
selectedResultsListViewEx.Focus();
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible();
}
}
void addButton_Click(object sender, EventArgs e)
{
switch (availableTabControl.SelectedIndex)
{
case 0:
availableAlphabeticTreeView_DoubleClick(this, null);
break;
case 1:
availableByQuantityTreeView_DoubleClick(this, null);
break;
case 2:
availableByCategoryTreeView_DoubleClick(this, null);
break;
default:
break;
}
}
/// Append at the end, this code supports multiple selected items,
/// although ListBox control settings may limit the max.number of selected items to one.
private void availableAlphabeticTreeView_DoubleClick(object sender, EventArgs e)
{
if (availableAlphabeticTreeView.SelectedNode != null &&
availableAlphabeticTreeView.SelectedNode.Tag is WMeterRsltItemSpec)
for (int i = availableResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
{
AddItem(availableAlphabeticTreeView.SelectedNode.Tag as WMeterRsltItemSpec);
var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[i]];
WMeterRsltItemSpec newItem = oriItem.Clone();
newItem.Caption = newItem.Name;
SelectedItems.Add(newItem);
}
}
private void availableByQuantityTreeView_DoubleClick(object sender, EventArgs e)
{
if (availableByQuantityTreeView.SelectedNode != null &&
availableByQuantityTreeView.SelectedNode.Tag is WMeterRsltItemSpec)
{
AddItem(availableByQuantityTreeView.SelectedNode.Tag as WMeterRsltItemSpec);
}
}
private void availableByCategoryTreeView_DoubleClick(object sender, EventArgs e)
{
if (availableByCategoryTreeView.SelectedNode != null &&
availableByCategoryTreeView.SelectedNode.Tag is WMeterRsltItemSpec)
{
AddItem(availableByCategoryTreeView.SelectedNode.Tag as WMeterRsltItemSpec);
}
}
void AddItem(WMeterRsltItemSpec item)
{
WMeterRsltItemSpec newItem = item.Clone();
newItem.Caption = newItem.Name;
SelectedItems.Add(newItem);
RedrawAvailable();
RedrawSelected();
/// Select the last item
selectedResultsListViewEx.Focus();
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible();
}
/// Select the last item
selectedResultsListViewEx.Focus();
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible();
}
private void selectedResultsListBox_DoubleClick(object sender, EventArgs e)
{
@@ -494,17 +350,5 @@ namespace Results.Forms
DialogResult = DialogResult.Cancel;
Close();
}
private void tabPage1_Click(object sender, EventArgs e)
{
}
private void availableByCategoryTreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
{
ToolTip toolTip = new ToolTip();
toolTip.SetToolTip(this, e.Node.ToolTipText);
}
}
}
+151 -239
View File
@@ -31,238 +31,156 @@ namespace Results.Forms
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.availableResultsLabel = new System.Windows.Forms.Label();
this.selectedResultsLabel = new System.Windows.Forms.Label();
this.removeAllButton = new System.Windows.Forms.Button();
this.removeButton = new System.Windows.Forms.Button();
this.addButton = new System.Windows.Forms.Button();
this.upButton = new System.Windows.Forms.Button();
this.downButton = new System.Windows.Forms.Button();
this.availableTabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.availableAlphabeticTreeView = new System.Windows.Forms.TreeView();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.availableByQuantityTreeView = new System.Windows.Forms.TreeView();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.availableByCategoryTreeView = new System.Windows.Forms.TreeView();
this.selectedResultsListViewEx = new Results.Forms.ListViewEx();
this.availableTabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.Location = new System.Drawing.Point(373, 499);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(105, 30);
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(494, 499);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(105, 30);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// availableResultsLabel
//
this.availableResultsLabel.AutoSize = true;
this.availableResultsLabel.Location = new System.Drawing.Point(12, 9);
this.availableResultsLabel.Name = "availableResultsLabel";
this.availableResultsLabel.Size = new System.Drawing.Size(86, 13);
this.availableResultsLabel.TabIndex = 8;
this.availableResultsLabel.Text = "Available results:";
//
// selectedResultsLabel
//
this.selectedResultsLabel.AutoSize = true;
this.selectedResultsLabel.Location = new System.Drawing.Point(284, 9);
this.selectedResultsLabel.Name = "selectedResultsLabel";
this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13);
this.selectedResultsLabel.TabIndex = 9;
this.selectedResultsLabel.Text = "Selected results:";
//
// removeAllButton
//
this.removeAllButton.Location = new System.Drawing.Point(218, 221);
this.removeAllButton.Name = "removeAllButton";
this.removeAllButton.Size = new System.Drawing.Size(94, 30);
this.removeAllButton.TabIndex = 46;
this.removeAllButton.Text = "<< R&emove all";
this.removeAllButton.UseVisualStyleBackColor = true;
this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click);
//
// removeButton
//
this.removeButton.Location = new System.Drawing.Point(218, 186);
this.removeButton.Name = "removeButton";
this.removeButton.Size = new System.Drawing.Size(93, 30);
this.removeButton.TabIndex = 45;
this.removeButton.Text = "< &Remove";
this.removeButton.UseVisualStyleBackColor = true;
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
//
// addButton
//
this.addButton.Location = new System.Drawing.Point(218, 151);
this.addButton.Name = "addButton";
this.addButton.Size = new System.Drawing.Size(93, 30);
this.addButton.TabIndex = 44;
this.addButton.Text = "&Add >";
this.addButton.UseVisualStyleBackColor = true;
this.addButton.Click += new System.EventHandler(this.addButton_Click);
//
// upButton
//
this.upButton.Location = new System.Drawing.Point(218, 313);
this.upButton.Name = "upButton";
this.upButton.Size = new System.Drawing.Size(93, 30);
this.upButton.TabIndex = 48;
this.upButton.Text = "Up";
this.upButton.UseVisualStyleBackColor = true;
this.upButton.Click += new System.EventHandler(this.upButton_Click);
//
// downButton
//
this.downButton.Location = new System.Drawing.Point(218, 349);
this.downButton.Name = "downButton";
this.downButton.Size = new System.Drawing.Size(93, 30);
this.downButton.TabIndex = 49;
this.downButton.Text = "Down";
this.downButton.UseVisualStyleBackColor = true;
this.downButton.Click += new System.EventHandler(this.downButton_Click);
//
// availableTabControl
//
this.availableTabControl.Controls.Add(this.tabPage1);
this.availableTabControl.Controls.Add(this.tabPage2);
this.availableTabControl.Controls.Add(this.tabPage3);
this.availableTabControl.Location = new System.Drawing.Point(6, 31);
this.availableTabControl.Name = "availableTabControl";
this.availableTabControl.SelectedIndex = 0;
this.availableTabControl.Size = new System.Drawing.Size(206, 453);
this.availableTabControl.TabIndex = 50;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.availableAlphabeticTreeView);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(198, 427);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "A...Z";
this.tabPage1.UseVisualStyleBackColor = true;
this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click);
//
// availableAlphabeticTreeView
//
this.availableAlphabeticTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.availableAlphabeticTreeView.Location = new System.Drawing.Point(3, 3);
this.availableAlphabeticTreeView.Name = "availableAlphabeticTreeView";
this.availableAlphabeticTreeView.Size = new System.Drawing.Size(192, 421);
this.availableAlphabeticTreeView.TabIndex = 0;
this.availableAlphabeticTreeView.DoubleClick += new System.EventHandler(this.availableAlphabeticTreeView_DoubleClick);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.availableByQuantityTreeView);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(198, 427);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "by quantity";
this.tabPage2.UseVisualStyleBackColor = true;
//
// availableByQuantityTreeView
//
this.availableByQuantityTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.availableByQuantityTreeView.Location = new System.Drawing.Point(3, 3);
this.availableByQuantityTreeView.Name = "availableByQuantityTreeView";
this.availableByQuantityTreeView.Size = new System.Drawing.Size(192, 421);
this.availableByQuantityTreeView.TabIndex = 0;
this.availableByQuantityTreeView.DoubleClick += new System.EventHandler(this.availableByQuantityTreeView_DoubleClick);
//
// tabPage3
//
this.tabPage3.Controls.Add(this.availableByCategoryTreeView);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(198, 427);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "by category";
this.tabPage3.UseVisualStyleBackColor = true;
//
// availableByCategoryTreeView
//
this.availableByCategoryTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.availableByCategoryTreeView.Location = new System.Drawing.Point(0, 0);
this.availableByCategoryTreeView.Name = "availableByCategoryTreeView";
this.availableByCategoryTreeView.Size = new System.Drawing.Size(198, 427);
this.availableByCategoryTreeView.TabIndex = 0;
this.availableByCategoryTreeView.NodeMouseHover += new System.Windows.Forms.TreeNodeMouseHoverEventHandler(this.availableByCategoryTreeView_NodeMouseHover);
this.availableByCategoryTreeView.DoubleClick += new System.EventHandler(this.availableByCategoryTreeView_DoubleClick);
//
// selectedResultsListViewEx
//
this.selectedResultsListViewEx.AllowColumnReorder = true;
this.selectedResultsListViewEx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.selectedResultsListViewEx.DoubleClickActivation = false;
this.selectedResultsListViewEx.FullRowSelect = true;
this.selectedResultsListViewEx.Location = new System.Drawing.Point(317, 31);
this.selectedResultsListViewEx.Name = "selectedResultsListViewEx";
this.selectedResultsListViewEx.Size = new System.Drawing.Size(594, 453);
this.selectedResultsListViewEx.TabIndex = 47;
this.selectedResultsListViewEx.UseCompatibleStateImageBehavior = false;
this.selectedResultsListViewEx.View = System.Windows.Forms.View.Details;
this.selectedResultsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(this.selectedResultsListViewEx_SubItemClicked);
this.selectedResultsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(this.selectedResultsListViewEx_SubItemEndEditing);
//
// ResultsConfigDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(923, 543);
this.Controls.Add(this.availableTabControl);
this.Controls.Add(this.downButton);
this.Controls.Add(this.upButton);
this.Controls.Add(this.selectedResultsListViewEx);
this.Controls.Add(this.removeAllButton);
this.Controls.Add(this.removeButton);
this.Controls.Add(this.addButton);
this.Controls.Add(this.selectedResultsLabel);
this.Controls.Add(this.availableResultsLabel);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResultsConfigDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ResultsConfig";
this.Load += new System.EventHandler(this.ResultsConfig_Load);
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ResultsConfigDlg_KeyPress);
this.availableTabControl.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.availableResultsListBox = new System.Windows.Forms.ListBox();
this.availableResultsLabel = new System.Windows.Forms.Label();
this.selectedResultsLabel = new System.Windows.Forms.Label();
this.removeAllButton = new System.Windows.Forms.Button();
this.removeButton = new System.Windows.Forms.Button();
this.addButton = new System.Windows.Forms.Button();
this.selectedResultsListViewEx = new Results.Forms.ListViewEx();
this.upButton = new System.Windows.Forms.Button();
this.downButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(344, 401);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(104, 30);
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(465, 401);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(104, 30);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// availableResultsListBox
//
this.availableResultsListBox.FormattingEnabled = true;
this.availableResultsListBox.Location = new System.Drawing.Point(12, 31);
this.availableResultsListBox.Name = "availableResultsListBox";
this.availableResultsListBox.Size = new System.Drawing.Size(162, 355);
this.availableResultsListBox.TabIndex = 6;
this.availableResultsListBox.DoubleClick += new System.EventHandler(this.availableResultsListBox_DoubleClick);
//
// availableResultsLabel
//
this.availableResultsLabel.AutoSize = true;
this.availableResultsLabel.Location = new System.Drawing.Point(12, 9);
this.availableResultsLabel.Name = "availableResultsLabel";
this.availableResultsLabel.Size = new System.Drawing.Size(86, 13);
this.availableResultsLabel.TabIndex = 8;
this.availableResultsLabel.Text = "Available results:";
//
// selectedResultsLabel
//
this.selectedResultsLabel.AutoSize = true;
this.selectedResultsLabel.Location = new System.Drawing.Point(284, 9);
this.selectedResultsLabel.Name = "selectedResultsLabel";
this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13);
this.selectedResultsLabel.TabIndex = 9;
this.selectedResultsLabel.Text = "Selected results:";
//
// removeAllButton
//
this.removeAllButton.Location = new System.Drawing.Point(184, 144);
this.removeAllButton.Name = "removeAllButton";
this.removeAllButton.Size = new System.Drawing.Size(94, 30);
this.removeAllButton.TabIndex = 46;
this.removeAllButton.Text = "<< R&emove all";
this.removeAllButton.UseVisualStyleBackColor = true;
this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click);
//
// removeButton
//
this.removeButton.Location = new System.Drawing.Point(184, 109);
this.removeButton.Name = "removeButton";
this.removeButton.Size = new System.Drawing.Size(93, 30);
this.removeButton.TabIndex = 45;
this.removeButton.Text = "< &Remove";
this.removeButton.UseVisualStyleBackColor = true;
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
//
// addButton
//
this.addButton.Location = new System.Drawing.Point(184, 74);
this.addButton.Name = "addButton";
this.addButton.Size = new System.Drawing.Size(93, 30);
this.addButton.TabIndex = 44;
this.addButton.Text = "&Add >";
this.addButton.UseVisualStyleBackColor = true;
this.addButton.Click += new System.EventHandler(this.addButton_Click);
//
// selectedResultsListViewEx
//
this.selectedResultsListViewEx.AllowColumnReorder = true;
this.selectedResultsListViewEx.DoubleClickActivation = false;
this.selectedResultsListViewEx.FullRowSelect = true;
this.selectedResultsListViewEx.Location = new System.Drawing.Point(287, 31);
this.selectedResultsListViewEx.Name = "selectedResultsListViewEx";
this.selectedResultsListViewEx.Size = new System.Drawing.Size(594, 355);
this.selectedResultsListViewEx.TabIndex = 47;
this.selectedResultsListViewEx.UseCompatibleStateImageBehavior = false;
this.selectedResultsListViewEx.View = System.Windows.Forms.View.Details;
this.selectedResultsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(this.selectedResultsListViewEx_SubItemClicked);
this.selectedResultsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(this.selectedResultsListViewEx_SubItemEndEditing);
//
// upButton
//
this.upButton.Location = new System.Drawing.Point(184, 236);
this.upButton.Name = "upButton";
this.upButton.Size = new System.Drawing.Size(93, 30);
this.upButton.TabIndex = 48;
this.upButton.Text = "Up";
this.upButton.UseVisualStyleBackColor = true;
this.upButton.Click += new System.EventHandler(this.upButton_Click);
//
// downButton
//
this.downButton.Location = new System.Drawing.Point(184, 272);
this.downButton.Name = "downButton";
this.downButton.Size = new System.Drawing.Size(93, 30);
this.downButton.TabIndex = 49;
this.downButton.Text = "Down";
this.downButton.UseVisualStyleBackColor = true;
this.downButton.Click += new System.EventHandler(this.downButton_Click);
//
// ResultsConfigDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(893, 445);
this.Controls.Add(this.downButton);
this.Controls.Add(this.upButton);
this.Controls.Add(this.selectedResultsListViewEx);
this.Controls.Add(this.removeAllButton);
this.Controls.Add(this.removeButton);
this.Controls.Add(this.addButton);
this.Controls.Add(this.selectedResultsLabel);
this.Controls.Add(this.availableResultsLabel);
this.Controls.Add(this.availableResultsListBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResultsConfigDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ResultsConfig";
this.Load += new System.EventHandler(this.ResultsConfig_Load);
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ResultsConfigDlg_KeyPress);
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -270,6 +188,7 @@ namespace Results.Forms
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.ListBox availableResultsListBox;
private System.Windows.Forms.Label availableResultsLabel;
private System.Windows.Forms.Label selectedResultsLabel;
private System.Windows.Forms.Button removeAllButton;
@@ -278,12 +197,5 @@ namespace Results.Forms
private ListViewEx selectedResultsListViewEx;
private System.Windows.Forms.Button upButton;
private System.Windows.Forms.Button downButton;
private System.Windows.Forms.TabControl availableTabControl;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TreeView availableAlphabeticTreeView;
private System.Windows.Forms.TreeView availableByQuantityTreeView;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TreeView availableByCategoryTreeView;
}
}
-3
View File
@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+3 -14
View File
@@ -1,7 +1,4 @@
///
/// Copyright (c) 2016-2017 Sensus Metering Systems
///
using System;
using System;
namespace Results
{
@@ -102,16 +99,8 @@ namespace Results
Start_volume_aux, /// 92
End_volume, /// 93
End_volume_main, /// 94
End_volume_aux, /// 95
Error_main, /// 96
Error_aux, /// 97
Serial_Nr_main, /// 98
Serial_Nr_aux, /// 99
End_state_main, /// 100
End_state_aux, /// 101
Q_rise, /// 102
Q_fall, /// 103
End_volume_aux, /// 95
Count,
}
}
+1 -4
View File
@@ -208,10 +208,7 @@ namespace Results
AllItems.Add(new ItemSpec("Temp lo st", "T lo st", null, null, (x, z) => z.TestRslt.Custom7.ToString("F3")));
AllItems.Add(new ItemSpec("Temp lo en", "T lo en", null, null, (x, z) => z.TestRslt.Custom8.ToString("F3")));
AllItems.Add(new ItemSpec("Temp lo av", "T lo av", null, null, (x, z) => ((z.TestRslt.Custom7 + z.TestRslt.Custom8) / 2).ToString("F3")));
AllItems.Add(new ItemSpec("Start mass", Strings.Start_mass + " [kg]", x => x.TestRslt.MassStart.ToString("F4"), (x, y, z) => z.TestRslt.MassStart.ToString("F4"), (x, z) => z.TestRslt.MassStart.ToString("F4")));
AllItems.Add(new ItemSpec("End mass", Strings.End_mass + " [kg]", x => x.TestRslt.MassEnd.ToString("F4"), (x, y, z) => z.TestRslt.MassEnd.ToString("F4"), (x, z) => z.TestRslt.MassEnd.ToString("F4")));
}
}
public static ItemSpec GetItem(string name)
{
+1 -1
View File
@@ -36,7 +36,7 @@ namespace Results.Mappings
Map(x => x.VolumeCTV);
Map(x => x.VolumeMaster);
Map(x => x.ErrorMaster);
#if HEAT_METERS
#if HEAT_METERS_SUPPORT
Map(x => x.RefEnergy);
#endif
Map(x => x.AmbTempMean).Column("AmbientTempAve");
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Results.Mappings
#if HEAT_METER_SUPPORT
Map(x => x.HeatMeter);
#endif
#if ORACLE_DB
#if IPERLST || IPERLST_SPECIAL
Map(x => x.WMTypeId);
Map(x => x.WMTypeRev);
#endif
+2 -2
View File
@@ -23,7 +23,7 @@ namespace Results.Mappings
Map(x => x.Passed);
Map(x => x.ResultCode);
#if IPERL
#if IPERLST || IPERLST_SPECIAL
Map(x => x.SerialNrEx);
Map(x => x.OrigCalibFactor);
Map(x => x.CalibFactor);
@@ -35,7 +35,7 @@ namespace Results.Mappings
Map(x => x.Hz2CorrectionDone);
Map(x => x.Hz2Correction);
#endif
References(x => x.WaterMeterData);
References(x => x.WaterMeterData);
References(x => x.Batch);
HasMany(x => x.MeterTestRslts)
.Cascade.All();
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2016-2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -111,11 +111,10 @@ namespace Results.Output.Printers.Munich
/// <remarks>This provides the print logic for our document</remarks>
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
{
/// Run base code
// Run base code
base.OnPrintPage(e);
/// Draw 2550 x 3507 'headpic' scaled to A4 at 100 DPI
e.Graphics.DrawImage(Results.Properties.Resources.Headpic, new Rectangle(0, 0, 827, 1137));
e.Graphics.DrawImageUnscaled(Results.Properties.Resources.Headpic, 0, 0);
/// Set print area size and margins (in dots using 80 dpi)
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
@@ -241,7 +240,7 @@ namespace Results.Output.Printers.Munich
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientHumiAve().ToString("F0") + " %");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbientPressAve()).ToString("F0") + " mbar");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientPressAve().ToString("F0") + " mbar");
lineNr++;
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.12.486.0")]
[assembly: AssemblyFileVersion("2.12.486.0")]
[assembly: AssemblyVersion("2.12.424.0")]
[assembly: AssemblyFileVersion("2.12.424.0")]
-36
View File
@@ -132,15 +132,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Category.
/// </summary>
internal static string Category {
get {
return ResourceManager.GetString("Category", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Compound.
/// </summary>
@@ -186,15 +177,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to End mass.
/// </summary>
internal static string End_mass {
get {
return ResourceManager.GetString("End_mass", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to End state.
/// </summary>
@@ -618,15 +600,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Quantity.
/// </summary>
internal static string Quantity {
get {
return ResourceManager.GetString("Quantity", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Ref.pulses.
/// </summary>
@@ -744,15 +717,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Start mass.
/// </summary>
internal static string Start_mass {
get {
return ResourceManager.GetString("Start_mass", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Start volume.
/// </summary>
-6
View File
@@ -189,10 +189,4 @@
<data name="Page" xml:space="preserve">
<value>str.</value>
</data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Veličina</value>
</data>
</root>
+1 -7
View File
@@ -133,7 +133,7 @@
<value>Stapel Nr.</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Prüfstand</value>
<value>Prüfstation</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Abbrechen</value>
@@ -375,10 +375,4 @@
<data name="Single" xml:space="preserve">
<value>Einzel</value>
</data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Größe</value>
</data>
</root>
-423
View File
@@ -1,423 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Add" xml:space="preserve">
<value>Dodać &gt;</value>
</data>
<data name="Alignment" xml:space="preserve">
<value>Wyrównywanie</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Zatwierdzenie</value>
</data>
<data name="Available_results" xml:space="preserve">
<value>Dostępne wyniki:</value>
</data>
<data name="Batch_nr" xml:space="preserve">
<value>Nr pakietu</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanowisko</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Anuluj</value>
</data>
<data name="Caption" xml:space="preserve">
<value>Podpis</value>
</data>
<data name="Configuration" xml:space="preserve">
<value>Konfiguracja</value>
</data>
<data name="Density" xml:space="preserve">
<value>Gęstość</value>
</data>
<data name="DownBtnText" xml:space="preserve">
<value>W dół</value>
</data>
<data name="End" xml:space="preserve">
<value>Koniec</value>
</data>
<data name="EndState_aux" xml:space="preserve">
<value>Stan końcowy dodatkowy</value>
</data>
<data name="EndState_main" xml:space="preserve">
<value>Stan końcowy podstawowy</value>
</data>
<data name="End_state" xml:space="preserve">
<value>Stan końcowy</value>
</data>
<data name="ErrLimHi" xml:space="preserve">
<value>Max. Dopuszczalny błąd</value>
</data>
<data name="ErrLimLo" xml:space="preserve">
<value>Min. Dopuszczalny błąd</value>
</data>
<data name="Error" xml:space="preserve">
<value>Błąd</value>
</data>
<data name="ErrRef" xml:space="preserve">
<value>Zakres błędów</value>
</data>
<data name="Err_aux" xml:space="preserve">
<value>Błąd dopuszczalny</value>
</data>
<data name="Err_main" xml:space="preserve">
<value>Błąd podstawowy</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Przepływ</value>
</data>
<data name="Format" xml:space="preserve">
<value>Format</value>
</data>
<data name="H_amb" xml:space="preserve">
<value>H otoczenia</value>
</data>
<data name="Item" xml:space="preserve">
<value>Pozycja</value>
</data>
<data name="MClass" xml:space="preserve">
<value>Klasa licznika</value>
</data>
<data name="OkBtnText" xml:space="preserve">
<value>OK</value>
</data>
<data name="PO" xml:space="preserve">
<value>Zamówienie</value>
</data>
<data name="Pos" xml:space="preserve">
<value>Pozycja</value>
</data>
<data name="Precision" xml:space="preserve">
<value>Dokładność</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Procedura</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Producent</value>
</data>
<data name="Protocol" xml:space="preserve">
<value>Zapiska</value>
</data>
<data name="Pulses" xml:space="preserve">
<value>Impulsy</value>
</data>
<data name="PulsesLiter" xml:space="preserve">
<value>imp./litr</value>
</data>
<data name="P_amb" xml:space="preserve">
<value>P otoczenia</value>
</data>
<data name="P_dn_end" xml:space="preserve">
<value>P w dół koniec</value>
</data>
<data name="P_dn" xml:space="preserve">
<value>P w dół</value>
</data>
<data name="P_dn_start" xml:space="preserve">
<value>P w dół start</value>
</data>
<data name="P_up_end" xml:space="preserve">
<value>P do góry koniec</value>
</data>
<data name="P_up" xml:space="preserve">
<value>P do góry </value>
</data>
<data name="P_up_start" xml:space="preserve">
<value>P do góry strat</value>
</data>
<data name="Q_fall" xml:space="preserve">
<value>Q obniżanie</value>
</data>
<data name="Q_from" xml:space="preserve">
<value>Q od</value>
</data>
<data name="Q_rise" xml:space="preserve">
<value>Q zwiększanie</value>
</data>
<data name="Q_to" xml:space="preserve">
<value>Q do</value>
</data>
<data name="RefPulses" xml:space="preserve">
<value>Wzorcowe impulsy</value>
</data>
<data name="Remove" xml:space="preserve">
<value>&lt; usuń</value>
</data>
<data name="Remove_all" xml:space="preserve">
<value>Usunąć wszystko</value>
</data>
<data name="Result" xml:space="preserve">
<value>Wyniki</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>Wybierz wyniki</value>
</data>
<data name="sn" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="sn_aux" xml:space="preserve">
<value>Nr seryjny dodatkowy</value>
</data>
<data name="sn_main" xml:space="preserve">
<value>Nr seryjny główny</value>
</data>
<data name="Start" xml:space="preserve">
<value>Początek</value>
</data>
<data name="Test" xml:space="preserve">
<value>Test</value>
</data>
<data name="Test_ID" xml:space="preserve">
<value>ID testu</value>
</data>
<data name="Test_method" xml:space="preserve">
<value>Metoda badania</value>
</data>
<data name="Test_vol" xml:space="preserve">
<value>Objętość testu</value>
</data>
<data name="T_amb" xml:space="preserve">
<value>T otoczenia</value>
</data>
<data name="T_div" xml:space="preserve">
<value>T różnica</value>
</data>
<data name="T_end" xml:space="preserve">
<value>T końcowa</value>
</data>
<data name="T_in" xml:space="preserve">
<value>T wejściowa</value>
</data>
<data name="T_out" xml:space="preserve">
<value>T wyjściowa</value>
</data>
<data name="T_s" xml:space="preserve">
<value>T [s]</value>
</data>
<data name="T_start" xml:space="preserve">
<value>T początkowa</value>
</data>
<data name="Uncertainty" xml:space="preserve">
<value>Niepewność [%]</value>
</data>
<data name="Units" xml:space="preserve">
<value>Jednostki</value>
</data>
<data name="UpBtnText" xml:space="preserve">
<value>Do góry</value>
</data>
<data name="User" xml:space="preserve">
<value>Użytkownik</value>
</data>
<data name="User_nr" xml:space="preserve">
<value>Nr Użytkownika</value>
</data>
<data name="Ver" xml:space="preserve">
<value>Wersja</value>
</data>
<data name="VolRef" xml:space="preserve">
<value>Wzorzec objętości </value>
</data>
<data name="Volume" xml:space="preserve">
<value>Objętość</value>
</data>
<data name="Width" xml:space="preserve">
<value>Szerokość</value>
</data>
<data name="WMs" xml:space="preserve">
<value>Liczniki</value>
</data>
<data name="WM_Type" xml:space="preserve">
<value>Typ licznika</value>
</data>
<data name="Year" xml:space="preserve">
<value>Rok</value>
</data>
<data name="Results" xml:space="preserve">
<value>Wyniki</value>
</data>
<data name="Remark" xml:space="preserve">
<value>Uwagi</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Kod wyniku</value>
</data>
<data name="Mounting" xml:space="preserve">
<value>Montaż</value>
</data>
<data name="Energy" xml:space="preserve">
<value>Energia</value>
</data>
<data name="Energy_ref" xml:space="preserve">
<value>Wzorzec energii</value>
</data>
<data name="P_delta" xml:space="preserve">
<value>P delta</value>
</data>
<data name="P_delta_end" xml:space="preserve">
<value>P delta końcowe</value>
</data>
<data name="P_delta_mean" xml:space="preserve">
<value>P delta główne</value>
</data>
<data name="P_delta_start" xml:space="preserve">
<value>P delta początkowe</value>
</data>
<data name="Meter_type" xml:space="preserve">
<value>Typ licznika</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Sprzężony</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Licznik ciepła</value>
</data>
<data name="Single" xml:space="preserve">
<value>Pojedynczy</value>
</data>
<data name="Page" xml:space="preserve">
<value>Strona</value>
</data>
<data name="End_volume" xml:space="preserve">
<value>Objętość końcowa</value>
</data>
<data name="Start_volume" xml:space="preserve">
<value>Objętość początkowa</value>
</data>
<data name="End_volume_aux" xml:space="preserve">
<value>Dodatkowa objętość końcowa</value>
</data>
<data name="End_volume_main" xml:space="preserve">
<value>Główna objętość końćowa</value>
</data>
<data name="Start_volume_aux" xml:space="preserve">
<value>Dodatkowa objętość początkowa</value>
</data>
<data name="Start_volume_main" xml:space="preserve">
<value>Główna objętość początkowa</value>
</data>
<data name="Volume_aux" xml:space="preserve">
<value>Objętość dodatkowa</value>
</data>
<data name="Volume_main" xml:space="preserve">
<value>Objętość główna</value>
</data>
</root>
-12
View File
@@ -420,16 +420,4 @@
<data name="Volume_main" xml:space="preserve">
<value>Volume main</value>
</data>
<data name="End_mass" xml:space="preserve">
<value>End mass</value>
</data>
<data name="Start_mass" xml:space="preserve">
<value>Start mass</value>
</data>
<data name="Category" xml:space="preserve">
<value>Category</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Quantity</value>
</data>
</root>
-423
View File
@@ -1,423 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Add" xml:space="preserve">
<value>Добавить &gt;</value>
</data>
<data name="Alignment" xml:space="preserve">
<value>Выравнивание</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Утверждение</value>
</data>
<data name="Available_results" xml:space="preserve">
<value>Доступные результаты</value>
</data>
<data name="Batch_nr" xml:space="preserve">
<value>№ пакета</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Установка</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="Caption" xml:space="preserve">
<value>Подпись</value>
</data>
<data name="Configuration" xml:space="preserve">
<value>Конфигурация</value>
</data>
<data name="Density" xml:space="preserve">
<value>Плотность</value>
</data>
<data name="DownBtnText" xml:space="preserve">
<value>Вниз</value>
</data>
<data name="End" xml:space="preserve">
<value>Конец</value>
</data>
<data name="EndState_aux" xml:space="preserve">
<value>Конечн. сост. доп.</value>
</data>
<data name="EndState_main" xml:space="preserve">
<value>Конечн. сост. главн.</value>
</data>
<data name="End_state" xml:space="preserve">
<value>Итог</value>
</data>
<data name="ErrLimHi" xml:space="preserve">
<value>Макс.допуст.погр.</value>
</data>
<data name="ErrLimLo" xml:space="preserve">
<value>Мин.доп.погр</value>
</data>
<data name="Error" xml:space="preserve">
<value>Ошибка</value>
</data>
<data name="ErrRef" xml:space="preserve">
<value>Err.ref.</value>
</data>
<data name="Err_aux" xml:space="preserve">
<value>Погр.доп.</value>
</data>
<data name="Err_main" xml:space="preserve">
<value>Погр.глав.</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Расход</value>
</data>
<data name="Format" xml:space="preserve">
<value>Формат</value>
</data>
<data name="H_amb" xml:space="preserve">
<value>H amb</value>
</data>
<data name="Item" xml:space="preserve">
<value>Item</value>
</data>
<data name="MClass" xml:space="preserve">
<value>M.Class</value>
</data>
<data name="OkBtnText" xml:space="preserve">
<value>OK</value>
</data>
<data name="PO" xml:space="preserve">
<value>PO</value>
</data>
<data name="Pos" xml:space="preserve">
<value>Pos.</value>
</data>
<data name="Precision" xml:space="preserve">
<value>Точность</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Процедура</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Производитель</value>
</data>
<data name="Protocol" xml:space="preserve">
<value>Протокол</value>
</data>
<data name="Pulses" xml:space="preserve">
<value>Импульсы</value>
</data>
<data name="PulsesLiter" xml:space="preserve">
<value>Импульсы/л</value>
</data>
<data name="P_amb" xml:space="preserve">
<value>P amb</value>
</data>
<data name="P_dn_end" xml:space="preserve">
<value>P вниз конец</value>
</data>
<data name="P_dn" xml:space="preserve">
<value>P вниз</value>
</data>
<data name="P_dn_start" xml:space="preserve">
<value>P вниз начало</value>
</data>
<data name="P_up_end" xml:space="preserve">
<value>P вверз конец</value>
</data>
<data name="P_up" xml:space="preserve">
<value>P вверх</value>
</data>
<data name="P_up_start" xml:space="preserve">
<value>P вверх начало</value>
</data>
<data name="Q_fall" xml:space="preserve">
<value>Q пониж</value>
</data>
<data name="Q_from" xml:space="preserve">
<value>Q от</value>
</data>
<data name="Q_rise" xml:space="preserve">
<value>Q повыш</value>
</data>
<data name="Q_to" xml:space="preserve">
<value>Q до</value>
</data>
<data name="RefPulses" xml:space="preserve">
<value>Эт.импульсы</value>
</data>
<data name="Remove" xml:space="preserve">
<value>&lt; Удалить</value>
</data>
<data name="Remove_all" xml:space="preserve">
<value>Удалить все</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>Выбанные результаты</value>
</data>
<data name="sn" xml:space="preserve">
<value>С/Н:</value>
</data>
<data name="sn_aux" xml:space="preserve">
<value>С/Н доп</value>
</data>
<data name="sn_main" xml:space="preserve">
<value>С/Н главн</value>
</data>
<data name="Start" xml:space="preserve">
<value>Начало</value>
</data>
<data name="Test" xml:space="preserve">
<value>Тест</value>
</data>
<data name="Test_ID" xml:space="preserve">
<value>ID теста</value>
</data>
<data name="Test_method" xml:space="preserve">
<value>Метод испытания</value>
</data>
<data name="Test_vol" xml:space="preserve">
<value>Тест.объем</value>
</data>
<data name="T_amb" xml:space="preserve">
<value>T amb</value>
</data>
<data name="T_div" xml:space="preserve">
<value>T div</value>
</data>
<data name="T_end" xml:space="preserve">
<value>T оконч.</value>
</data>
<data name="T_in" xml:space="preserve">
<value>T вх</value>
</data>
<data name="T_out" xml:space="preserve">
<value>T вых</value>
</data>
<data name="T_s" xml:space="preserve">
<value>T [с]</value>
</data>
<data name="T_start" xml:space="preserve">
<value>T начала</value>
</data>
<data name="Uncertainty" xml:space="preserve">
<value>Неопределенность</value>
</data>
<data name="Units" xml:space="preserve">
<value>Единицы</value>
</data>
<data name="UpBtnText" xml:space="preserve">
<value>Вверх</value>
</data>
<data name="User" xml:space="preserve">
<value>Пользователь</value>
</data>
<data name="User_nr" xml:space="preserve">
<value>№ пользователя</value>
</data>
<data name="Ver" xml:space="preserve">
<value>Эт.</value>
</data>
<data name="VolRef" xml:space="preserve">
<value>Об.эт.</value>
</data>
<data name="Volume" xml:space="preserve">
<value>Объем</value>
</data>
<data name="Width" xml:space="preserve">
<value>Ширина</value>
</data>
<data name="WMs" xml:space="preserve">
<value>Счетчики</value>
</data>
<data name="WM_Type" xml:space="preserve">
<value>Тип счетчика</value>
</data>
<data name="Year" xml:space="preserve">
<value>Год</value>
</data>
<data name="Results" xml:space="preserve">
<value>Результаты</value>
</data>
<data name="Remark" xml:space="preserve">
<value>Примечание</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Код результата</value>
</data>
<data name="Mounting" xml:space="preserve">
<value>Монтаж</value>
</data>
<data name="Energy" xml:space="preserve">
<value>Энергия</value>
</data>
<data name="Energy_ref" xml:space="preserve">
<value>Эт. энергия</value>
</data>
<data name="P_delta" xml:space="preserve">
<value>P дельта</value>
</data>
<data name="P_delta_end" xml:space="preserve">
<value>P дельта кон</value>
</data>
<data name="P_delta_mean" xml:space="preserve">
<value>P дельта ср</value>
</data>
<data name="P_delta_start" xml:space="preserve">
<value>P дельта нач</value>
</data>
<data name="Meter_type" xml:space="preserve">
<value>Тип счетчика</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Комбинированный</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Теплосчетчик</value>
</data>
<data name="Single" xml:space="preserve">
<value>Единый</value>
</data>
<data name="Page" xml:space="preserve">
<value>Страница</value>
</data>
<data name="End_volume" xml:space="preserve">
<value>Кон. объем</value>
</data>
<data name="Start_volume" xml:space="preserve">
<value>Нач. объем</value>
</data>
<data name="End_volume_aux" xml:space="preserve">
<value>Кон. объем доп.</value>
</data>
<data name="End_volume_main" xml:space="preserve">
<value>Кон. объем главн.</value>
</data>
<data name="Start_volume_aux" xml:space="preserve">
<value>Нач. объем доп.</value>
</data>
<data name="Start_volume_main" xml:space="preserve">
<value>Нач. объем главн.</value>
</data>
<data name="Volume_aux" xml:space="preserve">
<value>Объем доп.</value>
</data>
<data name="Volume_main" xml:space="preserve">
<value>Объем главн.</value>
</data>
</root>
+12 -11
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -27,7 +27,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -108,6 +108,12 @@
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="UiControls\BatchResultsCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UiControls\BatchResultsCtrl.Designer.cs">
<DependentUpon>BatchResultsCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Utils.cs" />
<Compile Include="WMeterRsltItemSpec.cs" />
</ItemGroup>
@@ -116,10 +122,6 @@
<Project>{743DF7DB-C7B6-42EB-986D-0F485E5588E4}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Users\Users.csproj">
<Project>{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}</Project>
<Name>Users</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="FileWriters\" />
@@ -141,15 +143,14 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.cs.resx" />
<EmbeddedResource Include="Resources\Strings.de.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.pl.resx" />
<EmbeddedResource Include="Resources\Strings.de.resx" />
<EmbeddedResource Include="Resources\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.ru.resx" />
<EmbeddedResource Include="UiControls\BatchResultsCtrl.resx">
<DependentUpon>BatchResultsCtrl.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Headpic.png" />
+57
View File
@@ -0,0 +1,57 @@
namespace Results.UiControls
{
partial class BatchResultsCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flowLayoutPanel
//
this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel.Name = "flowLayoutPanel";
this.flowLayoutPanel.Size = new System.Drawing.Size(1000, 735);
this.flowLayoutPanel.TabIndex = 0;
//
// BatchResultsCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowLayoutPanel);
this.Name = "BatchResultsCtrl";
this.Size = new System.Drawing.Size(1000, 735);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
}
}
+358
View File
@@ -0,0 +1,358 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using log4net;
using Config.Entities;
namespace Results.UiControls
{
public partial class BatchResultsCtrl : UserControl
{
static readonly ILog log = LogManager.GetLogger(typeof(BatchResultsCtrl));
///
/// Public members
///
public MetersArrangement MetersArrangement;
public TestsArrangement TestsArrangement;
public int NrMetersInOneGroup;
public IList<Results.ItemSpec> RsltItems_Screen_SingleWM;
public IList<Results.ItemSpec> RsltItems_Screen_CombinedWM;
public int[] RsltsClmnWidths
{
get
{
if (firstListView == null) return null;
/// Update and return column widths
int[] temp = new int[firstListView.Columns.Count];
for (int i = 0; i < firstListView.Columns.Count; i++)
{
temp[i] = firstListView.Columns[i].Width;
}
rsltsClmnWidths = temp;
return temp;
}
set
{
rsltsClmnWidths = value;
}
}
public bool Compound { get { return Compound; } } /// To inform configuration dialog which configuration is active
///
/// Private members
///
Results.BatchResults results;
bool compound;
ListView firstListView;
public int[] rsltsClmnWidths;
int rsltsClmnCount { get { return (rsltsClmnWidths != null) ? rsltsClmnWidths.Length : 0; } }
int lvWidth;
int lvHeight;
public BatchResultsCtrl()
{
InitializeComponent();
}
public void Display(Results.BatchResults results)
{
this.results = results;
Redraw();
}
/// <summary>
/// Re-draw the results. Apply new settings if they changed.
/// </summary>
public void Redraw()
{
this.SuspendLayout();
try
{
/// Determine how many water meters were enabled for result evaluation and printing
int enabledWMsCount = 0;
for (int i = 0; i < results.WMPositionsCount; i++)
{
if (results.WaterMeters[i] != null && !results.WaterMeters[i].Disabled)
{
enabledWMsCount++;
}
}
int metersInOneGroup = Math.Max(1, Math.Min(enabledWMsCount, NrMetersInOneGroup));
int nrGroups = Math.Max(1, (enabledWMsCount + NrMetersInOneGroup - 1) / metersInOneGroup);
if (MetersArrangement == MetersArrangement.Horizontally)
{
flowLayoutPanel.FlowDirection = FlowDirection.LeftToRight;
lvWidth = flowLayoutPanel.Width / metersInOneGroup - 6;
lvHeight = flowLayoutPanel.Height / nrGroups - 6;
}
else
{
flowLayoutPanel.FlowDirection = FlowDirection.TopDown;
lvWidth = flowLayoutPanel.Width / nrGroups - 6;
lvHeight = flowLayoutPanel.Height / metersInOneGroup - 6;
}
flowLayoutPanel.Controls.Clear();
flowLayoutPanel.WrapContents = true;
flowLayoutPanel.AutoScroll = true;
bool first = true;
for (int i = 0; i < results.WMPositionsCount; i++)
{
if (results.WaterMeters[i] != null && !results.WaterMeters[i].Disabled)
{
if (TestsArrangement == TestsArrangement.Rows)
{
ListView lview = GetResultsTestsAreRows(results.WaterMeters[i], i + 1);
if (first) { firstListView = lview; first = false; }
if (lview != null) flowLayoutPanel.Controls.Add(lview);
}
else
{
ListView lview = GetResultsTestsAreColumns(results.WaterMeters[i], i + 1);
if (first) { firstListView = lview; first = false; }
if (lview != null) flowLayoutPanel.Controls.Add(lview);
}
}
}
}
catch (Exception e)
{
log.FatalFormat("Redrawing results failed : {0}", e.Message);
if (e.InnerException != null)
{
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
}
log.FatalFormat("StackTrace : {0}{1}", Environment.NewLine, e.StackTrace);
}
this.ResumeLayout(false);
}
/// <summary>
/// Get an empty ListView control with appropriate parameters.
/// </summary>
/// <returns>ListView control</returns>
ListView GetListView()
{
ListView lview = new ListView();
lview.AllowColumnReorder = false;
lview.Dock = System.Windows.Forms.DockStyle.None;
lview.FullRowSelect = true;
lview.GridLines = true;
lview.Location = new System.Drawing.Point(0, 0);
lview.Size = new System.Drawing.Size(lvWidth, lvHeight);
lview.TabIndex = 0;
lview.UseCompatibleStateImageBehavior = false;
lview.View = System.Windows.Forms.View.Details;
return lview;
}
/// <summary>
/// Get decorated test names for a specified watermeter
/// </summary>
/// <param name="wMtr">Watermeter results entity</param>
/// <returns>A list of strings</returns>
IList<string> GetAllDecoratedTestNames(Results.Entities.WaterMeter wMtr)
{
IList<string> testNames = new List<string>();
foreach (var mtr in wMtr.MeterTestRslts)
{
if ((mtr.CompoundMeterId == (byte)CompoundMeterId.Single || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
&& mtr.TestDone
&& (mtr.Publish() != Config.Entities.Publish.Never)
&& (mtr.Publish() != Config.Entities.Publish.Internal))
{
testNames.Add(mtr.Name());
}
}
return testNames;
}
/// <summary>
/// Get a ListView control filled with results of the meter 'mtr'
/// </summary>
/// <param name="mtr">Water meter number (1-based): 1 .. Config.Data.WMsCount</param>
/// <returns>ListView object</returns>
ListView GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
{
compound = wMtr.Compound();
ListView lview = GetListView();
IList<Results.ItemSpec> items = (compound ? RsltItems_Screen_CombinedWM : RsltItems_Screen_SingleWM);
if (items == null || items.Count == 0) return lview;
// Header
lview.Columns.Add(printedWMNr.ToString(), (rsltsClmnCount > 0) ? rsltsClmnWidths[0] : 40);
int i = 1;
foreach (var item in items)
{
lview.Columns.Add(item.ClmnHeaderText, (rsltsClmnCount > i) ? rsltsClmnWidths[i] : 70);
i++;
}
IList<string> testNames = GetAllDecoratedTestNames(wMtr);
int ix = 0;
foreach (var mtr in wMtr.MeterTestRslts)
{
if ((mtr.CompoundMeterId == (byte)CompoundMeterId.Single || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
&& mtr.TestDone
&& (mtr.Publish() != Config.Entities.Publish.Never)
&& (mtr.Publish() != Config.Entities.Publish.Internal))
{
ListViewItem lvi = new ListViewItem(testNames[ix++]);
foreach (var item in items)
{
string str;
if (compound)
{
var main = wMtr.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
var aux = wMtr.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
str = (item.CanPrintCompoundMeter && main != null && aux != null)
? item.PrintCombined(main, aux, mtr)
: string.Empty;
}
else
{
str = item.CanPrintSingle ? item.Print(mtr) : string.Empty;
}
string[] texts = str.Split(new char[] { '|' });
if (texts.Length == 1)
{
lvi.SubItems.Add(str);
}
else if (texts.Length == 2)
{
Color color = texts[1].Equals("Green") ? Color.Green : (texts[1].Equals("Red") ? Color.Red : Color.White);
lvi.UseItemStyleForSubItems = false;
lvi.SubItems.Add(texts[0]);
lvi.SubItems[lvi.SubItems.Count - 1].BackColor = color;
}
else
{
lvi.SubItems.Add(string.Empty);
}
}
lview.Items.Add(lvi);
}
}
return lview;
}
/// <summary>
/// Get a ListView control filled with results of the meter 'mtr'
/// </summary>
/// <param name="mtr">Water meter number (1-based): 1 .. Config.Data.WMsCount</param>
/// <returns>ListView object</returns>
ListView GetResultsTestsAreColumns(Results.Entities.WaterMeter wMtr, int printedWMNr)
{
compound = wMtr.Compound();
ListView lview = GetListView();
IList<Results.ItemSpec> items = (compound ? RsltItems_Screen_CombinedWM : RsltItems_Screen_SingleWM);
if (items == null || items.Count == 0) return lview;
// Header
lview.Columns.Add(printedWMNr.ToString(), (rsltsClmnCount > 0) ? rsltsClmnWidths[0] : 40);
int i = 1;
foreach (var str in GetAllDecoratedTestNames(wMtr))
{
lview.Columns.Add(str, (rsltsClmnCount > i) ? rsltsClmnWidths[i] : 70);
i++;
}
foreach (var item in items)
{
ListViewItem lvi = new ListViewItem(item.ClmnHeaderText);
if (compound)
{
foreach (var mtr in wMtr.MeterTestRslts)
{
if (mtr.CompoundMeterId == (byte)CompoundMeterId.Compound && mtr.TestDone
&& (mtr.Publish() != Config.Entities.Publish.Never)
&& (mtr.Publish() != Config.Entities.Publish.Internal))
{
var main = wMtr.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
var aux = wMtr.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
string str = (item.CanPrintCompoundMeter && main != null && aux != null)
? item.PrintCombined(main, aux, mtr)
: string.Empty;
string[] texts = str.Split(new char[] { '|' });
if (texts.Length == 1)
{
lvi.SubItems.Add(str);
}
else if (texts.Length == 2)
{
Color color = texts[1].Equals("Green") ? Color.Green : (texts[1].Equals("Red") ? Color.Red : Color.White);
lvi.UseItemStyleForSubItems = false;
lvi.SubItems.Add(texts[0]);
lvi.SubItems[lvi.SubItems.Count - 1].BackColor = color;
}
else
{
lvi.SubItems.Add(string.Empty);
}
}
}
}
else
{
foreach (var mtr in wMtr.MeterTestRslts)
{
if (mtr.TestDone && (mtr.Publish() != Config.Entities.Publish.Never)
&& (mtr.Publish() != Config.Entities.Publish.Internal))
{
string str = !item.CanPrintSingle ? string.Empty : item.Print(mtr);
string[] texts = str.Split(new char[] { '|' });
if (texts.Length == 1)
{
lvi.SubItems.Add(str);
}
else if (texts.Length == 2)
{
Color color = texts[1].Equals("Green") ? Color.Green : (texts[1].Equals("Red") ? Color.Red : Color.White);
lvi.UseItemStyleForSubItems = false;
lvi.SubItems.Add(texts[0]);
lvi.SubItems[lvi.SubItems.Count - 1].BackColor = color;
}
else
{
lvi.SubItems.Add(string.Empty);
}
}
}
}
lview.Items.Add(lvi);
}
return lview;
}
}
}
+2 -19
View File
@@ -15,28 +15,11 @@ namespace Results
return string.Format("{0} ({1}/{2})", name, repetitionNr, repeats);
}
public static int BenchIdOracle2Asc(int benchIdOracle)
{
switch (benchIdOracle)
{
case 4: return 35; /// WR9
case 5: return 33; /// WR10
case 6: return 34; /// WR11
case 7: return 29; /// PT7, special
case 8: return 36; /// WR13
case 9: return 37; /// WR15
case 10: return 38; /// WR16
default: return 0;
}
}
/// <summary>
/// Converts float number to a string with the specified number of significant digits
/// Converts float number to a string with the specified number of valid digits
/// </summary>
/// <param name="value">Float value to be converted to a string</param>
/// <param name="validDigits">Number of significant digits: 4, 3, or 2 (otherwise a full precision number is printed)</param>
/// <param name="validDigits">Number of valid digits: 4, 3, or 2 (otherwise a full precision number is printed)</param>
/// <returns>String representation of the float number</returns>
public static string DoubleToStr(double value, int validDigits)
{
+142 -210
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -18,9 +18,7 @@ namespace Results
public readonly int Uid;
public readonly string OldUid;
public readonly string Name; /// Name-s of all items must be unique
public readonly string ToolTipText; /// Tool-Tip Text
public readonly Quantity Quantity; /// Quantity
public readonly ItemCategory Category; ///
public string Caption; /// Specifies item description to be printed as a caption (in the header, etc.)
public string TestID; /// Specifies the test
public Config.Unit Units; /// Specifies units for the output
@@ -31,7 +29,7 @@ namespace Results
public WMeterRsltItemSpec Clone()
{
WMeterRsltItemSpec item2 = new WMeterRsltItemSpec((ItemID)Uid, Name, ToolTipText, Quantity, Category, printDlgt);
WMeterRsltItemSpec item2 = new WMeterRsltItemSpec((ItemID)Uid, Name, Quantity, printDlgt);
item2.Caption = Caption;
item2.TestID = TestID;
item2.Units = Units;
@@ -45,18 +43,14 @@ namespace Results
///
/// Function to pick a MeterTestResult field and convert it into a string
///
public delegate string PrintDlgt(WaterMeter waterMeterResult, string testID, Config.Unit units, string format, string precision);
public delegate string PrintDlgt(WaterMeter waterMeterResult, string testID, Config.Unit units, string format, string precision);
private readonly PrintDlgt printDlgt;
/// <summary> Safe wrapper which replaces null-s by empty strings </summary>
public string Print(WaterMeter waterMeterResult)
public string Print(WaterMeter waterMeterResult)
{
return Print(waterMeterResult, TestID);
}
public string Print(WaterMeter waterMeterResult, string testId)
{
string str = printDlgt(waterMeterResult, testId, Units, Format, Precision);
string str = printDlgt(waterMeterResult, TestID, Units, Format, Precision);
if (str == null) str = string.Empty;
if (!string.IsNullOrEmpty(Format))
@@ -87,28 +81,12 @@ namespace Results
///
/// Public constructor
///
public WMeterRsltItemSpec(ItemID itemId, string name, string toolTipText, Quantity quantity, ItemCategory category, PrintDlgt printDlgt)
public WMeterRsltItemSpec(ItemID itemId, string name, Quantity quantity, PrintDlgt printDlgt)
{
Uid = (int)itemId;
OldUid = itemId.ToString().Replace("__", "/").Replace('_', ' ');
Name = name;
ToolTipText = toolTipText;
Quantity = quantity;
Category = category;
this.printDlgt = printDlgt;
}
///
/// Constructorwithot ToolTip text
///
public WMeterRsltItemSpec(ItemID itemId, string name, Quantity quantity, ItemCategory category, PrintDlgt printDlgt)
{
Uid = (int)itemId;
OldUid = itemId.ToString().Replace("__", "/").Replace('_', ' ');
Name = name;
ToolTipText = string.Format("{0} bla, bla, bla", Name);
Quantity = quantity;
Category = category;
this.printDlgt = printDlgt;
}
@@ -121,155 +99,153 @@ namespace Results
{
AllItems = new List<WMeterRsltItemSpec>();
AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => f));
AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", Quantity.String, (w, t, u, f, p) => f));
/// Common
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test, Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.ProcedureName()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.BatchNr().ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + " *", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " *", Quantity.Density, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// [kg/m3]
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + " *", Quantity.String, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, (w, t, u, f, p) => w.ProcedureName()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, (w, t, u, f, p) => w.BatchNr().ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + " *", Quantity.String, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " *", Quantity.Density, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// [kg/m3]
/// Target values
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, Strings.Q_from + "()", Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, Strings.Q_to + "()", Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, Strings.Q_from + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, Strings.Q_to + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
/// Test results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_start_time, Strings.T_start + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, Strings.Flow + "()", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, Strings.T_in + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, Strings.T_out + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, Strings.P_up_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, Strings.P_up_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, Strings.P_dn_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, Strings.P_dn_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, Strings.P_delta + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, Strings.P_delta_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, Strings.P_delta_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_start_time, Strings.T_start + "()", Quantity.DateTime, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, Strings.Flow + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, Strings.T_in + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, Strings.T_out + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, Strings.P_up_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, Strings.P_up_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, Strings.P_dn_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, Strings.P_dn_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, Strings.P_delta + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, Strings.P_delta_start + "()",Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, Strings.P_delta_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
/// Single and combined meter results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, Strings.Volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, Strings.VolRef + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
#if TURA_IPERL || TURA_SPECIAL
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, Strings.Volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, Strings.VolRef + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
#if IPERLST || IPERLST_SPECIAL
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
#else
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
#endif
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result + "()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result + "()", Quantity.Boolean, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr()));
/// Water meter info
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ProductName));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Producer));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.ProductName));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Producer));
AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString()
AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString()
: Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Certificate));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Certificate));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString()
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString()
: w.WaterMeterData.PulsesPerLtr.ToString(p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text1));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text2));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text3));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text4));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text5));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text1));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text2));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text3));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text4));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text5));
/// Water meters results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNr));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.PurchaseOrder));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.YearOfProduction.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.WMPosition.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Quantity.String, (w, t, u, f, p) => w.SerialNr));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, (w, t, u, f, p) => w.PurchaseOrder));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, (w, t, u, f, p) => w.YearOfProduction.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, (w, t, u, f, p) => w.WMPosition.ToString()));
/// Water meters results (single)
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndState));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString()
: w.GetMeterTestRslt(t).PulsesPerLiter.ToString(p))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, (w, t, u, f, p) => w.EndState));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString()
: w.GetMeterTestRslt(t).PulsesPerLiter.ToString(p))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString()));
/// Water meters results (combined)
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_rise, Strings.Q_rise, Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (w.QRise == 0) ? "-" : Utils.DoubleToStr(w.QRise, 4)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, Strings.Q_fall, Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (w.QFall == 0) ? "-" : Utils.DoubleToStr(w.QFall, 4)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_main, Strings.Err_main + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error.ToString()
: w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error.ToString(p))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_aux, Strings.Err_aux + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error.ToString()
: w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error.ToString(p))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_main, Strings.sn_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNr));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_aux, Strings.sn_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNrAux));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_main, Strings.EndState_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndState));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_aux, Strings.EndState_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndStateAux));
//AllItems.Add(new ItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => (z.QRise() == 0) ? "-" : Utils.DoubleToStr(z.QRise(), 4)));
//AllItems.Add(new ItemSpec("Q fall", "Q fall [m3/h]", null, (x, y, z) => (z.QFall() == 0) ? "-" : Utils.DoubleToStr(z.QFall(), 4)));
//AllItems.Add(new ItemSpec("Error large WM", "Error-L [%]", null, (x, y, z) => x.Error.ToString("F2")));
//AllItems.Add(new ItemSpec("Error small WM", "Error-S [%]", null, (x, y, z) => y.Error.ToString("F2")));
//AllItems.Add(new ItemSpec("Serial Nr large WM", "s/n", null, (x, y, z) => x.SerialNr()));
//AllItems.Add(new ItemSpec("Serial Nr small WM", "s/n", null, (x, y, z) => y.SerialNr()));
//AllItems.Add(new ItemSpec("End state large WM", "End state", null, (x, y, z) => x.EndState()));
//AllItems.Add(new ItemSpec("End state small WM", "End state", null, (x, y, z) => y.EndState()));
/// Batch info
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.TestBenchId.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProgramVersion));
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserName));
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserNumber.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.WatermetersStr));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProtocolTitle));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, (w, t, u, f, p) => w.Batch.TestBenchId.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, (w, t, u, f, p) => w.Batch.ProgramVersion));
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, (w, t, u, f, p) => w.Batch.UserName));
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, (w, t, u, f, p) => w.Batch.UserNumber.ToString()));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, (w, t, u, f, p) => w.Batch.WatermetersStr));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, (w, t, u, f, p) => w.Batch.ProtocolTitle));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
: ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p)));
/// Extra water meter data
AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.ResultCode.ToString() : string.Format(f, w.ResultCode)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => w.Batch.Remark));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.ResultCode.ToString() : string.Format(f, w.ResultCode)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, (w, t, u, f, p) => w.Batch.Remark));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, Strings.Volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, Strings.Volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, Strings.Volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, Strings.Volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
#if HEAT_METERS
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiMean, "T hi me", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom1).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiStart, "T hi st", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiEnd, "T hi en", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom3).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiAve, "T hi av", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoMean, "T lo me", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom6).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoStart, "T lo st", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom7).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoEnd, "T lo en", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom8).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoAve, "T lo av", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
#if HEAT_METERS_SUPPORT
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiMean, "T hi me", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom1).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiStart, "T hi st", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiEnd, "T hi en", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom3).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiAve, "T hi av", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoMean, "T lo me", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom6).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoStart, "T lo st", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom7).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoEnd, "T lo en", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom8).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoAve, "T lo av", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
#endif
}
}
/// <summary>
/// Converts a list of 'Output item specifications' to a string array
@@ -290,7 +266,7 @@ namespace Results
items[i].Format,
items[i].Precision,
items[i].Width,
items[i].Alignment);
items[i].Alignment.ToDescription());
}
return result;
}
@@ -303,77 +279,33 @@ namespace Results
public static IList<WMeterRsltItemSpec> FromStrArray(string[] strArray)
{
IList<WMeterRsltItemSpec> result = new List<WMeterRsltItemSpec>();
if (strArray != null)
{
for (int i = 0; i < strArray.Length; i++)
{
try
{
if (strArray[i].Contains("~"))
{
///
/// Load the new style results item specification
///
string[] field = strArray[i].Split(new char[] { '~' });
WMeterRsltItemSpec item = GetItem(int.Parse(field[0]));
string[] field = strArray[i].Split(new char[] { '~' });
try
{
WMeterRsltItemSpec item = GetItem(int.Parse(field[0]));
item.Caption = field[1];
item.TestID = field[2];
item.Units = 0;
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
{
if (u.ToString().Equals(field[3])) { item.Units = u; break; }
}
item.Format = field[4];
item.Precision = field[5];
item.Width = int.Parse(field[6]);
item.Alignment = 0;
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++)
{
if (a.ToString().Equals(field[7])) { item.Alignment = a; break; }
}
item.Caption = field[1];
item.TestID = field[2];
item.Units = 0;
for (Config.Unit u = 0; u < Config.Unit.Count; u++) if (u.ToString().Equals(field[3])) { item.Units = u; break; }
item.Format = field[4];
item.Precision = field[5];
item.Width = int.Parse(field[6]);
item.Alignment = 0;
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) if (a.ToDescription().Equals(field[7])) { item.Alignment = a; break; }
result.Add(item);
}
else
{
///
/// Try to load the old style results item specification
///
bool added = false;
foreach (var it in AllItems)
{
if (strArray[i].Equals(it.OldUid))
{
WMeterRsltItemSpec item = it.Clone();
item.Caption = item.Name.Replace("()", "").Replace(" *", "");
item.Units = 0; /// use default units
item.Format = null; /// the same like format string "{0}"
item.Precision = null;
item.Width = 0; /// do not ad any extra spaces
item.Alignment = Alignment.Left;
result.Add(item);
added = true;
break;
}
}
if (!added)
{
WMeterRsltItemSpec item = GetItem(0);
item.Caption = "Prs.Err.";
item.Format = string.Format("Parse error: {0}", strArray[i]);
result.Add(item);
}
}
}
catch
{
WMeterRsltItemSpec item = GetItem(0);
item.Caption = "Prs.Err.";
item.Format = string.Format("Parse error: {0}", strArray[i]);
result.Add(item);
}
result.Add(item);
}
catch
{
WMeterRsltItemSpec item = GetItem(0);
item.Format = string.Format("Parse error: {0}", strArray[i]);
result.Add(item);
}
}
}
return result;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace ResultsBrowser.Forms
/// <summary>
/// Required access rights to make changes with this form
/// </summary>
const Users.Grp.GID RequiredGroupMembership = Users.Grp.GID.Metrologists;
const Config.Grp.GID RequiredGroupMembership = Config.Grp.GID.Metrologists;
public Config.Entities.TestsArrangement TestsArrangement;
public Config.Entities.MetersArrangement MetersArrangement;
public int NrMetersInOneGroup;
+12 -24
View File
@@ -46,31 +46,19 @@ namespace ResultsBrowser.Forms
columnsComboBox3.Items.Add(item.Caption);
}
///
rowsComboBox.Text = (!string.IsNullOrEmpty(Program.LocalSettings.RowItemCaption) && rowsComboBox.Items.Contains(Program.LocalSettings.RowItemCaption))
? Program.LocalSettings.RowItemCaption
: string.Empty;
rowsComboBox2.Text = (!string.IsNullOrEmpty(Program.LocalSettings.RowItemCaption2) && rowsComboBox2.Items.Contains(Program.LocalSettings.RowItemCaption2))
? Program.LocalSettings.RowItemCaption2
: string.Empty;
rowsComboBox3.Text = (!string.IsNullOrEmpty(Program.LocalSettings.RowItemCaption3) && rowsComboBox3.Items.Contains(Program.LocalSettings.RowItemCaption3))
? Program.LocalSettings.RowItemCaption3
: string.Empty;
columnsComboBox.Text = (!string.IsNullOrEmpty(Program.LocalSettings.ColumnItemCaption) && columnsComboBox.Items.Contains(Program.LocalSettings.ColumnItemCaption))
? Program.LocalSettings.ColumnItemCaption
: string.Empty;
columnsComboBox2.Text = (!string.IsNullOrEmpty(Program.LocalSettings.ColumnItemCaption2) && columnsComboBox2.Items.Contains(Program.LocalSettings.ColumnItemCaption2))
? Program.LocalSettings.ColumnItemCaption2
: string.Empty;
columnsComboBox3.Text = (!string.IsNullOrEmpty(Program.LocalSettings.ColumnItemCaption3) && columnsComboBox3.Items.Contains(Program.LocalSettings.ColumnItemCaption3))
? Program.LocalSettings.ColumnItemCaption3
: string.Empty;
rowsComboBox.Text = rowsComboBox.Items.Contains(Program.LocalSettings.RowItemCaption) ? Program.LocalSettings.RowItemCaption : string.Empty;
rowsComboBox2.Text = rowsComboBox2.Items.Contains(Program.LocalSettings.RowItemCaption2) ? Program.LocalSettings.RowItemCaption2 : string.Empty;
rowsComboBox3.Text = rowsComboBox3.Items.Contains(Program.LocalSettings.RowItemCaption3) ? Program.LocalSettings.RowItemCaption3 : string.Empty;
columnsComboBox.Text = columnsComboBox.Items.Contains(Program.LocalSettings.ColumnItemCaption) ? Program.LocalSettings.ColumnItemCaption : string.Empty;
columnsComboBox2.Text = columnsComboBox2.Items.Contains(Program.LocalSettings.ColumnItemCaption2) ? Program.LocalSettings.ColumnItemCaption2 : string.Empty;
columnsComboBox3.Text = columnsComboBox3.Items.Contains(Program.LocalSettings.ColumnItemCaption3) ? Program.LocalSettings.ColumnItemCaption3 : string.Empty;
rowTestSpecTextBox.Text = RowTestSpecifier = string.IsNullOrEmpty(Program.LocalSettings.RowTestSpecifier) ? string.Empty : Program.LocalSettings.RowTestSpecifier;
rowTestSpecTextBox2.Text = RowTestSpecifier2 = string.IsNullOrEmpty(Program.LocalSettings.RowTestSpecifier2) ? string.Empty : Program.LocalSettings.RowTestSpecifier2;
rowTestSpecTextBox3.Text = RowTestSpecifier3 = string.IsNullOrEmpty(Program.LocalSettings.RowTestSpecifier3) ? string.Empty : Program.LocalSettings.RowTestSpecifier3;
columnTestSpecTextBox.Text = ColumnTestSpecifier = string.IsNullOrEmpty(Program.LocalSettings.ColumnTestSpecifier) ? string.Empty : Program.LocalSettings.ColumnTestSpecifier;
columnTestSpecTextBox2.Text = ColumnTestSpecifier2 = string.IsNullOrEmpty(Program.LocalSettings.ColumnTestSpecifier2) ? string.Empty : Program.LocalSettings.ColumnTestSpecifier2;
columnTestSpecTextBox3.Text = ColumnTestSpecifier3 = string.IsNullOrEmpty(Program.LocalSettings.ColumnTestSpecifier3) ? string.Empty : Program.LocalSettings.ColumnTestSpecifier3;
rowTestSpecTextBox.Text = RowTestSpecifier = Program.LocalSettings.RowTestSpecifier;
rowTestSpecTextBox2.Text = RowTestSpecifier2 = Program.LocalSettings.RowTestSpecifier2;
rowTestSpecTextBox3.Text = RowTestSpecifier3 = Program.LocalSettings.RowTestSpecifier3;
columnTestSpecTextBox.Text = ColumnTestSpecifier = Program.LocalSettings.ColumnTestSpecifier;
columnTestSpecTextBox2.Text = ColumnTestSpecifier2 = Program.LocalSettings.ColumnTestSpecifier2;
columnTestSpecTextBox3.Text = ColumnTestSpecifier3 = Program.LocalSettings.ColumnTestSpecifier3;
}
void Localize()
+3 -3
View File
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Sensus")]
[assembly: AssemblyProduct("ResultsBrowser")]
[assembly: AssemblyCopyright("Copyright © 2015 - 2017 Sensus Slovensko a.s.")]
[assembly: AssemblyCopyright("Copyright © 2015 - 2016 Sensus Slovensko a.s.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.12.514.0")]
[assembly: AssemblyFileVersion("2.12.514.0")]
[assembly: AssemblyVersion("2.12.437.0")]
[assembly: AssemblyFileVersion("2.12.437.0")]
-813
View File
@@ -1,813 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Confirmation" xml:space="preserve">
<value>Potwierdzenie</value>
</data>
<data name="Do_you_want_to_save_the_procedure" xml:space="preserve">
<value>Zachować procedurę ?</value>
</data>
<data name="Error" xml:space="preserve">
<value>Błąd</value>
</data>
<data name="Error_loading_users_from_the_database" xml:space="preserve">
<value>Błąd przy ładowaniu użytkowników z bazy danych:</value>
</data>
<data name="Failed_to_create_a_sample_database" xml:space="preserve">
<value>Nie udało się utworzyć bazy danych:</value>
</data>
<data name="Failed_to_export_the_database" xml:space="preserve">
<value>Nie powódł się eksport bazy danych:</value>
</data>
<data name="Invalid_user_password_or_bench" xml:space="preserve">
<value>Niezgodny użytkownik, hasło lub stanowisko</value>
</data>
<data name="Test_bench" xml:space="preserve">
<value>Stanowisko pomiarowe</value>
</data>
<data name="MaxChars" xml:space="preserve">
<value>Max._X_znaków alfanumerycznych </value>
</data>
<data name="close" xml:space="preserve">
<value>Zamknąć</value>
</data>
<data name="Diverter" xml:space="preserve">
<value>Zawór</value>
</data>
<data name="Emptying_valve" xml:space="preserve">
<value>Zawór spustowy</value>
</data>
<data name="Name" xml:space="preserve">
<value>Imię</value>
</data>
<data name="Reference" xml:space="preserve">
<value>Odniesienie</value>
</data>
<data name="Reg_valve" xml:space="preserve">
<value>Zawór regulacyjny</value>
</data>
<data name="Balance" xml:space="preserve">
<value>Waga</value>
</data>
<data name="Duration_s" xml:space="preserve">
<value>Czas trwania [s]</value>
</data>
<data name="no" xml:space="preserve">
<value>nie</value>
</data>
<data name="New_bench_path_name" xml:space="preserve">
<value>P stanowisko</value>
</data>
<data name="New_feeding_path_name" xml:space="preserve">
<value>P zasilania</value>
</data>
<data name="New_output_path_name" xml:space="preserve">
<value>PQ</value>
</data>
<data name="New_procedure_name" xml:space="preserve">
<value>Procedura</value>
</data>
<data name="New_sensors_path_name" xml:space="preserve">
<value>P czujnków</value>
</data>
<data name="New_test_name" xml:space="preserve">
<value>Test</value>
</data>
<data name="New_name_copy" xml:space="preserve">
<value>-Kopiuj'</value>
</data>
<data name="Correction_g" xml:space="preserve">
<value>Korekcja [r]</value>
</data>
<data name="Nr" xml:space="preserve">
<value>Nr</value>
</data>
<data name="Mass_kg" xml:space="preserve">
<value>Masa [kg]</value>
</data>
<data name="AddBtnText" xml:space="preserve">
<value>Dodać</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Anuluj</value>
</data>
<data name="CloseBtnText" xml:space="preserve">
<value>Zamknąć</value>
</data>
<data name="LockBtnText" xml:space="preserve">
<value>Zablokować </value>
</data>
<data name="RemoveBtnText" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="OkBtnText" xml:space="preserve">
<value>OK</value>
</data>
<data name="Correction_lph" xml:space="preserve">
<value>Korekcja [l/h]</value>
</data>
<data name="Correction_mbar" xml:space="preserve">
<value>Korekcja [mBar]</value>
</data>
<data name="Flow_m3h" xml:space="preserve">
<value>Przepływ [m3/h]</value>
</data>
<data name="Invalid_username_or_password" xml:space="preserve">
<value>Nieprawidłowa nazwa użytkownika lub hasło</value>
</data>
<data name="CopyBtnText" xml:space="preserve">
<value>Kupiuj</value>
</data>
<data name="DownBtnText" xml:space="preserve">
<value>Na dół </value>
</data>
<data name="EditBtnText" xml:space="preserve">
<value>Redagować</value>
</data>
<data name="UpBtnText" xml:space="preserve">
<value>Do góry</value>
</data>
<data name="NoDatabaseMsg" xml:space="preserve">
<value>Nie udane połaczenie z bazą danych</value>
</data>
<data name="ConfigureDatabaseText" xml:space="preserve">
<value>Konfiguracja testowa (wymagane hasło)</value>
</data>
<data name="ExitBtnText" xml:space="preserve">
<value>Wyjście</value>
</data>
<data name="Enter_password" xml:space="preserve">
<value>Wprowadź hasło</value>
</data>
<data name="Invalid_password" xml:space="preserve">
<value>Nieprawidłowe hasło</value>
</data>
<data name="Bench_name_conflict_Use_another_name_pls" xml:space="preserve">
<value>Nazwa stanowiska nieprawidłowa, użyj innej nazwy</value>
</data>
<data name="DB_was_successfully_created" xml:space="preserve">
<value>Utworzono bazę danych !</value>
</data>
<data name="DB_will_be_overwritten" xml:space="preserve">
<value>Baza danych zostanie nadpisana</value>
</data>
<data name="Do_you_want_to_proceed" xml:space="preserve">
<value>Chcesz kontynuować ?</value>
</data>
<data name="Notification" xml:space="preserve">
<value>Powiadomienie</value>
</data>
<data name="NoBenchMsg" xml:space="preserve">
<value>W konfiguracji oprogramowania nie ma stanowiska </value>
</data>
<data name="DescriptionColHdr" xml:space="preserve">
<value>Opis</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Procedura</value>
</data>
<data name="Test" xml:space="preserve">
<value>Test</value>
</data>
<data name="Corrected" xml:space="preserve">
<value>Poprawiono</value>
</data>
<data name="Measured" xml:space="preserve">
<value>Zmierzono</value>
</data>
<data name="Bench_is_not_running" xml:space="preserve">
<value>Stanowisko nie jest włączone ale można dokonać korekty nastaw dla usunięcia tego błedu.</value>
</data>
<data name="Emptying_chdr" xml:space="preserve">
<value>Spust</value>
</data>
<data name="Bench_chdr" xml:space="preserve">
<value>Stanowisko</value>
</data>
<data name="Err_cor_neg_pct_chdr" xml:space="preserve">
<value>Błąd kor. - [%]</value>
</data>
<data name="Err_cor_pos_pct_chdr" xml:space="preserve">
<value>Błąd kor. +[%]</value>
</data>
<data name="Err_limit_neg_pct_chdr" xml:space="preserve">
<value>Błąd limit - [%]</value>
</data>
<data name="Err_limit_pos_pct_chdr" xml:space="preserve">
<value>Błąd limit + [%]</value>
</data>
<data name="Feeding_chdr" xml:space="preserve">
<value>Zasilanie</value>
</data>
<data name="Red_type_chdr" xml:space="preserve">
<value>Red. Type</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Błąd przy tworzeniu bazy danych. Przyczyna:</value>
</data>
<data name="Metrology" xml:space="preserve">
<value>Metrologia</value>
</data>
<data name="_offline" xml:space="preserve">
<value>Ofline</value>
</data>
<data name="Administrator" xml:space="preserve">
<value>Administrator</value>
</data>
<data name="Calibration_Specialist" xml:space="preserve">
<value>Specjalista ds. kalibracji</value>
</data>
<data name="Head_of_Lab" xml:space="preserve">
<value>Kierownik laboratorium</value>
</data>
<data name="Maintenance_Specialist" xml:space="preserve">
<value>Konserwator</value>
</data>
<data name="Metrologist" xml:space="preserve">
<value>Metrolog</value>
</data>
<data name="Close_emptying_valve" xml:space="preserve">
<value>Zamknąć zawór spustowy</value>
</data>
<data name="Get_mass_of_water_in_the_tank" xml:space="preserve">
<value>Uzyskaj masę wody w zbiorniku</value>
</data>
<data name="Ignore" xml:space="preserve">
<value>Wyłączyć</value>
</data>
<data name="Loading_the_procedure" xml:space="preserve">
<value>Procedura ładowania</value>
</data>
<data name="Make_tank_empty" xml:space="preserve">
<value>Opróżnić zbiornik</value>
</data>
<data name="Measure_the_mass" xml:space="preserve">
<value>Pomiar masy</value>
</data>
<data name="Ready" xml:space="preserve">
<value>Gotowe</value>
</data>
<data name="BackBtnText" xml:space="preserve">
<value>&lt; z powrotem</value>
</data>
<data name="FinishBtnText" xml:space="preserve">
<value>Koniec</value>
</data>
<data name="NextBtnText" xml:space="preserve">
<value>Następny &gt;</value>
</data>
<data name="Flow_selection" xml:space="preserve">
<value>Wybór przypływu</value>
</data>
<data name="Method_chdr" xml:space="preserve">
<value>Metoda badania</value>
</data>
<data name="RelativeQfrom" xml:space="preserve">
<value>Q względne od</value>
</data>
<data name="RelativeQto" xml:space="preserve">
<value>Q względne do</value>
</data>
<data name="Combined_meters" xml:space="preserve">
<value>Wodomierze sprzężone</value>
</data>
<data name="DetectionThresholdPct" xml:space="preserve">
<value>Próg detekcji [%]</value>
</data>
<data name="RateOfChangePct" xml:space="preserve">
<value>Prędkość zmiany [%]</value>
</data>
<data name="Component" xml:space="preserve">
<value>Element</value>
</data>
<data name="_none_" xml:space="preserve">
<value>&lt;nie&gt;</value>
</data>
<data name="Method_selection" xml:space="preserve">
<value>Wybór metody badania</value>
</data>
<data name="Clear_results" xml:space="preserve">
<value>Usunąć wyniki</value>
</data>
<data name="Configure" xml:space="preserve">
<value>Konfigurować</value>
</data>
<data name="Arrangement_of_meters" xml:space="preserve">
<value>Połozenie badanych liczników</value>
</data>
<data name="Arrangement_of_tests" xml:space="preserve">
<value>Położenie badań</value>
</data>
<data name="Horizontally" xml:space="preserve">
<value>Poziomo</value>
</data>
<data name="Configuration" xml:space="preserve">
<value>Konfiguracja</value>
</data>
<data name="Failed" xml:space="preserve">
<value>NOK</value>
</data>
<data name="ClearBtnText" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="Emptying_tank" xml:space="preserve">
<value>Opróżnianie zbiornika</value>
</data>
<data name="Measuring_the_weight" xml:space="preserve">
<value>Pomair wagi</value>
</data>
<data name="Emptying_i_n" xml:space="preserve">
<value>Spust ({0}: krok {1} / {2}</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Aktywny</value>
</data>
<data name="Approval_info" xml:space="preserve">
<value>Informacja o zatwierdzeniu</value>
</data>
<data name="Metrological_class" xml:space="preserve">
<value>Klasa metrologiczna</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Producent</value>
</data>
<data name="Printer" xml:space="preserve">
<value>Drukarka</value>
</data>
<data name="Version" xml:space="preserve">
<value>Wersja</value>
</data>
<data name="nothing_to_configure" xml:space="preserve">
<value>&lt;nie konfigurować&gt;</value>
</data>
<data name="Fill_with_water" xml:space="preserve">
<value>Napełnić stanowisko wodą ?</value>
</data>
<data name="NoBtn" xml:space="preserve">
<value>Nie</value>
</data>
<data name="Question" xml:space="preserve">
<value>Pytanie</value>
</data>
<data name="Bench_parameters" xml:space="preserve">
<value>Parametry stanowiska</value>
</data>
<data name="Connection_string" xml:space="preserve">
<value>Parametry połączenia</value>
</data>
<data name="Create_DB" xml:space="preserve">
<value>Utwórz DB</value>
</data>
<data name="Database_type" xml:space="preserve">
<value>Typ bazy danych</value>
</data>
<data name="Logging" xml:space="preserve">
<value>Logowanie</value>
</data>
<data name="Mode" xml:space="preserve">
<value>Cykl pracy</value>
</data>
<data name="NewTabBtnText" xml:space="preserve">
<value>Nowa Tab</value>
</data>
<data name="New_transition_name" xml:space="preserve">
<value>Nowa nazwa przejścia</value>
</data>
<data name="Detection_completed" xml:space="preserve">
<value>Wykrywanie zakończono</value>
</data>
<data name="Emergency_STOP" xml:space="preserve">
<value>Zatrzymanie awaryjne</value>
</data>
<data name="Add" xml:space="preserve">
<value>&amp;Dodać &gt;</value>
</data>
<data name="Available_results" xml:space="preserve">
<value>Dostępne wyniki:</value>
</data>
<data name="Remove" xml:space="preserve">
<value>&lt;&amp;Usunąć</value>
</data>
<data name="Remove_all" xml:space="preserve">
<value>&lt;&lt;Usunąć wszystko</value>
</data>
<data name="Message" xml:space="preserve">
<value>Wiadomość</value>
</data>
<data name="dflt" xml:space="preserve">
<value>dflt</value>
</data>
<data name="Detection_failed" xml:space="preserve">
<value>Nie udana próba wykrywania</value>
</data>
<data name="Camera_error" xml:space="preserve">
<value>Błąd kamery</value>
</data>
<data name="remaining_time" xml:space="preserve">
<value>pozostały czas</value>
</data>
<data name="LessBtnText" xml:space="preserve">
<value>Mniej</value>
</data>
<data name="MoreBtnText" xml:space="preserve">
<value>Więcej</value>
</data>
<data name="Changes_will_be_lost_Do_you_want_to_proceed" xml:space="preserve">
<value>Zmiany zostaną stracone. Chcesz kontynuować ?</value>
</data>
<data name="Flowmeter" xml:space="preserve">
<value>Przepływomierz</value>
</data>
<data name="CombinedBtnText" xml:space="preserve">
<value>Sprzężony</value>
</data>
<data name="Device" xml:space="preserve">
<value>Urządzenie</value>
</data>
<data name="PrinterBtnText" xml:space="preserve">
<value>Drukarka</value>
</data>
<data name="Aux_Water_Meter" xml:space="preserve">
<value>Wodomierz dodatkowy</value>
</data>
<data name="Aux_Water_Meter_State" xml:space="preserve">
<value>Stan dodatkowego wodomierza</value>
</data>
<data name="Data" xml:space="preserve">
<value>Dane</value>
</data>
<data name="End_State" xml:space="preserve">
<value>Stan końcowy</value>
</data>
<data name="Main_Water_Meter" xml:space="preserve">
<value>Główny wodomierz</value>
</data>
<data name="Main_Water_Meter_State" xml:space="preserve">
<value>Stan wodomierza głównego</value>
</data>
<data name="Protocol" xml:space="preserve">
<value>Zapiska</value>
</data>
<data name="Serial_Number" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="Aux_WM_SerialNr" xml:space="preserve">
<value>Nr seryjny dodatkowego wodomierza</value>
</data>
<data name="Main_WM_SerialNr" xml:space="preserve">
<value>Nr seryjny głównego wodomierza</value>
</data>
<data name="Adjustment_in_progress" xml:space="preserve">
<value>Regulacja trwa</value>
</data>
<data name="Error_pct" xml:space="preserve">
<value>Błąd [%]</value>
</data>
<data name="Duration_Leak_s" xml:space="preserve">
<value>Czas trwania przepływu [s]</value>
</data>
<data name="Duration_PMax_s" xml:space="preserve">
<value>Czas trwania Pmax [s]</value>
</data>
<data name="Closing_valve_Pump_off" xml:space="preserve">
<value>Zamnięcie zaworu zasilania, wyłączenie pompy</value>
</data>
<data name="Purchase_Order" xml:space="preserve">
<value>Zamówienie</value>
</data>
<data name="Ambient_humidity_" xml:space="preserve">
<value>Wilgotność względna otoczenia</value>
</data>
<data name="Ambient_pressure_" xml:space="preserve">
<value>Ciśnienie względne:</value>
</data>
<data name="Ambient_temperature_" xml:space="preserve">
<value>Temperatura otoczenia:</value>
</data>
<data name="Approval_" xml:space="preserve">
<value>Zatwierdzenie:</value>
</data>
<data name="Date_and_time_" xml:space="preserve">
<value>Data i czas:</value>
</data>
<data name="End" xml:space="preserve">
<value>Koniec</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>@temperatura [degC]</value>
</data>
<data name="Density_kg_m3" xml:space="preserve">
<value>Gęstość [kg/m3]</value>
</data>
<data name="Density" xml:space="preserve">
<value>Gęstość</value>
</data>
<data name="Nr_meters_in_a_group" xml:space="preserve">
<value>Nr liczników w grupie</value>
</data>
<data name="End_Condition" xml:space="preserve">
<value>Stan końcowy</value>
</data>
<data name="Communication" xml:space="preserve">
<value>Połączenie</value>
</data>
<data name="Aux_" xml:space="preserve">
<value>Dodadkowy</value>
</data>
<data name="Main_" xml:space="preserve">
<value>Główny</value>
</data>
<data name="cold" xml:space="preserve">
<value>zimna</value>
</data>
<data name="hot" xml:space="preserve">
<value>gorąca</value>
</data>
<data name="Product_name" xml:space="preserve">
<value>Nazwa produktu</value>
</data>
<data name="Address" xml:space="preserve">
<value>Adres</value>
</data>
<data name="Approval_date" xml:space="preserve">
<value>Data zatwierdzenia</value>
</data>
<data name="Approval_ID" xml:space="preserve">
<value>ID Zatwierdzenia</value>
</data>
<data name="Approved_by" xml:space="preserve">
<value>Zatwierdzono</value>
</data>
<data name="Evaluate" xml:space="preserve">
<value>Ocena</value>
</data>
<data name="iPerl_Communication_in_progress" xml:space="preserve">
<value>Połączenie z iPERL w trakcie</value>
</data>
<data name="Language" xml:space="preserve">
<value>Język</value>
</data>
<data name="Available_Components_" xml:space="preserve">
<value>Dostępne elementy:</value>
</data>
<data name="Database_Settings" xml:space="preserve">
<value>Ustawienia bazy danych:</value>
</data>
<data name="About_Test_Bench_Framework" xml:space="preserve">
<value>O Framework stanowiska</value>
</data>
<data name="BuildDateStr" xml:space="preserve">
<value>Build Data _BUILD_Data_</value>
</data>
<data name="CopyrightStr" xml:space="preserve">
<value>Praw autorskie © 2013 - {0}</value>
</data>
<data name="Edit_User" xml:space="preserve">
<value>Edytuj użytkownika</value>
</data>
<data name="Groups" xml:space="preserve">
<value>Grupy</value>
</data>
<data name="An_unhandled_error_occured" xml:space="preserve">
<value>Wystąpił nieobsługiwany błąd </value>
</data>
<data name="IgnoreBtnText" xml:space="preserve">
<value>Wyłączyć</value>
</data>
<data name="Add_filter" xml:space="preserve">
<value>Dodać filtr</value>
</data>
<data name="Clear_filters" xml:space="preserve">
<value>Oczyścić filtr</value>
</data>
<data name="Execute_query" xml:space="preserve">
<value>Wykonaj zapytanie</value>
</data>
<data name="Export_query_results" xml:space="preserve">
<value>Eksport wyników zapytania</value>
</data>
<data name="Filters" xml:space="preserve">
<value>Filtry</value>
</data>
<data name="Format_of_results" xml:space="preserve">
<value>Format wyników</value>
</data>
<data name="Load_filters" xml:space="preserve">
<value>Załaduj filtry</value>
</data>
<data name="Print_query_results" xml:space="preserve">
<value>Wydrukuj wyniki</value>
</data>
<data name="Query_results" xml:space="preserve">
<value>Wyniki zapytania</value>
</data>
<data name="Results_Browser" xml:space="preserve">
<value>Przegląd wyników</value>
</data>
<data name="Save_filters" xml:space="preserve">
<value>Zachować filtry</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Ustawienia</value>
</data>
<data name="Test_benches" xml:space="preserve">
<value>Stanowiska pomiarowe</value>
</data>
<data name="RetryDatabaseText" xml:space="preserve">
<value>Powtórka</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>Wybrane wyniki:</value>
</data>
<data name="SingleBtnText" xml:space="preserve">
<value>Pojedynczy</value>
</data>
<data name="UnlockBtnText" xml:space="preserve">
<value>Odblokować</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Licznik wody</value>
</data>
<data name="Date" xml:space="preserve">
<value>Data</value>
</data>
<data name="From" xml:space="preserve">
<value>Od</value>
</data>
<data name="To" xml:space="preserve">
<value>Do</value>
</data>
<data name="Statistics" xml:space="preserve">
<value>Statystyka</value>
</data>
<data name="Columns" xml:space="preserve">
<value>Kolumny</value>
</data>
<data name="Rows" xml:space="preserve">
<value>Wiersze</value>
</data>
<data name="Select_a_filter" xml:space="preserve">
<value>Proszę wybrać filtr</value>
</data>
<data name="Error_displaying_results" xml:space="preserve">
<value>Błąd przy wyśiwetlaniu wyników</value>
</data>
<data name="All_files" xml:space="preserve">
<value>Wszystkie pliki</value>
</data>
<data name="Error_saving_file" xml:space="preserve">
<value>Błąd zapisu pliku:</value>
</data>
<data name="Error_serializing_filters" xml:space="preserve">
<value>Błąd szeregowania plików</value>
</data>
<data name="Query_files" xml:space="preserve">
<value>Pliki zapytania</value>
</data>
<data name="No_program_settings_found" xml:space="preserve">
<value>Nie znaleziono ustawień programu</value>
</data>
<data name="Using_default_settings" xml:space="preserve">
<value>Ustawienia domyslne</value>
</data>
<data name="Selected_language_not_supported" xml:space="preserve">
<value>Wybrany język jest nieobsługiwany</value>
</data>
<data name="Using_English" xml:space="preserve">
<value>Wykorzystuje język angielski</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Ostrzeżenie</value>
</data>
<data name="Count" xml:space="preserve">
<value>Odliczanie</value>
</data>
<data name="Format" xml:space="preserve">
<value>Format</value>
</data>
<data name="Page_orientation" xml:space="preserve">
<value>Orientacja strony</value>
</data>
<data name="Yes_Portrait_No_Landscape" xml:space="preserve">
<value>Tak = pionowa, Nie = pozioma</value>
</data>
<data name="Print" xml:space="preserve">
<value>Drukuj</value>
</data>
</root>
-813
View File
@@ -1,813 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Confirmation" xml:space="preserve">
<value>Подтверждение</value>
</data>
<data name="Do_you_want_to_save_the_procedure" xml:space="preserve">
<value>Хотите сохранить процедуру?</value>
</data>
<data name="Error" xml:space="preserve">
<value>Ошибка</value>
</data>
<data name="Error_loading_users_from_the_database" xml:space="preserve">
<value>Ошибка при загрузке пользователей из базы данных:</value>
</data>
<data name="Failed_to_create_a_sample_database" xml:space="preserve">
<value>Не удалось создать базу данных:</value>
</data>
<data name="Failed_to_export_the_database" xml:space="preserve">
<value>Не удалось экспортировать базу данных:</value>
</data>
<data name="Invalid_user_password_or_bench" xml:space="preserve">
<value>Неверный пользователь, пароль, или установка</value>
</data>
<data name="Test_bench" xml:space="preserve">
<value>Поверочная установка</value>
</data>
<data name="MaxChars" xml:space="preserve">
<value>(Макс. _X_ Буквенно-цифровых символов)</value>
</data>
<data name="close" xml:space="preserve">
<value>закрыть</value>
</data>
<data name="Diverter" xml:space="preserve">
<value>Клапан</value>
</data>
<data name="Emptying_valve" xml:space="preserve">
<value>Выпускной клапан</value>
</data>
<data name="Name" xml:space="preserve">
<value>Имя</value>
</data>
<data name="Reference" xml:space="preserve">
<value>Ссылка</value>
</data>
<data name="Reg_valve" xml:space="preserve">
<value>Рег. вентиль</value>
</data>
<data name="Balance" xml:space="preserve">
<value>Весы</value>
</data>
<data name="Duration_s" xml:space="preserve">
<value>Продолжительность [с]</value>
</data>
<data name="no" xml:space="preserve">
<value>нет</value>
</data>
<data name="New_bench_path_name" xml:space="preserve">
<value>PУстановка</value>
</data>
<data name="New_feeding_path_name" xml:space="preserve">
<value>PFeed</value>
</data>
<data name="New_output_path_name" xml:space="preserve">
<value>PQ</value>
</data>
<data name="New_procedure_name" xml:space="preserve">
<value>Процедура</value>
</data>
<data name="New_sensors_path_name" xml:space="preserve">
<value>PSens</value>
</data>
<data name="New_test_name" xml:space="preserve">
<value>Тест</value>
</data>
<data name="New_name_copy" xml:space="preserve">
<value> - Копировать</value>
</data>
<data name="Correction_g" xml:space="preserve">
<value>Коррекция [г]</value>
</data>
<data name="Nr" xml:space="preserve">
<value>№</value>
</data>
<data name="Mass_kg" xml:space="preserve">
<value>Масса [кг]</value>
</data>
<data name="AddBtnText" xml:space="preserve">
<value>Добавить</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="CloseBtnText" xml:space="preserve">
<value>Закрыть</value>
</data>
<data name="LockBtnText" xml:space="preserve">
<value>Заблокировать</value>
</data>
<data name="RemoveBtnText" xml:space="preserve">
<value>Удалить</value>
</data>
<data name="OkBtnText" xml:space="preserve">
<value>OK</value>
</data>
<data name="Correction_lph" xml:space="preserve">
<value>Коррекция [л/ч]</value>
</data>
<data name="Correction_mbar" xml:space="preserve">
<value>Коррекция [мбар]</value>
</data>
<data name="Flow_m3h" xml:space="preserve">
<value>Расход [м3/ч]</value>
</data>
<data name="Invalid_username_or_password" xml:space="preserve">
<value>Неправильное имя пользователя или пароль</value>
</data>
<data name="CopyBtnText" xml:space="preserve">
<value>Копировать</value>
</data>
<data name="DownBtnText" xml:space="preserve">
<value>Вниз</value>
</data>
<data name="EditBtnText" xml:space="preserve">
<value>Редактировать</value>
</data>
<data name="UpBtnText" xml:space="preserve">
<value>Вверх</value>
</data>
<data name="NoDatabaseMsg" xml:space="preserve">
<value>Не удается подключиться к базе данных.</value>
</data>
<data name="ConfigureDatabaseText" xml:space="preserve">
<value>Тестовая конфигурация установки (требуется пароль)</value>
</data>
<data name="ExitBtnText" xml:space="preserve">
<value>Выход</value>
</data>
<data name="Enter_password" xml:space="preserve">
<value>Введите пароль</value>
</data>
<data name="Invalid_password" xml:space="preserve">
<value>Неверный пароль</value>
</data>
<data name="Bench_name_conflict_Use_another_name_pls" xml:space="preserve">
<value>Имя поверочной установки неверно, используйте другое имя, пожалуйста</value>
</data>
<data name="DB_was_successfully_created" xml:space="preserve">
<value>База данных была успешно создана!</value>
</data>
<data name="DB_will_be_overwritten" xml:space="preserve">
<value>База данных будет перезаписана</value>
</data>
<data name="Do_you_want_to_proceed" xml:space="preserve">
<value>Вы хотите продолжить?</value>
</data>
<data name="Notification" xml:space="preserve">
<value>Уведомление</value>
</data>
<data name="NoBenchMsg" xml:space="preserve">
<value>Нет поверочной установки в конфигурации программы.</value>
</data>
<data name="DescriptionColHdr" xml:space="preserve">
<value>Описание</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Процедура</value>
</data>
<data name="Test" xml:space="preserve">
<value>Тест</value>
</data>
<data name="Corrected" xml:space="preserve">
<value>Исправлено</value>
</data>
<data name="Measured" xml:space="preserve">
<value>Измерено</value>
</data>
<data name="Bench_is_not_running" xml:space="preserve">
<value>Поверочная установка не запущена, однако вы можете изменить настройки, чтобы решить эту проблему.</value>
</data>
<data name="Emptying_chdr" xml:space="preserve">
<value>Выпуск</value>
</data>
<data name="Bench_chdr" xml:space="preserve">
<value>Установка</value>
</data>
<data name="Err_cor_neg_pct_chdr" xml:space="preserve">
<value>Err. cor. - [%]</value>
</data>
<data name="Err_cor_pos_pct_chdr" xml:space="preserve">
<value>Err. cor. +[%]</value>
</data>
<data name="Err_limit_neg_pct_chdr" xml:space="preserve">
<value>Err. Limit - [%]</value>
</data>
<data name="Err_limit_pos_pct_chdr" xml:space="preserve">
<value>Err. Limit + [%]</value>
</data>
<data name="Feeding_chdr" xml:space="preserve">
<value>Feeding</value>
</data>
<data name="Red_type_chdr" xml:space="preserve">
<value>Red. type</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Ошибка при создании базы данных. Причина:</value>
</data>
<data name="Metrology" xml:space="preserve">
<value>Метрология</value>
</data>
<data name="_offline" xml:space="preserve">
<value>(не в сети)</value>
</data>
<data name="Administrator" xml:space="preserve">
<value>Администратор</value>
</data>
<data name="Calibration_Specialist" xml:space="preserve">
<value>Специалист по калибровке</value>
</data>
<data name="Head_of_Lab" xml:space="preserve">
<value>Руководитель лаборатории</value>
</data>
<data name="Maintenance_Specialist" xml:space="preserve">
<value>Специалист по техобслуживанию</value>
</data>
<data name="Metrologist" xml:space="preserve">
<value>Метролог</value>
</data>
<data name="Close_emptying_valve" xml:space="preserve">
<value>Закрыть выпускной клапан</value>
</data>
<data name="Get_mass_of_water_in_the_tank" xml:space="preserve">
<value>Получить массу воды в резервуаре</value>
</data>
<data name="Ignore" xml:space="preserve">
<value>Отклонить</value>
</data>
<data name="Loading_the_procedure" xml:space="preserve">
<value>Процедура загрузки</value>
</data>
<data name="Make_tank_empty" xml:space="preserve">
<value>Оборожнить бак</value>
</data>
<data name="Measure_the_mass" xml:space="preserve">
<value>Измерьте массу</value>
</data>
<data name="Ready" xml:space="preserve">
<value>Готов</value>
</data>
<data name="BackBtnText" xml:space="preserve">
<value>&lt; Назад</value>
</data>
<data name="FinishBtnText" xml:space="preserve">
<value>Завершить</value>
</data>
<data name="NextBtnText" xml:space="preserve">
<value>Дальше &gt;</value>
</data>
<data name="Flow_selection" xml:space="preserve">
<value>Выбор расхода</value>
</data>
<data name="Method_chdr" xml:space="preserve">
<value>Метод испытания</value>
</data>
<data name="RelativeQfrom" xml:space="preserve">
<value>Относительный Q от</value>
</data>
<data name="RelativeQto" xml:space="preserve">
<value>Относительный Q до</value>
</data>
<data name="Combined_meters" xml:space="preserve">
<value>Комбинированные счетчики</value>
</data>
<data name="DetectionThresholdPct" xml:space="preserve">
<value>Порог [%]</value>
</data>
<data name="RateOfChangePct" xml:space="preserve">
<value>Скорость изменения [%]</value>
</data>
<data name="Component" xml:space="preserve">
<value>Компонент</value>
</data>
<data name="_none_" xml:space="preserve">
<value>&lt;нет&gt;</value>
</data>
<data name="Method_selection" xml:space="preserve">
<value>Выбор метода испытаний</value>
</data>
<data name="Clear_results" xml:space="preserve">
<value>Очистить Результаты</value>
</data>
<data name="Configure" xml:space="preserve">
<value>Конфигурировать</value>
</data>
<data name="Arrangement_of_meters" xml:space="preserve">
<value>Расположение испытуемых счетчиков</value>
</data>
<data name="Arrangement_of_tests" xml:space="preserve">
<value>Расположение испытаний</value>
</data>
<data name="Horizontally" xml:space="preserve">
<value>Горизонтально</value>
</data>
<data name="Configuration" xml:space="preserve">
<value>Конфигурация</value>
</data>
<data name="Failed" xml:space="preserve">
<value>NOK</value>
</data>
<data name="ClearBtnText" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="Emptying_tank" xml:space="preserve">
<value>Опорожнение бака</value>
</data>
<data name="Measuring_the_weight" xml:space="preserve">
<value>Измерение веса</value>
</data>
<data name="Emptying_i_n" xml:space="preserve">
<value>Слив ({0}: шаг {1} / {2})</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Активность</value>
</data>
<data name="Approval_info" xml:space="preserve">
<value>Информация об утверждении</value>
</data>
<data name="Metrological_class" xml:space="preserve">
<value>Метрологический класс</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Производитель</value>
</data>
<data name="Printer" xml:space="preserve">
<value>Принтер</value>
</data>
<data name="Version" xml:space="preserve">
<value>Версия</value>
</data>
<data name="nothing_to_configure" xml:space="preserve">
<value>&lt;нечего настраивать&gt;</value>
</data>
<data name="Fill_with_water" xml:space="preserve">
<value>Заполнить установку водой?</value>
</data>
<data name="NoBtn" xml:space="preserve">
<value>Нет</value>
</data>
<data name="Question" xml:space="preserve">
<value>Вопрос</value>
</data>
<data name="Bench_parameters" xml:space="preserve">
<value>Установка параметров</value>
</data>
<data name="Connection_string" xml:space="preserve">
<value>Строка подключения БД</value>
</data>
<data name="Create_DB" xml:space="preserve">
<value>Создание БД</value>
</data>
<data name="Database_type" xml:space="preserve">
<value>Тип БД</value>
</data>
<data name="Logging" xml:space="preserve">
<value>Логирование</value>
</data>
<data name="Mode" xml:space="preserve">
<value>Режим</value>
</data>
<data name="NewTabBtnText" xml:space="preserve">
<value>Новая вкладка</value>
</data>
<data name="New_transition_name" xml:space="preserve">
<value>Новое имя перехода</value>
</data>
<data name="Detection_completed" xml:space="preserve">
<value>Обнаружение завершено</value>
</data>
<data name="Emergency_STOP" xml:space="preserve">
<value>Аварийная остановка</value>
</data>
<data name="Add" xml:space="preserve">
<value>&amp;Добавить &gt;</value>
</data>
<data name="Available_results" xml:space="preserve">
<value>Доступные результаты</value>
</data>
<data name="Remove" xml:space="preserve">
<value>&lt; &amp;Удалить</value>
</data>
<data name="Remove_all" xml:space="preserve">
<value>&lt;&lt; Удалить все</value>
</data>
<data name="Message" xml:space="preserve">
<value>Сообщение</value>
</data>
<data name="dflt" xml:space="preserve">
<value>dflt</value>
</data>
<data name="Detection_failed" xml:space="preserve">
<value>Обнаружение не удалось</value>
</data>
<data name="Camera_error" xml:space="preserve">
<value>Ошибка камеры</value>
</data>
<data name="remaining_time" xml:space="preserve">
<value>оставшееся время</value>
</data>
<data name="LessBtnText" xml:space="preserve">
<value>Меньше</value>
</data>
<data name="MoreBtnText" xml:space="preserve">
<value>Больше</value>
</data>
<data name="Changes_will_be_lost_Do_you_want_to_proceed" xml:space="preserve">
<value>Изменения будут потеряны. Вы хотите продолжить?</value>
</data>
<data name="Flowmeter" xml:space="preserve">
<value>Расходомер</value>
</data>
<data name="CombinedBtnText" xml:space="preserve">
<value>Комбинированный</value>
</data>
<data name="Device" xml:space="preserve">
<value>Устройство</value>
</data>
<data name="PrinterBtnText" xml:space="preserve">
<value>Принтер</value>
</data>
<data name="Aux_Water_Meter" xml:space="preserve">
<value>Доп.счетчик воды</value>
</data>
<data name="Aux_Water_Meter_State" xml:space="preserve">
<value>Статус доп.счетчика</value>
</data>
<data name="Data" xml:space="preserve">
<value>Данные</value>
</data>
<data name="End_State" xml:space="preserve">
<value>Конечное состояние</value>
</data>
<data name="Main_Water_Meter" xml:space="preserve">
<value>Главный счетчик воды</value>
</data>
<data name="Main_Water_Meter_State" xml:space="preserve">
<value>Статус главного счетчика</value>
</data>
<data name="Protocol" xml:space="preserve">
<value>Протокол</value>
</data>
<data name="Serial_Number" xml:space="preserve">
<value>Серийный номер</value>
</data>
<data name="Aux_WM_SerialNr" xml:space="preserve">
<value>Сер. № доп. счетчика</value>
</data>
<data name="Main_WM_SerialNr" xml:space="preserve">
<value>Сер. № главн. счетчика</value>
</data>
<data name="Adjustment_in_progress" xml:space="preserve">
<value>Настройка выполняется</value>
</data>
<data name="Error_pct" xml:space="preserve">
<value>Погрешность [%]</value>
</data>
<data name="Duration_Leak_s" xml:space="preserve">
<value>Продолжительность расхода [с]</value>
</data>
<data name="Duration_PMax_s" xml:space="preserve">
<value>Продолжительность Pмакс [с]</value>
</data>
<data name="Closing_valve_Pump_off" xml:space="preserve">
<value>Закрытие впускного клапана, выключение насоса</value>
</data>
<data name="Purchase_Order" xml:space="preserve">
<value>Заказ</value>
</data>
<data name="Ambient_humidity_" xml:space="preserve">
<value>Относительная влажность окружающей среды:</value>
</data>
<data name="Ambient_pressure_" xml:space="preserve">
<value>Относительное давление: </value>
</data>
<data name="Ambient_temperature_" xml:space="preserve">
<value>Температура окружающей среды: </value>
</data>
<data name="Approval_" xml:space="preserve">
<value>Утверждение: </value>
</data>
<data name="Date_and_time_" xml:space="preserve">
<value>Дата и время: </value>
</data>
<data name="End" xml:space="preserve">
<value>Конец</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>температура [degC]</value>
</data>
<data name="Density_kg_m3" xml:space="preserve">
<value>Плотность [кг/м3]</value>
</data>
<data name="Density" xml:space="preserve">
<value>Плотность</value>
</data>
<data name="Nr_meters_in_a_group" xml:space="preserve">
<value>№ счетчиков в группе</value>
</data>
<data name="End_Condition" xml:space="preserve">
<value>Конечное состояние</value>
</data>
<data name="Communication" xml:space="preserve">
<value>Соединение</value>
</data>
<data name="Aux_" xml:space="preserve">
<value>Доп.</value>
</data>
<data name="Main_" xml:space="preserve">
<value>Главн:</value>
</data>
<data name="cold" xml:space="preserve">
<value>холодный</value>
</data>
<data name="hot" xml:space="preserve">
<value>горячий</value>
</data>
<data name="Product_name" xml:space="preserve">
<value>Наименование продукта</value>
</data>
<data name="Address" xml:space="preserve">
<value>Адрес</value>
</data>
<data name="Approval_date" xml:space="preserve">
<value>Дата утверждения</value>
</data>
<data name="Approval_ID" xml:space="preserve">
<value>ID Утверждения </value>
</data>
<data name="Approved_by" xml:space="preserve">
<value>Утверждено</value>
</data>
<data name="Evaluate" xml:space="preserve">
<value>Оценка</value>
</data>
<data name="iPerl_Communication_in_progress" xml:space="preserve">
<value>Осуществляется связь с iPerl </value>
</data>
<data name="Language" xml:space="preserve">
<value>Язык</value>
</data>
<data name="Available_Components_" xml:space="preserve">
<value>Доступные компоненты:</value>
</data>
<data name="Database_Settings" xml:space="preserve">
<value>Настройки Базы данных</value>
</data>
<data name="About_Test_Bench_Framework" xml:space="preserve">
<value>О Framework поверочной установки</value>
</data>
<data name="BuildDateStr" xml:space="preserve">
<value>Build Data _BUILD_Data_</value>
</data>
<data name="CopyrightStr" xml:space="preserve">
<value>Copyright © 2013 - {0}</value>
</data>
<data name="Edit_User" xml:space="preserve">
<value>Редактировать пользователя</value>
</data>
<data name="Groups" xml:space="preserve">
<value>Группы</value>
</data>
<data name="An_unhandled_error_occured" xml:space="preserve">
<value>Произошла необрабатываемая ошибка</value>
</data>
<data name="IgnoreBtnText" xml:space="preserve">
<value>Отклонить</value>
</data>
<data name="Add_filter" xml:space="preserve">
<value>Добавить фильтр</value>
</data>
<data name="Clear_filters" xml:space="preserve">
<value>Очистить фильтры</value>
</data>
<data name="Execute_query" xml:space="preserve">
<value>Выполнить запрос</value>
</data>
<data name="Export_query_results" xml:space="preserve">
<value>Экспорт результатов запроса</value>
</data>
<data name="Filters" xml:space="preserve">
<value>Фильтры</value>
</data>
<data name="Format_of_results" xml:space="preserve">
<value>Формат результатов</value>
</data>
<data name="Load_filters" xml:space="preserve">
<value>Загрузка фильтров</value>
</data>
<data name="Print_query_results" xml:space="preserve">
<value>Печать результатов</value>
</data>
<data name="Query_results" xml:space="preserve">
<value>Результаты запроса</value>
</data>
<data name="Results_Browser" xml:space="preserve">
<value>Результаты обозревателя</value>
</data>
<data name="Save_filters" xml:space="preserve">
<value>Сохранить фильтры</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Установки</value>
</data>
<data name="Test_benches" xml:space="preserve">
<value>Поверочные установки</value>
</data>
<data name="RetryDatabaseText" xml:space="preserve">
<value>Повтор</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>Выбанные результаты</value>
</data>
<data name="SingleBtnText" xml:space="preserve">
<value>Единый</value>
</data>
<data name="UnlockBtnText" xml:space="preserve">
<value>Разблокировать</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Счетчик воды</value>
</data>
<data name="Date" xml:space="preserve">
<value>Дата</value>
</data>
<data name="From" xml:space="preserve">
<value>От</value>
</data>
<data name="To" xml:space="preserve">
<value>До</value>
</data>
<data name="Statistics" xml:space="preserve">
<value>Статистика</value>
</data>
<data name="Columns" xml:space="preserve">
<value>Столбцы</value>
</data>
<data name="Rows" xml:space="preserve">
<value>Строки</value>
</data>
<data name="Select_a_filter" xml:space="preserve">
<value>Выберите фильтр</value>
</data>
<data name="Error_displaying_results" xml:space="preserve">
<value>Ошибка отображения результатов</value>
</data>
<data name="All_files" xml:space="preserve">
<value>Все файлы</value>
</data>
<data name="Error_saving_file" xml:space="preserve">
<value>Ошибка сохранения файла</value>
</data>
<data name="Error_serializing_filters" xml:space="preserve">
<value>Ошибка фильтров сериализации</value>
</data>
<data name="Query_files" xml:space="preserve">
<value>Запрашиваемые файлы</value>
</data>
<data name="No_program_settings_found" xml:space="preserve">
<value>Не найдены настройки программы</value>
</data>
<data name="Using_default_settings" xml:space="preserve">
<value>Использовать настройки по умолчанию</value>
</data>
<data name="Selected_language_not_supported" xml:space="preserve">
<value>Выбранный язык не поддерживается.</value>
</data>
<data name="Using_English" xml:space="preserve">
<value>Использование Английского языка</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Предупреждение</value>
</data>
<data name="Count" xml:space="preserve">
<value>Подсчет</value>
</data>
<data name="Format" xml:space="preserve">
<value>Формат</value>
</data>
<data name="Page_orientation" xml:space="preserve">
<value>Ориентация страницы</value>
</data>
<data name="Yes_Portrait_No_Landscape" xml:space="preserve">
<value>Да = Книжная, No = Альбомная</value>
</data>
<data name="Print" xml:space="preserve">
<value>Печатать</value>
</data>
</root>
+2 -8
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -209,12 +209,10 @@
</Compile>
<EmbeddedResource Include="Resources\Strings.cs.resx" />
<EmbeddedResource Include="Resources\Strings.de.resx" />
<EmbeddedResource Include="Resources\Strings.pl.resx" />
<EmbeddedResource Include="Resources\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings1.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.ru.resx" />
<EmbeddedResource Include="ResultsBrowserWnd.resx">
<DependentUpon>ResultsBrowserWnd.cs</DependentUpon>
</EmbeddedResource>
@@ -238,10 +236,6 @@
<Project>{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}</Project>
<Name>Results</Name>
</ProjectReference>
<ProjectReference Include="..\Users\Users.csproj">
<Project>{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}</Project>
<Name>Users</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+1 -8
View File
@@ -75,13 +75,6 @@ namespace ResultsBrowser
checkBox3.Visible = !string.IsNullOrEmpty(checkBox3.Text);
}
string BenchName()
{
return checkBox1.Checked ? Program.LocalSettings.Bench1
: checkBox2.Checked ? Program.LocalSettings.Bench2
: Program.LocalSettings.Bench3;
}
void Localize()
{
filtersGroupBox.Text = Strings.Filters;
@@ -299,7 +292,7 @@ namespace ResultsBrowser
#if MUNICH
foreach (var wm in waterMeters)
{
new Results.Output.Printers.Munich.MunichPrintDocument(string.Format("4/13 - {0}", BenchName()), wm, Config.Entities.PageOrientation.Portrait).Print();
new Results.Output.Printers.Munich.MunichPrintDocument("", wm, Config.Entities.PageOrientation.Portrait).Print();
}
#elif CEVAK_PT40_272
IList<Results.Entities.Batch> batches = new List<Results.Entities.Batch>();
-19
View File
@@ -16,20 +16,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBr
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceTest", "DeviceTest\DeviceTest.csproj", "{6D3384DC-4638-4A92-91A8-F39D900377C6}"
ProjectSection(ProjectDependencies) = postProject
{439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36}
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dirichlet.Numerics", "Dirichlet.Numerics\Dirichlet.Numerics.csproj", "{439D0878-C76E-452B-B17D-209A89E91D36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Users", "Users\Users.csproj", "{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserManagement", "UserManagement\UserManagement.csproj", "{B2CD81B3-AF09-4978-996C-02EDB5F819B7}"
ProjectSection(ProjectDependencies) = postProject
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -116,16 +107,6 @@ Global
{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}.Release|x86.ActiveCfg = Release|Any CPU
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Debug|Any CPU.ActiveCfg = Debug|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Debug|Mixed Platforms.Build.0 = Debug|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Debug|x86.ActiveCfg = Debug|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Debug|x86.Build.0 = Debug|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|Any CPU.ActiveCfg = Release|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|Mixed Platforms.Build.0 = Release|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|x86.ActiveCfg = Release|x86
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -90,12 +90,6 @@ namespace TBF.BenchControl.Ambient.Comet
return;
}
if (serialPort == null)
{
log.ErrorFormat("{0} - RunDeviceBefore() - serial port closed", Name);
return;
}
try
{
int receivedBytes = serialPort.BytesToRead;
@@ -145,12 +139,6 @@ namespace TBF.BenchControl.Ambient.Comet
return;
}
if (serialPort == null)
{
log.ErrorFormat("{0} - RunDeviceAfter() - serial port closed", Name);
return;
}
try
{
/// Each 10 seconds
@@ -190,11 +178,7 @@ namespace TBF.BenchControl.Ambient.Comet
/// <summary>Stop this device</summary>
public void StopDevice()
{
if (serialPort != null)
{
serialPort.Close();
serialPort = null;
}
if (serialPort != null) serialPort.Close();
}
///
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -47,23 +47,6 @@ namespace TBF.BenchControl.DB.SensusOracle
StreamWriter logger; /// Logs specified by LU
///
/// Information extracted from VT_PRUEFPUNKT_SOLL_SD for a given watermeter by query:
/// SELECT * FROM VT_PRUEFPUNKT_SOLL_SD WHERE ANBID=4 AND ID_WZTyp=x AND Rev_WZTyp=y
///
class TestInfo
{
public int PruefungsNr;
public string QBezeichnung;
public TestInfo(int p, string q) { PruefungsNr = p; QBezeichnung = q; }
public override string ToString() { return string.Format("({0},{1})", PruefungsNr, QBezeichnung); }
}
///
static int id_WZTyp;
static int rev_WZTyp;
static IList<TestInfo> testInfos = new List<TestInfo>();
public Database() {}
public Database(Generic.IComponentCfg cfg)
@@ -86,39 +69,24 @@ namespace TBF.BenchControl.DB.SensusOracle
public void Initialize()
{
switch (DBCfg.DBUsed)
{
case DBUsed.Production:
connection = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
break;
case DBUsed.Quality:
connection = new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;"); /// TODO: Quality database specification
break;
case DBUsed.Test:
connection = new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;");
break;
default:
connection = null;
break;
}
connection = (DBCfg.DBUsed == DBUsed.Production)
? new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;")
: new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;");
if (DBCfg.DebugLevel == DebugMode.Simulate) return;
///
/// Do something with the database to see if the connection works well
///
if (connection != null)
{
connection.Open();
connection.Open();
string rslt = "none";
OracleCommand cmd = new OracleCommand("select Standort from ANBIETER_SD where ANBID = 4", connection);
OracleDataReader dr = cmd.ExecuteReader();
if (dr.Read()) rslt = dr.GetString(0);
dr.Close();
string rslt = "none";
OracleCommand cmd = new OracleCommand("select Standort from ANBIETER_SD where ANBID = 4", connection);
OracleDataReader dr = cmd.ExecuteReader();
if (dr.Read()) rslt = dr.GetString(0);
dr.Close();
connection.Close();
}
connection.Close();
}
public void RunDeviceBefore() {}
@@ -246,14 +214,14 @@ namespace TBF.BenchControl.DB.SensusOracle
if (batch.WaterMeters.Count == 0) return Event.ResultsWritten;
bool anyError = false;
#if ORACLE_DB
if (DBCfg.DebugLevel != DebugMode.Simulate && connection != null)
#if IPERLST || IPERLST_SPECIAL
if (DBCfg.DebugLevel != DebugMode.Simulate)
{
if (WriteResultsToDatabase(connection, batch, false) == Retv.Error) anyError = true;
}
#endif
WriteLogsToDisk(logger, batch);
WriteLogsToDisk(logger, batch);
if (anyError)
{
@@ -273,7 +241,7 @@ namespace TBF.BenchControl.DB.SensusOracle
public static Retv WriteLogsToDisk(StreamWriter logger, Results.Entities.Batch batch)
{
#if TURA_IPERL || TURA_SPECIAL
#if IPERLST || IPERLST_SPECIAL
if (logger == null) return Retv.Error;
Results.Entities.WaterMeter wm0 = null;
@@ -772,10 +740,10 @@ namespace TBF.BenchControl.DB.SensusOracle
}
#endif
return Retv.OK; /// OK
}
}
#if ORACLE_DB
#if IPERLST || IPERLST_SPECIAL
public static Retv WriteResultsToDatabase(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
{
OracleTransaction transaction = null;
@@ -919,40 +887,12 @@ namespace TBF.BenchControl.DB.SensusOracle
cmd.ExecuteNonQuery(); /// Returns nr. of updated rows
if ((id_WZTyp != b.WaterMeters[0].WaterMeterData.WMTypeId) || (rev_WZTyp != b.WaterMeters[0].WaterMeterData.WMTypeRev) || testInfos.Count == 0)
for (int q = 1; q <= 3; q++)
{
testInfos.Clear();
id_WZTyp = b.WaterMeters[0].WaterMeterData.WMTypeId;
rev_WZTyp = b.WaterMeters[0].WaterMeterData.WMTypeRev;
Results.Entities.TestRslt tr = b.GetTestRslt(string.Format("Q{0}", q), 0);
OracleCommand cmd1 = new OracleCommand("SELECT PruefungsNr, PosFehlerKalt, QBezeichnung FROM VT_PRUEFPUNKT_SOLL_SD WHERE ANBID=4 AND ID_WZTyp=:1 AND Rev_WZTyp=:2", conn);
parm = new OracleParameter("ID_WZTyp", OracleDbType.Int32); parm.Value = id_WZTyp; cmd1.Parameters.Add(parm); ///:1
parm = new OracleParameter("Rev_WZTyp", OracleDbType.Int32); parm.Value = rev_WZTyp; cmd1.Parameters.Add(parm); ///:2
OracleDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
int pruefungsNr = dr.GetInt32(0);
double errLimHi = dr.GetDouble(1);
string qBezeichnung = dr.GetString(2);
if (qBezeichnung == "Q2" && errLimHi > 2.0) qBezeichnung = "Q2adj";
if (qBezeichnung.ToLower().Contains("just") && pruefungsNr == -1) qBezeichnung = "Adjustment";
if (qBezeichnung.Contains("Q") || qBezeichnung == "Adjustment")
{
testInfos.Add(new TestInfo(pruefungsNr, qBezeichnung));
log.WarnFormat("VT_PRUEFPUNKT_SOLL_SD info : ID_WZTyp={0} Rev_WZTyp={1} PruefungsNr={2} PosFehlerKalt={3} QBezeichnung={4}",
id_WZTyp, rev_WZTyp, pruefungsNr, errLimHi, qBezeichnung);
}
}
dr.Close();
}
foreach (var testInfo in testInfos)
{
Results.Entities.TestRslt tr = b.GetTestRslt(testInfo.QBezeichnung, 0);
if (tr == null) tr = b.GetTestRslt(testInfo.QBezeichnung, 1); /// TODO: Remove this workaround for large watermeters with multiple parts at Q3
if (tr == null) tr = b.GetTestRslt(string.Format("Q{0}", q), 1); /// TODO: Remove this workaround for large large watermeters with multiple parts at Q3
if (tr == null) continue;
@@ -968,7 +908,7 @@ namespace TBF.BenchControl.DB.SensusOracle
parm = new OracleParameter("ANBID", OracleDbType.Int32); parm.Value = Anbid_StaraTura; cmd2.Parameters.Add(parm); ///:1
parm = new OracleParameter("ID_Pruefstand", OracleDbType.Int32); parm.Value = 18000 + b.TestBenchId; cmd2.Parameters.Add(parm); ///:2
parm = new OracleParameter("ID_WzPruefreihe", OracleDbType.Int32); parm.Value = b.BatchNr; cmd2.Parameters.Add(parm); ///:3
parm = new OracleParameter("PruefungsNr", OracleDbType.Int32); parm.Value = testInfo.PruefungsNr; cmd2.Parameters.Add(parm); ///:4
parm = new OracleParameter("PruefungsNr", OracleDbType.Int32); parm.Value = ((q==0) ? -1 : q); cmd2.Parameters.Add(parm); ///:4
///
parm = new OracleParameter("PVOL", OracleDbType.Double); parm.Value = Units.ConvertTo(Unit.l, tr.VolumeCTV); cmd2.Parameters.Add(parm); ///:5
parm = new OracleParameter("PMasse", OracleDbType.Double); parm.Value = Units.ConvertTo(Unit.kg, tr.MassEnd-tr.MassStart); cmd2.Parameters.Add(parm); ///:6
@@ -1072,17 +1012,10 @@ namespace TBF.BenchControl.DB.SensusOracle
log.InfoFormat("VT_ZAEHLER_PINDEX_PD inserted, PcbNr={0}, pos={1}, pruefix={2}", wm.SerialNr, wm.WMPosition, max_Pruefindex % 100);
}
foreach (var testInfo in testInfos)
{
Results.Entities.MeterTestRslt mtr = wm.GetMeterTestRslt(testInfo.QBezeichnung);
if (mtr == null)
{
throw new Exception(string.Format("'{0}' test results missing, watermeter {1}", testInfo.QBezeichnung, wm.WMPosition));
}
SaveMeterTestResult(conn, mtr, testInfo.PruefungsNr, max_Pruefindex);
for (int q = 1; q <= 3; q++)
{
Results.Entities.MeterTestRslt mtr = wm.GetMeterTestRslt(string.Format("Q{0}", q));
SaveMeterTestResult(conn, mtr, q, max_Pruefindex);
}
{
@@ -1116,10 +1049,11 @@ namespace TBF.BenchControl.DB.SensusOracle
/// </summary>
/// <param name="q">q = 0, 1, 2 or 3 (Adj., Q1, Q2, Q3)</param>
/// <returns>Nr. of rows updated</returns>
static int SaveMeterTestResult(OracleConnection conn, Results.Entities.MeterTestRslt mtr, int qq, int max_Pruefindex) ///
static int SaveMeterTestResult(OracleConnection conn, Results.Entities.MeterTestRslt mtr, int q, int max_Pruefindex) ///
{
double Q_wm = 3600.0 * mtr.VolumeMeter / mtr.TestTime; /// in [l/hour]
double Q_wm_with_upper_bound = Math.Min(2 * 1000 * mtr.TestRslt.FlowVolume, Math.Max(0.0, Q_wm));
int qq = (q == 0) ? -1 : q;
OracleCommand cmd = new OracleCommand("INSERT INTO VT_PRUEFREIHE_IST_PD(" +
"VT_Fernum, Pruefindex, PruefungsNr, ANBID, ID_WZTyp, Rev_WZTyp, Rev_WZPruefpunkt, " +
@@ -1152,5 +1086,5 @@ namespace TBF.BenchControl.DB.SensusOracle
return retv;
}
#endif
}
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -11,7 +11,6 @@ namespace TBF.BenchControl.DB.SensusOracle
{
public enum DBUsed
{
None,
Production,
Test,
Quality,
@@ -32,11 +32,11 @@ namespace TBF.BenchControl.DataEntry.Combined
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
@@ -74,9 +74,9 @@ namespace TBF.BenchControl.DataEntry.Combined
serialNr = new string[Config.Data.CompoundWMsCount * 2];
disabled = new bool[Config.Data.CompoundWMsCount];
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
wmStartState = new float[Config.Data.CompoundWMsCount * 2];
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
wmEndState = new float[Config.Data.CompoundWMsCount * 2];
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
currentOp = CurrentOp.None;
@@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Nr seryjny 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Nr seryjny 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Nr seryjny 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Nr seryjny 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Nr seryjny 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Nr seryjny 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Uwaga:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Uzupełnienie za nr seryjnym</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Uzupełnienie przed nr seryjnym</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Nr identyfikacyjny:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>naprawionych</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># sztuk</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Auto nr seryjny</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Серийный номер 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Серийный номер8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Серийный номер 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Серийный номер 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Серийный номер 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Серийный номер 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Примечание:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Дополнить за с/н</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Дополнить перед с/н</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Идентификационный номер:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>отремонтированных</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># штук</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Авто с/н</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -35,11 +35,11 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
@@ -89,9 +89,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
serialNr = new string[Config.Data.HeatMetersCount];
disabled = new bool[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartState = new float[Config.Data.HeatMetersCount];
wmStartStateStr = new string[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
wmEndState = new float[Config.Data.HeatMetersCount];
energyStartState = new double[Config.Data.HeatMetersCount];
energyStartStateStr = new string[Config.Data.HeatMetersCount];
energyEndState = new double[Config.Data.HeatMetersCount];
@@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny 6</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Uwaga:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Uzupełnienie za nr seryjnym</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Uzupełnienie przed nr seryjnym</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Nr identyfikacyjny:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>naprawionych</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># sztuk</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Auto nr seryjny</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер 6</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Примечание:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Дополнить за с/н</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Дополнить перед с/н</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Идентификационный номер:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>отремонтированных</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># штук</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Авто с/н</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -35,11 +35,11 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
@@ -89,9 +89,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
serialNr = new string[Config.Data.HeatMetersCount];
disabled = new bool[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartState = new float[Config.Data.HeatMetersCount];
wmStartStateStr = new string[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
wmEndState = new float[Config.Data.HeatMetersCount];
energyStartState = new double[Config.Data.HeatMetersCount];
energyStartStateStr = new string[Config.Data.HeatMetersCount];
energyEndState = new double[Config.Data.HeatMetersCount];
@@ -1,162 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Wodomierz 1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Wodomierz 2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Wodomierz 3</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Wodomierz 4</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
<value>Wodomierz 5</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Wodomierz 6</value>
</data>
<data name="groupBox6.Text" xml:space="preserve">
<value>Nr seryjny:</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Data</value>
</data>
</root>
@@ -1,162 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Водосчетчик 1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Водосчетчик 2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Водосчетчик 3</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Водосчетчик 4</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
<value>Водосчетчик 5</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox6.Text" xml:space="preserve">
<value>Водосчетчик 6</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Дата</value>
</data>
</root>
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -10,7 +10,7 @@ using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Munich3
{
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Munich3({0})", Cfg.ToString(1)); }
@@ -28,24 +28,19 @@ namespace TBF.BenchControl.DataEntry.Munich3
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
string[] wmEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
public float WMState(int wmNr)
{
float retVal;
if (wmNr >= 0 && wmNr < wmEndState.Length && Utils.TryParseUFloat(wmEndState[wmNr], out retVal)) return retVal;
return 0;
}
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved;
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
@@ -55,8 +50,6 @@ namespace TBF.BenchControl.DataEntry.Munich3
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
@@ -73,10 +66,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
wmEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
@@ -100,24 +90,11 @@ namespace TBF.BenchControl.DataEntry.Munich3
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowWMSNsAndStatesFormOp()
{
return null;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
@@ -137,18 +114,6 @@ namespace TBF.BenchControl.DataEntry.Munich3
myRef.modelessDlg = endForm;
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
@@ -162,13 +127,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
case CurrentOp.ShowFormAtCycleEnd:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
}
/// <summary>Run this operation</summary>
@@ -205,36 +164,11 @@ namespace TBF.BenchControl.DataEntry.Munich3
{
if (waterMeters[i] != null)
{
wmCycleEndState[i] = waterMeters[i].EndState = dlg.EndStateText[i];
wmEndState[i] = waterMeters[i].EndState = dlg.EndStateText[i];
waterMeters[i].YearOfProduction = dlg.YearOfProduction[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
@@ -1,464 +0,0 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
///
using System;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
namespace TBF.BenchControl.DataEntry.Munich3
{
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
{
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
/// <summary> Number of water meters </summary>
public readonly int WaterMetersCount;
readonly bool[] disabled;
// To be retrieved after the form closes
public float[] WMStartState;
// To be retrieved after the form closes
public readonly string[] WMStartStateStr;
// To be retrieved after the form closes
public float[] WMEndState;
bool endStates; /// false=start states, true=end states
double refVolume;
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
/// <summary>
/// Constructor to fill in start states
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public TestStartEndForm(int waterMetersCount, bool[] disabled)
{
endStates = false;
this.WaterMetersCount = waterMetersCount;
this.disabled = disabled;
InitializeComponent();
WMStartState = new float[waterMetersCount];
WMStartStateStr = new string[waterMetersCount];
completed = false;
StartForceCloseHandler();
}
/// <summary>
/// Constructor to fill in end states
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
double refVolume, double errLimLo, double errLimHi)
{
endStates = true;
this.WaterMetersCount = waterMetersCount;
this.WMStartStateStr = wmStartStateStr;
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
throw (new Exception("Invalid 'wmStartStateStr' argument"));
this.disabled = disabled;
this.refVolume = refVolume;
this.warningLimLo = 2 * errLimLo;
this.warningLimHi = 2 * errLimHi;
InitializeComponent();
WMEndState = new float[waterMetersCount];
completed = false;
StartForceCloseHandler();
}
/// <summary> Parameterless constructor for all watermeters </summary>
public TestStartEndForm()
: this(Config.Data.WMsCount, null)
{
}
private void CycleEndForm_Load(object sender, EventArgs e)
{
Localize();
Height = 70 + 90 * WaterMetersCount;
if (WaterMetersCount < 1) groupBox1.Visible = false;
if (WaterMetersCount < 2) groupBox2.Visible = false;
if (WaterMetersCount < 3) groupBox3.Visible = false;
if (WaterMetersCount < 4) groupBox4.Visible = false;
if (WaterMetersCount < 5) groupBox5.Visible = false;
if (WaterMetersCount < 6) groupBox6.Visible = false;
if (endStates)
{
if (WaterMetersCount >= 1) wmStartStateTextBox1.Text = WMStartStateStr[0];
if (WaterMetersCount >= 2) wmStartStateTextBox2.Text = WMStartStateStr[1];
if (WaterMetersCount >= 3) wmStartStateTextBox3.Text = WMStartStateStr[2];
if (WaterMetersCount >= 4) wmStartStateTextBox4.Text = WMStartStateStr[3];
if (WaterMetersCount >= 5) wmStartStateTextBox5.Text = WMStartStateStr[4];
if (WaterMetersCount >= 6) wmStartStateTextBox6.Text = WMStartStateStr[5];
wmEndStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
wmEndStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
wmEndStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
wmEndStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
wmEndStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
wmEndStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
}
else
{
wmStartStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
wmStartStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
wmStartStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
wmStartStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
wmStartStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
wmStartStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
}
}
void Localize()
{
Text = Strings.Water_Meter_States;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox3.Text = Strings.Water_Meter + " 3";
groupBox4.Text = Strings.Water_Meter + " 4";
groupBox5.Text = Strings.Water_Meter + " 5";
groupBox6.Text = Strings.Water_Meter + " 6";
wmStateLabel1.Text = Strings.WMState;
wmStateLabel2.Text = Strings.WMState;
wmStateLabel3.Text = Strings.WMState;
wmStateLabel4.Text = Strings.WMState;
wmStateLabel5.Text = Strings.WMState;
wmStateLabel6.Text = Strings.WMState;
startLabel.Text = Strings.Start;
endLabel.Text = Strings.End;
okButton.Text = Strings.OkBtnText;
}
private void okButton_Click(object sender, EventArgs e)
{
try
{
if (endStates)
{
if (wmEndStateTextBox1.Enabled) WMEndState[0] = Utils.ParseUFloat(wmEndStateTextBox1.Text);
if (wmEndStateTextBox2.Enabled) WMEndState[1] = Utils.ParseUFloat(wmEndStateTextBox2.Text);
if (wmEndStateTextBox3.Enabled) WMEndState[2] = Utils.ParseUFloat(wmEndStateTextBox3.Text);
if (wmEndStateTextBox4.Enabled) WMEndState[3] = Utils.ParseUFloat(wmEndStateTextBox4.Text);
if (wmEndStateTextBox5.Enabled) WMEndState[4] = Utils.ParseUFloat(wmEndStateTextBox5.Text);
if (wmEndStateTextBox6.Enabled) WMEndState[5] = Utils.ParseUFloat(wmEndStateTextBox6.Text);
}
else
{
if (wmStartStateTextBox1.Enabled)
{
WMStartStateStr[0] = wmStartStateTextBox1.Text;
WMStartState[0] = Utils.ParseUFloat(wmStartStateTextBox1.Text);
}
if (wmStartStateTextBox2.Enabled)
{
WMStartStateStr[1] = wmStartStateTextBox2.Text;
WMStartState[1] = Utils.ParseUFloat(wmStartStateTextBox2.Text);
}
if (wmStartStateTextBox3.Enabled)
{
WMStartStateStr[2] = wmStartStateTextBox3.Text;
WMStartState[2] = Utils.ParseUFloat(wmStartStateTextBox3.Text);
}
if (wmStartStateTextBox4.Enabled)
{
WMStartStateStr[3] = wmStartStateTextBox4.Text;
WMStartState[3] = Utils.ParseUFloat(wmStartStateTextBox4.Text);
}
if (wmStartStateTextBox5.Enabled)
{
WMStartStateStr[4] = wmStartStateTextBox5.Text;
WMStartState[4] = Utils.ParseUFloat(wmStartStateTextBox5.Text);
}
if (wmStartStateTextBox6.Enabled)
{
WMStartStateStr[5] = wmStartStateTextBox6.Text;
WMStartState[5] = Utils.ParseUFloat(wmStartStateTextBox6.Text);
}
}
}
catch
{
return;
}
completed = true;
Close();
}
#region Forced close handling
public void StartForceCloseHandler()
{
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
else OnForceClose(sender, args);
};
}
void OnForceClose(object sender, EventArgs args)
{
DialogResult = DialogResult.Cancel;
Close();
}
#endregion
private void wmEndStateTextBox1_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox1.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox1.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { };
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmEndStateTextBox2_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox2.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox2.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { err = 1000.0f; };
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmEndStateTextBox3_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox3.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox3.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { err = 1000.0f; };
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmEndStateTextBox4_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox4.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox4.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { err = 1000.0f; };
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmEndStateTextBox5_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox5.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox5.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { err = 1000.0f; };
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmEndStateTextBox6_TextChanged(object sender, EventArgs e)
{
double err = 0;
try
{
float endState = Utils.ParseUFloat(wmEndStateTextBox6.Text);
float startState = Utils.ParseUFloat(wmStartStateTextBox6.Text);
err = 100.0 * (endState - startState - refVolume) / refVolume;
}
catch { err = 1000.0f; };
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void wmStartStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmStartStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmStartStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmStartStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmStartStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmStartStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
private void wmEndStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
}
else if (e.KeyChar == '+') okButton_Click(sender, e);
}
}
}
@@ -1,512 +0,0 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
///
namespace TBF.BenchControl.DataEntry.Munich3
{
partial class TestStartEndForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.exclamation2 = new System.Windows.Forms.Label();
this.wmStartStateTextBox2 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox2 = new System.Windows.Forms.TextBox();
this.wmStateLabel2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.exclamation1 = new System.Windows.Forms.Label();
this.wmStartStateTextBox1 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox1 = new System.Windows.Forms.TextBox();
this.wmStateLabel1 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.exclamation3 = new System.Windows.Forms.Label();
this.wmStartStateTextBox3 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox3 = new System.Windows.Forms.TextBox();
this.wmStateLabel3 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.exclamation4 = new System.Windows.Forms.Label();
this.wmStartStateTextBox4 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox4 = new System.Windows.Forms.TextBox();
this.wmStateLabel4 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.exclamation5 = new System.Windows.Forms.Label();
this.wmStartStateTextBox5 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox5 = new System.Windows.Forms.TextBox();
this.wmStateLabel5 = new System.Windows.Forms.Label();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.exclamation6 = new System.Windows.Forms.Label();
this.wmStartStateTextBox6 = new System.Windows.Forms.TextBox();
this.wmEndStateTextBox6 = new System.Windows.Forms.TextBox();
this.wmStateLabel6 = new System.Windows.Forms.Label();
this.startLabel = new System.Windows.Forms.Label();
this.endLabel = new System.Windows.Forms.Label();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Controls.Add(this.exclamation2);
this.groupBox2.Controls.Add(this.wmStartStateTextBox2);
this.groupBox2.Controls.Add(this.wmEndStateTextBox2);
this.groupBox2.Controls.Add(this.wmStateLabel2);
this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox2.ForeColor = System.Drawing.Color.Black;
this.groupBox2.Location = new System.Drawing.Point(25, 122);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(547, 81);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Water Meter 2";
//
// exclamation2
//
this.exclamation2.AutoSize = true;
this.exclamation2.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation2.ForeColor = System.Drawing.Color.Red;
this.exclamation2.Location = new System.Drawing.Point(515, 27);
this.exclamation2.Name = "exclamation2";
this.exclamation2.Size = new System.Drawing.Size(30, 38);
this.exclamation2.TabIndex = 4;
this.exclamation2.Text = "!";
this.exclamation2.Visible = false;
//
// wmStartStateTextBox2
//
this.wmStartStateTextBox2.Enabled = false;
this.wmStartStateTextBox2.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox2.Name = "wmStartStateTextBox2";
this.wmStartStateTextBox2.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox2.TabIndex = 3;
this.wmStartStateTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox2_KeyPress);
//
// wmEndStateTextBox2
//
this.wmEndStateTextBox2.Enabled = false;
this.wmEndStateTextBox2.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox2.Name = "wmEndStateTextBox2";
this.wmEndStateTextBox2.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox2.TabIndex = 1;
this.wmEndStateTextBox2.TextChanged += new System.EventHandler(this.wmEndStateTextBox2_TextChanged);
this.wmEndStateTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox2_KeyPress);
//
// wmStateLabel2
//
this.wmStateLabel2.AutoSize = true;
this.wmStateLabel2.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel2.Name = "wmStateLabel2";
this.wmStateLabel2.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel2.TabIndex = 0;
this.wmStateLabel2.Text = "State:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.exclamation1);
this.groupBox1.Controls.Add(this.wmStartStateTextBox1);
this.groupBox1.Controls.Add(this.wmEndStateTextBox1);
this.groupBox1.Controls.Add(this.wmStateLabel1);
this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox1.ForeColor = System.Drawing.Color.Black;
this.groupBox1.Location = new System.Drawing.Point(25, 32);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(547, 81);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Water Meter 1";
//
// exclamation1
//
this.exclamation1.AutoSize = true;
this.exclamation1.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation1.ForeColor = System.Drawing.Color.Red;
this.exclamation1.Location = new System.Drawing.Point(515, 27);
this.exclamation1.Name = "exclamation1";
this.exclamation1.Size = new System.Drawing.Size(30, 38);
this.exclamation1.TabIndex = 3;
this.exclamation1.Text = "!";
this.exclamation1.Visible = false;
//
// wmStartStateTextBox1
//
this.wmStartStateTextBox1.Enabled = false;
this.wmStartStateTextBox1.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox1.Name = "wmStartStateTextBox1";
this.wmStartStateTextBox1.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox1.TabIndex = 2;
this.wmStartStateTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox1_KeyPress);
//
// wmEndStateTextBox1
//
this.wmEndStateTextBox1.Enabled = false;
this.wmEndStateTextBox1.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox1.Name = "wmEndStateTextBox1";
this.wmEndStateTextBox1.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox1.TabIndex = 1;
this.wmEndStateTextBox1.TextChanged += new System.EventHandler(this.wmEndStateTextBox1_TextChanged);
this.wmEndStateTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox1_KeyPress);
//
// wmStateLabel1
//
this.wmStateLabel1.AutoSize = true;
this.wmStateLabel1.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel1.Name = "wmStateLabel1";
this.wmStateLabel1.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel1.TabIndex = 0;
this.wmStateLabel1.Text = "State:";
//
// okButton
//
this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Location = new System.Drawing.Point(603, 46);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(98, 63);
this.okButton.TabIndex = 7;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.exclamation3);
this.groupBox3.Controls.Add(this.wmStartStateTextBox3);
this.groupBox3.Controls.Add(this.wmEndStateTextBox3);
this.groupBox3.Controls.Add(this.wmStateLabel3);
this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox3.ForeColor = System.Drawing.Color.Black;
this.groupBox3.Location = new System.Drawing.Point(25, 212);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(547, 81);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Water Meter 3";
//
// exclamation3
//
this.exclamation3.AutoSize = true;
this.exclamation3.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation3.ForeColor = System.Drawing.Color.Red;
this.exclamation3.Location = new System.Drawing.Point(515, 27);
this.exclamation3.Name = "exclamation3";
this.exclamation3.Size = new System.Drawing.Size(30, 38);
this.exclamation3.TabIndex = 5;
this.exclamation3.Text = "!";
this.exclamation3.Visible = false;
//
// wmStartStateTextBox3
//
this.wmStartStateTextBox3.Enabled = false;
this.wmStartStateTextBox3.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox3.Name = "wmStartStateTextBox3";
this.wmStartStateTextBox3.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox3.TabIndex = 4;
this.wmStartStateTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox3_KeyPress);
//
// wmEndStateTextBox3
//
this.wmEndStateTextBox3.Enabled = false;
this.wmEndStateTextBox3.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox3.Name = "wmEndStateTextBox3";
this.wmEndStateTextBox3.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox3.TabIndex = 1;
this.wmEndStateTextBox3.TextChanged += new System.EventHandler(this.wmEndStateTextBox3_TextChanged);
this.wmEndStateTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox3_KeyPress);
//
// wmStateLabel3
//
this.wmStateLabel3.AutoSize = true;
this.wmStateLabel3.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel3.Name = "wmStateLabel3";
this.wmStateLabel3.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel3.TabIndex = 0;
this.wmStateLabel3.Text = "State:";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.exclamation4);
this.groupBox4.Controls.Add(this.wmStartStateTextBox4);
this.groupBox4.Controls.Add(this.wmEndStateTextBox4);
this.groupBox4.Controls.Add(this.wmStateLabel4);
this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox4.ForeColor = System.Drawing.Color.Black;
this.groupBox4.Location = new System.Drawing.Point(25, 302);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(547, 81);
this.groupBox4.TabIndex = 4;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Water Meter 4";
//
// exclamation4
//
this.exclamation4.AutoSize = true;
this.exclamation4.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation4.ForeColor = System.Drawing.Color.Red;
this.exclamation4.Location = new System.Drawing.Point(515, 27);
this.exclamation4.Name = "exclamation4";
this.exclamation4.Size = new System.Drawing.Size(30, 38);
this.exclamation4.TabIndex = 5;
this.exclamation4.Text = "!";
this.exclamation4.Visible = false;
//
// wmStartStateTextBox4
//
this.wmStartStateTextBox4.Enabled = false;
this.wmStartStateTextBox4.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox4.Name = "wmStartStateTextBox4";
this.wmStartStateTextBox4.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox4.TabIndex = 4;
this.wmStartStateTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox4_KeyPress);
//
// wmEndStateTextBox4
//
this.wmEndStateTextBox4.Enabled = false;
this.wmEndStateTextBox4.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox4.Name = "wmEndStateTextBox4";
this.wmEndStateTextBox4.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox4.TabIndex = 1;
this.wmEndStateTextBox4.TextChanged += new System.EventHandler(this.wmEndStateTextBox4_TextChanged);
this.wmEndStateTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox4_KeyPress);
//
// wmStateLabel4
//
this.wmStateLabel4.AutoSize = true;
this.wmStateLabel4.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel4.Name = "wmStateLabel4";
this.wmStateLabel4.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel4.TabIndex = 0;
this.wmStateLabel4.Text = "State:";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.exclamation5);
this.groupBox5.Controls.Add(this.wmStartStateTextBox5);
this.groupBox5.Controls.Add(this.wmEndStateTextBox5);
this.groupBox5.Controls.Add(this.wmStateLabel5);
this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox5.ForeColor = System.Drawing.Color.Black;
this.groupBox5.Location = new System.Drawing.Point(25, 392);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(547, 81);
this.groupBox5.TabIndex = 5;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Water Meter 5";
//
// exclamation5
//
this.exclamation5.AutoSize = true;
this.exclamation5.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation5.ForeColor = System.Drawing.Color.Red;
this.exclamation5.Location = new System.Drawing.Point(515, 27);
this.exclamation5.Name = "exclamation5";
this.exclamation5.Size = new System.Drawing.Size(30, 38);
this.exclamation5.TabIndex = 5;
this.exclamation5.Text = "!";
this.exclamation5.Visible = false;
//
// wmStartStateTextBox5
//
this.wmStartStateTextBox5.Enabled = false;
this.wmStartStateTextBox5.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox5.Name = "wmStartStateTextBox5";
this.wmStartStateTextBox5.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox5.TabIndex = 4;
this.wmStartStateTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox5_KeyPress);
//
// wmEndStateTextBox5
//
this.wmEndStateTextBox5.Enabled = false;
this.wmEndStateTextBox5.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox5.Name = "wmEndStateTextBox5";
this.wmEndStateTextBox5.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox5.TabIndex = 1;
this.wmEndStateTextBox5.TextChanged += new System.EventHandler(this.wmEndStateTextBox5_TextChanged);
this.wmEndStateTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox5_KeyPress);
//
// wmStateLabel5
//
this.wmStateLabel5.AutoSize = true;
this.wmStateLabel5.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel5.Name = "wmStateLabel5";
this.wmStateLabel5.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel5.TabIndex = 0;
this.wmStateLabel5.Text = "State:";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.exclamation6);
this.groupBox6.Controls.Add(this.wmStartStateTextBox6);
this.groupBox6.Controls.Add(this.wmEndStateTextBox6);
this.groupBox6.Controls.Add(this.wmStateLabel6);
this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox6.ForeColor = System.Drawing.Color.Black;
this.groupBox6.Location = new System.Drawing.Point(25, 482);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(547, 81);
this.groupBox6.TabIndex = 6;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Water Meter 6";
//
// exclamation6
//
this.exclamation6.AutoSize = true;
this.exclamation6.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.exclamation6.ForeColor = System.Drawing.Color.Red;
this.exclamation6.Location = new System.Drawing.Point(515, 27);
this.exclamation6.Name = "exclamation6";
this.exclamation6.Size = new System.Drawing.Size(30, 38);
this.exclamation6.TabIndex = 5;
this.exclamation6.Text = "!";
this.exclamation6.Visible = false;
//
// wmStartStateTextBox6
//
this.wmStartStateTextBox6.Enabled = false;
this.wmStartStateTextBox6.Location = new System.Drawing.Point(164, 31);
this.wmStartStateTextBox6.Name = "wmStartStateTextBox6";
this.wmStartStateTextBox6.Size = new System.Drawing.Size(163, 31);
this.wmStartStateTextBox6.TabIndex = 4;
this.wmStartStateTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox6_KeyPress);
//
// wmEndStateTextBox6
//
this.wmEndStateTextBox6.Enabled = false;
this.wmEndStateTextBox6.Location = new System.Drawing.Point(350, 31);
this.wmEndStateTextBox6.Name = "wmEndStateTextBox6";
this.wmEndStateTextBox6.Size = new System.Drawing.Size(163, 31);
this.wmEndStateTextBox6.TabIndex = 1;
this.wmEndStateTextBox6.TextChanged += new System.EventHandler(this.wmEndStateTextBox6_TextChanged);
this.wmEndStateTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox6_KeyPress);
//
// wmStateLabel6
//
this.wmStateLabel6.AutoSize = true;
this.wmStateLabel6.Location = new System.Drawing.Point(18, 34);
this.wmStateLabel6.Name = "wmStateLabel6";
this.wmStateLabel6.Size = new System.Drawing.Size(68, 23);
this.wmStateLabel6.TabIndex = 0;
this.wmStateLabel6.Text = "State:";
//
// startLabel
//
this.startLabel.AutoSize = true;
this.startLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.startLabel.Location = new System.Drawing.Point(245, 11);
this.startLabel.Name = "startLabel";
this.startLabel.Size = new System.Drawing.Size(56, 23);
this.startLabel.TabIndex = 8;
this.startLabel.Text = "Start";
//
// endLabel
//
this.endLabel.AutoSize = true;
this.endLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.endLabel.Location = new System.Drawing.Point(431, 11);
this.endLabel.Name = "endLabel";
this.endLabel.Size = new System.Drawing.Size(46, 23);
this.endLabel.TabIndex = 9;
this.endLabel.Text = "End";
//
// TestStartEndForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DarkGoldenrod;
this.ClientSize = new System.Drawing.Size(729, 586);
this.Controls.Add(this.endLabel);
this.Controls.Add(this.startLabel);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.okButton);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "TestStartEndForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "End States";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleEndForm_Load);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox wmEndStateTextBox2;
private System.Windows.Forms.Label wmStateLabel2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox wmEndStateTextBox1;
private System.Windows.Forms.Label wmStateLabel1;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox wmEndStateTextBox3;
private System.Windows.Forms.Label wmStateLabel3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox wmEndStateTextBox4;
private System.Windows.Forms.Label wmStateLabel4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox wmEndStateTextBox5;
private System.Windows.Forms.Label wmStateLabel5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.TextBox wmEndStateTextBox6;
private System.Windows.Forms.Label wmStateLabel6;
private System.Windows.Forms.TextBox wmStartStateTextBox2;
private System.Windows.Forms.TextBox wmStartStateTextBox1;
private System.Windows.Forms.TextBox wmStartStateTextBox3;
private System.Windows.Forms.TextBox wmStartStateTextBox4;
private System.Windows.Forms.TextBox wmStartStateTextBox5;
private System.Windows.Forms.TextBox wmStartStateTextBox6;
private System.Windows.Forms.Label startLabel;
private System.Windows.Forms.Label endLabel;
private System.Windows.Forms.Label exclamation2;
private System.Windows.Forms.Label exclamation1;
private System.Windows.Forms.Label exclamation3;
private System.Windows.Forms.Label exclamation4;
private System.Windows.Forms.Label exclamation5;
private System.Windows.Forms.Label exclamation6;
}
}
@@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Nr seryjny 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Nr seryjny 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Nr seryjny 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Nr seryjny 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Nr seryjny 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Nr seryjny 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Uwaga:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Uzupełnienie za nr seryjnym</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Uzupełnienie przed nr seryjnym</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Nr identyfikacyjny:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>naprawionych</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># sztuk</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Auto nr seryjny</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Серийный номер 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Серийный номер 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Серийный номер 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Серийный номер 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Серийный номер 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Серийный номер 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Примечание:</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Дополнить за с/н</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Дополнить перед с/н</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Идентификационный номер:</value>
</data>
<data name="ext4Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext3Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext2Label.Text" xml:space="preserve">
<value>?</value>
</data>
<data name="ext1Label.Text" xml:space="preserve">
<value>отремонтированных</value>
</data>
<data name="extensionsGroupBox.Text" xml:space="preserve">
<value># штук</value>
</data>
<data name="autoSNButton.Text" xml:space="preserve">
<value>Авто с/н</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -1,20 +1,279 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard12
{
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Standard12({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryForm()
: base()
{
}
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new float[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new float[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleBeginningForm(myRef.waterMeters, entryFormCfg.EnterSerialNrsAtTheEnd, entryFormCfg.SensusExtensions);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,18 +1,18 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard12
{
public class Factory : IComponentFactory
public class EntryFormFactory : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-12"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -1,279 +0,0 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard12
{
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
public override string ToString() { return string.Format("DataEntry.Standard12({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryFormNoStartEnd()
{
}
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
///
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleBeginningForm(myRef.waterMeters, entryFormCfg.EnterSerialNrsAtTheEnd, entryFormCfg.SensusExtensions);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,26 +0,0 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard12
{
public class FactoryNoStartEnd : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-12-NoStartEnd"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
}
}
}
@@ -151,6 +151,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
{
Localize();
//Height = 115 + 90 * WaterMetersCount;
for (int i = 0; i < TextBoxesCount; i++)
{
if (i < WaterMetersCount)
@@ -194,8 +196,6 @@ namespace TBF.BenchControl.DataEntry.Standard12
}
}
}
//Height = 85 + 44 * WaterMetersCount;
}
void Localize()
@@ -1,204 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Nr seryjny 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Nr seryjny 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Nr seryjny 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Nr seryjny 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Nr seryjny 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Nr seryjny 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Nr seryjny 13</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Nr seryjny 14</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Nr seryjny 15</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Nr seryjny 16</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Nr seryjny 17</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Nr seryjny 18</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Nr seryjny 19</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>Nr seryjny 20</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Nr seryjny 21</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Nr seryjny 22</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Nr seryjny 23</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Nr seryjny 24</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,204 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Серийный номер 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Серийный номер 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Серийный номер 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Серийный номер 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Серийный номер 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Серийный номер 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Серийный номер 13</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Серийный номер 14</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Серийный номер 15</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Серийный номер 16</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Серийный номер 17</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Серийный номер 18</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Серийный номер 19</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>Серийный номер 20</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Серийный номер 21</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Серийный номер 22</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Серийный номер 23</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Серийный номер 24</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -1,20 +1,279 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard24
{
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryForm()
: base()
{
}
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new float[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new float[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,18 +1,18 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard24
{
public class Factory : IComponentFactory
public class EntryFormFactory : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-24"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -1,279 +0,0 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard24
{
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryFormNoStartEnd()
{
}
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
///
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,26 +0,0 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard24
{
public class FactoryNoStartEnd : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-24-NoStartEnd"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
}
}
}
@@ -1,276 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Nr seryjny 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Nr seryjny 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Nr seryjny 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Nr seryjny 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Nr seryjny 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Nr seryjny 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Nr seryjny 13</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Nr seryjny 14</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Nr seryjny 15</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Nr seryjny 16</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Nr seryjny 17</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Nr seryjny 18</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Nr seryjny 19</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>Nr seryjny 20</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Nr seryjny 21</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Nr seryjny 22</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Nr seryjny 23</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Nr seryjny 24</value>
</data>
<data name="label48.Text" xml:space="preserve">
<value>Nr seryjny 48</value>
</data>
<data name="label47.Text" xml:space="preserve">
<value>Nr seryjny 47</value>
</data>
<data name="label46.Text" xml:space="preserve">
<value>Nr seryjny 46</value>
</data>
<data name="label45.Text" xml:space="preserve">
<value>Nr seryjny 45</value>
</data>
<data name="label44.Text" xml:space="preserve">
<value>Nr seryjny 44</value>
</data>
<data name="label43.Text" xml:space="preserve">
<value>Nr seryjny 43</value>
</data>
<data name="label42.Text" xml:space="preserve">
<value>Nr seryjny 42</value>
</data>
<data name="label41.Text" xml:space="preserve">
<value>Nr seryjny 41</value>
</data>
<data name="label40.Text" xml:space="preserve">
<value>Nr seryjny 40</value>
</data>
<data name="label39.Text" xml:space="preserve">
<value>Nr seryjny 39</value>
</data>
<data name="label38.Text" xml:space="preserve">
<value>Nr seryjny 38</value>
</data>
<data name="label37.Text" xml:space="preserve">
<value>Nr seryjny 37</value>
</data>
<data name="label36.Text" xml:space="preserve">
<value>Nr seryjny 36</value>
</data>
<data name="label35.Text" xml:space="preserve">
<value>Nr seryjny 35</value>
</data>
<data name="label34.Text" xml:space="preserve">
<value>Nr seryjny 34</value>
</data>
<data name="label33.Text" xml:space="preserve">
<value>Nr seryjny 16</value>
</data>
<data name="label32.Text" xml:space="preserve">
<value>Nr seryjny 17</value>
</data>
<data name="label31.Text" xml:space="preserve">
<value>Nr seryjny 18</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>Nr seryjny 19</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>Nr seryjny 20</value>
</data>
<data name="label28.Text" xml:space="preserve">
<value>Nr seryjny 21</value>
</data>
<data name="label27.Text" xml:space="preserve">
<value>Nr seryjny 22</value>
</data>
<data name="label26.Text" xml:space="preserve">
<value>Nr seryjny 23</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>Nr seryjny 24</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,276 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер 1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер 2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер 3</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер 5</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер 6</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Серийный номер 7</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Серийный номер 8</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Серийный номер 9</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Серийный номер 10</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Серийный номер 11</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>Серийный номер 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Серийный номер 13</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Серийный номер 14</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Серийный номер 15</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Серийный номер 16</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Серийный номер 17</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Серийный номер 18</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Серийный номер 19</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>Серийный номер 20</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Серийный номер 21</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Серийный номер 22</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Серийный номер 23</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Серийный номер 24</value>
</data>
<data name="label48.Text" xml:space="preserve">
<value>Серийный номер 48</value>
</data>
<data name="label47.Text" xml:space="preserve">
<value>Серийный номер 47</value>
</data>
<data name="label46.Text" xml:space="preserve">
<value>Серийный номер 46</value>
</data>
<data name="label45.Text" xml:space="preserve">
<value>Серийный номер 45</value>
</data>
<data name="label44.Text" xml:space="preserve">
<value>Серийный номер 44</value>
</data>
<data name="label43.Text" xml:space="preserve">
<value>Серийный номер 43</value>
</data>
<data name="label42.Text" xml:space="preserve">
<value>Серийный номер 42</value>
</data>
<data name="label41.Text" xml:space="preserve">
<value>Серийный номер 41</value>
</data>
<data name="label40.Text" xml:space="preserve">
<value>Серийный номер 40</value>
</data>
<data name="label39.Text" xml:space="preserve">
<value>Серийный номер 39</value>
</data>
<data name="label38.Text" xml:space="preserve">
<value>Серийный номер 38</value>
</data>
<data name="label37.Text" xml:space="preserve">
<value>Серийный номер 37</value>
</data>
<data name="label36.Text" xml:space="preserve">
<value>Серийный номер 36</value>
</data>
<data name="label35.Text" xml:space="preserve">
<value>Серийный номер 35</value>
</data>
<data name="label34.Text" xml:space="preserve">
<value>Серийный номер 34</value>
</data>
<data name="label33.Text" xml:space="preserve">
<value>Серийный номер 33</value>
</data>
<data name="label32.Text" xml:space="preserve">
<value>Серийный номер 32</value>
</data>
<data name="label31.Text" xml:space="preserve">
<value>Серийный номер 31</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>Серийный номер 30</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>Серийный номер 29</value>
</data>
<data name="label28.Text" xml:space="preserve">
<value>Серийный номер 28</value>
</data>
<data name="label27.Text" xml:space="preserve">
<value>Серийный номер 27</value>
</data>
<data name="label26.Text" xml:space="preserve">
<value>Серийный номер 26</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>Серийный номер 25</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -1,20 +1,279 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard48
{
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Standard48({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryForm()
: base()
{
}
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new float[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new float[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,18 +1,18 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard48
{
public class Factory : IComponentFactory
public class EntryFormFactory : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-48"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -1,279 +0,0 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard48
{
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
public override string ToString() { return string.Format("DataEntry.Standard48({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryFormNoStartEnd()
{
}
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
///
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,26 +0,0 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard48
{
public class FactoryNoStartEnd : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-48-NoStartEnd"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
}
}
}
@@ -41,6 +41,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
enabledComboBoxes = new List<ComboBox>();
StartForceCloseHandler();
Height = 147 + WaterMetersCount * 90;
}
/// <summary> Parameterless constructor for all watermeters </summary>
@@ -71,29 +73,24 @@ namespace TBF.BenchControl.DataEntry.Standard6
if (WaterMetersCount < 4) { groupBox4.Visible = false; } else { enabledComboBoxes.Add(comboBox4); }
if (WaterMetersCount < 5) { groupBox5.Visible = false; } else { enabledComboBoxes.Add(comboBox5); }
if (WaterMetersCount < 6) { groupBox6.Visible = false; } else { enabledComboBoxes.Add(comboBox6); }
Height = 147 + WaterMetersCount * 90;
}
}
void Localize()
{
Text = Strings.Data;
orderGroupBox.Text = Strings.Purchase_order;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox3.Text = Strings.Water_Meter + " 3";
groupBox4.Text = Strings.Water_Meter + " 4";
groupBox5.Text = Strings.Water_Meter + " 5";
groupBox6.Text = Strings.Water_Meter + " 6";
label1.Text = Strings.Serial_Number;
label2.Text = Strings.Serial_Number;
label3.Text = Strings.Serial_Number;
label4.Text = Strings.Serial_Number;
label5.Text = Strings.Serial_Number;
label6.Text = Strings.Serial_Number;
okButton.Text = Strings.OkBtnText;
clearButton.Text = Strings.ClearBtnText;
}
@@ -1,168 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Wodomierz 1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Wodomierz 2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Wodomierz 3</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Wodomierz 4</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
<value>Wodomierz 5</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Nr seryjny</value>
</data>
<data name="groupBox6.Text" xml:space="preserve">
<value>Wodomierz 6</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Kolejność</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Usunąć</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dane partii</value>
</data>
</root>
@@ -1,168 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Водосчетчик 1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Водосчетчик 2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Водосчетчик 3</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Водосчетчик 4</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
<value>Водосчетчик 5</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Серийный номер:</value>
</data>
<data name="groupBox6.Text" xml:space="preserve">
<value>Водосчетчик 6</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Порядок</value>
</data>
<data name="clearButton.Text" xml:space="preserve">
<value>Очистить</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Пакетные данные</value>
</data>
</root>
@@ -1,20 +1,279 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard6
{
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Standard6({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
float[] wmStartState;
public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
float[] wmEndState;
public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryForm()
: base()
{
}
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new float[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new float[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryForm myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,18 +1,18 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard6
{
public class Factory : IComponentFactory
public class EntryFormFactory : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -1,279 +0,0 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard6
{
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
public override string ToString() { return string.Format("DataEntry.Standard6({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin, End and WMStates form
/// </summary>
string purchaseOrder;
public string PurchaseOrder { get { return purchaseOrder; } }
string[] serialNr;
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmCycleEndState;
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
double[] wmStartState;
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
double[] wmEndState;
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
double refVolume;
double errLimLo;
double errLimHi;
bool resultSaved; /// Set in Run() when results are saved
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
EnterTestStartStates,
EnterTestEndStates,
}
CurrentOp currentOp;
public EntryFormNoStartEnd()
{
}
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.refVolume = refVolume;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
///
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
modelessDlg.Show();
}
///
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
modelessDlg.Show();
}
///
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
{
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
break;
case CurrentOp.ShowFormAtCycleEnd:
if (entryFormCfg.EnterSerialNrsAtTheEnd)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else if (entryFormCfg.ShowCycleEndForm)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
}
break;
case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
break;
case CurrentOp.EnterTestEndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{
return Event.ModelessFormIsOpen;
}
if (!resultSaved) /// This is to save the result only once
{
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
if (dlg != null)
{
purchaseOrder = dlg.PurchaseOrder;
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
{
if (waterMeters[i] != null)
{
serialNr[i] = waterMeters[i].SerialNr = dlg.SNText[i];
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
}
}
}
}
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = waterMeters.Length;
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
for (int i = 0; i < count; i++)
{
if (waterMeters[i] != null)
{
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
{
/// Fixed start test - start
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmStartState[i] = dlg.WMStartState[i];
wmStartStateStr[i] = dlg.WMStartStateStr[i];
}
}
}
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
{
/// Fixed start test - end
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
if (dlg != null)
{
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
wmEndState[i] = dlg.WMEndState[i];
}
}
}
resultSaved = true;
modelessDlg = null;
}
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (modelessDlg is IHasCompleted)
{
UiBridge.Bridge.OnCloseModelessForm(this, null);
modelessDlg = null;
}
currentOp = CurrentOp.None;
}
/// <summary>
/// Updates test results with the information collected in watermeters.
/// </summary>
/// <param name="batchResults">Test results to be updated with the information</param>
public void UpdateTestResults(Results.BatchResults batchResults)
{
foreach (var wm in batchResults.WaterMeters)
{
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
}
}
}
}
@@ -1,26 +0,0 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard6
{
public class FactoryNoStartEnd : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard-6-NoStartEnd"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
}
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Windows.Forms;
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
{
Localize();
Height = 70 + 90 * WaterMetersCount;
Height = 115 + 90 * WaterMetersCount;
if (WaterMetersCount < 1) groupBox1.Visible = false;
if (WaterMetersCount < 2) groupBox2.Visible = false;
@@ -104,43 +104,39 @@ namespace TBF.BenchControl.DataEntry.Standard6
if (WaterMetersCount >= 4) wmStartStateTextBox4.Text = WMStartStateStr[3];
if (WaterMetersCount >= 5) wmStartStateTextBox5.Text = WMStartStateStr[4];
if (WaterMetersCount >= 6) wmStartStateTextBox6.Text = WMStartStateStr[5];
wmEndStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
wmEndStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
wmEndStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
wmEndStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
wmEndStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
wmEndStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
wmEndStateTextBox1.Enabled = (disabled == null || disabled.Length < 1 || !disabled[0]);
wmEndStateTextBox2.Enabled = (disabled == null || disabled.Length < 2 || !disabled[1]);
wmEndStateTextBox3.Enabled = (disabled == null || disabled.Length < 3 || !disabled[2]);
wmEndStateTextBox4.Enabled = (disabled == null || disabled.Length < 4 || !disabled[3]);
wmEndStateTextBox5.Enabled = (disabled == null || disabled.Length < 5 || !disabled[4]);
wmEndStateTextBox6.Enabled = (disabled == null || disabled.Length < 6 || !disabled[5]);
}
else
{
wmStartStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
wmStartStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
wmStartStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
wmStartStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
wmStartStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
wmStartStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
wmStartStateTextBox1.Enabled = (disabled == null || disabled.Length < 1 || !disabled[0]);
wmStartStateTextBox2.Enabled = (disabled == null || disabled.Length < 2 || !disabled[1]);
wmStartStateTextBox3.Enabled = (disabled == null || disabled.Length < 3 || !disabled[2]);
wmStartStateTextBox4.Enabled = (disabled == null || disabled.Length < 4 || !disabled[3]);
wmStartStateTextBox5.Enabled = (disabled == null || disabled.Length < 5 || !disabled[4]);
wmStartStateTextBox6.Enabled = (disabled == null || disabled.Length < 6 || !disabled[5]);
}
}
void Localize()
{
Text = Strings.Water_Meter_States;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox3.Text = Strings.Water_Meter + " 3";
groupBox4.Text = Strings.Water_Meter + " 4";
groupBox5.Text = Strings.Water_Meter + " 5";
groupBox6.Text = Strings.Water_Meter + " 6";
wmStateLabel1.Text = Strings.WMState;
wmStateLabel2.Text = Strings.WMState;
wmStateLabel3.Text = Strings.WMState;
wmStateLabel4.Text = Strings.WMState;
wmStateLabel5.Text = Strings.WMState;
wmStateLabel6.Text = Strings.WMState;
startLabel.Text = Strings.Start;
endLabel.Text = Strings.End;
okButton.Text = Strings.OkBtnText;
@@ -30,8 +30,8 @@ namespace TBF.BenchControl.DataEntry.WMStates
/// <summary>
/// Test start water meter states set by forms
/// </summary>
double[] wmStartState;
public double WMStartState(int wmNr)
float[] wmStartState;
public float WMStartState(int wmNr)
{
if (wmStartState == null || wmStartState.Length <= wmNr) return 0;
return wmStartState[wmNr];
@@ -40,8 +40,8 @@ namespace TBF.BenchControl.DataEntry.WMStates
/// <summary>
/// Test end water meter states set by forms
/// </summary>
double[] wmEndState;
public double WMEndState(int wmNr)
float[] wmEndState;
public float WMEndState(int wmNr)
{
if (wmEndState == null || wmEndState.Length <= wmNr) return 0;
return wmEndState[wmNr];
@@ -77,7 +77,7 @@ namespace TBF.BenchControl.DataEntry.WMStates
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartState = new float[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}

Some files were not shown because too many files have changed in this diff Show More