Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62ffe72131 |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ALZIR_25;LANG_FR</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;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;ALZIR_25;LANG_FR</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace Results.Entities
|
||||
public virtual object CompleteTestInfos { get; set; } /// SensusTestInfo[] obtained as a best match at the beginning of the cycle, not mapped to DB !!!
|
||||
#endif
|
||||
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
||||
public virtual int SessionId { get; set; } /// Not mapped to DB !!! 1 (regular tracing DB session) or 2 (alternative tracing DB session)
|
||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
@@ -360,7 +359,6 @@ namespace Results.Entities
|
||||
CompleteTestInfos = null;
|
||||
#endif
|
||||
ProcessId = 0;
|
||||
SessionId = 0;
|
||||
ErrorFlags = 0;
|
||||
LastRecordIsNok = false;
|
||||
}
|
||||
@@ -421,7 +419,6 @@ namespace Results.Entities
|
||||
CompleteTestInfos = src.CompleteTestInfos;
|
||||
#endif
|
||||
ProcessId = src.ProcessId;
|
||||
SessionId = src.SessionId;
|
||||
LastRecordIsNok = src.LastRecordIsNok;
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Gma.QrCodeNet.Encoding;
|
||||
using Config.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
@@ -15,9 +13,7 @@ namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrintDocument : PrintersCommon
|
||||
{
|
||||
static QrEncoder encoder = new QrEncoder();
|
||||
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
readonly int printHeight;
|
||||
readonly int printWidth;
|
||||
|
||||
@@ -97,44 +93,6 @@ namespace Results.Output.Printers.Label
|
||||
e.Graphics.DrawString(item.Print(wm), this.font, Brushes.Black, printArea);
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.DrawSNasBarcode)
|
||||
{
|
||||
if (cfg.IsQR)
|
||||
{
|
||||
QrCode qrCode = encoder.Encode(wm.SerialNr);
|
||||
DrawQR(e.Graphics, qrCode, cfg.BarcodeLeft, cfg.BarcodeTop, cfg.BarcodeWidth, cfg.BarcodeHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void DrawQR(Graphics g, QrCode qrCode, float left, float top, float width, float height)
|
||||
{
|
||||
/// Assuming 100 dpi (printer)
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
float qrPixWidth = width / qrCode.Matrix.Width;
|
||||
float qrPixHeight = height / qrCode.Matrix.Height;
|
||||
for (int i = 0; i < qrCode.Matrix.Height; i++)
|
||||
{
|
||||
for (int j = 0; j < qrCode.Matrix.Width; j++)
|
||||
{
|
||||
if (qrCode.Matrix[j, i])
|
||||
{
|
||||
g.FillRectangle(Brushes.Black, new RectangleF(left + j * qrPixWidth,
|
||||
top + i * qrPixHeight,
|
||||
qrPixWidth,
|
||||
qrPixHeight));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
@@ -17,11 +17,5 @@ namespace Results.Output.Printers.Label
|
||||
public System.Globalization.CultureInfo CultureInfo;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// true = Bypass printing
|
||||
public bool DrawSNasBarcode;
|
||||
public bool IsQR;
|
||||
public int BarcodeLeft;
|
||||
public int BarcodeTop;
|
||||
public int BarcodeWidth;
|
||||
public int BarcodeHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ALZIR_25;LANG_FR</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;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;ALZIR_25;LANG_FR</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -35,9 +35,6 @@
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Gma.QrCodeNet.Encoding">
|
||||
<HintPath>..\packages\QrCode.Net.0.4.0.0\net40\Gma.QrCodeNet.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ALZIR_25;LANG_FR</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;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;ALZIR_25;LANG_FR</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TBF\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{EFEC8A31-3022-4DA7-A8F6-16D30A94C3FF} = {EFEC8A31-3022-4DA7-A8F6-16D30A94C3FF}
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TBFSetup", "TBFSetup\TBFSetup.vdproj", "{4890DE5C-9F68-40D7-B075-92C8EAB79833}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csproj", "{743DF7DB-C7B6-42EB-986D-0F485E5588E4}"
|
||||
@@ -72,6 +74,12 @@ Global
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|Any CPU.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|Mixed Platforms.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|x86.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Any CPU.ActiveCfg = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Mixed Platforms.ActiveCfg = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|x86.ActiveCfg = Release
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
|
||||
@@ -213,27 +213,20 @@ namespace TBF.BenchControl.Elde
|
||||
}
|
||||
#endif
|
||||
|
||||
if (index >= 0 && index < FMFreq.Length)
|
||||
{
|
||||
if (FMFreq[index] != power)
|
||||
{
|
||||
FMFreq[index] = power;
|
||||
if (index >= 0 && index < FMFreq.Length && FMFreq[index] != power)
|
||||
{
|
||||
FMFreq[index] = power;
|
||||
|
||||
pumpPowerChanged = true; /// Forces sending a command using Command.None
|
||||
pumpPowerChanged = true; /// Forces sending a command using Command.None
|
||||
|
||||
string s = string.Format("FMFreq=[{0}{1}{2}{3}{4}{5}]", FMFreq[0].ToString(),
|
||||
(FMFreq.Length > 1) ? ("," + FMFreq[1].ToString()) : "",
|
||||
(FMFreq.Length > 2) ? ("," + FMFreq[2].ToString()) : "",
|
||||
(FMFreq.Length > 3) ? ("," + FMFreq[3].ToString()) : "",
|
||||
(FMFreq.Length > 4) ? ("," + FMFreq[4].ToString()) : "",
|
||||
(FMFreq.Length > 5) ? ("," + FMFreq[5].ToString()) : "");
|
||||
log.Warn(s);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log.ErrorFormat("Wrong FM pump: index = {0}, power = {1}", index, power);
|
||||
}
|
||||
log.DebugFormat("FMFreq=[{0}{1}{2}{3}{4}{5}]",
|
||||
FMFreq[0].ToString(),
|
||||
(FMFreq.Length > 1) ? ("," + FMFreq[1].ToString()) : "",
|
||||
(FMFreq.Length > 2) ? ("," + FMFreq[2].ToString()) : "",
|
||||
(FMFreq.Length > 3) ? ("," + FMFreq[3].ToString()) : "",
|
||||
(FMFreq.Length > 4) ? ("," + FMFreq[4].ToString()) : "",
|
||||
(FMFreq.Length > 5) ? ("," + FMFreq[5].ToString()) : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +312,7 @@ namespace TBF.BenchControl.Elde
|
||||
#else /// all newer benches
|
||||
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
|
||||
#endif
|
||||
UInt128 valvesToInvert,
|
||||
UInt128 valvesToInvert,
|
||||
double[] tankCapacities)
|
||||
{
|
||||
this.valvesToInvert = valvesToInvert;
|
||||
@@ -449,20 +442,15 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
if (cbCommandQueue.Count > 0)
|
||||
{
|
||||
///
|
||||
/// There is a command in the queue
|
||||
///
|
||||
controlCom.SendCommand(cbCommandQueue.Dequeue(), (benchModelRoute & routeMask), uintFilters, FMFreq, regConst, shortImp);
|
||||
|
||||
lastSentRoute = (benchModelRoute & routeMask);
|
||||
lastSentFilters = uintFilters;
|
||||
lastSentFMFreq = FMFreq;
|
||||
lastsentRegConst = regConst;
|
||||
lastSentShortImp = shortImp;
|
||||
|
||||
/// Deep copy of arrays lastSentFilters and lastSentFMFreq
|
||||
if ((lastSentFilters == null) || (lastSentFilters.Length != uintFilters.Length)) lastSentFilters = new uint[(uintFilters == null) ? 0 : uintFilters.Length];
|
||||
for (int i = 0; i < lastSentFilters.Length; i++) lastSentFilters[i] = uintFilters[i];
|
||||
if ((lastSentFMFreq == null) || (lastSentFMFreq.Length != FMFreq.Length)) lastSentFMFreq = new float[(FMFreq == null) ? 0 : FMFreq.Length];
|
||||
for (int i = 0; i < lastSentFMFreq.Length; i++) lastSentFMFreq[i] = FMFreq[i];
|
||||
}
|
||||
else if (((benchModelRoute & routeMask) != lastSentRoute) ||
|
||||
filtersAreDifferent ||
|
||||
@@ -470,20 +458,15 @@ namespace TBF.BenchControl.Elde
|
||||
(lastsentRegConst != regConst) ||
|
||||
(lastSentShortImp != shortImp))
|
||||
{
|
||||
///
|
||||
/// Command queue is mepty, but 'route', pump frequency, PID coef., filters or shortImp have changed
|
||||
///
|
||||
controlCom.SendCommand(new SendCommandArgs(Command.None, 0, 0, 0, 0, 0), (benchModelRoute & routeMask), uintFilters, FMFreq, regConst, shortImp);
|
||||
|
||||
lastSentRoute = (benchModelRoute & routeMask);
|
||||
lastSentFilters = uintFilters;
|
||||
lastSentFMFreq = FMFreq;
|
||||
lastsentRegConst = regConst;
|
||||
lastSentShortImp = shortImp;
|
||||
|
||||
/// Deep copy of arrays lastSentFilters and lastSentFMFreq
|
||||
if ((lastSentFilters == null) || (lastSentFilters.Length != uintFilters.Length)) lastSentFilters = new uint[(uintFilters == null) ? 0 : uintFilters.Length];
|
||||
for (int i = 0; i < lastSentFilters.Length; i++) lastSentFilters[i] = uintFilters[i];
|
||||
if ((lastSentFMFreq == null) || (lastSentFMFreq.Length != FMFreq.Length)) lastSentFMFreq = new float[(FMFreq == null) ? 0 : FMFreq.Length];
|
||||
for (int i = 0; i < lastSentFMFreq.Length; i++) lastSentFMFreq[i] = FMFreq[i];
|
||||
}
|
||||
|
||||
controlCom.RunDeviceAfter();
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace TBF.BenchControl.Elde
|
||||
}
|
||||
|
||||
public float Pressure(int prsNr0) { return ctrlBrdComponent.pressure[prsNr0]; }
|
||||
public float Temperature(int tmpNr0) { return (tmpNr0 >= 0 && tmpNr0 < ctrlBrdComponent.temperature.Length) ? ctrlBrdComponent.temperature[tmpNr0] : 0; }
|
||||
public float Temperature(int tmpNr0) { return ctrlBrdComponent.temperature[tmpNr0]; }
|
||||
public RegulValveState RegulValveState(int rvNr1) { return (RegulValveState)ctrlBrdComponent.rValveStatus[rvNr1 - 1]; }
|
||||
#if GENESIS || BERLIN || PETERSBURG_200 || DEWA_300
|
||||
public UInt128 RRoute { get { return ((UInt128)ctrlBrdComponent.rRouteH << 64) | (UInt128)ctrlBrdComponent.rRoute; } }
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
|
||||
|
||||
public string ConnStr;
|
||||
public string ConnStr2;
|
||||
public string NetAdapter;
|
||||
public bool CheckPreviousRecords;
|
||||
public bool SaveTracingRecords;
|
||||
@@ -29,8 +28,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
ParentName = string.Empty;
|
||||
NetAdapter = string.Empty;
|
||||
ConnStr = "server=10.42.128.16; database=sledovanie2020; uid=vyroba2020; pwd=qwerty; charset=utf8;";
|
||||
ConnStr2 = "server=10.42.128.16; database=sledovanie2019; uid=vyroba2019; pwd=qwerty; charset=utf8;";
|
||||
ConnStr = "SERVER=10.42.128.16; DATABASE=sledovanie2019; UID=vyroba2019; PASSWORD=qwerty; CHARSET=utf8;";
|
||||
CheckPreviousRecords = true;
|
||||
SaveTracingRecords = true;
|
||||
}
|
||||
@@ -44,12 +42,11 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, CheckPrev.={1}, SaveRecords={2}, ConnStr={3}, , ConnStr2={4}",
|
||||
return string.Format("Name={0}, CheckPreviousRecords={1}, SaveTracingRecords={2}, ConnStr={3}",
|
||||
Name,
|
||||
CheckPreviousRecords,
|
||||
SaveTracingRecords,
|
||||
ConnStr,
|
||||
ConnStr2);
|
||||
ConnStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,16 +76,11 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
ISessionFactory sessionFactory; /// Factory to create database sessions that is initialized in the constructor
|
||||
ISessionFactory sessionFactory; /// Factory to create database sessions that is initialized in the constructor
|
||||
IList<Process> processes;
|
||||
Dictionary<int, Process> processDictionary;
|
||||
Dictionary<int, IList<Workstep>> workstepsDictionary;
|
||||
|
||||
ISessionFactory sessionFactory2; /// Factory to create database sessions that is initialized in the constructor
|
||||
IList<Process> processes2;
|
||||
Dictionary<int, Process> processDictionary2;
|
||||
Dictionary<int, IList<Workstep>> workstepsDictionary2;
|
||||
|
||||
///
|
||||
/// Previous workstep verification info
|
||||
///
|
||||
@@ -130,19 +125,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<TracingDB.Entities.Process>())
|
||||
.ExposeConfiguration(TracingDB.DB.BuildSchema)
|
||||
.BuildSessionFactory();
|
||||
|
||||
///
|
||||
/// Session factory 2 is used to create the 2nd database sessions
|
||||
///
|
||||
if (!string.IsNullOrEmpty(tracingCfg.ConnStr2))
|
||||
{
|
||||
sessionFactory2 = FluentNHibernate.Cfg.Fluently.Configure()
|
||||
.Database(FluentNHibernate.Cfg.Db.MySQLConfiguration.Standard.ConnectionString(tracingCfg.ConnStr2))
|
||||
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<TracingDB.Entities.Process>())
|
||||
.ExposeConfiguration(TracingDB.DB.BuildSchema)
|
||||
.BuildSessionFactory();
|
||||
}
|
||||
|
||||
///
|
||||
/// Register this test bench in the tracing DB for approx. 2 weeks
|
||||
///
|
||||
@@ -308,7 +290,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
Retv retVal = Retv.Error;
|
||||
|
||||
bool isAtLeastOneNOK = false;
|
||||
using (ISession session = sessionFactory.OpenSession())
|
||||
{
|
||||
for (int i = 0; i < waterMeters.Length; i++)
|
||||
@@ -317,45 +298,22 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
|
||||
if ((wm != null) && !wm.Disabled)
|
||||
{
|
||||
CheckPreviousRecordOfSingleWM(session, wm, 1);
|
||||
if (wm.LastRecordIsNok)
|
||||
{
|
||||
isAtLeastOneNOK = true;
|
||||
}
|
||||
CheckPreviousRecordOfSingleWM(session, wm);
|
||||
}
|
||||
}
|
||||
|
||||
retVal = Retv.OK;
|
||||
}
|
||||
|
||||
if (isAtLeastOneNOK && (sessionFactory2 != null))
|
||||
{
|
||||
using (ISession session2 = sessionFactory2.OpenSession())
|
||||
{
|
||||
for (int i = 0; i < waterMeters.Length; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = waterMeters[i];
|
||||
|
||||
if ((wm != null) && !wm.Disabled && wm.LastRecordIsNok)
|
||||
{
|
||||
CheckPreviousRecordOfSingleWM(session2, wm, 2);
|
||||
}
|
||||
}
|
||||
|
||||
retVal = Retv.OK;
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Retv CheckPreviousRecordOfSingleWM(ISession session, Results.Entities.WaterMeter wm, int sessionId)
|
||||
Retv CheckPreviousRecordOfSingleWM(ISession session, Results.Entities.WaterMeter wm)
|
||||
{
|
||||
if (string.IsNullOrEmpty(wm.SerialNr))
|
||||
{
|
||||
/// S/N is missing
|
||||
wm.ProcessId = 0;
|
||||
wm.SessionId = 0;
|
||||
wm.LastRecordIsNok = false; /// OK, this is an RFID comm. error, not a production tracing error
|
||||
return Retv.OK;
|
||||
}
|
||||
@@ -387,7 +345,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
/// No records found
|
||||
wm.ProcessId = 0;
|
||||
wm.SessionId = sessionId;
|
||||
wm.LastRecordIsNok = true; /// NOK
|
||||
///
|
||||
return Retv.OK;
|
||||
@@ -446,8 +403,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
|
||||
|
||||
wm.ProcessId = currentProcess.Id;
|
||||
wm.SessionId = sessionId;
|
||||
wm.LastRecordIsNok = true; /// NOK (=default if no matching record found)
|
||||
wm.LastRecordIsNok = true; /// NOK (=default if no matching record found)
|
||||
foreach (var rslt in results)
|
||||
{
|
||||
if ((verifiedWorkstep.Id == (int)rslt[1]) && (processId == (int)rslt[2]))
|
||||
@@ -471,10 +427,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
ITransaction transaction = null;
|
||||
ISession session = null;
|
||||
|
||||
///
|
||||
/// Save to regular tracing DB
|
||||
///
|
||||
try
|
||||
{
|
||||
session = sessionFactory.OpenSession();
|
||||
@@ -483,16 +435,15 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
int writtenRecordsCount = 0;
|
||||
foreach (var wMtr in batch.WaterMeters)
|
||||
{
|
||||
if (wMtr.SessionId == 1)
|
||||
{
|
||||
writtenRecordsCount += SaveSingleWM2DB(session, wMtr);
|
||||
}
|
||||
writtenRecordsCount += SaveSingleWM2DB(session, wMtr);
|
||||
}
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
|
||||
log.ErrorFormat("Batch {0}: {1} of {2} watermeters written to the regular production tracing DB",
|
||||
log.ErrorFormat("Batch {0}: {1} of {2} watermeters written to production tracing DB",
|
||||
batch.BatchNr, writtenRecordsCount, batch.WaterMeters.Count);
|
||||
|
||||
return Retv.OK;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -511,54 +462,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
session.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
if (sessionFactory2 != null)
|
||||
{
|
||||
///
|
||||
/// Save to alternative tracing DB
|
||||
///
|
||||
transaction = null;
|
||||
session = null;
|
||||
try
|
||||
{
|
||||
session = sessionFactory2.OpenSession();
|
||||
transaction = session.BeginTransaction();
|
||||
|
||||
int writtenRecordsCount = 0;
|
||||
foreach (var wMtr in batch.WaterMeters)
|
||||
{
|
||||
if (wMtr.SessionId == 2)
|
||||
{
|
||||
writtenRecordsCount += SaveSingleWM2DB(session, wMtr);
|
||||
}
|
||||
}
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
|
||||
log.ErrorFormat("Batch {0}: {1} of {2} watermeters written to the alternative production tracing DB",
|
||||
batch.BatchNr, writtenRecordsCount, batch.WaterMeters.Count);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
if (transaction != null && !transaction.WasCommitted) transaction.Rollback();
|
||||
|
||||
log.WarnFormat("Failed to write results of batch {0} to production tracing DB: {1}",
|
||||
batch.BatchNr, exc.Message);
|
||||
|
||||
return Retv.Error;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (session != null)
|
||||
{
|
||||
session.Close();
|
||||
session.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Retv.OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -47,7 +47,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
connStrTextBox.Text = config.ConnStr;
|
||||
connStr2TextBox.Text = config.ConnStr2;
|
||||
checkPreviousRecordsCheckBox.Checked = config.CheckPreviousRecords;
|
||||
saveTracingRecordsCheckBox.Checked = config.SaveTracingRecords;
|
||||
|
||||
@@ -103,7 +102,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
connStrTextBox.Enabled = true;
|
||||
connStr2TextBox.Enabled = true;
|
||||
netAdapterComboBox.Enabled = true;
|
||||
checkPreviousRecordsCheckBox.Enabled = true;
|
||||
saveTracingRecordsCheckBox.Enabled = true;
|
||||
@@ -127,7 +125,6 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.ConnStr, connStrTextBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
flags |= UpdateDifferent(ref config.ConnStr2, connStr2TextBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
flags |= UpdateDifferent(ref config.CheckPreviousRecords, checkPreviousRecordsCheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
flags |= UpdateDifferent(ref config.SaveTracingRecords, saveTracingRecordsCheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
|
||||
|
||||
@@ -40,31 +40,29 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
this.checkPreviousRecordsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.netAdapterLabel = new System.Windows.Forms.Label();
|
||||
this.netAdapterComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.connStr2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.connStr2Label = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(117, 32);
|
||||
this.nameTextBox.Location = new System.Drawing.Point(110, 51);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(326, 20);
|
||||
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(5, 35);
|
||||
this.nameLabel.Location = new System.Drawing.Point(15, 54);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(38, 13);
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name:";
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(114, 10);
|
||||
this.classNameLabel.Location = new System.Drawing.Point(107, 26);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
@@ -73,25 +71,25 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
// connStrTextBox
|
||||
//
|
||||
this.connStrTextBox.Enabled = false;
|
||||
this.connStrTextBox.Location = new System.Drawing.Point(8, 74);
|
||||
this.connStrTextBox.Location = new System.Drawing.Point(110, 76);
|
||||
this.connStrTextBox.Name = "connStrTextBox";
|
||||
this.connStrTextBox.Size = new System.Drawing.Size(435, 20);
|
||||
this.connStrTextBox.TabIndex = 4;
|
||||
this.connStrTextBox.Size = new System.Drawing.Size(327, 20);
|
||||
this.connStrTextBox.TabIndex = 6;
|
||||
//
|
||||
// connStrLabel
|
||||
//
|
||||
this.connStrLabel.AutoSize = true;
|
||||
this.connStrLabel.Location = new System.Drawing.Point(5, 58);
|
||||
this.connStrLabel.Location = new System.Drawing.Point(15, 79);
|
||||
this.connStrLabel.Name = "connStrLabel";
|
||||
this.connStrLabel.Size = new System.Drawing.Size(92, 13);
|
||||
this.connStrLabel.TabIndex = 3;
|
||||
this.connStrLabel.Text = "Connection string:";
|
||||
this.connStrLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connStrLabel.TabIndex = 5;
|
||||
this.connStrLabel.Text = "Connection string";
|
||||
//
|
||||
// saveTracingRecordsCheckBox
|
||||
//
|
||||
this.saveTracingRecordsCheckBox.AutoSize = true;
|
||||
this.saveTracingRecordsCheckBox.Enabled = false;
|
||||
this.saveTracingRecordsCheckBox.Location = new System.Drawing.Point(117, 221);
|
||||
this.saveTracingRecordsCheckBox.Location = new System.Drawing.Point(110, 159);
|
||||
this.saveTracingRecordsCheckBox.Name = "saveTracingRecordsCheckBox";
|
||||
this.saveTracingRecordsCheckBox.Size = new System.Drawing.Size(177, 17);
|
||||
this.saveTracingRecordsCheckBox.TabIndex = 10;
|
||||
@@ -102,7 +100,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
//
|
||||
this.checkPreviousRecordsCheckBox.AutoSize = true;
|
||||
this.checkPreviousRecordsCheckBox.Enabled = false;
|
||||
this.checkPreviousRecordsCheckBox.Location = new System.Drawing.Point(117, 199);
|
||||
this.checkPreviousRecordsCheckBox.Location = new System.Drawing.Point(110, 136);
|
||||
this.checkPreviousRecordsCheckBox.Name = "checkPreviousRecordsCheckBox";
|
||||
this.checkPreviousRecordsCheckBox.Size = new System.Drawing.Size(138, 17);
|
||||
this.checkPreviousRecordsCheckBox.TabIndex = 9;
|
||||
@@ -112,44 +110,24 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
// netAdapterLabel
|
||||
//
|
||||
this.netAdapterLabel.AutoSize = true;
|
||||
this.netAdapterLabel.Location = new System.Drawing.Point(5, 147);
|
||||
this.netAdapterLabel.Location = new System.Drawing.Point(15, 104);
|
||||
this.netAdapterLabel.Name = "netAdapterLabel";
|
||||
this.netAdapterLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.netAdapterLabel.Size = new System.Drawing.Size(86, 13);
|
||||
this.netAdapterLabel.TabIndex = 7;
|
||||
this.netAdapterLabel.Text = "Network adapter:";
|
||||
this.netAdapterLabel.Text = "Network adapter";
|
||||
//
|
||||
// netAdapterComboBox
|
||||
//
|
||||
this.netAdapterComboBox.Enabled = false;
|
||||
this.netAdapterComboBox.FormattingEnabled = true;
|
||||
this.netAdapterComboBox.Location = new System.Drawing.Point(8, 163);
|
||||
this.netAdapterComboBox.Location = new System.Drawing.Point(110, 101);
|
||||
this.netAdapterComboBox.Name = "netAdapterComboBox";
|
||||
this.netAdapterComboBox.Size = new System.Drawing.Size(435, 21);
|
||||
this.netAdapterComboBox.TabIndex = 8;
|
||||
//
|
||||
// connStr2TextBox
|
||||
//
|
||||
this.connStr2TextBox.Enabled = false;
|
||||
this.connStr2TextBox.Location = new System.Drawing.Point(8, 118);
|
||||
this.connStr2TextBox.Name = "connStr2TextBox";
|
||||
this.connStr2TextBox.Size = new System.Drawing.Size(434, 20);
|
||||
this.connStr2TextBox.TabIndex = 6;
|
||||
//
|
||||
// connStr2Label
|
||||
//
|
||||
this.connStr2Label.AutoSize = true;
|
||||
this.connStr2Label.Location = new System.Drawing.Point(5, 102);
|
||||
this.connStr2Label.Name = "connStr2Label";
|
||||
this.connStr2Label.Size = new System.Drawing.Size(101, 13);
|
||||
this.connStr2Label.TabIndex = 5;
|
||||
this.connStr2Label.Text = "Connection string 2:";
|
||||
this.netAdapterComboBox.Size = new System.Drawing.Size(327, 21);
|
||||
this.netAdapterComboBox.TabIndex = 11;
|
||||
//
|
||||
// TracingCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.connStr2TextBox);
|
||||
this.Controls.Add(this.connStr2Label);
|
||||
this.Controls.Add(this.netAdapterComboBox);
|
||||
this.Controls.Add(this.netAdapterLabel);
|
||||
this.Controls.Add(this.saveTracingRecordsCheckBox);
|
||||
@@ -160,7 +138,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "TracingCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(450, 250);
|
||||
this.Size = new System.Drawing.Size(450, 230);
|
||||
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
@@ -178,7 +156,5 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
private System.Windows.Forms.CheckBox checkPreviousRecordsCheckBox;
|
||||
private System.Windows.Forms.Label netAdapterLabel;
|
||||
private System.Windows.Forms.ComboBox netAdapterComboBox;
|
||||
private System.Windows.Forms.TextBox connStr2TextBox;
|
||||
private System.Windows.Forms.Label connStr2Label;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public class PrintLabelDocument : PrintDocument
|
||||
{
|
||||
const int FontSize = 9;
|
||||
const string FontFamilyName = "Arial"; //"Times New Roman";
|
||||
|
||||
readonly int paperWidth;
|
||||
readonly int paperHeight;
|
||||
readonly string templateFile;
|
||||
|
||||
/// <summary> Property variable for the Font the user wishes to use </summary>
|
||||
Font font;
|
||||
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
///
|
||||
/// Layout and status
|
||||
///
|
||||
int nextWMNr; /// nr. of watermeter to be printed as the first one on the next page
|
||||
int nrPages;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public PrintLabelDocument(Results.Entities.Batch batch,
|
||||
PageOrientation pageOrientation,
|
||||
int paperWidth,
|
||||
int paperHeight,
|
||||
string templateFile)
|
||||
{
|
||||
this.batch = batch;
|
||||
this.paperWidth = paperWidth;
|
||||
this.paperHeight = paperHeight;
|
||||
this.templateFile = templateFile;
|
||||
|
||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
||||
|
||||
/// Set print area size and margins (in dots using 80 dpi)
|
||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
||||
int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
||||
|
||||
/// Check if the user selected to print in Landscape mode
|
||||
/// if they did then we need to swap height/width parameters
|
||||
if (DefaultPageSettings.Landscape)
|
||||
{
|
||||
int tmp = printHeight;
|
||||
printHeight = printWidth;
|
||||
printWidth = tmp;
|
||||
}
|
||||
|
||||
/// One watermeter per label/page
|
||||
nrPages = batch.WaterMeters.Count;
|
||||
|
||||
nextWMNr = 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
|
||||
if (font == null) { font = new Font(FontFamilyName, FontSize, FontStyle.Regular); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
if (File.Exists(templateFile))
|
||||
{
|
||||
Image img = Image.FromFile(templateFile);
|
||||
e.Graphics.DrawImage(new Bitmap(img), new Rectangle(0, 0, paperWidth, paperHeight));
|
||||
}
|
||||
|
||||
/// Set print area size and margins (in dots using 80 dpi)
|
||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
||||
int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
||||
|
||||
/// Check if the user selected to print in Landscape mode
|
||||
/// if they did then we need to swap height/width parameters
|
||||
if (base.DefaultPageSettings.Landscape)
|
||||
{
|
||||
int tmp = printHeight;
|
||||
printHeight = printWidth;
|
||||
printWidth = tmp;
|
||||
}
|
||||
|
||||
int x = leftMargin;
|
||||
int y = topMargin;
|
||||
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
|
||||
///--------
|
||||
/// Body
|
||||
///--------
|
||||
|
||||
PrintWM(e, nextWMNr);
|
||||
nextWMNr++;
|
||||
e.HasMorePages = (nextWMNr < batch.WaterMeters.Count);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Print one water meter results
|
||||
/// </summary>
|
||||
/// <param name="wmNr">Water meter number (0-based)</param>
|
||||
void PrintWM(System.Drawing.Printing.PrintPageEventArgs e, int wmNr)
|
||||
{
|
||||
if (wmNr >= batch.WaterMeters.Count) return;
|
||||
|
||||
Results.Entities.WaterMeter wm = batch.WaterMeters[wmNr];
|
||||
|
||||
if (wm == null) return;
|
||||
|
||||
|
||||
/// Serial number
|
||||
if (!string.IsNullOrEmpty(wm.SerialNr)) PrintAt(e, 20, 62, string.Format("S/N: {0}", wm.SerialNr));
|
||||
|
||||
/// Watermeter type
|
||||
PrintAt(e, 20, 74, batch.ProtocolTitle);
|
||||
|
||||
/// Date
|
||||
PrintAt(e, 135, 74, string.Format("{0:dd/MM/yy", batch.EndTime));
|
||||
|
||||
Results.WMeterRsltItemSpec item1 = Results.WMeterRsltItemSpec.GetItem(Results.ItemID.Test_name);
|
||||
|
||||
Results.WMeterRsltItemSpec item2 = Results.WMeterRsltItemSpec.GetItem(Results.ItemID.Error);
|
||||
item2.Units = Config.Unit.Pct;
|
||||
item2.Precision = "F2";
|
||||
item2.Format = "{0}%";
|
||||
|
||||
int printPosition = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
item1.TestID = mtr.Name();
|
||||
item2.TestID = mtr.Name();
|
||||
|
||||
PrintAt(e, 20, 6 + 14 * printPosition, item1.Print(wm));
|
||||
PrintAt(e, 78, 6 + 14 * printPosition, item2.Print(wm));
|
||||
|
||||
printPosition++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintAt(e, p.X, p.Y, text);
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, 667, 18);
|
||||
e.Graphics.DrawString(text, this.font, Brushes.Black, printArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,12 +76,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
printerCfg.NrOfCopies = newCfg.NrOfCopies;
|
||||
printerCfg.GoodOnly = newCfg.GoodOnly;
|
||||
printerCfg.SupressPrinting = newCfg.SupressPrinting;
|
||||
printerCfg.DrawSNasBarcode = newCfg.DrawSNasBarcode;
|
||||
printerCfg.IsQR = newCfg.IsQR;
|
||||
printerCfg.BarcodeLeft = newCfg.BarcodeLeft;
|
||||
printerCfg.BarcodeTop = newCfg.BarcodeTop;
|
||||
printerCfg.BarcodeWidth = newCfg.BarcodeWidth;
|
||||
printerCfg.BarcodeHeight = newCfg.BarcodeHeight;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
@@ -137,6 +131,7 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PrintResults(Results.Entities.Batch batch, Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
LabelPrinterCfg cfg = new LabelPrinterCfg
|
||||
@@ -152,12 +147,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
|
||||
GoodOnly = printerCfg.GoodOnly,
|
||||
SupressPrinting = printerCfg.SupressPrinting,
|
||||
DrawSNasBarcode = printerCfg.DrawSNasBarcode,
|
||||
IsQR = printerCfg.IsQR,
|
||||
BarcodeLeft = printerCfg.BarcodeLeft,
|
||||
BarcodeTop = printerCfg.BarcodeTop,
|
||||
BarcodeWidth = printerCfg.BarcodeWidth,
|
||||
BarcodeHeight = printerCfg.BarcodeHeight,
|
||||
};
|
||||
|
||||
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -33,14 +33,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// true = Bypass printing
|
||||
|
||||
public bool DrawSNasBarcode;
|
||||
public bool IsQR;
|
||||
public int BarcodeLeft;
|
||||
public int BarcodeTop;
|
||||
public int BarcodeWidth;
|
||||
public int BarcodeHeight;
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PrinterCfg()
|
||||
{
|
||||
@@ -63,20 +55,18 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
NrOfCopies = 1;
|
||||
GoodOnly = false;
|
||||
SupressPrinting = false;
|
||||
DrawSNasBarcode = false;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, GoodOnly={5}, SupressPrinting={6}, Barcode={7}",
|
||||
return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, GoodOnly={5}, SupressPrinting={6}",
|
||||
Name,
|
||||
PageOrientation,
|
||||
PaperWidth,
|
||||
PaperHeight,
|
||||
Template,
|
||||
GoodOnly ? "yes" : "no",
|
||||
SupressPrinting ? "yes" : "no",
|
||||
DrawSNasBarcode ? "yes" : "no"
|
||||
SupressPrinting ? "yes" : "no"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+292
-413
@@ -31,407 +31,296 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
/// </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.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.orientationLabel = new System.Windows.Forms.Label();
|
||||
this.orientationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.templateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.templateLabel = new System.Windows.Forms.Label();
|
||||
this.paperWidthTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperWidthLabel = new System.Windows.Forms.Label();
|
||||
this.paperHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.italicCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.boldCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.fontSizeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.fontFamilyComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.bodyFontLabel = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.itemsToPrintButton = new System.Windows.Forms.Button();
|
||||
this.nrOfCopiesLabel = new System.Windows.Forms.Label();
|
||||
this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cultureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.cultureLabel = new System.Windows.Forms.Label();
|
||||
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.snBarcodeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.barcodeHeightLabel = new System.Windows.Forms.Label();
|
||||
this.barcodeHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.isQrCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.barcodeWidthLabel = new System.Windows.Forms.Label();
|
||||
this.barcodeWidthTextBox = new System.Windows.Forms.TextBox();
|
||||
this.barcodeTopLabel = new System.Windows.Forms.Label();
|
||||
this.barcodeTopTextBox = new System.Windows.Forms.TextBox();
|
||||
this.barcodeLeftTextBox = new System.Windows.Forms.TextBox();
|
||||
this.barcodeLeftLabel = new System.Windows.Forms.Label();
|
||||
this.snBarcodeCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.snBarcodeGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(122, 35);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(8, 38);
|
||||
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(119, 11);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "Class name";
|
||||
//
|
||||
// supressPrintingCheckBox
|
||||
//
|
||||
this.supressPrintingCheckBox.AutoSize = true;
|
||||
this.supressPrintingCheckBox.Enabled = false;
|
||||
this.supressPrintingCheckBox.Location = new System.Drawing.Point(245, 200);
|
||||
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
|
||||
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
|
||||
this.supressPrintingCheckBox.TabIndex = 11;
|
||||
this.supressPrintingCheckBox.Text = "Supress printing";
|
||||
this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// orientationLabel
|
||||
//
|
||||
this.orientationLabel.AutoSize = true;
|
||||
this.orientationLabel.Location = new System.Drawing.Point(8, 84);
|
||||
this.orientationLabel.Name = "orientationLabel";
|
||||
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.orientationLabel.TabIndex = 3;
|
||||
this.orientationLabel.Text = "Page orientation";
|
||||
//
|
||||
// orientationComboBox
|
||||
//
|
||||
this.orientationComboBox.Enabled = false;
|
||||
this.orientationComboBox.FormattingEnabled = true;
|
||||
this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
|
||||
this.orientationComboBox.Name = "orientationComboBox";
|
||||
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.orientationComboBox.TabIndex = 4;
|
||||
//
|
||||
// templateTextBox
|
||||
//
|
||||
this.templateTextBox.Enabled = false;
|
||||
this.templateTextBox.Location = new System.Drawing.Point(122, 58);
|
||||
this.templateTextBox.Name = "templateTextBox";
|
||||
this.templateTextBox.Size = new System.Drawing.Size(228, 20);
|
||||
this.templateTextBox.TabIndex = 10;
|
||||
//
|
||||
// templateLabel
|
||||
//
|
||||
this.templateLabel.AutoSize = true;
|
||||
this.templateLabel.Location = new System.Drawing.Point(8, 61);
|
||||
this.templateLabel.Name = "templateLabel";
|
||||
this.templateLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.templateLabel.TabIndex = 9;
|
||||
this.templateLabel.Text = "Template file";
|
||||
//
|
||||
// paperWidthTextBox
|
||||
//
|
||||
this.paperWidthTextBox.Enabled = false;
|
||||
this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
|
||||
this.paperWidthTextBox.Name = "paperWidthTextBox";
|
||||
this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperWidthTextBox.TabIndex = 6;
|
||||
//
|
||||
// paperWidthLabel
|
||||
//
|
||||
this.paperWidthLabel.AutoSize = true;
|
||||
this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
|
||||
this.paperWidthLabel.Name = "paperWidthLabel";
|
||||
this.paperWidthLabel.Size = new System.Drawing.Size(103, 13);
|
||||
this.paperWidthLabel.TabIndex = 5;
|
||||
this.paperWidthLabel.Text = "Paper width / height";
|
||||
//
|
||||
// paperHeightTextBox
|
||||
//
|
||||
this.paperHeightTextBox.Enabled = false;
|
||||
this.paperHeightTextBox.Location = new System.Drawing.Point(176, 105);
|
||||
this.paperHeightTextBox.Name = "paperHeightTextBox";
|
||||
this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperHeightTextBox.TabIndex = 8;
|
||||
//
|
||||
// italicCheckBox
|
||||
//
|
||||
this.italicCheckBox.AutoSize = true;
|
||||
this.italicCheckBox.Enabled = false;
|
||||
this.italicCheckBox.Location = new System.Drawing.Point(335, 134);
|
||||
this.italicCheckBox.Name = "italicCheckBox";
|
||||
this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.italicCheckBox.TabIndex = 47;
|
||||
this.italicCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// boldCheckBox
|
||||
//
|
||||
this.boldCheckBox.AutoSize = true;
|
||||
this.boldCheckBox.Enabled = false;
|
||||
this.boldCheckBox.Location = new System.Drawing.Point(307, 134);
|
||||
this.boldCheckBox.Name = "boldCheckBox";
|
||||
this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.boldCheckBox.TabIndex = 46;
|
||||
this.boldCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// fontSizeTextBox
|
||||
//
|
||||
this.fontSizeTextBox.Enabled = false;
|
||||
this.fontSizeTextBox.Location = new System.Drawing.Point(259, 128);
|
||||
this.fontSizeTextBox.Name = "fontSizeTextBox";
|
||||
this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
|
||||
this.fontSizeTextBox.TabIndex = 45;
|
||||
//
|
||||
// fontFamilyComboBox
|
||||
//
|
||||
this.fontFamilyComboBox.Enabled = false;
|
||||
this.fontFamilyComboBox.FormattingEnabled = true;
|
||||
this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 128);
|
||||
this.fontFamilyComboBox.Name = "fontFamilyComboBox";
|
||||
this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.fontFamilyComboBox.TabIndex = 44;
|
||||
//
|
||||
// bodyFontLabel
|
||||
//
|
||||
this.bodyFontLabel.AutoSize = true;
|
||||
this.bodyFontLabel.Location = new System.Drawing.Point(8, 131);
|
||||
this.bodyFontLabel.Name = "bodyFontLabel";
|
||||
this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
|
||||
this.bodyFontLabel.TabIndex = 43;
|
||||
this.bodyFontLabel.Text = "Font family/size/style";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label2.Location = new System.Drawing.Point(331, 119);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(24, 13);
|
||||
this.label2.TabIndex = 49;
|
||||
this.label2.Text = "Ital.";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(297, 119);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(32, 13);
|
||||
this.label1.TabIndex = 48;
|
||||
this.label1.Text = "Bold";
|
||||
//
|
||||
// itemsToPrintButton
|
||||
//
|
||||
this.itemsToPrintButton.Enabled = false;
|
||||
this.itemsToPrintButton.Location = new System.Drawing.Point(259, 85);
|
||||
this.itemsToPrintButton.Name = "itemsToPrintButton";
|
||||
this.itemsToPrintButton.Size = new System.Drawing.Size(91, 30);
|
||||
this.itemsToPrintButton.TabIndex = 50;
|
||||
this.itemsToPrintButton.Text = "Items to print";
|
||||
this.itemsToPrintButton.UseVisualStyleBackColor = true;
|
||||
this.itemsToPrintButton.Click += new System.EventHandler(this.itemsToPrintButton_Click);
|
||||
//
|
||||
// nrOfCopiesLabel
|
||||
//
|
||||
this.nrOfCopiesLabel.AutoSize = true;
|
||||
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 179);
|
||||
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
|
||||
this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.nrOfCopiesLabel.TabIndex = 52;
|
||||
this.nrOfCopiesLabel.Text = "Number of copies";
|
||||
//
|
||||
// nrOfCopiesTextBox
|
||||
//
|
||||
this.nrOfCopiesTextBox.Enabled = false;
|
||||
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 176);
|
||||
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
|
||||
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.nrOfCopiesTextBox.TabIndex = 51;
|
||||
//
|
||||
// cultureComboBox
|
||||
//
|
||||
this.cultureComboBox.Enabled = false;
|
||||
this.cultureComboBox.FormattingEnabled = true;
|
||||
this.cultureComboBox.Location = new System.Drawing.Point(122, 152);
|
||||
this.cultureComboBox.Name = "cultureComboBox";
|
||||
this.cultureComboBox.Size = new System.Drawing.Size(228, 21);
|
||||
this.cultureComboBox.TabIndex = 54;
|
||||
//
|
||||
// cultureLabel
|
||||
//
|
||||
this.cultureLabel.AutoSize = true;
|
||||
this.cultureLabel.Location = new System.Drawing.Point(8, 155);
|
||||
this.cultureLabel.Name = "cultureLabel";
|
||||
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.cultureLabel.TabIndex = 53;
|
||||
this.cultureLabel.Text = "Cullture";
|
||||
//
|
||||
// goodOnlyCheckBox
|
||||
//
|
||||
this.goodOnlyCheckBox.AutoSize = true;
|
||||
this.goodOnlyCheckBox.Enabled = false;
|
||||
this.goodOnlyCheckBox.Location = new System.Drawing.Point(245, 179);
|
||||
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
|
||||
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
|
||||
this.goodOnlyCheckBox.TabIndex = 55;
|
||||
this.goodOnlyCheckBox.Text = "Good only";
|
||||
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// snBarcodeGroupBox
|
||||
//
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeHeightLabel);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeHeightTextBox);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.isQrCheckBox);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeWidthLabel);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeWidthTextBox);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeTopLabel);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeTopTextBox);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeLeftTextBox);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.barcodeLeftLabel);
|
||||
this.snBarcodeGroupBox.Controls.Add(this.snBarcodeCheckBox);
|
||||
this.snBarcodeGroupBox.Location = new System.Drawing.Point(11, 227);
|
||||
this.snBarcodeGroupBox.Name = "snBarcodeGroupBox";
|
||||
this.snBarcodeGroupBox.Size = new System.Drawing.Size(339, 59);
|
||||
this.snBarcodeGroupBox.TabIndex = 56;
|
||||
this.snBarcodeGroupBox.TabStop = false;
|
||||
//
|
||||
// barcodeHeightLabel
|
||||
//
|
||||
this.barcodeHeightLabel.AutoSize = true;
|
||||
this.barcodeHeightLabel.Location = new System.Drawing.Point(207, 29);
|
||||
this.barcodeHeightLabel.Name = "barcodeHeightLabel";
|
||||
this.barcodeHeightLabel.Size = new System.Drawing.Size(38, 13);
|
||||
this.barcodeHeightLabel.TabIndex = 18;
|
||||
this.barcodeHeightLabel.Text = "Height";
|
||||
//
|
||||
// barcodeHeightTextBox
|
||||
//
|
||||
this.barcodeHeightTextBox.Enabled = false;
|
||||
this.barcodeHeightTextBox.Location = new System.Drawing.Point(247, 25);
|
||||
this.barcodeHeightTextBox.Name = "barcodeHeightTextBox";
|
||||
this.barcodeHeightTextBox.Size = new System.Drawing.Size(32, 20);
|
||||
this.barcodeHeightTextBox.TabIndex = 17;
|
||||
//
|
||||
// isQrCheckBox
|
||||
//
|
||||
this.isQrCheckBox.AutoSize = true;
|
||||
this.isQrCheckBox.Location = new System.Drawing.Point(293, 27);
|
||||
this.isQrCheckBox.Name = "isQrCheckBox";
|
||||
this.isQrCheckBox.Size = new System.Drawing.Size(42, 17);
|
||||
this.isQrCheckBox.TabIndex = 16;
|
||||
this.isQrCheckBox.Text = "QR";
|
||||
this.isQrCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// barcodeWidthLabel
|
||||
//
|
||||
this.barcodeWidthLabel.AutoSize = true;
|
||||
this.barcodeWidthLabel.Location = new System.Drawing.Point(135, 29);
|
||||
this.barcodeWidthLabel.Name = "barcodeWidthLabel";
|
||||
this.barcodeWidthLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.barcodeWidthLabel.TabIndex = 15;
|
||||
this.barcodeWidthLabel.Text = "Width";
|
||||
//
|
||||
// barcodeWidthTextBox
|
||||
//
|
||||
this.barcodeWidthTextBox.Enabled = false;
|
||||
this.barcodeWidthTextBox.Location = new System.Drawing.Point(171, 25);
|
||||
this.barcodeWidthTextBox.Name = "barcodeWidthTextBox";
|
||||
this.barcodeWidthTextBox.Size = new System.Drawing.Size(32, 20);
|
||||
this.barcodeWidthTextBox.TabIndex = 14;
|
||||
//
|
||||
// barcodeTopLabel
|
||||
//
|
||||
this.barcodeTopLabel.AutoSize = true;
|
||||
this.barcodeTopLabel.Location = new System.Drawing.Point(71, 29);
|
||||
this.barcodeTopLabel.Name = "barcodeTopLabel";
|
||||
this.barcodeTopLabel.Size = new System.Drawing.Size(26, 13);
|
||||
this.barcodeTopLabel.TabIndex = 13;
|
||||
this.barcodeTopLabel.Text = "Top";
|
||||
//
|
||||
// barcodeTopTextBox
|
||||
//
|
||||
this.barcodeTopTextBox.Enabled = false;
|
||||
this.barcodeTopTextBox.Location = new System.Drawing.Point(99, 25);
|
||||
this.barcodeTopTextBox.Name = "barcodeTopTextBox";
|
||||
this.barcodeTopTextBox.Size = new System.Drawing.Size(32, 20);
|
||||
this.barcodeTopTextBox.TabIndex = 11;
|
||||
//
|
||||
// barcodeLeftTextBox
|
||||
//
|
||||
this.barcodeLeftTextBox.Enabled = false;
|
||||
this.barcodeLeftTextBox.Location = new System.Drawing.Point(35, 25);
|
||||
this.barcodeLeftTextBox.Name = "barcodeLeftTextBox";
|
||||
this.barcodeLeftTextBox.Size = new System.Drawing.Size(32, 20);
|
||||
this.barcodeLeftTextBox.TabIndex = 10;
|
||||
//
|
||||
// barcodeLeftLabel
|
||||
//
|
||||
this.barcodeLeftLabel.AutoSize = true;
|
||||
this.barcodeLeftLabel.Location = new System.Drawing.Point(8, 29);
|
||||
this.barcodeLeftLabel.Name = "barcodeLeftLabel";
|
||||
this.barcodeLeftLabel.Size = new System.Drawing.Size(25, 13);
|
||||
this.barcodeLeftLabel.TabIndex = 9;
|
||||
this.barcodeLeftLabel.Text = "Left";
|
||||
//
|
||||
// snBarcodeCheckBox
|
||||
//
|
||||
this.snBarcodeCheckBox.AutoSize = true;
|
||||
this.snBarcodeCheckBox.Location = new System.Drawing.Point(10, 0);
|
||||
this.snBarcodeCheckBox.Name = "snBarcodeCheckBox";
|
||||
this.snBarcodeCheckBox.Size = new System.Drawing.Size(176, 17);
|
||||
this.snBarcodeCheckBox.TabIndex = 0;
|
||||
this.snBarcodeCheckBox.Text = "Print barcode with serial number";
|
||||
this.snBarcodeCheckBox.UseVisualStyleBackColor = true;
|
||||
this.snBarcodeCheckBox.CheckedChanged += new System.EventHandler(this.snBarcodeCheckBox_CheckedChanged);
|
||||
//
|
||||
// PrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.snBarcodeGroupBox);
|
||||
this.Controls.Add(this.goodOnlyCheckBox);
|
||||
this.Controls.Add(this.cultureComboBox);
|
||||
this.Controls.Add(this.cultureLabel);
|
||||
this.Controls.Add(this.nrOfCopiesLabel);
|
||||
this.Controls.Add(this.nrOfCopiesTextBox);
|
||||
this.Controls.Add(this.itemsToPrintButton);
|
||||
this.Controls.Add(this.italicCheckBox);
|
||||
this.Controls.Add(this.boldCheckBox);
|
||||
this.Controls.Add(this.fontSizeTextBox);
|
||||
this.Controls.Add(this.fontFamilyComboBox);
|
||||
this.Controls.Add(this.bodyFontLabel);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.paperHeightTextBox);
|
||||
this.Controls.Add(this.paperWidthTextBox);
|
||||
this.Controls.Add(this.paperWidthLabel);
|
||||
this.Controls.Add(this.templateTextBox);
|
||||
this.Controls.Add(this.templateLabel);
|
||||
this.Controls.Add(this.orientationComboBox);
|
||||
this.Controls.Add(this.orientationLabel);
|
||||
this.Controls.Add(this.supressPrintingCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "PrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(372, 327);
|
||||
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
|
||||
this.snBarcodeGroupBox.ResumeLayout(false);
|
||||
this.snBarcodeGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.orientationLabel = new System.Windows.Forms.Label();
|
||||
this.orientationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.templateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.templateLabel = new System.Windows.Forms.Label();
|
||||
this.paperWidthTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperWidthLabel = new System.Windows.Forms.Label();
|
||||
this.paperHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperHeightLabel = new System.Windows.Forms.Label();
|
||||
this.italicCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.boldCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.fontSizeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.fontFamilyComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.bodyFontLabel = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.itemsToPrintButton = new System.Windows.Forms.Button();
|
||||
this.nrOfCopiesLabel = new System.Windows.Forms.Label();
|
||||
this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cultureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.cultureLabel = new System.Windows.Forms.Label();
|
||||
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(122, 35);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(8, 38);
|
||||
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(119, 11);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "Class name";
|
||||
//
|
||||
// supressPrintingCheckBox
|
||||
//
|
||||
this.supressPrintingCheckBox.AutoSize = true;
|
||||
this.supressPrintingCheckBox.Enabled = false;
|
||||
this.supressPrintingCheckBox.Location = new System.Drawing.Point(122, 283);
|
||||
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
|
||||
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
|
||||
this.supressPrintingCheckBox.TabIndex = 11;
|
||||
this.supressPrintingCheckBox.Text = "Supress printing";
|
||||
this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// orientationLabel
|
||||
//
|
||||
this.orientationLabel.AutoSize = true;
|
||||
this.orientationLabel.Location = new System.Drawing.Point(8, 84);
|
||||
this.orientationLabel.Name = "orientationLabel";
|
||||
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.orientationLabel.TabIndex = 3;
|
||||
this.orientationLabel.Text = "Page orientation";
|
||||
//
|
||||
// orientationComboBox
|
||||
//
|
||||
this.orientationComboBox.Enabled = false;
|
||||
this.orientationComboBox.FormattingEnabled = true;
|
||||
this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
|
||||
this.orientationComboBox.Name = "orientationComboBox";
|
||||
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.orientationComboBox.TabIndex = 4;
|
||||
//
|
||||
// templateTextBox
|
||||
//
|
||||
this.templateTextBox.Enabled = false;
|
||||
this.templateTextBox.Location = new System.Drawing.Point(122, 58);
|
||||
this.templateTextBox.Name = "templateTextBox";
|
||||
this.templateTextBox.Size = new System.Drawing.Size(228, 20);
|
||||
this.templateTextBox.TabIndex = 10;
|
||||
//
|
||||
// templateLabel
|
||||
//
|
||||
this.templateLabel.AutoSize = true;
|
||||
this.templateLabel.Location = new System.Drawing.Point(8, 61);
|
||||
this.templateLabel.Name = "templateLabel";
|
||||
this.templateLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.templateLabel.TabIndex = 9;
|
||||
this.templateLabel.Text = "Template file";
|
||||
//
|
||||
// paperWidthTextBox
|
||||
//
|
||||
this.paperWidthTextBox.Enabled = false;
|
||||
this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
|
||||
this.paperWidthTextBox.Name = "paperWidthTextBox";
|
||||
this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperWidthTextBox.TabIndex = 6;
|
||||
//
|
||||
// paperWidthLabel
|
||||
//
|
||||
this.paperWidthLabel.AutoSize = true;
|
||||
this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
|
||||
this.paperWidthLabel.Name = "paperWidthLabel";
|
||||
this.paperWidthLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.paperWidthLabel.TabIndex = 5;
|
||||
this.paperWidthLabel.Text = "Paper width";
|
||||
//
|
||||
// paperHeightTextBox
|
||||
//
|
||||
this.paperHeightTextBox.Enabled = false;
|
||||
this.paperHeightTextBox.Location = new System.Drawing.Point(122, 128);
|
||||
this.paperHeightTextBox.Name = "paperHeightTextBox";
|
||||
this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperHeightTextBox.TabIndex = 8;
|
||||
//
|
||||
// paperHeightLabel
|
||||
//
|
||||
this.paperHeightLabel.AutoSize = true;
|
||||
this.paperHeightLabel.Location = new System.Drawing.Point(8, 131);
|
||||
this.paperHeightLabel.Name = "paperHeightLabel";
|
||||
this.paperHeightLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.paperHeightLabel.TabIndex = 7;
|
||||
this.paperHeightLabel.Text = "Paper height";
|
||||
//
|
||||
// bodyItalicCheckBox
|
||||
//
|
||||
this.italicCheckBox.AutoSize = true;
|
||||
this.italicCheckBox.Enabled = false;
|
||||
this.italicCheckBox.Location = new System.Drawing.Point(335, 190);
|
||||
this.italicCheckBox.Name = "bodyItalicCheckBox";
|
||||
this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.italicCheckBox.TabIndex = 47;
|
||||
this.italicCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bodyBoldCheckBox
|
||||
//
|
||||
this.boldCheckBox.AutoSize = true;
|
||||
this.boldCheckBox.Enabled = false;
|
||||
this.boldCheckBox.Location = new System.Drawing.Point(307, 190);
|
||||
this.boldCheckBox.Name = "bodyBoldCheckBox";
|
||||
this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.boldCheckBox.TabIndex = 46;
|
||||
this.boldCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bodyFontSizeTextBox
|
||||
//
|
||||
this.fontSizeTextBox.Enabled = false;
|
||||
this.fontSizeTextBox.Location = new System.Drawing.Point(259, 184);
|
||||
this.fontSizeTextBox.Name = "bodyFontSizeTextBox";
|
||||
this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
|
||||
this.fontSizeTextBox.TabIndex = 45;
|
||||
//
|
||||
// bodyFontFamilyComboBox
|
||||
//
|
||||
this.fontFamilyComboBox.Enabled = false;
|
||||
this.fontFamilyComboBox.FormattingEnabled = true;
|
||||
this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 184);
|
||||
this.fontFamilyComboBox.Name = "bodyFontFamilyComboBox";
|
||||
this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.fontFamilyComboBox.TabIndex = 44;
|
||||
//
|
||||
// bodyFontLabel
|
||||
//
|
||||
this.bodyFontLabel.AutoSize = true;
|
||||
this.bodyFontLabel.Location = new System.Drawing.Point(8, 187);
|
||||
this.bodyFontLabel.Name = "bodyFontLabel";
|
||||
this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
|
||||
this.bodyFontLabel.TabIndex = 43;
|
||||
this.bodyFontLabel.Text = "Font family/size/style";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label2.Location = new System.Drawing.Point(331, 175);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(24, 13);
|
||||
this.label2.TabIndex = 49;
|
||||
this.label2.Text = "Ital.";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(297, 175);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(32, 13);
|
||||
this.label1.TabIndex = 48;
|
||||
this.label1.Text = "Bold";
|
||||
//
|
||||
// itemsToPrintButton
|
||||
//
|
||||
this.itemsToPrintButton.Enabled = false;
|
||||
this.itemsToPrintButton.Location = new System.Drawing.Point(121, 154);
|
||||
this.itemsToPrintButton.Name = "itemsToPrintButton";
|
||||
this.itemsToPrintButton.Size = new System.Drawing.Size(132, 23);
|
||||
this.itemsToPrintButton.TabIndex = 50;
|
||||
this.itemsToPrintButton.Text = "Items to print";
|
||||
this.itemsToPrintButton.UseVisualStyleBackColor = true;
|
||||
this.itemsToPrintButton.Click += new System.EventHandler(this.itemsToPrintButton_Click);
|
||||
//
|
||||
// nrOfCopiesLabel
|
||||
//
|
||||
this.nrOfCopiesLabel.AutoSize = true;
|
||||
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 235);
|
||||
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
|
||||
this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.nrOfCopiesLabel.TabIndex = 52;
|
||||
this.nrOfCopiesLabel.Text = "Number of copies";
|
||||
//
|
||||
// nrOfCopiesTextBox
|
||||
//
|
||||
this.nrOfCopiesTextBox.Enabled = false;
|
||||
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 232);
|
||||
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
|
||||
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.nrOfCopiesTextBox.TabIndex = 51;
|
||||
//
|
||||
// cultureComboBox
|
||||
//
|
||||
this.cultureComboBox.Enabled = false;
|
||||
this.cultureComboBox.FormattingEnabled = true;
|
||||
this.cultureComboBox.Location = new System.Drawing.Point(122, 208);
|
||||
this.cultureComboBox.Name = "cultureComboBox";
|
||||
this.cultureComboBox.Size = new System.Drawing.Size(218, 21);
|
||||
this.cultureComboBox.TabIndex = 54;
|
||||
//
|
||||
// cultureLabel
|
||||
//
|
||||
this.cultureLabel.AutoSize = true;
|
||||
this.cultureLabel.Location = new System.Drawing.Point(8, 211);
|
||||
this.cultureLabel.Name = "cultureLabel";
|
||||
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.cultureLabel.TabIndex = 53;
|
||||
this.cultureLabel.Text = "Cullture";
|
||||
//
|
||||
// goodOnlyCheckBox
|
||||
//
|
||||
this.goodOnlyCheckBox.AutoSize = true;
|
||||
this.goodOnlyCheckBox.Enabled = false;
|
||||
this.goodOnlyCheckBox.Location = new System.Drawing.Point(122, 262);
|
||||
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
|
||||
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
|
||||
this.goodOnlyCheckBox.TabIndex = 55;
|
||||
this.goodOnlyCheckBox.Text = "Good only";
|
||||
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.goodOnlyCheckBox);
|
||||
this.Controls.Add(this.cultureComboBox);
|
||||
this.Controls.Add(this.cultureLabel);
|
||||
this.Controls.Add(this.nrOfCopiesLabel);
|
||||
this.Controls.Add(this.nrOfCopiesTextBox);
|
||||
this.Controls.Add(this.itemsToPrintButton);
|
||||
this.Controls.Add(this.italicCheckBox);
|
||||
this.Controls.Add(this.boldCheckBox);
|
||||
this.Controls.Add(this.fontSizeTextBox);
|
||||
this.Controls.Add(this.fontFamilyComboBox);
|
||||
this.Controls.Add(this.bodyFontLabel);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.paperHeightTextBox);
|
||||
this.Controls.Add(this.paperHeightLabel);
|
||||
this.Controls.Add(this.paperWidthTextBox);
|
||||
this.Controls.Add(this.paperWidthLabel);
|
||||
this.Controls.Add(this.templateTextBox);
|
||||
this.Controls.Add(this.templateLabel);
|
||||
this.Controls.Add(this.orientationComboBox);
|
||||
this.Controls.Add(this.orientationLabel);
|
||||
this.Controls.Add(this.supressPrintingCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "PrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(372, 327);
|
||||
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -447,7 +336,8 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
private System.Windows.Forms.Label templateLabel;
|
||||
private System.Windows.Forms.TextBox paperWidthTextBox;
|
||||
private System.Windows.Forms.Label paperWidthLabel;
|
||||
private System.Windows.Forms.TextBox paperHeightTextBox;
|
||||
private System.Windows.Forms.TextBox paperHeightTextBox;
|
||||
private System.Windows.Forms.Label paperHeightLabel;
|
||||
private System.Windows.Forms.CheckBox italicCheckBox;
|
||||
private System.Windows.Forms.CheckBox boldCheckBox;
|
||||
private System.Windows.Forms.TextBox fontSizeTextBox;
|
||||
@@ -461,16 +351,5 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
private System.Windows.Forms.ComboBox cultureComboBox;
|
||||
private System.Windows.Forms.Label cultureLabel;
|
||||
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
|
||||
private System.Windows.Forms.GroupBox snBarcodeGroupBox;
|
||||
private System.Windows.Forms.TextBox barcodeTopTextBox;
|
||||
private System.Windows.Forms.TextBox barcodeLeftTextBox;
|
||||
private System.Windows.Forms.Label barcodeLeftLabel;
|
||||
private System.Windows.Forms.CheckBox snBarcodeCheckBox;
|
||||
private System.Windows.Forms.Label barcodeWidthLabel;
|
||||
private System.Windows.Forms.TextBox barcodeWidthTextBox;
|
||||
private System.Windows.Forms.Label barcodeTopLabel;
|
||||
private System.Windows.Forms.CheckBox isQrCheckBox;
|
||||
private System.Windows.Forms.Label barcodeHeightLabel;
|
||||
private System.Windows.Forms.TextBox barcodeHeightTextBox;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
@@ -43,9 +42,7 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
fontFamilyComboBox.Items.Add(ff.Name);
|
||||
}
|
||||
|
||||
ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
|
||||
}
|
||||
}
|
||||
|
||||
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -83,14 +80,7 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
nrOfCopiesTextBox.Text = config.NrOfCopies.ToString();
|
||||
goodOnlyCheckBox.Checked = config.GoodOnly;
|
||||
supressPrintingCheckBox.Checked = config.SupressPrinting;
|
||||
|
||||
snBarcodeCheckBox.Checked = config.DrawSNasBarcode;
|
||||
isQrCheckBox.Checked = config.IsQR;
|
||||
barcodeLeftTextBox.Text = config.BarcodeLeft.ToString();
|
||||
barcodeTopTextBox.Text = config.BarcodeTop.ToString();
|
||||
barcodeWidthTextBox.Text = config.BarcodeWidth.ToString();
|
||||
barcodeHeightTextBox.Text = config.BarcodeHeight.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
@@ -108,20 +98,7 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
nrOfCopiesTextBox.Enabled = true;
|
||||
goodOnlyCheckBox.Enabled = true;
|
||||
supressPrintingCheckBox.Enabled = true;
|
||||
|
||||
snBarcodeCheckBox.Enabled = true;
|
||||
ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
|
||||
isQrCheckBox.Enabled = true;
|
||||
barcodeLeftTextBox.Enabled = true;
|
||||
barcodeTopTextBox.Enabled = true;
|
||||
barcodeWidthTextBox.Enabled = true;
|
||||
barcodeHeightTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
private void snBarcodeCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
@@ -165,26 +142,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
message += Environment.NewLine + "'Number of copies' should be between 0 and 9";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(barcodeLeftTextBox.Text, out dummy) || dummy < 0 || dummy > 2000)
|
||||
{
|
||||
message += Environment.NewLine + "Barcode 'Left' should be between 0 and 2000";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(barcodeTopTextBox.Text, out dummy) || dummy < 0 || dummy > 2000)
|
||||
{
|
||||
message += Environment.NewLine + "Barcode 'Top' should be between 0 and 2000";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(barcodeWidthTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
|
||||
{
|
||||
message += Environment.NewLine + "Barcode 'Width' should be between 0 and 200";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(barcodeHeightTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
|
||||
{
|
||||
message += Environment.NewLine + "Barcode 'Height' should be between 0 and 200";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
@@ -236,13 +193,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref config.DrawSNasBarcode, snBarcodeCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.IsQR, isQrCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BarcodeLeft, barcodeLeftTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BarcodeTop, barcodeTopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BarcodeWidth, barcodeWidthTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BarcodeHeight, barcodeHeightTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
Printer.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
@@ -264,20 +214,6 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
}
|
||||
}
|
||||
|
||||
private void ManageCheckGroupBox(CheckBox chk, GroupBox grp)
|
||||
{
|
||||
/// Make sure the CheckBox isn't in the GroupBox. This will only happen the first time.
|
||||
if (chk.Parent == grp)
|
||||
{
|
||||
grp.Parent.Controls.Add(chk); /// Reparent the CheckBox so it's not in the GroupBox.
|
||||
chk.Location = new Point(chk.Left + grp.Left, chk.Top + grp.Top); /// Adjust the CheckBox's location.
|
||||
chk.BringToFront(); /// Move the CheckBox to the top of the stacking order.
|
||||
}
|
||||
|
||||
/// Enable or disable the GroupBox.
|
||||
grp.Enabled = chk.Checked;
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCmdResponse(object sender, CmdResponseArgs args)
|
||||
|
||||
@@ -530,18 +530,9 @@ namespace TBF.BenchControl.Sequences
|
||||
/// Water meter passed and was already saved to Oracle, do not reload & fix it now
|
||||
wm.Disabled = true;
|
||||
}
|
||||
else if ((wm.ErrorFlags & (int)ErrorFlagMask.E28) == 0)
|
||||
else if (!wm.Disabled && Users.GlobalData.GetCurrentUserName() == "milan")
|
||||
{
|
||||
/// Water meter failed but the failure is not an assembly error
|
||||
wm.Disabled = true;
|
||||
}
|
||||
else if (!wm.Disabled && (Users.GlobalData.GetCurrentUserName() == "milan" ||
|
||||
Users.GlobalData.GetCurrentUserName() == "augustin" ||
|
||||
Users.GlobalData.GetCurrentUserName() == "michal" ||
|
||||
Users.GlobalData.GetCurrentUserName() == "michal2"))
|
||||
{
|
||||
/// Water meter failed, is not disabled, there is an assembly error and user is one of above
|
||||
/// ... => reset flag E28
|
||||
/// Water meter not passed and not disabled and user is 'milan' => reset flag E28
|
||||
wm.ErrorFlags = wm.ErrorFlags & (~(int)ErrorFlagMask.E28);
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
|
||||
@@ -511,14 +511,14 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
if (transitionSequence == null)
|
||||
{
|
||||
log.WarnFormat("Transition(null, context={0})", context);
|
||||
|
||||
///
|
||||
/// No transition sequence defined --> Default action
|
||||
///
|
||||
if ((context == TransitionContext.AfterTest) || (context == TransitionContext.AfterTestWithOverlap))
|
||||
{
|
||||
log.WarnFormat("Transition(null, context={0}), turning FM pump off and setting valves to defaults", context);
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||
|
||||
State.Create("SequenceBase : Transition : TestEnd - Default action")
|
||||
.AddOperation(checkUiOp)
|
||||
@@ -536,8 +536,8 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
else
|
||||
{
|
||||
///
|
||||
/// Fetch and execute the transition sequence, it is guaranteed (transitionSequence != null)
|
||||
///
|
||||
/// Fetch and execute the transition sequence
|
||||
///
|
||||
IList<TransitionStep> transitionSteps = new List<TransitionStep>();
|
||||
if (StateMachine.TransitionSteps != null)
|
||||
@@ -553,7 +553,7 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
int stepsCount = transitionSteps.Count;
|
||||
|
||||
log.WarnFormat("Transition(sequence={0} ({1} steps), context={2})", transitionSequence.Name, stepsCount, context);
|
||||
log.WarnFormat("Transition(sequence={0} ({1} steps), context={2})", transitionSequence.Name, stepsCount, context);
|
||||
|
||||
foreach (var step in transitionSteps)
|
||||
{
|
||||
@@ -729,17 +729,13 @@ namespace TBF.BenchControl.Sequences
|
||||
///
|
||||
if (context == TransitionContext.Stop || errorFlag || stopFlag)
|
||||
{
|
||||
log.ErrorFormat("Transition({0}, context={1}) errorFlag={2} stopFlag={3} ... stoppng all pumps off",
|
||||
(transitionSequence != null) ? transitionSequence.Name : "null", context, errorFlag, stopFlag);
|
||||
|
||||
///
|
||||
///
|
||||
/// On error or when STOP pressed
|
||||
///
|
||||
foreach (var fmPump in PumpsWithFM) fmPump.TurnOff();
|
||||
|
||||
if (inPath != null)
|
||||
{
|
||||
///
|
||||
/// Stop the pump
|
||||
///
|
||||
State.Create("SequenceBase.Transition() : Test stopped -> Stopping the pump")
|
||||
@@ -755,8 +751,6 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
else if (context == TransitionContext.BeforeTest)
|
||||
{
|
||||
log.WarnFormat("Transition(any, context={0}), setting the required route before a test", context);
|
||||
|
||||
///
|
||||
/// Always set route at the beginning of this test
|
||||
///
|
||||
@@ -779,8 +773,6 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
else if ((context == TransitionContext.AfterTestWithOverlap) && (nextInPath != null) && (nextBenchPath != null) && (nextOutPath != null))
|
||||
{
|
||||
log.WarnFormat("Transition(., context={0}), overlapped action (next flow regulation)", context);
|
||||
|
||||
/// Set route for the next test
|
||||
State.Create("SequenceBase : AfterTestWithOverlap : Default action")
|
||||
.AddOperation(checkUiOp)
|
||||
|
||||
@@ -634,7 +634,6 @@ namespace TBF.BenchControl
|
||||
else errorMsg = string.Empty;
|
||||
if ((isHydroTest && (pfeed == null || pben == null || pout == null)) || (pmtrs == null))
|
||||
{
|
||||
log.ErrorFormat("GetPaths({0},...) returns false, wrong configuration", test.Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -646,7 +645,6 @@ namespace TBF.BenchControl
|
||||
#endif
|
||||
if (heatMetersPathRequired && phmtrs == null)
|
||||
{
|
||||
log.ErrorFormat("GetPaths({0},...) returns false, missing heat meters sensors", test.Name);
|
||||
errorMsg = "Cannot load heat meters sensors";
|
||||
return false;
|
||||
}
|
||||
@@ -660,19 +658,16 @@ namespace TBF.BenchControl
|
||||
|
||||
if (isHydroTest && pout.Scale == null)
|
||||
{
|
||||
log.ErrorFormat("GetPaths({0},...) returns false, missing scales in output path {1}", test.Name, test.OutputPath);
|
||||
errorMsg = string.Format("No balance specified in path {0}", test.OutputPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Program.LocalSettings.RealDensity < 500.0f || Program.LocalSettings.RealDensity > 2000.0f)
|
||||
{
|
||||
log.ErrorFormat("GetPaths({0},...) returns false, density was not specified", test.Name);
|
||||
errorMsg = string.Format("Density was not specified");
|
||||
errorMsg = string.Format("Density was not specified");
|
||||
return false;
|
||||
}
|
||||
|
||||
log.WarnFormat("GetPaths({0},...) returns true, paths loaded OK, isHydroTest={1}", test.Name, isHydroTest);
|
||||
errorMsg = string.Empty;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -386,33 +386,18 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
|
||||
|
||||
if (test.TimeFlow2Mass > 0)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Waiting before grabbing images", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
}
|
||||
int time = StateMachine.Time;
|
||||
double currentFlow = RefFlow.Val;
|
||||
|
||||
|
||||
TestStartTime = DateTime.Now;
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
int startTime = StateMachine.Time;
|
||||
int startPulses = 0;
|
||||
|
||||
|
||||
///
|
||||
/// Take start images
|
||||
/// Grab start images
|
||||
///
|
||||
//-----------------------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Grabbing_images);
|
||||
//-----------------------------------------------------------------
|
||||
string fileName = string.Format("{0}-start.bmp", test.Name);
|
||||
string[] startImages = new string[sensPath.RegisterReaders.Length];
|
||||
///
|
||||
@@ -647,26 +632,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
|
||||
EndTime = (double)StateMachine.Time;
|
||||
TestEndTime = DateTime.Now;
|
||||
|
||||
|
||||
if (test.TimeStop2Mass > 0)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Waiting before grabbing images", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
}
|
||||
|
||||
|
||||
int endPulses = cBrd.EtPulses(0);
|
||||
|
||||
switchTimeEnd = 0.001f * cBrd.ValveOpenCloseTime;
|
||||
log.WarnFormat("Start valve switch time on test end = {0} ms", cBrd.ValveOpenCloseTime);
|
||||
|
||||
@@ -692,9 +659,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
///
|
||||
/// Grab END images
|
||||
///
|
||||
//-----------------------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Grabbing_images);
|
||||
//-----------------------------------------------------------------
|
||||
fileName = string.Format("{0}-end.bmp", test.Name);
|
||||
string[] endImages = new string[sensPath.RegisterReaders.Length];
|
||||
///
|
||||
|
||||
+13
-17
@@ -650,24 +650,20 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
if (test.TimeStop2Mass > 0)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(cBrd.ReadDiverterTransitionOp(outPath.Diverter, CountWhenSendingRdDivCmd, CountWhenReadingDiv, false, DiverterEnd, BatchRslts.Batch.BatchNr, test.Name, repetitionNr))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) || !e.Contains(Event.BalanceDone));
|
||||
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(cBrd.ReadDiverterTransitionOp(outPath.Diverter, CountWhenSendingRdDivCmd, CountWhenReadingDiv, false, DiverterEnd, BatchRslts.Batch.BatchNr, test.Name, repetitionNr))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) || !e.Contains(Event.BalanceDone));
|
||||
|
||||
|
||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "End mass");
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
|| ProcessData.TempDownStat.Max > ProcessData.TempDownStat.Average + errorsCfg.TestParams.Delta_T;
|
||||
|
||||
/// Max. absolute value of up and down water temperature difference
|
||||
bool E5 = Math.Abs(ProcessData.TempUpStat.Average - ProcessData.TempDownStat.Average) > errorsCfg.TestParams.Delta_Tup_Tdn;
|
||||
bool E5 = ProcessData.TempDiffStat.Max > errorsCfg.TestParams.Delta_Tup_Tdn;
|
||||
|
||||
bool E6 = false;
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1412.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1412.0")]
|
||||
[assembly: AssemblyVersion("2.18.1374.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1374.0")]
|
||||
|
||||
Generated
-9
@@ -1995,15 +1995,6 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Grabbing images.
|
||||
/// </summary>
|
||||
internal static string Grabbing_images {
|
||||
get {
|
||||
return ResourceManager.GetString("Grabbing_images", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Graphs.
|
||||
/// </summary>
|
||||
|
||||
@@ -2089,7 +2089,4 @@
|
||||
<data name="Stop" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
<data name="Grabbing_images" xml:space="preserve">
|
||||
<value>Grabbing images</value>
|
||||
</data>
|
||||
</root>
|
||||
+18
-10
@@ -4,31 +4,35 @@
|
||||
<TestBenches>
|
||||
<DatabaseSettings>
|
||||
<BenchName>Test Bench</BenchName>
|
||||
<BenchName>Mobile test bench</BenchName>
|
||||
<IsRealBench>true</IsRealBench>
|
||||
<ProceduresDBSettings>
|
||||
<DbType>MySql</DbType>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=testbench; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
</ProceduresDBSettings>
|
||||
<WaterMetersDBSettings>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=alzir25; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
<DbType>MySql</DbType>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=testbench-r; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
</WaterMetersDBSettings>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=alzir25-r; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
<ConnectionString />
|
||||
</DatabaseSettings>
|
||||
</TestBenches>
|
||||
<LastBench>Test Bench</LastBench>
|
||||
<LoginMethod>UserName</LoginMethod>
|
||||
<LastBench>Mobile test bench</LastBench>
|
||||
<BatchNr>1</BatchNr>
|
||||
<RealDensity>998.2008</RealDensity>
|
||||
<AtTemperature>20</AtTemperature>
|
||||
<RightPaneHorizSplitterDistance>25</RightPaneHorizSplitterDistance>
|
||||
<MainWndLeft>75</MainWndLeft>
|
||||
<MainWndTop>5</MainWndTop>
|
||||
<TopPaneVerticalSplitterDistance>596</TopPaneVerticalSplitterDistance>
|
||||
<MainWndLeft>76</MainWndLeft>
|
||||
<MainWndTop>21</MainWndTop>
|
||||
<MainWndWidth>1250</MainWndWidth>
|
||||
<MainWndHeight>750</MainWndHeight>
|
||||
<ManiWndMaximized>false</ManiWndMaximized>
|
||||
<ManiWndMaximized>true</ManiWndMaximized>
|
||||
<ComponentsDlgLeft>200</ComponentsDlgLeft>
|
||||
<ComponentsDlgTop>100</ComponentsDlgTop>
|
||||
<ComponentsDlgWidth>850</ComponentsDlgWidth>
|
||||
<ComponentsDlgHeight>500</ComponentsDlgHeight>
|
||||
<PopupResultsLeft>0</PopupResultsLeft>
|
||||
<PopupResultsTop>0</PopupResultsTop>
|
||||
<PopupResultsWidth>0</PopupResultsWidth>
|
||||
<PopupResultsHeight>0</PopupResultsHeight>
|
||||
<PathsDlgLeft>0</PathsDlgLeft>
|
||||
<PathsDlgTop>0</PathsDlgTop>
|
||||
<PathsDlgWidth>0</PathsDlgWidth>
|
||||
@@ -53,6 +57,10 @@
|
||||
<OneProcedureDlgHeight>0</OneProcedureDlgHeight>
|
||||
<PrintOrderLeft>0</PrintOrderLeft>
|
||||
<PrintOrderTop>0</PrintOrderTop>
|
||||
<EnduranceDlgLeft>0</EnduranceDlgLeft>
|
||||
<EnduranceDlgTop>0</EnduranceDlgTop>
|
||||
<EnduranceDlgWidth>0</EnduranceDlgWidth>
|
||||
<EnduranceDlgHeight>0</EnduranceDlgHeight>
|
||||
<PrintOrderOnlyGoodResult>false</PrintOrderOnlyGoodResult>
|
||||
<PrintOrderOnlyLastResult>false</PrintOrderOnlyLastResult>
|
||||
<ResultsConfigMeters>Vertically</ResultsConfigMeters>
|
||||
|
||||
@@ -60,10 +60,11 @@
|
||||
<logger name="NHibernate"> <level value="ERROR" /> </logger>
|
||||
<logger name="TBF.BenchControl.StateMachine"> <level value="INFO" /> </logger>
|
||||
<logger name="TBF.BenchControl.State"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.ControlComdWrap"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.ControlComWrap"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.Pump"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.PumpWithFM"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.MettlerToledo"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Fomulas"> <level value="FATAL" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.StartMeasurementOp"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Modbus"> <level value="DEBUG" /> </logger>
|
||||
</log4net>
|
||||
|
||||
+8
-5
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ALZIR_25;LANG_FR;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -49,7 +49,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;ALZIR_25;LANG_FR;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -58,7 +58,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ALZIR_25;LANG_FR;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -67,7 +67,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;CEVAK_40;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;ALZIR_25;LANG_FR;STABLE_MASS_EXTRAS</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -98,7 +98,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ControlComponent3U">
|
||||
<HintPath>..\packages\ControlBoard\CEVAK-PT40-272\ControlComponent3U.dll</HintPath>
|
||||
<HintPath>..\packages\ControlBoard\Alzir-25\ControlComponent3U.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
@@ -990,6 +990,9 @@
|
||||
<DependentUpon>PrinterCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Output\Printers\Label\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\Printers\Label\PrintLabelDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Output\Printers\Munich\Printer.cs" />
|
||||
<Compile Include="BenchControl\Output\Printers\Munich\PrinterCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\Printers\Munich\PrinterCfgCtrl.cs">
|
||||
|
||||
Generated
+1
-1
@@ -54,7 +54,7 @@ namespace TBF.UI
|
||||
this.horizontalSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.mainTabControl = new System.Windows.Forms.TabControl();
|
||||
this.homeTabPage = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
|
||||
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
|
||||
this.processTabPage = new System.Windows.Forms.TabPage();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl24();
|
||||
this.insertTabPage = new System.Windows.Forms.TabPage();
|
||||
|
||||
@@ -136,6 +136,12 @@
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RecordProcessing\RecordProcessing.csproj">
|
||||
<Project>{67BD7A8F-0FED-4FDE-B875-78D5A2BC9B2C}</Project>
|
||||
<Name>RecordProcessing</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_FR</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -26,7 +26,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;LANG_FR</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<repositories>
|
||||
<repository path="..\TBF\packages.config" />
|
||||
<repository path="..\TracingDB\packages.config" />
|
||||
<repository path="..\TestBenchFramework\packages.config" />
|
||||
</repositories>
|
||||
Reference in New Issue
Block a user