Compare commits
163
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
121b034516 | ||
|
|
d2d571945c | ||
|
|
bd9c3aa5e2 | ||
|
|
73ea0ff586 | ||
|
|
78408ed5eb | ||
|
|
f04cdccd20 | ||
|
|
82acf60f2e | ||
|
|
68413867ad | ||
|
|
1fd8881d53 | ||
|
|
cebdd71065 | ||
|
|
668304cb72 | ||
|
|
c28c5a5554 | ||
|
|
450493069c | ||
|
|
d7519aa95a | ||
|
|
e89ab89874 | ||
|
|
025fa81941 | ||
|
|
845c66b511 | ||
|
|
3725e238fc | ||
|
|
ac2ac82187 | ||
|
|
5e6be0c4b4 | ||
|
|
ed66c6a259 | ||
|
|
0db7736247 | ||
|
|
02cebe0966 | ||
|
|
4f2bb6291f | ||
|
|
498c8afbe4 | ||
|
|
0e6dce4750 | ||
|
|
7a74579c8b | ||
|
|
c23630a980 | ||
|
|
205df83c1c | ||
|
|
b26f65dab4 | ||
|
|
8d1ac8f41d | ||
|
|
115916fd36 | ||
|
|
6641ed9d96 | ||
|
|
5e3d408706 | ||
|
|
8fc9e3e5ce | ||
|
|
e7aa9731d0 | ||
|
|
0fc63655e9 | ||
|
|
86b47cb434 | ||
|
|
b3ec97d95c | ||
|
|
1620758545 | ||
|
|
5a2d51db95 | ||
|
|
c0e99364a4 | ||
|
|
371a27c646 | ||
|
|
4a06dcff3e | ||
|
|
0f54bf86ac | ||
|
|
921c524f0e | ||
|
|
a8df9b50de | ||
|
|
5da9b1e94e | ||
|
|
63871c9bcc | ||
|
|
e5b61825ff | ||
|
|
2d484ea993 | ||
|
|
b5b7d50742 | ||
|
|
19d77a9ad9 | ||
|
|
e77c0460de | ||
|
|
2ad5843f4f | ||
|
|
631ef5fe20 | ||
|
|
cd246e89c8 | ||
|
|
438374532f | ||
|
|
92609b9ead | ||
|
|
07b51f12a2 | ||
|
|
16494389c6 | ||
|
|
be86f0278f | ||
|
|
7e7ae86f65 | ||
|
|
3b2139d3df | ||
|
|
16c59b5c47 | ||
|
|
49cc584914 | ||
|
|
aeefac1d4e | ||
|
|
2b30607d9c | ||
|
|
cef8d3ff95 | ||
|
|
64646486e9 | ||
|
|
769e68d49b | ||
|
|
3dcb134aa1 | ||
|
|
81cb0eae64 | ||
|
|
4fad9925ec | ||
|
|
92d246eda0 | ||
|
|
34479778b9 | ||
|
|
163d209071 | ||
|
|
8eb601f24d | ||
|
|
ac9407b59d | ||
|
|
00dd0ed8fd | ||
|
|
6a53417b62 | ||
|
|
90f2b83fc0 | ||
|
|
3382c6e77a | ||
|
|
072de642e1 | ||
|
|
489ebd04aa | ||
|
|
2a68934b0e | ||
|
|
f3a502b7df | ||
|
|
2b0e66c71d | ||
|
|
e5c01a14d9 | ||
|
|
e5ef10beac | ||
|
|
4c3c499ad5 | ||
|
|
bdc7f5abd8 | ||
|
|
0ff78b9d4c | ||
|
|
41959d863f | ||
|
|
e7d495e47d | ||
|
|
e4f5be3f41 | ||
|
|
f42c1b7f0c | ||
|
|
9dbca87429 | ||
|
|
49ae2a84c4 | ||
|
|
34073844bc | ||
|
|
6f3b9be77e | ||
|
|
f675c7ada2 | ||
|
|
6aee0a71ed | ||
|
|
fa818c5cf8 | ||
|
|
0ef9505af1 | ||
|
|
bf69524fd8 | ||
|
|
58df07300e | ||
|
|
bef4928162 | ||
|
|
5995204d8d | ||
|
|
69b7c94176 | ||
|
|
540bc8ca74 | ||
|
|
03920d5b90 | ||
|
|
765637ce2d | ||
|
|
b4596ae6e9 | ||
|
|
4c92cb7af0 | ||
|
|
770b8447ac | ||
|
|
f3532fc3cb | ||
|
|
a7cfbc0b76 | ||
|
|
608dd087b8 | ||
|
|
5d2871b9ed | ||
|
|
779c870613 | ||
|
|
3cd585fe41 | ||
|
|
ff27ae7635 | ||
|
|
a41e805e8d | ||
|
|
9bcf3aa7f6 | ||
|
|
ff2248720c | ||
|
|
9bd2cd2634 | ||
|
|
9ba1b58d2e | ||
|
|
1d8728c7ce | ||
|
|
af68f35400 | ||
|
|
de269b66b5 | ||
|
|
ea894c2db5 | ||
|
|
bd9785c195 | ||
|
|
044046080d | ||
|
|
04efa02089 | ||
|
|
426a21fd0b | ||
|
|
8523324962 | ||
|
|
f06f819adb | ||
|
|
ac8e766476 | ||
|
|
a67a709782 | ||
|
|
9543de4170 | ||
|
|
79fea707f3 | ||
|
|
1034c8e752 | ||
|
|
aa95f60a81 | ||
|
|
420cf6397b | ||
|
|
fce2fcf293 | ||
|
|
41c662f053 | ||
|
|
72d2b602ab | ||
|
|
dc08f308d0 | ||
|
|
910f15dfbf | ||
|
|
d4f8c23cce | ||
|
|
324be83f9b | ||
|
|
ea8d4cb63d | ||
|
|
7b5231af80 | ||
|
|
63b7b83363 | ||
|
|
7a814c2a00 | ||
|
|
76053d466b | ||
|
|
6020d6e4eb | ||
|
|
61d06dc910 | ||
|
|
e889215cf4 | ||
|
|
cdc971f733 | ||
|
|
863856d27d | ||
|
|
cf5dd8cb71 |
+2
-2
@@ -8,8 +8,8 @@ GemCard/bin
|
||||
GemCard/obj
|
||||
GraphLib/bin
|
||||
GraphLib/obj
|
||||
MonitoringDB/bin
|
||||
MonitoringDB/obj
|
||||
TracingDB/bin
|
||||
TracingDB/obj
|
||||
Results/bin/
|
||||
Results/obj/
|
||||
ResultsBrowser/bin/
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</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;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
+22
-4
@@ -14,25 +14,43 @@ namespace Config
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif DN100 || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT
|
||||
#elif DN100 || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || CEVAK_200
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU300 || FUZHOU150 || PT200IL || PUCHONG_PT200 || GENESIS || SLM_150 || PETERSBURG_200
|
||||
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || PUCHONG_200 || GENESIS || SLM_150 || PETERSBURG_200
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif TORINO50 || BADGER_MALA_TRAT || BERLIN
|
||||
#elif DUBAJ_50
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 5;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif IZRAEL_50
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU_100
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif TORINO_50 || BADGER_MALA_TRAT || 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 = 1;
|
||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40 || FUZHOU_40 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || ZAMBIA
|
||||
#elif TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || ZAMBIA || FEWA_50
|
||||
public const int WMsCount = 20;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Config
|
||||
result.IsRealBench = IsRealBench;
|
||||
result.ProceduresDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
|
||||
result.WaterMetersDBSettings = (Users.DBSettings)WaterMetersDBSettings.Clone();
|
||||
result.UsersDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
|
||||
result.UsersDBSettings = (Users.DBSettings)UsersDBSettings.Clone();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,45 @@ namespace Config.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public enum ProcedureState
|
||||
/// <summary>
|
||||
/// Flags returned by each device configuration control Verify(...) function.
|
||||
/// </summary>
|
||||
public enum CfgUpdateFlags
|
||||
{
|
||||
None = 0,
|
||||
Error = 0x1, /// Some settings in the user control are invalid and cannot be set
|
||||
Warning = 0x02, /// Some settings in the user control are suspicious, can be set after user confirmation
|
||||
RestartRqrd = 0x04, /// TBF program restart is required to apply all changed parameters
|
||||
AnyChange = 0x08, /// At least one parameter have changed
|
||||
VolatileChange = 0x10,
|
||||
InvokeCfgChange = 0x20, /// Invoke CfgChange handler of the component
|
||||
}
|
||||
|
||||
public enum RemoteDBUse
|
||||
{
|
||||
[Description("Local DB only")] LocalDBOnly,
|
||||
[Description("Remote DB only")] RemoteDBOnly,
|
||||
[Description("Both DB-s, local 1st")] BothDBsLocalFirst,
|
||||
[Description("Both DB-s, remote 1st")] BothDBsRemoteFirst,
|
||||
Count,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Contains a procedure name and a database specification (local/remote).
|
||||
/// </summary>
|
||||
public class ProcedureInfo
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly Users.Entities.DBKind DBKind;
|
||||
|
||||
public ProcedureInfo(string name, Users.Entities.DBKind dbKind)
|
||||
{
|
||||
Name = name;
|
||||
DBKind = dbKind;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ProcedureState
|
||||
{
|
||||
Active,
|
||||
History,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Config.Entities
|
||||
@@ -20,13 +22,19 @@ namespace Config.Entities
|
||||
int ParamsCount();
|
||||
|
||||
/// <summary>
|
||||
/// Parameter names
|
||||
/// Returns a parameter name
|
||||
/// </summary>
|
||||
/// <param name="ix">Zero based index of the parameter</param>
|
||||
string ParamName(int ix);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of possible values of one parameter (ComboBox when editing) or null (Textbox when editing).
|
||||
/// </summary>
|
||||
/// <param name="ix">Zero based index of the parameter</param>
|
||||
IList<string> ParamValues(int ix);
|
||||
|
||||
/// <summary>
|
||||
/// Parameter values in string form
|
||||
/// Returns a parameter value in the string form
|
||||
/// </summary>
|
||||
/// <param name="ix">Zero based index of the parameter</param>
|
||||
string ToString(int ix);
|
||||
@@ -50,7 +58,7 @@ namespace Config.Entities
|
||||
/// </summary>
|
||||
/// <param name="ix">Zero based index of the parameter</param>
|
||||
/// <param name="strValue">String representation of the parameter</param>
|
||||
void UpdateParam(int ix, string strValue);
|
||||
CfgUpdateFlags UpdateParam(int ix, string strValue);
|
||||
|
||||
void UpdateEmbeddedDbEntity();
|
||||
|
||||
|
||||
+7
-62
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
@@ -39,7 +39,11 @@ namespace Config
|
||||
dbType = Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
break;
|
||||
}
|
||||
case Users.Entities.DBKind.RemoteConfig:
|
||||
dbType = Data.CurrentBench.UsersDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.UsersDBSettings.ConnectionString;
|
||||
break;
|
||||
}
|
||||
|
||||
return CreateSessionFactory(database, dbType, connectionString, false);
|
||||
}
|
||||
@@ -69,6 +73,7 @@ namespace Config
|
||||
{
|
||||
default:
|
||||
case Users.Entities.DBKind.Config:
|
||||
case Users.Entities.DBKind.RemoteConfig:
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
|
||||
break;
|
||||
case Users.Entities.DBKind.Results:
|
||||
@@ -122,41 +127,6 @@ namespace Config
|
||||
return SessionFactories[ix].OpenSession();
|
||||
}
|
||||
|
||||
public static void SaveToDb(Users.Entities.DBKind database, object obj)
|
||||
{
|
||||
SaveToDb(CreateSession(database), obj);
|
||||
}
|
||||
|
||||
public static void SaveToDb(ISession session, object obj)
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
session.SaveOrUpdate(obj);
|
||||
transaction.Commit();
|
||||
}
|
||||
catch
|
||||
{
|
||||
transaction.Rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteFromDb(Users.Entities.DBKind database, object obj)
|
||||
{
|
||||
DeleteFromDb(CreateSession(database), obj);
|
||||
}
|
||||
|
||||
public static void DeleteFromDb(ISession session, object obj)
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
session.Delete(obj);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty users database.
|
||||
/// Database contains only the user 'admin' and the control board component 'CB'.
|
||||
@@ -213,30 +183,5 @@ namespace Config
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty water meters database
|
||||
/// </summary>
|
||||
/// <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)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Users.Entities.DBKind.Results, dbType, connectionString, true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
//using (var session = sessionFactory.OpenSession())
|
||||
//{
|
||||
// using (var transaction = session.BeginTransaction())
|
||||
// {
|
||||
// /// Create one component
|
||||
// var cmpnt = (new BenchControl.Elde.ControlBoardCfg("CB", 1)).CreateDbEntity();
|
||||
// session.SaveOrUpdate(cmpnt);
|
||||
// transaction.Commit();
|
||||
// }
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.18.893.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.893.0")]
|
||||
[assembly: AssemblyVersion("2.18.982.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.982.0")]
|
||||
|
||||
+19
-2
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2017-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -9,7 +12,21 @@ namespace Config
|
||||
{
|
||||
public static string SignificantDigitsToFmt(double value, int sigDigits)
|
||||
{
|
||||
if (sigDigits == 5)
|
||||
if (sigDigits == 6)
|
||||
{
|
||||
if (value >= 99999.5 || value < -99999.5) return "F0";
|
||||
else if (value >= 9999.95 || value < -9999.95) return "F1";
|
||||
else if (value >= 999.995 || value < -999.995) return "F2";
|
||||
else if (value >= 99.9995 || value < -99.9995) return "F3";
|
||||
else if (value >= 9.99995 || value < -9.99995) return "F4";
|
||||
else if (value >= 0.999995 || value < -0.999995) return "F5";
|
||||
else if (value >= 0.0999995 || value < -0.0999995) return "F6";
|
||||
else if (value >= 0.00999995 || value < -0.00999995) return "F7";
|
||||
else if (value >= 0.000999995 || value < -0.000999995) return "F8";
|
||||
else if (value >= 0.0000999995 || value < -0.0000999995) return "F9";
|
||||
else return "F10";
|
||||
}
|
||||
else if (sigDigits == 5)
|
||||
{
|
||||
if (value >= 9999.5 || value < -9999.5) return "F0";
|
||||
else if (value >= 999.95 || value < -999.95) return "F1";
|
||||
|
||||
+34
-10
@@ -56,7 +56,10 @@ namespace DeviceTest
|
||||
|
||||
|
||||
static TBF.Boxes.FloatBox floatBox;
|
||||
static Event evnt;
|
||||
static TBF.Boxes.DoubleBox dblBox1;
|
||||
static TBF.Boxes.DoubleBox dblBox2;
|
||||
static TBF.Boxes.DoubleBox dblBox3;
|
||||
static Event evnt;
|
||||
|
||||
|
||||
static DeviceTestDlg()
|
||||
@@ -657,7 +660,13 @@ namespace DeviceTest
|
||||
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)
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadVolumeOp(ref dblBox2);
|
||||
operation3 = (tbfComponent1forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
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);
|
||||
@@ -681,10 +690,16 @@ namespace DeviceTest
|
||||
}
|
||||
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);
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadVolumeOp(ref dblBox2);
|
||||
operation23 = (tbfComponent2forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
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);
|
||||
@@ -708,10 +723,16 @@ namespace DeviceTest
|
||||
}
|
||||
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);
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadVolumeOp(ref dblBox2);
|
||||
operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
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);
|
||||
@@ -720,11 +741,14 @@ namespace DeviceTest
|
||||
}
|
||||
|
||||
|
||||
while (workerThreadRunning)
|
||||
int time = 0;
|
||||
while (workerThreadRunning)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
|
||||
if (workerThreadRunning)
|
||||
StateMachine.Time = ++time;
|
||||
|
||||
if (workerThreadRunning)
|
||||
{
|
||||
foreach (var d in tbfDevices) d.RunDeviceBefore();
|
||||
|
||||
|
||||
@@ -72,10 +72,10 @@ namespace DeviceTest
|
||||
}
|
||||
|
||||
/// Configure and start logging
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(LocAppDataDir + log4netConfigFName));
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(Path.Combine(LocAppDataDir, log4netConfigFName)));
|
||||
log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
log.Fatal(string.Format("TBF ver.{0}", Version));
|
||||
log.FatalFormat("DeviceTest ver.{0}", Version);
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
@@ -121,21 +121,6 @@
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
<COMReference Include="GemCardExLib">
|
||||
<Guid>{F1FF634B-BEDF-461C-A409-5B88E05F5117}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
<COMReference Include="SCARDSSPLib">
|
||||
<Guid>{82C38704-19F1-11D3-A11F-00C04F79F800}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
</COMReference>
|
||||
<COMReference Include="stdole">
|
||||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PrecisionTimer.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -43,11 +43,6 @@ namespace GraphLib
|
||||
PlotterGraphSelectCurvesForm GraphPropertiesForm = null;
|
||||
PrintPreviewForm printPreviewForm = null;
|
||||
|
||||
private PrecisionTimer.Timer mTimer = null;
|
||||
private float play_speed = 0.5f;
|
||||
private float play_speed_max = 10f;
|
||||
private float play_speed_min = 0.5f;
|
||||
|
||||
private bool paused = false;
|
||||
private bool isRunning = false;
|
||||
|
||||
@@ -58,11 +53,6 @@ namespace GraphLib
|
||||
public PlotterDisplayEx()
|
||||
{
|
||||
InitializeComponent();
|
||||
mTimer = new PrecisionTimer.Timer();
|
||||
mTimer.Period = 50; // 20 fps
|
||||
mTimer.Tick += new EventHandler(OnTimerTick);
|
||||
play_speed = 0.5f; // 20x10 = 200 values per second == sample frequency
|
||||
mTimer.Start();
|
||||
isRunning = false;
|
||||
}
|
||||
|
||||
@@ -192,85 +182,10 @@ namespace GraphLib
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
paused = true;
|
||||
|
||||
if (mTimer.IsRunning)
|
||||
{
|
||||
mTimer.Stop();
|
||||
mTimer.Dispose();
|
||||
}
|
||||
|
||||
paused = true;
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (isRunning == false && paused == false)
|
||||
{
|
||||
gPane.starting_idx = 0;
|
||||
paused = false;
|
||||
isRunning = true;
|
||||
// mTimer.Start();
|
||||
tb1.Buttons[0].ImageIndex = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paused == false)
|
||||
{
|
||||
//mTimer.Stop();
|
||||
paused = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// mTimer.Start();
|
||||
paused = false;
|
||||
}
|
||||
|
||||
if (paused)
|
||||
{
|
||||
|
||||
tb1.Buttons[0].ImageIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
tb1.Buttons[0].ImageIndex = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
if (isRunning)
|
||||
{
|
||||
// mTimer.Stop();
|
||||
isRunning = false;
|
||||
paused = false;
|
||||
hScrollBar1.Value = 0;
|
||||
tb1.Buttons[0].ImageIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void tb1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
|
||||
{
|
||||
bool pushed = e.Button.Pushed;
|
||||
switch (e.Button.Tag.ToString().ToLower())
|
||||
{
|
||||
case "play":
|
||||
|
||||
Start();
|
||||
|
||||
break;
|
||||
|
||||
case "stop":
|
||||
|
||||
Stop();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPlayPanelVisible()
|
||||
{
|
||||
panel1.Visible = true;
|
||||
@@ -317,27 +232,6 @@ namespace GraphLib
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePlayback()
|
||||
{
|
||||
if (!paused && isRunning == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
gPane.starting_idx += play_speed;
|
||||
UpdateScrollBar();
|
||||
gPane.Invalidate();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTimerTick(object sender, EventArgs e)
|
||||
{
|
||||
UpdateControl();
|
||||
|
||||
UpdatePlayback();
|
||||
}
|
||||
|
||||
private void UpdateScrollBar()
|
||||
{
|
||||
|
||||
Generated
-1
@@ -57,7 +57,6 @@ namespace GraphLib
|
||||
this.tb1.Size = new System.Drawing.Size(80, 26);
|
||||
this.tb1.TabIndex = 1;
|
||||
this.tb1.Visible = false;
|
||||
this.tb1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tb1_ButtonClick);
|
||||
//
|
||||
// tbbSave
|
||||
//
|
||||
|
||||
@@ -1,490 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Based on the work of Leslie Sanford
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace PrecisionTimer
|
||||
{
|
||||
public enum Mode
|
||||
{
|
||||
OneShot,
|
||||
Periodic
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct TimerCaps
|
||||
{
|
||||
public int periodMin;
|
||||
public int periodMax;
|
||||
}
|
||||
|
||||
|
||||
public sealed class Timer : IComponent
|
||||
{
|
||||
private delegate void TimeProc(int id, int msg, int user, int param1, int param2);
|
||||
|
||||
private delegate void EventRaiser(EventArgs e);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeGetDevCaps(ref TimerCaps caps,
|
||||
int sizeOfTimerCaps);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeSetEvent(int delay,
|
||||
int resolution,
|
||||
TimeProc proc,
|
||||
int user,
|
||||
int mode);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeKillEvent(int id);
|
||||
|
||||
private const int TIMERR_NOERROR = 0;
|
||||
|
||||
private int timerID;
|
||||
|
||||
private volatile Mode mode;
|
||||
|
||||
private volatile int period;
|
||||
|
||||
private volatile int resolution;
|
||||
|
||||
private TimeProc timeProcPeriodic;
|
||||
|
||||
private TimeProc timeProcOneShot;
|
||||
|
||||
private EventRaiser tickRaiser;
|
||||
|
||||
private bool running = false;
|
||||
|
||||
private volatile bool disposed = false;
|
||||
|
||||
private ISynchronizeInvoke synchronizingObject = null;
|
||||
|
||||
private ISite site = null;
|
||||
|
||||
private static TimerCaps caps;
|
||||
|
||||
public event EventHandler Started;
|
||||
|
||||
public event EventHandler Stopped;
|
||||
|
||||
public event EventHandler Tick;
|
||||
|
||||
static Timer()
|
||||
{
|
||||
// Get multimedia timer capabilities.
|
||||
timeGetDevCaps(ref caps, Marshal.SizeOf(caps));
|
||||
}
|
||||
|
||||
|
||||
public Timer(IContainer container)
|
||||
{
|
||||
|
||||
container.Add(this);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
||||
public Timer()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
~Timer()
|
||||
{
|
||||
if(IsRunning)
|
||||
{
|
||||
// Stop and destroy timer.
|
||||
timeKillEvent(timerID);
|
||||
}
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
this.mode = Mode.Periodic;
|
||||
this.period = Capabilities.periodMin;
|
||||
this.resolution = 1;
|
||||
|
||||
running = false;
|
||||
|
||||
timeProcPeriodic = new TimeProc(TimerPeriodicEventCallback);
|
||||
timeProcOneShot = new TimeProc(TimerOneShotEventCallback);
|
||||
tickRaiser = new EventRaiser(OnTick);
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(Mode == Mode.Periodic)
|
||||
{
|
||||
timerID = timeSetEvent(Period, Resolution, timeProcPeriodic, 0, (int)Mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
timerID = timeSetEvent(Period, Resolution, timeProcOneShot, 0, (int)Mode);
|
||||
}
|
||||
|
||||
if(timerID != 0)
|
||||
{
|
||||
running = true;
|
||||
|
||||
if(SynchronizingObject != null && SynchronizingObject.InvokeRequired)
|
||||
{
|
||||
SynchronizingObject.BeginInvoke(
|
||||
new EventRaiser(OnStarted),
|
||||
new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnStarted(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new TimerException("Unable to start timer.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
if(!running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int result = timeKillEvent(timerID);
|
||||
|
||||
Debug.Assert(result == TIMERR_NOERROR);
|
||||
|
||||
running = false;
|
||||
|
||||
if(SynchronizingObject != null && SynchronizingObject.InvokeRequired)
|
||||
{
|
||||
SynchronizingObject.BeginInvoke(
|
||||
new EventRaiser(OnStopped),
|
||||
new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnStopped(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void TimerPeriodicEventCallback(int id, int msg, int user, int param1, int param2)
|
||||
{
|
||||
if(synchronizingObject != null)
|
||||
{
|
||||
synchronizingObject.BeginInvoke(tickRaiser, new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnTick(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private void TimerOneShotEventCallback(int id, int msg, int user, int param1, int param2)
|
||||
{
|
||||
if(synchronizingObject != null)
|
||||
{
|
||||
synchronizingObject.BeginInvoke(tickRaiser, new object[] { EventArgs.Empty });
|
||||
Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
OnTick(EventArgs.Empty);
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Raises the Disposed event.
|
||||
private void OnDisposed(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Disposed;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Started event.
|
||||
private void OnStarted(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Started;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Stopped event.
|
||||
private void OnStopped(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Stopped;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Tick event.
|
||||
private void OnTick(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Tick;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the object used to marshal event-handler calls.
|
||||
/// </summary>
|
||||
public ISynchronizeInvoke SynchronizingObject
|
||||
{
|
||||
get
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return synchronizingObject;
|
||||
}
|
||||
set
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
synchronizingObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Period
|
||||
{
|
||||
get
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return period;
|
||||
}
|
||||
set
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
else if(value < Capabilities.periodMin || value > Capabilities.periodMax)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Period", value,
|
||||
"Multimedia Timer period out of range.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
period = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Resolution
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
return resolution;
|
||||
}
|
||||
set
|
||||
{
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
else if(value < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Resolution", value,
|
||||
"timer resolution out of range.");
|
||||
}
|
||||
|
||||
resolution = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Mode Mode
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
|
||||
return mode;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
|
||||
mode = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the Timer is running.
|
||||
/// </summary>
|
||||
public bool IsRunning
|
||||
{
|
||||
get
|
||||
{
|
||||
return running;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timer capabilities.
|
||||
/// </summary>
|
||||
public static TimerCaps Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return caps;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public event System.EventHandler Disposed;
|
||||
|
||||
public ISite Site
|
||||
{
|
||||
get
|
||||
{
|
||||
return site;
|
||||
}
|
||||
set
|
||||
{
|
||||
site = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
|
||||
OnDisposed(EventArgs.Empty);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TimerException : ApplicationException
|
||||
{
|
||||
public TimerException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MonitoringDB.Entities
|
||||
{
|
||||
public class Process
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int ItemNr { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual string Description { get; set; }
|
||||
public virtual ReleaseStatus ReleaseStatus { get; set; }
|
||||
public virtual DateTime TimeStamp { get; set; }
|
||||
public virtual string UserName { get; set; }
|
||||
|
||||
public virtual IList<Part> Parts { get; set; }
|
||||
public virtual IList<Workstep> Worksteps { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default (private) constructor inicializing lists
|
||||
/// </summary>
|
||||
protected Process()
|
||||
{
|
||||
Parts = new List<Part>();
|
||||
Worksteps = new List<Workstep>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor used when this process is created
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public Process(string name)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Description = string.Empty;
|
||||
ReleaseStatus = ReleaseStatus.In_preparation;
|
||||
TimeStamp = DateTime.Now;
|
||||
UserName = "admin";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a copy of a process with a new name
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public virtual Process Clone(string name)
|
||||
{
|
||||
Process rslt = new Process(name);
|
||||
rslt.Description = Description;
|
||||
|
||||
foreach (var part in Parts) rslt.Parts.Add(part.Clone(rslt));
|
||||
foreach (var workstep in Worksteps) rslt.Worksteps.Add(workstep.Clone(rslt));
|
||||
|
||||
return rslt;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} '{1}' ({2}) {3} {4}",
|
||||
ItemNr,
|
||||
Name,
|
||||
TimeStamp.Date.ToShortDateString(),
|
||||
(Description == null) ? string.Empty : Description,
|
||||
ReleaseStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
namespace MonitoringDB
|
||||
{
|
||||
public enum CodeType
|
||||
{
|
||||
UniqueNr,
|
||||
FlowtubeNr, /// prvé 3 znaky sa zhodujú s poslednými 3 znakmi názvu
|
||||
FlowtubeNrLU, /// začiatok kódu sa zhoduje s názvom
|
||||
BatchNr,
|
||||
BatchNrContainingPartName,
|
||||
DateMMYY,
|
||||
QualityCheck,
|
||||
}
|
||||
|
||||
public enum CodeForm
|
||||
{
|
||||
Barcode,
|
||||
QRCode,
|
||||
Keyboard,
|
||||
OkNok,
|
||||
}
|
||||
|
||||
public enum CodeLocation
|
||||
{
|
||||
OnPart,
|
||||
OnPallet,
|
||||
}
|
||||
|
||||
public enum LifetimeManagement
|
||||
{
|
||||
None,
|
||||
OneYear,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum ReleaseStatus
|
||||
{
|
||||
In_preparation,
|
||||
Released,
|
||||
ReleasedActive,
|
||||
Deactivated,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Mode
|
||||
{
|
||||
Debug, // Debug mode - no Oracle database used
|
||||
Test, // Test database used
|
||||
Production, // Production database used
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum LoginLevel
|
||||
{
|
||||
None,
|
||||
TeamLeader,
|
||||
Administrator,
|
||||
MH,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum ItemSpecID
|
||||
{
|
||||
RefRecordID = 0,
|
||||
|
||||
TimeStamp,
|
||||
Workstep,
|
||||
Workplace,
|
||||
UserName,
|
||||
Barcode,
|
||||
PartBarcode,
|
||||
|
||||
TimeStamp2,
|
||||
Workstep2,
|
||||
Workplace2,
|
||||
UserName2,
|
||||
Barcode2,
|
||||
PartBarcode2,
|
||||
|
||||
SerialNr,
|
||||
PurchaseOrder,
|
||||
TestResult,
|
||||
MaxPruefindex,
|
||||
|
||||
Process,
|
||||
}
|
||||
|
||||
public enum ItemSpecCaps
|
||||
{
|
||||
None = 0,
|
||||
ReferenceRecord = 1,
|
||||
AssociatedRecord = 2,
|
||||
OracleQuery = 4,
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MonitoringDB.Forms
|
||||
{
|
||||
public partial class SettingsDlg : Form
|
||||
{
|
||||
public string WorkplaceName
|
||||
{
|
||||
set { workplaceNameTextBox.Text = value; }
|
||||
get { return workplaceNameTextBox.Text; }
|
||||
}
|
||||
|
||||
public string ConnectionString
|
||||
{
|
||||
set { connectionStringTextBox.Text = value; }
|
||||
get { return connectionStringTextBox.Text; }
|
||||
}
|
||||
|
||||
public string UsersDBConnString
|
||||
{
|
||||
set { usersDBConnStringTextBox.Text = value; }
|
||||
get { return usersDBConnStringTextBox.Text; }
|
||||
}
|
||||
|
||||
public bool OracleBattery
|
||||
{
|
||||
set { oracleBatteryCheckBox.Checked = value; }
|
||||
get { return oracleBatteryCheckBox.Checked; }
|
||||
}
|
||||
|
||||
public bool CheckPcbIsInOracle
|
||||
{
|
||||
set { checkPcbIsInOracleCheckBox.Checked = value; }
|
||||
get { return checkPcbIsInOracleCheckBox.Checked; }
|
||||
}
|
||||
|
||||
public int ExtraBatterLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
int extraLifetime;
|
||||
if (int.TryParse(extraBatteryLifetimeTextBox.Text, out extraLifetime) && extraLifetime >= 0) return extraLifetime;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public MonitoringDB.Mode Mode
|
||||
{
|
||||
set
|
||||
{
|
||||
radioButton1.Checked = (value == MonitoringDB.Mode.Test);
|
||||
radioButton2.Checked = (value == MonitoringDB.Mode.Production);
|
||||
}
|
||||
get
|
||||
{
|
||||
return radioButton1.Checked ? MonitoringDB.Mode.Test : MonitoringDB.Mode.Production;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Basic configuration dialog
|
||||
/// </summary>
|
||||
/// <param name="isWorkplace">false = Konfiguracia pracovisk, true = Pracovisko</param>
|
||||
public SettingsDlg(bool isWorkplace)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (isWorkplace)
|
||||
{
|
||||
oracleGroupBox.Visible = true;
|
||||
}
|
||||
extraBatteryLifetimeTextBox.Text = "0";
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MonitoringDB.Forms
|
||||
{
|
||||
public partial class TrivialLoginDlg : Form
|
||||
{
|
||||
public LoginLevel LoginLevel;
|
||||
|
||||
public TrivialLoginDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoginLevel = LoginLevel.None;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (passwordTextBox.Text.ToLower().Equals("barcode"))
|
||||
{
|
||||
LoginLevel = LoginLevel.Administrator;
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else if (passwordTextBox.Text.ToLower().Equals("teamleader"))
|
||||
{
|
||||
LoginLevel = LoginLevel.TeamLeader;
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else if (passwordTextBox.Text.ToLower().Equals("kremik"))
|
||||
{
|
||||
LoginLevel = LoginLevel.MH;
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
-105
@@ -1,105 +0,0 @@
|
||||
namespace MonitoringDB.Forms
|
||||
{
|
||||
partial class TrivialLoginDlg
|
||||
{
|
||||
/// <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.passwordGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.passwordGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// passwordGroupBox
|
||||
//
|
||||
this.passwordGroupBox.Controls.Add(this.passwordTextBox);
|
||||
this.passwordGroupBox.Location = new System.Drawing.Point(12, 10);
|
||||
this.passwordGroupBox.Name = "passwordGroupBox";
|
||||
this.passwordGroupBox.Size = new System.Drawing.Size(200, 49);
|
||||
this.passwordGroupBox.TabIndex = 0;
|
||||
this.passwordGroupBox.TabStop = false;
|
||||
this.passwordGroupBox.Text = "Heslo";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
this.passwordTextBox.Location = new System.Drawing.Point(51, 18);
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.PasswordChar = '*';
|
||||
this.passwordTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.passwordTextBox.TabIndex = 0;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(237, 18);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 39);
|
||||
this.okButton.TabIndex = 1;
|
||||
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(330, 18);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 39);
|
||||
this.cancelButton.TabIndex = 2;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// LoginDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(426, 73);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.passwordGroupBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "LoginDlg";
|
||||
this.Text = "LoginDlg";
|
||||
this.passwordGroupBox.ResumeLayout(false);
|
||||
this.passwordGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox passwordGroupBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
namespace MonitoringDB.Mappings
|
||||
{
|
||||
class ProcessMap : ClassMap<Entities.Process>
|
||||
{
|
||||
public ProcessMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Description);
|
||||
Map(x => x.ReleaseStatus);
|
||||
Map(x => x.TimeStamp);
|
||||
Map(x => x.UserName);
|
||||
|
||||
HasMany(x => x.Parts)
|
||||
.OrderBy("Name")
|
||||
.Cascade.All();
|
||||
HasMany(x => x.Worksteps)
|
||||
.OrderBy("WorkstepNr")
|
||||
.Cascade.All();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-5
@@ -27,8 +27,8 @@ namespace Results
|
||||
public Batch Batch;
|
||||
public WaterMeter[] WaterMeters;
|
||||
|
||||
public static BatchResults NewFromProcedure(int batchNr, int benchId, string user, int userNr, string programVer,
|
||||
Config.Entities.Procedure procedure,
|
||||
public static BatchResults NewFromProcedure(int batchNr, int benchId, string benchName, string a1, string a2, string a3, string a4, string a5,
|
||||
string user, int userNr, string programVer, Config.Entities.Procedure procedure,
|
||||
WaterMeterData[] waterMeterDatas, int[] waterMeterParts, double densityCorr)
|
||||
{
|
||||
BatchResults d = new BatchResults(waterMeterDatas.Length);
|
||||
@@ -37,8 +37,14 @@ namespace Results
|
||||
/// Create new batch
|
||||
d.Batch = new Batch()
|
||||
{
|
||||
TestBenchId = benchId,
|
||||
BatchNr = batchNr,
|
||||
BatchNr = batchNr,
|
||||
TestBenchId = benchId,
|
||||
TestBenchName = benchName,
|
||||
Address1 = a1,
|
||||
Address2 = a2,
|
||||
Address3 = a3,
|
||||
Address4 = a4,
|
||||
Address5 = a5,
|
||||
ProgramVersion = programVer,
|
||||
UserName = user,
|
||||
UserNumber = userNr,
|
||||
@@ -199,8 +205,10 @@ namespace Results
|
||||
{
|
||||
foreach (var mtr in WaterMeters[i].MeterTestRslts)
|
||||
{
|
||||
if (mtr.TestData().Name.ToLower().Contains("adj"))
|
||||
if (mtr.TestData().Name.ToLower().Contains("adj") || mtr.TestData().Name.ToLower().Contains("just"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,13 @@ namespace Results.Entities
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int BatchNr { get; set; }
|
||||
public virtual int TestBenchId { get; set; }
|
||||
public virtual string ProgramVersion { get; set; }
|
||||
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string ProgramVersion { get; set; }
|
||||
public virtual string UserName { get; set; }
|
||||
public virtual int UserNumber { get; set; }
|
||||
public virtual string ProcedureName { get; set; }
|
||||
|
||||
@@ -28,6 +28,9 @@ namespace Results.Entities
|
||||
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
#if ORACLE_DB
|
||||
public virtual double LastError { get; set; } /// [%] Previous test error at this Q in case Pruefindex > 1
|
||||
#endif
|
||||
|
||||
public virtual WaterMeter WaterMeter { get; set; } /// reference to the WaterMeter entity
|
||||
public virtual TestRslt TestRslt { get; set; } /// reference to the TestRslt entity
|
||||
@@ -80,10 +83,18 @@ namespace Results.Entities
|
||||
public virtual bool IsDataStream() { return (RegReaderType == (int)Config.Entities.RegisterReaderType.DataStream); }
|
||||
public virtual bool IsManual() { return (RegReaderType == (int)Config.Entities.RegisterReaderType.Manual); }
|
||||
|
||||
public virtual string PassedColorStr()
|
||||
public virtual string PassedColorStr(string yesNoFormatOrEmpty)
|
||||
{
|
||||
return Utils.PassedColorStr(Passed, Evaluate());
|
||||
}
|
||||
if (string.IsNullOrEmpty(yesNoFormatOrEmpty))
|
||||
{
|
||||
return Utils.PassedColorStr(Passed, Evaluate());
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] yesNo = yesNoFormatOrEmpty.Split(new char[] { '~' });
|
||||
return Passed ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
|
||||
}
|
||||
}
|
||||
|
||||
public MeterTestRslt()
|
||||
{
|
||||
|
||||
@@ -26,8 +26,10 @@ namespace Results.Entities
|
||||
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double PulsesMaster { get; set; }
|
||||
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected
|
||||
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter
|
||||
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
|
||||
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
|
||||
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
|
||||
/// When mass measurement is not available, corrected by a correction table.
|
||||
public virtual double MassStartRaw { get; set; } /// [kg]
|
||||
public virtual double MassStart { get; set; } /// [kg]
|
||||
public virtual double MassEndRaw { get; set; } /// [kg]
|
||||
@@ -40,7 +42,7 @@ namespace Results.Entities
|
||||
public virtual double FlowVolume { get; set; } /// [m3/h]
|
||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||
public virtual double ErrorMaster { get; set; } /// [%]
|
||||
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
|
||||
|
||||
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
|
||||
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||
@@ -107,7 +109,7 @@ namespace Results.Entities
|
||||
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
|
||||
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
|
||||
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
|
||||
public virtual float FlowMin { get; set; } /// [m3/h] not mapped to DB
|
||||
public virtual float FlowMin { get; set; } /// [m3/h]
|
||||
public virtual float FlowMax { get; set; } /// [m3/h]
|
||||
|
||||
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
|
||||
|
||||
@@ -58,13 +58,15 @@ namespace Results.Entities
|
||||
|
||||
#if IPERL
|
||||
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
|
||||
public virtual double Q2ErrWOCorrection { get; set; }
|
||||
public virtual double OrigCalibFactor { get; set; } /// Original iPerl calibration factor used during the test
|
||||
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double OrigCalibFactorLNA{ get; set; } /// Original iPerl LNA calibration factor used during the test
|
||||
public virtual double CalibFactorLNA { get; set; } /// iPerl LNA calibration factor used during the test
|
||||
public virtual double Q2ErrWOCorrection { get; set; }
|
||||
public virtual bool Q2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
public virtual double Q2Correction { get; set; } /// !!! obsolete
|
||||
public virtual int Q2CorrRFlow { get; set; } /// iPerl Q2 correction for the R-flow written to iPerl
|
||||
public virtual int Q2CorrLFlow { get; set; } /// iPerl Q2 correction for the L-flow written to iPerl
|
||||
public virtual int Q2CorrRL { get; set; } /// iPerl Q2 correction for the R-flow written to iPerl
|
||||
public virtual int Q2CorrLR { get; set; } /// iPerl Q2 correction for the L-flow written to iPerl
|
||||
public virtual int Q2CorrFlowRight { get; set; } /// 1 = right to left
|
||||
public virtual double Diff2Hz8Hz { get; set; }
|
||||
public virtual bool Hz2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
@@ -117,7 +119,7 @@ namespace Results.Entities
|
||||
ErrorFlagsMode eFlagsMode = 0; /// = ErrorFlagsMode.Off;
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
|
||||
if (mtr.Evaluate() && mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
|
||||
if ((int)mtr.TestRslt.ErrorFlagsMode() > (int)eFlagsMode) eFlagsMode = mtr.TestRslt.ErrorFlagsMode();
|
||||
}
|
||||
errorFlagsMode = eFlagsMode; /// Maximum from all tests (=ErrorFlagsMode.On if at least one test is ErrorFlagsMode.On)
|
||||
@@ -149,7 +151,7 @@ namespace Results.Entities
|
||||
{
|
||||
ErrorFlagsMode errorFlagsMode;
|
||||
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM(out errorFlagsMode));
|
||||
return string.IsNullOrEmpty(eFlags) ? (WaterMeterData.Text4 + PassedColorStr()) : eFlags;
|
||||
return string.IsNullOrEmpty(eFlags) ? (WaterMeterData.Text4 + PassedColorStr(null)) : eFlags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -209,9 +211,17 @@ namespace Results.Entities
|
||||
}
|
||||
|
||||
|
||||
public virtual string PassedColorStr()
|
||||
public virtual string PassedColorStr(string yesNoFormatOrEmpty)
|
||||
{
|
||||
return Utils.PassedColorStr(Passed, true);
|
||||
if (string.IsNullOrEmpty(yesNoFormatOrEmpty))
|
||||
{
|
||||
return Utils.PassedColorStr(Passed, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] yesNo = yesNoFormatOrEmpty.Split(new char[] { '~' });
|
||||
return Passed ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +274,21 @@ namespace Results.Entities
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool TryGetTestRslt(string testName, out TestRslt testRslt)
|
||||
{
|
||||
MeterTestRslt mtr = GetMeterTestRslt(testName);
|
||||
if (mtr != null)
|
||||
{
|
||||
testRslt = mtr.TestRslt;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
testRslt = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual TestData GetTestData(string testName)
|
||||
{
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
@@ -276,6 +301,21 @@ namespace Results.Entities
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool TryGetTestData(string testName, out TestData testData)
|
||||
{
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.TestRslt.TestData.Name == testName)
|
||||
{
|
||||
testData = mtr.TestRslt.TestData;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
testData = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -312,8 +352,8 @@ namespace Results.Entities
|
||||
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
|
||||
Q2CorrectionDone = src.Q2CorrectionDone;
|
||||
Q2Correction = src.Q2Correction;
|
||||
Q2CorrRFlow = src.Q2CorrRFlow;
|
||||
Q2CorrLFlow = src.Q2CorrLFlow;
|
||||
Q2CorrRL = src.Q2CorrRL;
|
||||
Q2CorrLR = src.Q2CorrLR;
|
||||
Q2CorrFlowRight = src.Q2CorrFlowRight;
|
||||
Diff2Hz8Hz = src.Diff2Hz8Hz;
|
||||
Hz2CorrectionDone = src.Hz2CorrectionDone;
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static class ListViewExtensions
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct HDITEM
|
||||
{
|
||||
public Mask mask;
|
||||
public int cxy;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszText;
|
||||
public IntPtr hbm;
|
||||
public int cchTextMax;
|
||||
public Format fmt;
|
||||
public IntPtr lParam;
|
||||
// _WIN32_IE >= 0x0300
|
||||
public int iImage;
|
||||
public int iOrder;
|
||||
// _WIN32_IE >= 0x0500
|
||||
public uint type;
|
||||
public IntPtr pvFilter;
|
||||
// _WIN32_WINNT >= 0x0600
|
||||
public uint state;
|
||||
|
||||
[Flags]
|
||||
public enum Mask
|
||||
{
|
||||
Format = 0x4, // HDI_FORMAT
|
||||
};
|
||||
|
||||
[Flags]
|
||||
public enum Format
|
||||
{
|
||||
SortDown = 0x200, // HDF_SORTDOWN
|
||||
SortUp = 0x400, // HDF_SORTUP
|
||||
};
|
||||
};
|
||||
|
||||
public const int LVM_FIRST = 0x1000;
|
||||
public const int LVM_GETHEADER = LVM_FIRST + 31;
|
||||
|
||||
public const int HDM_FIRST = 0x1200;
|
||||
public const int HDM_GETITEM = HDM_FIRST + 11;
|
||||
public const int HDM_SETITEM = HDM_FIRST + 12;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
|
||||
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, SortOrder order)
|
||||
{
|
||||
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
|
||||
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
|
||||
{
|
||||
var columnPtr = new IntPtr(columnNumber);
|
||||
var item = new HDITEM
|
||||
{
|
||||
mask = HDITEM.Mask.Format
|
||||
};
|
||||
|
||||
if (SendMessage(columnHeader, HDM_GETITEM, columnPtr, ref item) == IntPtr.Zero)
|
||||
{
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
if (order != SortOrder.None && columnNumber == columnIndex)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case SortOrder.Ascending:
|
||||
item.fmt &= ~HDITEM.Format.SortDown;
|
||||
item.fmt |= HDITEM.Format.SortUp;
|
||||
break;
|
||||
|
||||
case SortOrder.Descending:
|
||||
item.fmt &= ~HDITEM.Format.SortUp;
|
||||
item.fmt |= HDITEM.Format.SortDown;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.fmt &= ~HDITEM.Format.SortDown & ~HDITEM.Format.SortUp;
|
||||
}
|
||||
|
||||
if (SendMessage(columnHeader, HDM_SETITEM, columnPtr, ref item) == IntPtr.Zero)
|
||||
{
|
||||
throw new Win32Exception();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public class LviIntColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
SortOrder order;
|
||||
|
||||
public LviIntColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviIntColumnComparer(int column, SortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
int valX = int.Parse(((ListViewItem)x).SubItems[column].Text);
|
||||
int valY = int.Parse(((ListViewItem)y).SubItems[column].Text);
|
||||
return (order == SortOrder.Descending) ? (valY - valX) : (valX - valY);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public class LviTextColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
SortOrder order;
|
||||
|
||||
public LviTextColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviTextColumnComparer(int column, SortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
string txtX = ((ListViewItem)x).SubItems[column].Text;
|
||||
string txtY = ((ListViewItem)y).SubItems[column].Text;
|
||||
return (order == SortOrder.Descending) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
-2
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2016-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Results
|
||||
Pulse__liter, /// 61 Water meter constant (pulses per liter) specific for one test
|
||||
Reference_pulses_ni, /// 62 Reference pulses gated for specific meter (synchro method)
|
||||
Reference_energy, /// 63
|
||||
Test_bench_ID, /// 64
|
||||
Bench_ID, /// 64 Test bench ID (int) obtained from a component implementing IBenchInfo
|
||||
Program_version, /// 65
|
||||
User_name, /// 66
|
||||
User_nr, /// 67
|
||||
@@ -251,7 +251,24 @@ namespace Results
|
||||
Flow_ctv_start, /// 217
|
||||
Flow_ctv_end, /// 218
|
||||
ConstMasterRaw, /// 219 ConstMaster (like 194) uncorrected
|
||||
Reference_error_corr, /// 220 Reference flow meter error after correction using correction curve
|
||||
|
||||
Proc_description, /// 221 Procedure description (CEVAK, not mapped to DB)
|
||||
Bench_name, /// 222 'Test bench name' (string) obtained from a component implementing IBenchInfo
|
||||
Bench_address1, /// 223 'Address 1' from IBenchInfo
|
||||
Bench_address2, /// 224 'Address 2' from IBenchInfo
|
||||
Bench_address3, /// 225 'Address 3' from IBenchInfo
|
||||
Bench_address4, /// 226 'Address 4' from IBenchInfo
|
||||
Bench_address5, /// 227 'Address 5' from IBenchInfo
|
||||
|
||||
Max_test_index, /// 228 MaxPruefindex % 100
|
||||
VolumeCTV, /// 229
|
||||
|
||||
/// iPerl
|
||||
LastError, /// 230 For iPerl previous test result (test with Proefindex-1)
|
||||
OrigCalibFactorLNA, /// 231
|
||||
CalibFactorLNA, /// 232
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,10 @@ namespace Results.Mappings
|
||||
Map(x => x.Error);
|
||||
Map(x => x.TestDone);
|
||||
Map(x => x.Passed);
|
||||
|
||||
References(x => x.WaterMeter);
|
||||
#if ORACLE_DB
|
||||
Map(x => x.LastError);
|
||||
#endif
|
||||
References(x => x.WaterMeter);
|
||||
References(x => x.TestRslt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
@@ -31,18 +31,24 @@ namespace Results.Mappings
|
||||
Map(x => x.SerialNrEx);
|
||||
Map(x => x.OrigCalibFactor);
|
||||
Map(x => x.CalibFactor);
|
||||
Map(x => x.Q2ErrWOCorrection);
|
||||
Map(x => x.OrigCalibFactorLNA);
|
||||
Map(x => x.CalibFactorLNA);
|
||||
Map(x => x.Q2ErrWOCorrection);
|
||||
Map(x => x.Q2CorrectionDone);
|
||||
Map(x => x.Q2Correction);
|
||||
Map(x => x.Q2CorrRFlow);
|
||||
Map(x => x.Q2CorrLFlow);
|
||||
Map(x => x.Q2CorrRL).Column("Q2CorrRFlow");
|
||||
Map(x => x.Q2CorrLR).Column("Q2CorrLFlow");
|
||||
Map(x => x.Q2CorrFlowRight);
|
||||
Map(x => x.Diff2Hz8Hz);
|
||||
Map(x => x.Hz2CorrectionDone);
|
||||
Map(x => x.Hz2Correction);
|
||||
Map(x => x.FWVersion);
|
||||
#endif
|
||||
References(x => x.WaterMeterData);
|
||||
#if ORACLE_DB
|
||||
Map(x => x.Pruefindex);
|
||||
Map(x => x.HydrPruefung);
|
||||
#endif
|
||||
References(x => x.WaterMeterData);
|
||||
References(x => x.Batch);
|
||||
HasMany(x => x.MeterTestRslts)
|
||||
.Cascade.All();
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace Results.Output.Printers.Enhanced
|
||||
|
||||
Table table0 = Table.Create_TestsAreRows(batch.WaterMeters[0], testItems, style);
|
||||
SizeF tableSize = table0.Measure(e);
|
||||
int wmSectionHeight = (int)tableSize.Height + 3 * SpacingOne4Header;
|
||||
int wmSectionHeight = (int)tableSize.Height + SpacingOne4Header * ((tableSize.Height > 0) ? 3 : 2);
|
||||
|
||||
nrWMsOnFirstPage = (printHeight - BodyTop + TitleY - 2 * SpacingOne) / wmSectionHeight;
|
||||
nrWMsOnNextPage = (printHeight - 2 * SpacingOne) / wmSectionHeight;
|
||||
@@ -239,7 +239,10 @@ namespace Results.Output.Printers.Enhanced
|
||||
for (int wmNr = nextWMNr; wmNr < Math.Min(nextWMNr + nrWMsOnPage, batch.WaterMeters.Count); wmNr++) /// wmNr is 0-based
|
||||
{
|
||||
int wmPosition = true ? batch.WaterMeters[wmNr].WMPosition : (wmNr + 1);
|
||||
nextWmTop = (int)PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop) + SpacingOneAndHalf4Header;
|
||||
if (!cfg.GoodOnly || batch.WaterMeters[wmNr].Passed)
|
||||
{
|
||||
nextWmTop = (int)PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop) + SpacingOneAndHalf4Header;
|
||||
}
|
||||
}
|
||||
|
||||
nextWMNr += nrWMsOnPage;
|
||||
@@ -265,7 +268,7 @@ namespace Results.Output.Printers.Enhanced
|
||||
/// <param name="top">Top coordinate of watermeter data</param>
|
||||
/// <returns>The height of the printed section</returns>
|
||||
float PrintWM(System.Drawing.Printing.PrintPageEventArgs e,
|
||||
Results.Entities.WaterMeter wm, int printedWMNr, int top)
|
||||
Results.Entities.WaterMeter wm, int printedWMNr, int top)
|
||||
{
|
||||
/// Print the water meter number and the serial number
|
||||
string wmText = string.Format("{0} {1}", Strings.Water_Meter, printedWMNr);
|
||||
@@ -278,7 +281,14 @@ namespace Results.Output.Printers.Enhanced
|
||||
|
||||
Table table = Table.Create_TestsAreRows(wm, testItems, style);
|
||||
|
||||
return table.Draw(e, leftMargin, top + SpacingOneAndHalf4Header);
|
||||
if (table.IsEmpty())
|
||||
{
|
||||
return top;
|
||||
}
|
||||
else
|
||||
{
|
||||
return table.Draw(e, leftMargin, top + SpacingOneAndHalf4Header);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,10 +57,21 @@ namespace Results.Output.Printers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when table has either rows or columns count == 0
|
||||
/// </summary>
|
||||
/// <returns>true when empty</returns>
|
||||
public bool IsEmpty()
|
||||
{
|
||||
return (Rows == null || RowsCount == 0 || Rows[0] == null || Rows[0].Length == 0);
|
||||
}
|
||||
|
||||
|
||||
public SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
SizeF retVal = new SizeF(0, 0);
|
||||
if (RowsCount == 0) return retVal;
|
||||
|
||||
if (IsEmpty()) return retVal; /// Empty table => zero Size
|
||||
|
||||
float[] columnWidth = new float[ColumnsCount];
|
||||
float[] rowHeight = new float[RowsCount];
|
||||
@@ -117,10 +128,10 @@ namespace Results.Output.Printers
|
||||
|
||||
public float Draw(System.Drawing.Printing.PrintPageEventArgs e, float left, float top)
|
||||
{
|
||||
if (RowsCount == 0) return top;
|
||||
if (IsEmpty()) return top; /// Empty table
|
||||
|
||||
int tblColumnsCount = Rows[0].Length;
|
||||
|
||||
|
||||
float[] columnWidth = new float[tblColumnsCount];
|
||||
float[] columnPos = new float[tblColumnsCount];
|
||||
float[] vertLinePos = new float[tblColumnsCount + 1];
|
||||
|
||||
@@ -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.18.918.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.918.0")]
|
||||
[assembly: AssemblyVersion("2.18.1041.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1041.0")]
|
||||
|
||||
Generated
+46
-1
@@ -69,6 +69,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Address.
|
||||
/// </summary>
|
||||
internal static string Address {
|
||||
get {
|
||||
return ResourceManager.GetString("Address", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Alignment.
|
||||
/// </summary>
|
||||
@@ -123,6 +132,24 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bench ID.
|
||||
/// </summary>
|
||||
internal static string Bench_ID {
|
||||
get {
|
||||
return ResourceManager.GetString("Bench_ID", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bench name.
|
||||
/// </summary>
|
||||
internal static string Bench_name {
|
||||
get {
|
||||
return ResourceManager.GetString("Bench_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
@@ -636,6 +663,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Procedure description.
|
||||
/// </summary>
|
||||
internal static string Procedure_description {
|
||||
get {
|
||||
return ResourceManager.GetString("Procedure_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Producer.
|
||||
/// </summary>
|
||||
@@ -1023,6 +1059,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Relative error of a meter in previous test/in production.
|
||||
/// </summary>
|
||||
internal static string Tooltip_E_rel_last {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_E_rel_last", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Relative error of the master meter.
|
||||
/// </summary>
|
||||
@@ -1303,7 +1348,7 @@ namespace Results.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow calculated from conventional true volume and the time.
|
||||
/// Looks up a localized string similar to Flow measured by the reference flow meter.
|
||||
/// </summary>
|
||||
internal static string Tooltip_Q_v_r {
|
||||
get {
|
||||
|
||||
@@ -213,4 +213,43 @@
|
||||
<data name="Unit" xml:space="preserve">
|
||||
<value>Jednotka</value>
|
||||
</data>
|
||||
<data name="Approval" xml:space="preserve">
|
||||
<value>Schválení</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Stanice</value>
|
||||
</data>
|
||||
<data name="Density" xml:space="preserve">
|
||||
<value>Hustota</value>
|
||||
</data>
|
||||
<data name="Density_correction" xml:space="preserve">
|
||||
<value>Korekce hustoty</value>
|
||||
</data>
|
||||
<data name="End" xml:space="preserve">
|
||||
<value>Konec</value>
|
||||
</data>
|
||||
<data name="Procedure" xml:space="preserve">
|
||||
<value>Procedura</value>
|
||||
</data>
|
||||
<data name="Procedure_description" xml:space="preserve">
|
||||
<value>Popis procedury</value>
|
||||
</data>
|
||||
<data name="Start" xml:space="preserve">
|
||||
<value>Začátek</value>
|
||||
</data>
|
||||
<data name="User" xml:space="preserve">
|
||||
<value>Uživatel</value>
|
||||
</data>
|
||||
<data name="User_description" xml:space="preserve">
|
||||
<value>Popis uživatele</value>
|
||||
</data>
|
||||
<data name="Bench_ID" xml:space="preserve">
|
||||
<value>ID stanice</value>
|
||||
</data>
|
||||
<data name="Bench_name" xml:space="preserve">
|
||||
<value>Jméno stanice</value>
|
||||
</data>
|
||||
<data name="Address" xml:space="preserve">
|
||||
<value>Adresa</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -514,7 +514,7 @@
|
||||
<value>Flow obtained from the master meter - mean</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_v_r" xml:space="preserve">
|
||||
<value>Flow calculated from conventional true volume and the time</value>
|
||||
<value>Flow measured by the reference flow meter</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_ac" xml:space="preserve">
|
||||
<value>Actual temperature at the diverter</value>
|
||||
@@ -723,4 +723,19 @@
|
||||
<data name="Unit" xml:space="preserve">
|
||||
<value>Unit</value>
|
||||
</data>
|
||||
<data name="Procedure_description" xml:space="preserve">
|
||||
<value>Procedure description</value>
|
||||
</data>
|
||||
<data name="Bench_ID" xml:space="preserve">
|
||||
<value>Bench ID</value>
|
||||
</data>
|
||||
<data name="Bench_name" xml:space="preserve">
|
||||
<value>Bench name</value>
|
||||
</data>
|
||||
<data name="Address" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name="Tooltip_E_rel_last" xml:space="preserve">
|
||||
<value>Relative error of a meter in previous test/in production</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</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;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -77,6 +77,9 @@
|
||||
<Compile Include="Forms\ListViewEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ListViewExtensions.cs" />
|
||||
<Compile Include="Forms\LviIntColumnComparer.cs" />
|
||||
<Compile Include="Forms\LviTextColumnComparer.cs" />
|
||||
<Compile Include="Forms\ResultsConfigCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
||||
+2
-2
@@ -54,9 +54,9 @@ namespace Results
|
||||
|
||||
public static string PassedColorStr(bool passed, bool useRedGreenColor)
|
||||
{
|
||||
#if PUCHONG_PT200
|
||||
#if PUCHONG_200
|
||||
return (useRedGreenColor) ? (passed ? "OK|Green" : "NG|Red") : (passed ? "OK|White" : "NG|White");
|
||||
#elif BAHRAIN_50
|
||||
#elif BAHRAIN_50 || DUBAJ_50
|
||||
return (useRedGreenColor) ? (passed ? "PASSED|Green" : "FAILED|Red") : (passed ? "PASSED|White" : "FAILED|White");
|
||||
#elif LANG_PL
|
||||
return (useRedGreenColor) ? (passed ? "+|Green" : "-|Red") : (passed ? "+|White" : "-|White");
|
||||
|
||||
@@ -132,7 +132,10 @@ namespace Results
|
||||
/// Static list of all available items
|
||||
public static readonly IList<WMeterRsltItemSpec> AllItems;
|
||||
|
||||
/// Static constructor that initializes the list of all items
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="WMeterRsltItemSpec"/> class.
|
||||
/// </summary>
|
||||
/// Static constructor that initializes the list of all items
|
||||
static WMeterRsltItemSpec()
|
||||
{
|
||||
AllItems = new List<WMeterRsltItemSpec>();
|
||||
@@ -141,17 +144,19 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Separator, "Separator", "", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => string.Empty));
|
||||
|
||||
/// Common
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (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) => FormatStr(f, w.ProcedureName())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.BatchNr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (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) => FormatStr(f, w.ProcedureName())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Proc_description, Strings.Procedure_description, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.ProcedureDescription)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.BatchNr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method())));
|
||||
|
||||
///
|
||||
/// Volume
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeRef)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.VolumeCTV, string.Format("{0} CTV ()", Strings.VName_Vol), Quantity.Volume, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).VolumeCTV)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeRef)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
@@ -209,7 +214,7 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_max, string.Format("{0} ref max ()", Strings.VName_Flow), Strings.Tooltip_Q_max, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_start, string.Format("{0} ref start ()",Strings.VName_Flow),Strings.Tooltip_Q_start, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_end, string.Format("{0} ref end ()", Strings.VName_Flow), Strings.Tooltip_Q_end, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv min ()", Strings.VName_Flow), "Mean CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TestTime == 0) ? 0 : w.GetTestRslt(t).VolumeCTV / w.GetTestRslt(t).TestTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv ()", Strings.VName_Flow), "CTV of the flow (mean val.)",Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TestTime == 0) ? 0 : 3.6 * w.GetTestRslt(t).VolumeCTV / w.GetTestRslt(t).TestTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_min, string.Format("{0} ctv min ()", Strings.VName_Flow), "Min. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMin / w.GetTestRslt(t).VolumeMaster)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_max, string.Format("{0} ctv max ()", Strings.VName_Flow), "Max. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMax / w.GetTestRslt(t).VolumeMaster)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_start, string.Format("{0} ctv start ()", Strings.VName_Flow), "Start flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowStart / w.GetTestRslt(t).VolumeMaster)));
|
||||
@@ -304,12 +309,15 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).ErrLimHi())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).Uncertainty())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, string.Format("{0} rel.ref. ()", Strings.VName_Error), Strings.Tooltip_E_rel_ref, Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).ErrorMaster)));
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error_corr, string.Format("{0} ref.corr. ()", Strings.VName_Error), "Relative error of the reference flow meter after correction using correction curve", Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", Config.Formulas.ErrorFromVolumes(w.GetTestRslt(t).ConstMasterCorr, w.GetTestRslt(t).ConstMaster))));
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.LastError, string.Format("{0} rel. last ()", Strings.VName_Error), Strings.Tooltip_E_rel_last, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).LastError)));
|
||||
#else
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr() : ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr(f)
|
||||
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.PassedOrErrorFlagsStr()))); /// PL specific result
|
||||
|
||||
@@ -371,8 +379,14 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_aux, Strings.EndState_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndStateAux)));
|
||||
|
||||
/// Batch info
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.TestBenchId.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.ProgramVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_ID, Strings.Bench_ID, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.TestBenchId.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_name, Strings.Bench_name, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.TestBenchName) ? w.Batch.TestBenchName : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_address1, Strings.Address + " 1", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.Address1) ? w.Batch.Address1 : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_address2, Strings.Address + " 2", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.Address2) ? w.Batch.Address2 : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_address3, Strings.Address + " 3", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.Address3) ? w.Batch.Address3 : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_address4, Strings.Address + " 4", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.Address4) ? w.Batch.Address4 : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Bench_address5, Strings.Address + " 5", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, !string.IsNullOrEmpty(w.Batch.Address5) ? w.Batch.Address5 : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.ProgramVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.Batch.UserNumber)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, Users.Entities.User.EncodedStrToUserName(w.Batch.UserName))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_description, Strings.User_description, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, Users.Entities.User.EncodedStrToFullName(w.Batch.UserName))));
|
||||
@@ -397,20 +411,25 @@ namespace Results
|
||||
#endif
|
||||
|
||||
#if IPERL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactorLNA,"iPerl OrigCalibFactorLNA",Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactorLNA)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactorLNA, "iPerl CalibFactorLNA", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactorLNA)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean,ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLR)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_test_index, "iPerl test index", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, (w.Pruefindex % 100))));
|
||||
#endif
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null && w.GetMeterTestRslt(t).TestDone) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null && w.GetMeterTestRslt(t).Passed) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagsStr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlagsEx, Strings.Error_flags + "Ex", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ErrorFlagsStrEx())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0001) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).TestDone)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).Passed)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagsStr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlagsEx, Strings.Error_flags + "Ex", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ErrorFlagsStrEx())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0001) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E2, "E2 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0002) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E3, "E3 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0004) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E4, "E4 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0008) != 0) ? Strings.Yes : Strings.No));
|
||||
@@ -443,9 +462,22 @@ namespace Results
|
||||
return string.IsNullOrEmpty(format) ? value : string.Format(format, value);
|
||||
}
|
||||
|
||||
public static string FormatBool(string format, bool value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return value ? Strings.Yes : Strings.No;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] yesNo = format.Split(new char[] { '~' });
|
||||
return value ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Strings.No);
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatInt(string format, int value)
|
||||
{
|
||||
return string.IsNullOrEmpty(format) ? value.ToString() : string.Format(format, value);
|
||||
return string.IsNullOrEmpty(format) ? value.ToString() : string.Format(format, value);
|
||||
}
|
||||
|
||||
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v)
|
||||
|
||||
@@ -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.18.856.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.856.0")]
|
||||
[assembly: AssemblyVersion("2.18.995.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.995.0")]
|
||||
|
||||
@@ -237,4 +237,7 @@
|
||||
<data name="Print" xml:space="preserve">
|
||||
<value>Vytisknout</value>
|
||||
</data>
|
||||
<data name="Add_data_from_Oracle" xml:space="preserve">
|
||||
<value>Dohledej údaje z Oracle</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -825,4 +825,7 @@
|
||||
<data name="Error_exporting_results" xml:space="preserve">
|
||||
<value>Error exporting results</value>
|
||||
</data>
|
||||
<data name="Add_data_from_Oracle" xml:space="preserve">
|
||||
<value>Add data from Oracle</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -105,6 +105,15 @@ namespace ResultsBrowser.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add data from Oracle.
|
||||
/// </summary>
|
||||
internal static string Add_data_from_Oracle {
|
||||
get {
|
||||
return ResourceManager.GetString("Add_data_from_Oracle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add filter.
|
||||
/// </summary>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</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;TURA_SPECIAL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -398,21 +398,21 @@ namespace ResultsBrowser
|
||||
{
|
||||
new Results.Output.Printers.Munich.MunichPrintDocument(string.Format("4/13 - {0}", BenchName()), wm, Config.Entities.PageOrientation.Portrait).Print();
|
||||
}
|
||||
#elif CEVAK_PT40_272
|
||||
#elif CEVAK_40
|
||||
IList<Results.Entities.Batch> batches = new List<Results.Entities.Batch>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (!batches.Contains(wm.Batch)) batches.Add(wm.Batch);
|
||||
}
|
||||
|
||||
foreach (var batch in batches)
|
||||
{
|
||||
new Results.Output.Printers.Cevak.PrintDocumentCevak(batch,
|
||||
Config.Entities.PageOrientation.Portrait,
|
||||
60, 60, 60,
|
||||
"PT40 Z/E-35-A",
|
||||
"0111-OOP-C035-13").Print();
|
||||
}
|
||||
//foreach (var batch in batches)
|
||||
//{
|
||||
// new Results.Output.Printers.Cevak.PrintDocumentCevak(batch,
|
||||
// Config.Entities.PageOrientation.Portrait,
|
||||
// 60, 60, 60,
|
||||
// "PT40 Z/E-35-A",
|
||||
// "0111-OOP-C035-13").Print();
|
||||
//}
|
||||
#else
|
||||
if (string.IsNullOrEmpty(filtersConfig.PrinterClass))
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphLib", "GraphLib\GraphL
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonitoringDB", "MonitoringDB\MonitoringDB.csproj", "{EFEC8A31-3022-4DA7-A8F6-16D30A94C3FF}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TracingDB", "TracingDB\TracingDB.csproj", "{EFEC8A31-3022-4DA7-A8F6-16D30A94C3FF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemCard", "GemCard\GemCard.csproj", "{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}"
|
||||
EndProject
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(AmbientCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.Ambient.Greco
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(AmbientCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Extended
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfoEx({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly ComponentCfg myCfg;
|
||||
|
||||
public string TestBenchName { get { return myCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return myCfg.TestBenchId; } }
|
||||
public string Address1 { get { return myCfg.Address1; } }
|
||||
public string Address2 { get { return myCfg.Address2; } }
|
||||
public string Address3 { get { return myCfg.Address3; } }
|
||||
public string Address4 { get { return myCfg.Address4; } }
|
||||
public string Address5 { get { return myCfg.Address5; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex { get { return myCfg.MaxTestIndex; } } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
#endif
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Extended
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
public string Address1;
|
||||
public string Address2;
|
||||
public string Address3;
|
||||
public string Address4;
|
||||
public string Address5;
|
||||
public string ApprovalId;
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
#endif
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
public ComponentCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Factory = factory;
|
||||
Name = "BenchInfoEx";
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
|
||||
Address1 = string.Empty;
|
||||
Address2 = string.Empty;
|
||||
Address3 = string.Empty;
|
||||
Address4 = string.Empty;
|
||||
Address5 = string.Empty;
|
||||
|
||||
ApprovalId = string.Empty;
|
||||
ApprovalDate = string.Empty;
|
||||
ApprovedBy = string.Empty;
|
||||
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
#if ORACLE_DB
|
||||
MaxTestIndex = 4;
|
||||
#endif
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Test bench name",
|
||||
"Test bench ID",
|
||||
"Address 1",
|
||||
"Address 2",
|
||||
"Address 3",
|
||||
"Address 4",
|
||||
"Address 5",
|
||||
"Approval",
|
||||
"Approval date",
|
||||
"Approved by",
|
||||
"Remote DB use",
|
||||
#if ORACLE_DB
|
||||
"Max.test index",
|
||||
#endif
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
if (i == 10)
|
||||
{
|
||||
IList<string> list = new List<string>();
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++) list.Add(rdbu.ToDescription());
|
||||
return list;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
if (i == -1)
|
||||
{
|
||||
return string.Format("{0}: Bench name={1}, Bench Id={2}, Procedures={3}", Name, TestBenchName, TestBenchId, RemoteDBUse.ToDescription());
|
||||
}
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return TestBenchName;
|
||||
case 1: return TestBenchId.ToString();
|
||||
case 2: return Address1;
|
||||
case 3: return Address2;
|
||||
case 4: return Address3;
|
||||
case 5: return Address4;
|
||||
case 6: return Address5;
|
||||
case 7: return ApprovalId;
|
||||
case 8: return ApprovalDate;
|
||||
case 9: return ApprovedBy;
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
#if ORACLE_DB
|
||||
case 11: return MaxTestIndex.ToString();
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: TestBenchName = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 1: TestBenchId = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
case 2: Address1 = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: Address2 = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 4: Address3 = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 5: Address4 = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 6: Address5 = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 7: ApprovalId = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 8: ApprovalDate = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 9: ApprovedBy = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 10:
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++)
|
||||
{
|
||||
if (strValue == rdbu.ToDescription())
|
||||
{
|
||||
if (RemoteDBUse != rdbu)
|
||||
{
|
||||
RemoteDBUse = rdbu;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
#if ORACLE_DB
|
||||
case 11: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
int idummy;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
return true;
|
||||
case 1:
|
||||
case 11:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 10:
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++)
|
||||
{
|
||||
if (strValue == rdbu.ToDescription()) return true;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(ComponentCfg prms)
|
||||
{
|
||||
prms.TestBenchName = this.TestBenchName;
|
||||
prms.TestBenchId = this.TestBenchId;
|
||||
prms.Address1 = this.Address1;
|
||||
prms.Address2 = this.Address2;
|
||||
prms.Address3 = this.Address3;
|
||||
prms.Address4 = this.Address4;
|
||||
prms.Address5 = this.Address5;
|
||||
prms.ApprovalId = this.ApprovalId;
|
||||
prms.ApprovalDate = this.ApprovalDate;
|
||||
prms.ApprovedBy = this.ApprovedBy;
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
#if ORACLE_DB
|
||||
prms.MaxTestIndex = this.MaxTestIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public void UpdateEmbeddedDbEntity()
|
||||
{
|
||||
/// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
namespace TBF.BenchControl.BenchInfo.Extended
|
||||
{
|
||||
public class ComponentFactory : IComponentFactory
|
||||
{
|
||||
@@ -1,6 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -24,6 +23,15 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
|
||||
public string TestBenchName { get { return benchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
public string Address1 { get { return string.Empty; } }
|
||||
public string Address2 { get { return string.Empty; } }
|
||||
public string Address3 { get { return string.Empty; } }
|
||||
public string Address4 { get { return string.Empty; } }
|
||||
public string Address5 { get { return string.Empty; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return RemoteDBUse.LocalDBOnly; } }
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex { get { return 0; } }
|
||||
#endif
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
public partial class ComponentCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
ComponentCfg config;
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfoEx({0})", Cfg.ToString(1)); }
|
||||
|
||||
public readonly ComponentCfg BenchInfoCfg;
|
||||
|
||||
public string TestBenchName { get { return BenchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return BenchInfoCfg.TestBenchId; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
BenchInfoCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
public string Address1;
|
||||
public string Address2;
|
||||
public string Address3;
|
||||
public string Address4;
|
||||
public string Address5;
|
||||
public string ApprovalId;
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg()
|
||||
{
|
||||
Name = "BenchInfoEx";
|
||||
ParentName = string.Empty;
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
|
||||
Address1 = string.Empty;
|
||||
Address2 = string.Empty;
|
||||
Address3 = string.Empty;
|
||||
Address4 = string.Empty;
|
||||
Address5 = string.Empty;
|
||||
|
||||
ApprovalId = string.Empty;
|
||||
ApprovalDate = string.Empty;
|
||||
ApprovedBy = string.Empty;
|
||||
}
|
||||
|
||||
public ComponentCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
public partial class ComponentCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
ComponentCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as ComponentCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public ComponentCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
benchNameLabel.Text = Strings.Test_bench_name;
|
||||
benchIdLabel.Text = Strings.Test_bench_number;
|
||||
|
||||
address1Label.Text = Strings.Address + " 1";
|
||||
address2Label.Text = Strings.Address + " 2";
|
||||
address3Label.Text = Strings.Address + " 3";
|
||||
address4Label.Text = Strings.Address + " 4";
|
||||
address5Label.Text = Strings.Address + " 5";
|
||||
|
||||
approvalIdLabel.Text = Strings.Approval_ID;
|
||||
approvalDateLabel.Text = Strings.Approval_date;
|
||||
approvedByLabel.Text = Strings.Approved_by;
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
benchNameTextBox.Text = config.TestBenchName;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
|
||||
address1TextBox.Text = config.Address1;
|
||||
address2TextBox.Text = config.Address2;
|
||||
address3TextBox.Text = config.Address3;
|
||||
address4TextBox.Text = config.Address4;
|
||||
address5TextBox.Text = config.Address5;
|
||||
|
||||
approvalIdTextBox.Text = config.ApprovalId;
|
||||
approvalDateTextBox.Text = config.ApprovalDate;
|
||||
approvedByTextBox.Text = config.ApprovedBy;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
benchNameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
|
||||
address1TextBox.Enabled = true;
|
||||
address2TextBox.Enabled = true;
|
||||
address3TextBox.Enabled = true;
|
||||
address4TextBox.Enabled = true;
|
||||
address5TextBox.Enabled = true;
|
||||
|
||||
approvalIdTextBox.Enabled = true;
|
||||
approvalDateTextBox.Enabled = true;
|
||||
approvedByTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out dummy) || dummy < 0)
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message = string.Format("Invalid {0} parameter", Strings.Test_bench_number);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
config.Name = nameTextBox.Text;
|
||||
config.TestBenchName = benchNameTextBox.Text;
|
||||
config.TestBenchId = int.Parse(benchIdTextBox.Text);
|
||||
|
||||
config.Address1 = address1TextBox.Text;
|
||||
config.Address2 = address2TextBox.Text;
|
||||
config.Address3 = address3TextBox.Text;
|
||||
config.Address4 = address4TextBox.Text;
|
||||
config.Address5 = address5TextBox.Text;
|
||||
|
||||
config.ApprovalId = approvalIdTextBox.Text;
|
||||
config.ApprovalDate = approvalDateTextBox.Text;
|
||||
config.ApprovedBy = approvedByTextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,316 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
partial class ComponentCfgCtrl
|
||||
{
|
||||
/// <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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.address1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address1Label = new System.Windows.Forms.Label();
|
||||
this.address2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address2Label = new System.Windows.Forms.Label();
|
||||
this.address3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address3Label = new System.Windows.Forms.Label();
|
||||
this.address4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address4Label = new System.Windows.Forms.Label();
|
||||
this.address5TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address5Label = new System.Windows.Forms.Label();
|
||||
this.approvedByTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvedByLabel = new System.Windows.Forms.Label();
|
||||
this.approvalDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalDateLabel = new System.Windows.Forms.Label();
|
||||
this.approvalIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalIdLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 24);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 27);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(110, 6);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(6, 66);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(99, 13);
|
||||
this.benchIdLabel.TabIndex = 5;
|
||||
this.benchIdLabel.Text = "Test bench number";
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(113, 64);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchIdTextBox.TabIndex = 6;
|
||||
//
|
||||
// address1TextBox
|
||||
//
|
||||
this.address1TextBox.Enabled = false;
|
||||
this.address1TextBox.Location = new System.Drawing.Point(73, 86);
|
||||
this.address1TextBox.Name = "address1TextBox";
|
||||
this.address1TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address1TextBox.TabIndex = 8;
|
||||
//
|
||||
// address1Label
|
||||
//
|
||||
this.address1Label.AutoSize = true;
|
||||
this.address1Label.Location = new System.Drawing.Point(6, 89);
|
||||
this.address1Label.Name = "address1Label";
|
||||
this.address1Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address1Label.TabIndex = 7;
|
||||
this.address1Label.Text = "Address 1";
|
||||
//
|
||||
// address2TextBox
|
||||
//
|
||||
this.address2TextBox.Enabled = false;
|
||||
this.address2TextBox.Location = new System.Drawing.Point(73, 106);
|
||||
this.address2TextBox.Name = "address2TextBox";
|
||||
this.address2TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address2TextBox.TabIndex = 10;
|
||||
//
|
||||
// address2Label
|
||||
//
|
||||
this.address2Label.AutoSize = true;
|
||||
this.address2Label.Location = new System.Drawing.Point(6, 109);
|
||||
this.address2Label.Name = "address2Label";
|
||||
this.address2Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address2Label.TabIndex = 9;
|
||||
this.address2Label.Text = "Address 2";
|
||||
//
|
||||
// address3TextBox
|
||||
//
|
||||
this.address3TextBox.Enabled = false;
|
||||
this.address3TextBox.Location = new System.Drawing.Point(73, 126);
|
||||
this.address3TextBox.Name = "address3TextBox";
|
||||
this.address3TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address3TextBox.TabIndex = 12;
|
||||
//
|
||||
// address3Label
|
||||
//
|
||||
this.address3Label.AutoSize = true;
|
||||
this.address3Label.Location = new System.Drawing.Point(6, 129);
|
||||
this.address3Label.Name = "address3Label";
|
||||
this.address3Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address3Label.TabIndex = 11;
|
||||
this.address3Label.Text = "Address 3";
|
||||
//
|
||||
// address4TextBox
|
||||
//
|
||||
this.address4TextBox.Enabled = false;
|
||||
this.address4TextBox.Location = new System.Drawing.Point(73, 146);
|
||||
this.address4TextBox.Name = "address4TextBox";
|
||||
this.address4TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address4TextBox.TabIndex = 14;
|
||||
//
|
||||
// address4Label
|
||||
//
|
||||
this.address4Label.AutoSize = true;
|
||||
this.address4Label.Location = new System.Drawing.Point(6, 149);
|
||||
this.address4Label.Name = "address4Label";
|
||||
this.address4Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address4Label.TabIndex = 13;
|
||||
this.address4Label.Text = "Address 4";
|
||||
//
|
||||
// address5TextBox
|
||||
//
|
||||
this.address5TextBox.Enabled = false;
|
||||
this.address5TextBox.Location = new System.Drawing.Point(73, 166);
|
||||
this.address5TextBox.Name = "address5TextBox";
|
||||
this.address5TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address5TextBox.TabIndex = 16;
|
||||
//
|
||||
// address5Label
|
||||
//
|
||||
this.address5Label.AutoSize = true;
|
||||
this.address5Label.Location = new System.Drawing.Point(6, 169);
|
||||
this.address5Label.Name = "address5Label";
|
||||
this.address5Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address5Label.TabIndex = 15;
|
||||
this.address5Label.Text = "Address 5";
|
||||
//
|
||||
// approvedByTextBox
|
||||
//
|
||||
this.approvedByTextBox.Enabled = false;
|
||||
this.approvedByTextBox.Location = new System.Drawing.Point(113, 227);
|
||||
this.approvedByTextBox.Name = "approvedByTextBox";
|
||||
this.approvedByTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvedByTextBox.TabIndex = 22;
|
||||
//
|
||||
// approvedByLabel
|
||||
//
|
||||
this.approvedByLabel.AutoSize = true;
|
||||
this.approvedByLabel.Location = new System.Drawing.Point(6, 230);
|
||||
this.approvedByLabel.Name = "approvedByLabel";
|
||||
this.approvedByLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.approvedByLabel.TabIndex = 21;
|
||||
this.approvedByLabel.Text = "Approved by";
|
||||
//
|
||||
// approvalDateTextBox
|
||||
//
|
||||
this.approvalDateTextBox.Enabled = false;
|
||||
this.approvalDateTextBox.Location = new System.Drawing.Point(113, 207);
|
||||
this.approvalDateTextBox.Name = "approvalDateTextBox";
|
||||
this.approvalDateTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalDateTextBox.TabIndex = 20;
|
||||
//
|
||||
// approvalDateLabel
|
||||
//
|
||||
this.approvalDateLabel.AutoSize = true;
|
||||
this.approvalDateLabel.Location = new System.Drawing.Point(6, 210);
|
||||
this.approvalDateLabel.Name = "approvalDateLabel";
|
||||
this.approvalDateLabel.Size = new System.Drawing.Size(73, 13);
|
||||
this.approvalDateLabel.TabIndex = 19;
|
||||
this.approvalDateLabel.Text = "Approval date";
|
||||
//
|
||||
// approvalIdTextBox
|
||||
//
|
||||
this.approvalIdTextBox.Enabled = false;
|
||||
this.approvalIdTextBox.Location = new System.Drawing.Point(113, 187);
|
||||
this.approvalIdTextBox.Name = "approvalIdTextBox";
|
||||
this.approvalIdTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalIdTextBox.TabIndex = 18;
|
||||
//
|
||||
// approvalIdLabel
|
||||
//
|
||||
this.approvalIdLabel.AutoSize = true;
|
||||
this.approvalIdLabel.Location = new System.Drawing.Point(6, 190);
|
||||
this.approvalIdLabel.Name = "approvalIdLabel";
|
||||
this.approvalIdLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.approvalIdLabel.TabIndex = 17;
|
||||
this.approvalIdLabel.Text = "Approval Id";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
this.benchNameTextBox.Enabled = false;
|
||||
this.benchNameTextBox.Location = new System.Drawing.Point(113, 44);
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
this.benchNameTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.benchNameTextBox.TabIndex = 4;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(6, 46);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.benchNameLabel.TabIndex = 3;
|
||||
this.benchNameLabel.Text = "Test bench name";
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.approvedByTextBox);
|
||||
this.Controls.Add(this.approvedByLabel);
|
||||
this.Controls.Add(this.approvalDateTextBox);
|
||||
this.Controls.Add(this.approvalDateLabel);
|
||||
this.Controls.Add(this.approvalIdTextBox);
|
||||
this.Controls.Add(this.approvalIdLabel);
|
||||
this.Controls.Add(this.address5TextBox);
|
||||
this.Controls.Add(this.address5Label);
|
||||
this.Controls.Add(this.address4TextBox);
|
||||
this.Controls.Add(this.address4Label);
|
||||
this.Controls.Add(this.address3TextBox);
|
||||
this.Controls.Add(this.address3Label);
|
||||
this.Controls.Add(this.address2TextBox);
|
||||
this.Controls.Add(this.address2Label);
|
||||
this.Controls.Add(this.address1TextBox);
|
||||
this.Controls.Add(this.address1Label);
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "ComponentCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 250);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.TextBox address1TextBox;
|
||||
private System.Windows.Forms.Label address1Label;
|
||||
private System.Windows.Forms.TextBox address2TextBox;
|
||||
private System.Windows.Forms.Label address2Label;
|
||||
private System.Windows.Forms.TextBox address3TextBox;
|
||||
private System.Windows.Forms.Label address3Label;
|
||||
private System.Windows.Forms.TextBox address4TextBox;
|
||||
private System.Windows.Forms.Label address4Label;
|
||||
private System.Windows.Forms.TextBox address5TextBox;
|
||||
private System.Windows.Forms.Label address5Label;
|
||||
private System.Windows.Forms.TextBox approvedByTextBox;
|
||||
private System.Windows.Forms.Label approvedByLabel;
|
||||
private System.Windows.Forms.TextBox approvalDateTextBox;
|
||||
private System.Windows.Forms.Label approvalDateLabel;
|
||||
private System.Windows.Forms.TextBox approvalIdTextBox;
|
||||
private System.Windows.Forms.Label approvalIdLabel;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace TBF.BenchControl
|
||||
}
|
||||
|
||||
|
||||
protected virtual XmlSerializer GetSerializer() { return new XmlSerializer(GetType()); }
|
||||
public virtual XmlSerializer GetSerializer() { return new XmlSerializer(GetType()); }
|
||||
|
||||
public Component CreateDbEntity()
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace TBF.BenchControl.Configs.NameOnly
|
||||
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Configs.NameOnly
|
||||
{
|
||||
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
TestMethodCfg config;
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Configs.ParamsProvider
|
||||
{
|
||||
public partial class ComponentCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
|
||||
IParamsProvider paramsProvider;
|
||||
///
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get
|
||||
{
|
||||
return paramsProvider as IComponentCfg;
|
||||
}
|
||||
set
|
||||
{
|
||||
paramsProvider = value as IParamsProvider;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
IList<string> parents;
|
||||
Control[] editors;
|
||||
CfgUpdateFlags flags;
|
||||
|
||||
public ComponentCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="paramsProvider">Parameters provider implementing IComponentCfg and IParamsProvider</param>
|
||||
/// <param name="parents">A list of parents or null, null hides parentComboBox</param>
|
||||
public ComponentCfgCtrl(IParamsProvider paramsProvider, IList<string> parents)
|
||||
: this()
|
||||
{
|
||||
this.paramsProvider = paramsProvider;
|
||||
this.parents = parents;
|
||||
|
||||
if (parents == null)
|
||||
{
|
||||
parentLabel.Visible = false;
|
||||
parentComboBox.Visible = false;
|
||||
}
|
||||
|
||||
editors = new Control[paramsProvider.ParamsCount()];
|
||||
for (int i = 0; i < paramsProvider.ParamsCount(); i++)
|
||||
{
|
||||
IList<string> values = paramsProvider.ParamValues(i);
|
||||
if (values == null)
|
||||
{
|
||||
editors[i] = new TextBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
ComboBox cb = new ComboBox();
|
||||
foreach (var v in values) cb.Items.Add(v);
|
||||
editors[i] = cb;
|
||||
}
|
||||
editors[i].Visible = false;
|
||||
this.Controls.Add(editors[i]);
|
||||
}
|
||||
|
||||
flags = CfgUpdateFlags.None;
|
||||
|
||||
paramsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(paramsListViewEx_SubItemClicked);
|
||||
paramsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(paramsListViewEx_SubItemEndEditing);
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
componentClassLabel.Text = Strings.Component_class;
|
||||
nameLabel.Text = Strings.Name;
|
||||
parentLabel.Text = Strings.Parent_name;
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
paramsListViewEx.Columns.Add(Strings.Parameter, 210);
|
||||
paramsListViewEx.Columns.Add(Strings.Value, 210);
|
||||
if (parents != null)
|
||||
{
|
||||
foreach (var p in parents) parentComboBox.Items.Add(p);
|
||||
}
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
/// Close CmdResponse handlers here
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (paramsProvider == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
componentClassTextBox.Text = Config.Factory.ClassName;
|
||||
nameTextBox.Text = Config.Name;
|
||||
|
||||
if (parents != null) parentComboBox.Text = Config.ParentName;
|
||||
|
||||
paramsListViewEx.Items.Clear();
|
||||
for (int i = 0; i < paramsProvider.ParamsCount(); i++)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(paramsProvider.ParamName(i));
|
||||
lvi.SubItems.Add(paramsProvider.ToString(i));
|
||||
lvi.Tag = i;
|
||||
paramsListViewEx.Items.Add(lvi);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
if (parents != null) parentComboBox.Enabled = true;
|
||||
paramsListViewEx.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
if (parents == null) return CfgUpdateFlags.None;
|
||||
|
||||
/// Verify the parent
|
||||
foreach (var item in parentComboBox.Items)
|
||||
{
|
||||
if (parentComboBox.Text == item.ToString()) return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, parentLabel.Text);
|
||||
return CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
if (paramsProvider == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
CfgUpdateFlags f = this.flags;
|
||||
|
||||
if (Config.Name != nameTextBox.Text)
|
||||
{
|
||||
Config.Name = nameTextBox.Text;
|
||||
f |= CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
if (parents != null)
|
||||
{
|
||||
if (Config.ParentName != parentComboBox.Text)
|
||||
{
|
||||
Config.ParentName = parentComboBox.Text;
|
||||
f |= CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
private void paramsListViewEx_SubItemClicked(object sender, Results.Forms.SubItemEventArgs e)
|
||||
{
|
||||
if (e.SubItem != 1) return;
|
||||
int itemNr = (int)e.Item.Tag;
|
||||
paramsListViewEx.StartEditing(editors[itemNr], e.Item, e.SubItem);
|
||||
}
|
||||
|
||||
private void paramsListViewEx_SubItemEndEditing(object sender, Results.Forms.SubItemEndEditingEventArgs e)
|
||||
{
|
||||
if (e.SubItem != 1) return;
|
||||
int itemNr = (int)e.Item.Tag;
|
||||
|
||||
string message;
|
||||
if (paramsProvider.ValidateParam(itemNr, e.DisplayText, out message))
|
||||
{
|
||||
flags |= paramsProvider.UpdateParam(itemNr, e.DisplayText);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.Configs.ParamsProvider
|
||||
{
|
||||
partial class ComponentCfgCtrl
|
||||
{
|
||||
/// <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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.parentComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.parentLabel = new System.Windows.Forms.Label();
|
||||
this.componentClassLabel = new System.Windows.Forms.Label();
|
||||
this.componentClassTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paramsListViewEx = new Results.Forms.ListViewEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(161, 30);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(262, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 33);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.parentComboBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.parentLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentClassLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentClassTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.nameLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.nameTextBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.paramsListViewEx);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(444, 353);
|
||||
this.splitContainer1.SplitterDistance = 80;
|
||||
this.splitContainer1.TabIndex = 6;
|
||||
//
|
||||
// parentComboBox
|
||||
//
|
||||
this.parentComboBox.Enabled = false;
|
||||
this.parentComboBox.FormattingEnabled = true;
|
||||
this.parentComboBox.Location = new System.Drawing.Point(161, 52);
|
||||
this.parentComboBox.Name = "parentComboBox";
|
||||
this.parentComboBox.Size = new System.Drawing.Size(262, 21);
|
||||
this.parentComboBox.TabIndex = 9;
|
||||
//
|
||||
// parentLabel
|
||||
//
|
||||
this.parentLabel.AutoSize = true;
|
||||
this.parentLabel.Location = new System.Drawing.Point(6, 55);
|
||||
this.parentLabel.Name = "parentLabel";
|
||||
this.parentLabel.Size = new System.Drawing.Size(38, 13);
|
||||
this.parentLabel.TabIndex = 8;
|
||||
this.parentLabel.Text = "Parent";
|
||||
//
|
||||
// componentClassLabel
|
||||
//
|
||||
this.componentClassLabel.AutoSize = true;
|
||||
this.componentClassLabel.Location = new System.Drawing.Point(6, 11);
|
||||
this.componentClassLabel.Name = "componentClassLabel";
|
||||
this.componentClassLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.componentClassLabel.TabIndex = 7;
|
||||
this.componentClassLabel.Text = "Component Class";
|
||||
//
|
||||
// componentClassTextBox
|
||||
//
|
||||
this.componentClassTextBox.Enabled = false;
|
||||
this.componentClassTextBox.Location = new System.Drawing.Point(161, 8);
|
||||
this.componentClassTextBox.Name = "componentClassTextBox";
|
||||
this.componentClassTextBox.Size = new System.Drawing.Size(262, 20);
|
||||
this.componentClassTextBox.TabIndex = 6;
|
||||
//
|
||||
// paramsListViewEx
|
||||
//
|
||||
this.paramsListViewEx.AllowColumnReorder = true;
|
||||
this.paramsListViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.paramsListViewEx.DoubleClickActivation = false;
|
||||
this.paramsListViewEx.Enabled = false;
|
||||
this.paramsListViewEx.FullRowSelect = true;
|
||||
this.paramsListViewEx.GridLines = true;
|
||||
this.paramsListViewEx.LabelWrap = false;
|
||||
this.paramsListViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.paramsListViewEx.Name = "paramsListViewEx";
|
||||
this.paramsListViewEx.Size = new System.Drawing.Size(444, 269);
|
||||
this.paramsListViewEx.TabIndex = 0;
|
||||
this.paramsListViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.paramsListViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.paramsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(this.paramsListViewEx_SubItemClicked);
|
||||
this.paramsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(this.paramsListViewEx_SubItemEndEditing);
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "ComponentCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(444, 353);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ComboBox parentComboBox;
|
||||
private System.Windows.Forms.Label parentLabel;
|
||||
private System.Windows.Forms.Label componentClassLabel;
|
||||
private System.Windows.Forms.TextBox componentClassTextBox;
|
||||
private Results.Forms.ListViewEx paramsListViewEx;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,311 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
partial class DatabaseCfgCtrl
|
||||
{
|
||||
/// <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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.destinationTextBox = new System.Windows.Forms.TextBox();
|
||||
this.destinationLabel = new System.Windows.Forms.Label();
|
||||
this.dayFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.destinationButton = new System.Windows.Forms.Button();
|
||||
this.yearFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.monthFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.eliminateSpacesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.separatorLabel = new System.Windows.Forms.Label();
|
||||
this.separatorComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.dbUsedComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.dbUsedLabel = new System.Windows.Forms.Label();
|
||||
this.baujahrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.baujahrLabel = new System.Windows.Forms.Label();
|
||||
this.logsFolderButton = new System.Windows.Forms.Button();
|
||||
this.logsFolderTextBox = new System.Windows.Forms.TextBox();
|
||||
this.logsFolderLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(110, 30);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(19, 33);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(107, 8);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// destinationTextBox
|
||||
//
|
||||
this.destinationTextBox.Enabled = false;
|
||||
this.destinationTextBox.Location = new System.Drawing.Point(110, 117);
|
||||
this.destinationTextBox.Name = "destinationTextBox";
|
||||
this.destinationTextBox.Size = new System.Drawing.Size(145, 20);
|
||||
this.destinationTextBox.TabIndex = 10;
|
||||
//
|
||||
// destinationLabel
|
||||
//
|
||||
this.destinationLabel.AutoSize = true;
|
||||
this.destinationLabel.Location = new System.Drawing.Point(19, 120);
|
||||
this.destinationLabel.Name = "destinationLabel";
|
||||
this.destinationLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.destinationLabel.TabIndex = 9;
|
||||
this.destinationLabel.Text = "Results folder";
|
||||
//
|
||||
// dayFoldersCheckBox
|
||||
//
|
||||
this.dayFoldersCheckBox.AutoSize = true;
|
||||
this.dayFoldersCheckBox.Enabled = false;
|
||||
this.dayFoldersCheckBox.Location = new System.Drawing.Point(207, 166);
|
||||
this.dayFoldersCheckBox.Name = "dayFoldersCheckBox";
|
||||
this.dayFoldersCheckBox.Size = new System.Drawing.Size(79, 17);
|
||||
this.dayFoldersCheckBox.TabIndex = 17;
|
||||
this.dayFoldersCheckBox.Text = "Day folders";
|
||||
this.dayFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// destinationButton
|
||||
//
|
||||
this.destinationButton.Enabled = false;
|
||||
this.destinationButton.Location = new System.Drawing.Point(261, 117);
|
||||
this.destinationButton.Name = "destinationButton";
|
||||
this.destinationButton.Size = new System.Drawing.Size(30, 20);
|
||||
this.destinationButton.TabIndex = 11;
|
||||
this.destinationButton.Text = "...";
|
||||
this.destinationButton.UseVisualStyleBackColor = true;
|
||||
this.destinationButton.Click += new System.EventHandler(this.destinationButton_Click);
|
||||
//
|
||||
// yearFoldersCheckBox
|
||||
//
|
||||
this.yearFoldersCheckBox.AutoSize = true;
|
||||
this.yearFoldersCheckBox.Enabled = false;
|
||||
this.yearFoldersCheckBox.Location = new System.Drawing.Point(23, 166);
|
||||
this.yearFoldersCheckBox.Name = "yearFoldersCheckBox";
|
||||
this.yearFoldersCheckBox.Size = new System.Drawing.Size(82, 17);
|
||||
this.yearFoldersCheckBox.TabIndex = 15;
|
||||
this.yearFoldersCheckBox.Text = "Year folders";
|
||||
this.yearFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// monthFoldersCheckBox
|
||||
//
|
||||
this.monthFoldersCheckBox.AutoSize = true;
|
||||
this.monthFoldersCheckBox.Enabled = false;
|
||||
this.monthFoldersCheckBox.Location = new System.Drawing.Point(111, 166);
|
||||
this.monthFoldersCheckBox.Name = "monthFoldersCheckBox";
|
||||
this.monthFoldersCheckBox.Size = new System.Drawing.Size(90, 17);
|
||||
this.monthFoldersCheckBox.TabIndex = 16;
|
||||
this.monthFoldersCheckBox.Text = "Month folders";
|
||||
this.monthFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// eliminateSpacesCheckBox
|
||||
//
|
||||
this.eliminateSpacesCheckBox.AutoSize = true;
|
||||
this.eliminateSpacesCheckBox.Enabled = false;
|
||||
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(111, 208);
|
||||
this.eliminateSpacesCheckBox.Name = "eliminateSpacesCheckBox";
|
||||
this.eliminateSpacesCheckBox.Size = new System.Drawing.Size(165, 17);
|
||||
this.eliminateSpacesCheckBox.TabIndex = 20;
|
||||
this.eliminateSpacesCheckBox.Text = "Eliminate spaces in each field";
|
||||
this.eliminateSpacesCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// separatorLabel
|
||||
//
|
||||
this.separatorLabel.AutoSize = true;
|
||||
this.separatorLabel.Location = new System.Drawing.Point(19, 188);
|
||||
this.separatorLabel.Name = "separatorLabel";
|
||||
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.separatorLabel.TabIndex = 18;
|
||||
this.separatorLabel.Text = "Separator";
|
||||
//
|
||||
// separatorComboBox
|
||||
//
|
||||
this.separatorComboBox.Enabled = false;
|
||||
this.separatorComboBox.FormattingEnabled = true;
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(110, 185);
|
||||
this.separatorComboBox.Name = "separatorComboBox";
|
||||
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.separatorComboBox.TabIndex = 19;
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(110, 51);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchIdTextBox.TabIndex = 4;
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(19, 54);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(76, 13);
|
||||
this.benchIdLabel.TabIndex = 3;
|
||||
this.benchIdLabel.Text = "Test Bench ID";
|
||||
//
|
||||
// dbUsedComboBox
|
||||
//
|
||||
this.dbUsedComboBox.Enabled = false;
|
||||
this.dbUsedComboBox.FormattingEnabled = true;
|
||||
this.dbUsedComboBox.Location = new System.Drawing.Point(110, 73);
|
||||
this.dbUsedComboBox.Name = "dbUsedComboBox";
|
||||
this.dbUsedComboBox.Size = new System.Drawing.Size(145, 21);
|
||||
this.dbUsedComboBox.TabIndex = 6;
|
||||
//
|
||||
// dbUsedLabel
|
||||
//
|
||||
this.dbUsedLabel.AutoSize = true;
|
||||
this.dbUsedLabel.Location = new System.Drawing.Point(19, 76);
|
||||
this.dbUsedLabel.Name = "dbUsedLabel";
|
||||
this.dbUsedLabel.Size = new System.Drawing.Size(79, 13);
|
||||
this.dbUsedLabel.TabIndex = 5;
|
||||
this.dbUsedLabel.Text = "Database used";
|
||||
//
|
||||
// baujahrTextBox
|
||||
//
|
||||
this.baujahrTextBox.Enabled = false;
|
||||
this.baujahrTextBox.Location = new System.Drawing.Point(110, 95);
|
||||
this.baujahrTextBox.Name = "baujahrTextBox";
|
||||
this.baujahrTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.baujahrTextBox.TabIndex = 8;
|
||||
//
|
||||
// baujahrLabel
|
||||
//
|
||||
this.baujahrLabel.AutoSize = true;
|
||||
this.baujahrLabel.Location = new System.Drawing.Point(19, 98);
|
||||
this.baujahrLabel.Name = "baujahrLabel";
|
||||
this.baujahrLabel.Size = new System.Drawing.Size(43, 13);
|
||||
this.baujahrLabel.TabIndex = 7;
|
||||
this.baujahrLabel.Text = "Baujahr";
|
||||
//
|
||||
// logsFolderButton
|
||||
//
|
||||
this.logsFolderButton.Enabled = false;
|
||||
this.logsFolderButton.Location = new System.Drawing.Point(261, 139);
|
||||
this.logsFolderButton.Name = "logsFolderButton";
|
||||
this.logsFolderButton.Size = new System.Drawing.Size(30, 20);
|
||||
this.logsFolderButton.TabIndex = 14;
|
||||
this.logsFolderButton.Text = "...";
|
||||
this.logsFolderButton.UseVisualStyleBackColor = true;
|
||||
this.logsFolderButton.Click += new System.EventHandler(this.logsFolderButton_Click);
|
||||
//
|
||||
// logsFolderTextBox
|
||||
//
|
||||
this.logsFolderTextBox.Enabled = false;
|
||||
this.logsFolderTextBox.Location = new System.Drawing.Point(110, 139);
|
||||
this.logsFolderTextBox.Name = "logsFolderTextBox";
|
||||
this.logsFolderTextBox.Size = new System.Drawing.Size(145, 20);
|
||||
this.logsFolderTextBox.TabIndex = 13;
|
||||
//
|
||||
// logsFolderLabel
|
||||
//
|
||||
this.logsFolderLabel.AutoSize = true;
|
||||
this.logsFolderLabel.Location = new System.Drawing.Point(19, 142);
|
||||
this.logsFolderLabel.Name = "logsFolderLabel";
|
||||
this.logsFolderLabel.Size = new System.Drawing.Size(59, 13);
|
||||
this.logsFolderLabel.TabIndex = 12;
|
||||
this.logsFolderLabel.Text = "Logs folder";
|
||||
//
|
||||
// DatabaseCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.logsFolderButton);
|
||||
this.Controls.Add(this.logsFolderTextBox);
|
||||
this.Controls.Add(this.logsFolderLabel);
|
||||
this.Controls.Add(this.baujahrTextBox);
|
||||
this.Controls.Add(this.baujahrLabel);
|
||||
this.Controls.Add(this.dbUsedComboBox);
|
||||
this.Controls.Add(this.dbUsedLabel);
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.separatorComboBox);
|
||||
this.Controls.Add(this.separatorLabel);
|
||||
this.Controls.Add(this.eliminateSpacesCheckBox);
|
||||
this.Controls.Add(this.monthFoldersCheckBox);
|
||||
this.Controls.Add(this.yearFoldersCheckBox);
|
||||
this.Controls.Add(this.destinationButton);
|
||||
this.Controls.Add(this.dayFoldersCheckBox);
|
||||
this.Controls.Add(this.destinationTextBox);
|
||||
this.Controls.Add(this.destinationLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "DatabaseCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 230);
|
||||
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.TextBox destinationTextBox;
|
||||
private System.Windows.Forms.Label destinationLabel;
|
||||
private System.Windows.Forms.CheckBox dayFoldersCheckBox;
|
||||
private System.Windows.Forms.Button destinationButton;
|
||||
private System.Windows.Forms.CheckBox yearFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox monthFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox eliminateSpacesCheckBox;
|
||||
private System.Windows.Forms.Label separatorLabel;
|
||||
private System.Windows.Forms.ComboBox separatorComboBox;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
private System.Windows.Forms.ComboBox dbUsedComboBox;
|
||||
private System.Windows.Forms.Label dbUsedLabel;
|
||||
private System.Windows.Forms.TextBox baujahrTextBox;
|
||||
private System.Windows.Forms.Label baujahrLabel;
|
||||
private System.Windows.Forms.Button logsFolderButton;
|
||||
private System.Windows.Forms.TextBox logsFolderTextBox;
|
||||
private System.Windows.Forms.Label logsFolderLabel;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
public class PumpCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PumpCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
public partial class PumpCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(PumpCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
PumpCfg config;
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -274,8 +274,11 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -313,8 +313,11 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using Config;
|
||||
@@ -12,8 +12,6 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -313,7 +313,10 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using Config;
|
||||
@@ -12,8 +12,6 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich3
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -272,8 +272,11 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
bool fixedErrorLimits; /// false in case of calculated error limits
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -119,6 +120,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
this.fixedErrorLimits = (errLimHi > errLimLo);
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
@@ -286,7 +288,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation1.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -298,7 +300,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation2.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -310,7 +312,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation3.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -322,7 +324,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation4.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -334,7 +336,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation5.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -346,7 +348,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation6.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -358,7 +360,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation7.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -370,7 +372,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation8.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -382,7 +384,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation9.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
@@ -395,7 +397,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation10.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
@@ -408,7 +410,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation11.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -420,7 +422,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation12.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
@@ -272,7 +272,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
bool fixedErrorLimits; /// false in case of calculated error limits
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -124,6 +125,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
this.fixedErrorLimits = (errLimHi > errLimLo);
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
@@ -289,7 +291,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation1.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -301,7 +303,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation2.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -313,7 +315,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation3.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -325,7 +327,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation4.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -337,7 +339,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation5.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -349,7 +351,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation6.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -361,7 +363,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation7.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -373,7 +375,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation8.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -385,7 +387,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation9.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
@@ -398,7 +400,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation10.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
@@ -411,7 +413,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation11.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -423,7 +425,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation12.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -435,7 +437,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation13.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -447,7 +449,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation14.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -459,7 +461,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation15.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -471,7 +473,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation16.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -483,7 +485,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation17.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -495,7 +497,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation18.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -507,7 +509,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation19.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -519,7 +521,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation20.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -531,7 +533,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation21.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -543,7 +545,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation22.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -555,7 +557,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation23.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -567,7 +569,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamation24.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user