Remove SharedComponents + UNI shows Serial Nr
Remove `SharedComponents` references and legacy `LiveLogCache` logic: - Eliminate unused `SharedComponents` references across the solution to streamline dependencies. - Comment out `LiveLogCache` interactions in multiple modules, transitioning to alternative or undefined logging mechanisms. - Add optional `regReadersOptional` parameters to `ShowCycleBeginFormOp` methods for improved flexibility. - Introduce `ITestMethodSmart` interface to support smart reader functionality. - Add new `LogCacheAppender` configuration to `log4netConfig.xml` for diagnostic use. - Update project files to remove outdated references and include newly introduced files.
This commit is contained in:
parent
690e3f6505
commit
2b3e0dfa32
@ -91,11 +91,5 @@
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedComponents\SharedComponents.csproj">
|
||||
<Project>{8f942729-f454-4c99-ba6c-746962065ae3}</Project>
|
||||
<Name>SharedComponents</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -1,4 +1,4 @@
|
||||
using SharedComponents;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@ -83,22 +83,22 @@ namespace AppDiagnostic
|
||||
var selectedIndices = _listView.SelectedIndices.Cast<int>().ToList();
|
||||
|
||||
// Načítanie logov
|
||||
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount())
|
||||
.Where(log => string.IsNullOrEmpty(_filterText) ||
|
||||
log.IndexOf(_filterText, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
.ToList();
|
||||
// var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount())
|
||||
// .Where(log => string.IsNullOrEmpty(_filterText) ||
|
||||
// log.IndexOf(_filterText, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
// .ToList();
|
||||
|
||||
// Vymazanie existujúcich položiek a pridanie nových
|
||||
_listView.Items.Clear();
|
||||
|
||||
foreach (var log in logs)
|
||||
{
|
||||
var item = new ListViewItem(log)
|
||||
{
|
||||
BackColor = _listView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
|
||||
};
|
||||
_listView.Items.Add(item);
|
||||
}
|
||||
// foreach (var log in logs)
|
||||
// {
|
||||
// var item = new ListViewItem(log)
|
||||
// {
|
||||
// BackColor = _listView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
|
||||
// };
|
||||
// _listView.Items.Add(item);
|
||||
// }
|
||||
|
||||
// Obnovenie označených položiek
|
||||
foreach (var index in selectedIndices)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SharedComponents;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@ -45,32 +45,32 @@ namespace AppDiagnostic
|
||||
_listView.Items.Clear();
|
||||
|
||||
// Načítame všetky logy (ideálne z cache alebo databázy)
|
||||
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.Logs.Count);
|
||||
//var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.Logs.Count);
|
||||
|
||||
// Pridáme len tie logy, ktoré spĺňajú filter
|
||||
foreach (var log in logs)
|
||||
{
|
||||
if (log.ToLower().Contains(_filterText)) // Kontrola, či log obsahuje filter text
|
||||
{
|
||||
var listViewItem = new ListViewItem(log);
|
||||
|
||||
// Striedanie farieb riadkov
|
||||
if (_listView.Items.Count % 2 == 0) // Párny index => biela
|
||||
{
|
||||
listViewItem.BackColor = Color.White;
|
||||
}
|
||||
else // Nepárny index => svetlá sivá
|
||||
{
|
||||
listViewItem.BackColor = Color.FromArgb(240, 240, 240); // Veľmi svetlá sivá
|
||||
}
|
||||
|
||||
// Pridanie efektu pre novú položku
|
||||
ApplyNewItemEffect(listViewItem);
|
||||
|
||||
// Pridanie položky do ListView
|
||||
_listView.Items.Add(listViewItem);
|
||||
}
|
||||
}
|
||||
// foreach (var log in logs)
|
||||
// {
|
||||
// if (log.ToLower().Contains(_filterText)) // Kontrola, či log obsahuje filter text
|
||||
// {
|
||||
// var listViewItem = new ListViewItem(log);
|
||||
//
|
||||
// // Striedanie farieb riadkov
|
||||
// if (_listView.Items.Count % 2 == 0) // Párny index => biela
|
||||
// {
|
||||
// listViewItem.BackColor = Color.White;
|
||||
// }
|
||||
// else // Nepárny index => svetlá sivá
|
||||
// {
|
||||
// listViewItem.BackColor = Color.FromArgb(240, 240, 240); // Veľmi svetlá sivá
|
||||
// }
|
||||
//
|
||||
// // Pridanie efektu pre novú položku
|
||||
// ApplyNewItemEffect(listViewItem);
|
||||
//
|
||||
// // Pridanie položky do ListView
|
||||
// _listView.Items.Add(listViewItem);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@ -1,19 +1,6 @@
|
||||
using log4net.Config;
|
||||
using log4net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net.Appender;
|
||||
using SharedComponents;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using System.IO; // Pre File.WriteAllLines a prácu so súbormi
|
||||
using System.Linq;
|
||||
// Pre File.WriteAllLines a prácu so súbormi
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
@ -78,16 +65,16 @@ namespace AppDiagnostic
|
||||
}
|
||||
|
||||
// Získajte nové logy od posledného indexu
|
||||
var logs = LiveLogCache.Instance.GetLogs(lastDisplayedLogIndex, LiveLogCache.Instance.Logs.Count - lastDisplayedLogIndex);
|
||||
//var logs = LiveLogCache.Instance.GetLogs(lastDisplayedLogIndex, LiveLogCache.Instance.Logs.Count - lastDisplayedLogIndex);
|
||||
|
||||
// Pridajte len nové logy
|
||||
foreach (var log in logs)
|
||||
{
|
||||
memoListView.Items.Add(new ListViewItem(log));
|
||||
}
|
||||
// foreach (var log in logs)
|
||||
// {
|
||||
// memoListView.Items.Add(new ListViewItem(log));
|
||||
// }
|
||||
|
||||
// Aktualizujte posledný zobrazený index
|
||||
lastDisplayedLogIndex = LiveLogCache.Instance.Logs.Count;
|
||||
//lastDisplayedLogIndex = LiveLogCache.Instance.Logs.Count;
|
||||
|
||||
// Ak je autoScrollEnabled, posuňte sa na posledný záznam
|
||||
if (autoScrollEnabled && memoListView.Items.Count > 0)
|
||||
@ -117,7 +104,7 @@ namespace AppDiagnostic
|
||||
{
|
||||
//LiveLogCache.Instance.AddLog("Nový log z hlavnej aplikácie");
|
||||
|
||||
LiveLogCache.Instance.ClearLogs();
|
||||
//LiveLogCache.Instance.ClearLogs();
|
||||
ClearListView();
|
||||
}
|
||||
|
||||
@ -211,10 +198,10 @@ namespace AppDiagnostic
|
||||
try
|
||||
{
|
||||
// Načítanie všetkých logov z LiveLogCache
|
||||
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount());
|
||||
//var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount());
|
||||
|
||||
// Uloženie logov do vybraného súboru
|
||||
File.WriteAllLines(saveFileDialog.FileName, logs);
|
||||
//File.WriteAllLines(saveFileDialog.FileName, logs);
|
||||
|
||||
MessageBox.Show("Logs saved successfully.", "Save TBF live logs", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
@ -245,19 +232,19 @@ namespace AppDiagnostic
|
||||
_logAdapter._filterText = string.Empty;
|
||||
|
||||
// Načítanie logov od indexu vybraného riadku
|
||||
var logs = LiveLogCache.Instance.GetLogs(selectedIndex, LiveLogCache.Instance.GetCount() - selectedIndex);
|
||||
//var logs = LiveLogCache.Instance.GetLogs(selectedIndex, LiveLogCache.Instance.GetCount() - selectedIndex);
|
||||
|
||||
// Obnovenie ListView s novými údajmi
|
||||
memoListView.BeginUpdate();
|
||||
memoListView.Items.Clear();
|
||||
foreach (var log in logs)
|
||||
{
|
||||
var item = new ListViewItem(log)
|
||||
{
|
||||
BackColor = memoListView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
|
||||
};
|
||||
memoListView.Items.Add(item);
|
||||
}
|
||||
// foreach (var log in logs)
|
||||
// {
|
||||
// var item = new ListViewItem(log)
|
||||
// {
|
||||
// BackColor = memoListView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
|
||||
// };
|
||||
// memoListView.Items.Add(item);
|
||||
// }
|
||||
memoListView.EndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
14
TBF.sln
14
TBF.sln
@ -111,8 +111,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppDiagnostic", "AppDiagnos
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedComponents", "SharedComponents\SharedComponents.csproj", "{8F942729-F454-4C99-BA6C-746962065AE3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.RfidCom", "..\iPerlHead\Sensus.iPerl.RfidCom\Sensus.iPerl.RfidCom.csproj", "{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole", "..\iPerlHead\Sensus.iPerl.TestConsole\Sensus.iPerl.TestConsole.csproj", "{5025ED8B-A94F-4E58-8BE0-68481B061609}"
|
||||
@ -491,18 +489,6 @@ Global
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
||||
@ -18,7 +18,6 @@ using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
using AppDiagnostic;
|
||||
using SharedComponents;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
|
||||
@ -81,7 +81,7 @@ namespace TBF.Rig.DataEntry.Combined
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -96,7 +96,7 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -95,7 +95,7 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -89,7 +89,7 @@ namespace TBF.Rig.DataEntry.S620
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -81,7 +81,7 @@ namespace TBF.Rig.DataEntry.Single
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -81,7 +81,7 @@ namespace TBF.Rig.DataEntry.Standard12
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -83,7 +83,7 @@ namespace TBF.Rig.DataEntry.Standard24
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
this.currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Common;
|
||||
using Config;
|
||||
using log4net;
|
||||
using SharedComponents;
|
||||
|
||||
///
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
@ -644,7 +643,7 @@ namespace TBF.Rig.DataEntry.Standard24
|
||||
[Conditional("DIAG_LOG_TestStartEndForm1")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ namespace TBF.Rig.DataEntry.Standard48
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -77,7 +77,7 @@ namespace TBF.Rig.DataEntry.Standard6
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -158,7 +158,7 @@ namespace TBF.Rig.DataEntry.StandardCamera
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -165,7 +165,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -49,6 +49,8 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
readonly Label[] labels; /// Labels for water meter numbers
|
||||
readonly ComboBox[,] comboBoxes; /// Combo boxes for values in columns
|
||||
readonly CheckBox[] checkBoxes; /// Check boxes for water meter enable/disable
|
||||
///
|
||||
bool readSerialNoByRegisterReader = true;
|
||||
|
||||
readonly MultiPurposeBtnFunction multiPurposeButtonFn;
|
||||
bool multiPurposeButtonFlag;
|
||||
@ -700,6 +702,15 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
///
|
||||
string firstSN = comboBoxes[k, firstIx].Text;
|
||||
|
||||
|
||||
|
||||
if (readSerialNoByRegisterReader)
|
||||
{
|
||||
//TODO read serail number from register reader
|
||||
log.Debug("Read serial number from register reader!");
|
||||
|
||||
}
|
||||
|
||||
int firstSnNr;
|
||||
int startIx = firstSN.IndexOfAny(digits);
|
||||
if (startIx >= 0)
|
||||
|
||||
@ -150,7 +150,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.FormAtCycleBeginning;
|
||||
|
||||
@ -80,7 +80,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -11,6 +11,6 @@ namespace TBF.Rig.GenericDevices
|
||||
/// Displays form at the beginning of the cycle (usually to enter S/N).
|
||||
/// </summary>
|
||||
/// <returns>Operation to be used in the sequence</returns>
|
||||
IOperation ShowCycleBeginFormOp();
|
||||
IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null);
|
||||
}
|
||||
}
|
||||
|
||||
11
TBF/Rig/GenericDevices/ITestMethodSmart.cs
Normal file
11
TBF/Rig/GenericDevices/ITestMethodSmart.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace TBF.Rig.GenericDevices
|
||||
{
|
||||
/// <summary>
|
||||
/// * mark test method from smart family devices
|
||||
/// * (this Test method is used for devices that support smart reader)
|
||||
/// </summary>
|
||||
public interface ITestMethodSmart
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@
|
||||
using Dirichlet.Numerics;
|
||||
using log4net;
|
||||
using SchematicDrawing;
|
||||
using SharedComponents;
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
@ -355,7 +354,7 @@ namespace TBF.Rig.Modbus.PumpFM.DanfossVLT
|
||||
[Conditional("DIAG_LOG_PUMP")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
using Dirichlet.Numerics;
|
||||
using log4net;
|
||||
using SchematicDrawing;
|
||||
using SharedComponents;
|
||||
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
@ -491,7 +491,7 @@ namespace TBF.Rig.Modbus.PumpFM.Grundfoss
|
||||
[Conditional("DIAG_LOG_PUMP")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ namespace TBF.Rig.RegisterReaders.KPackE.DataEntryForRadio
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
public IOperation ShowCycleBeginFormOp( IRegReader[] regReadersOptional = null)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using SharedComponents;
|
||||
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
@ -205,7 +204,7 @@ namespace TBF.Rig.RegisterReaders.PulsesFromUniCB
|
||||
[Conditional("DIAG_LOG_MASS1")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using SharedComponents;
|
||||
|
||||
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
@ -10,7 +10,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Generic;
|
||||
@ -189,7 +188,7 @@ namespace TBF.Rig.RegisterReaders.StandingStartStop
|
||||
[Conditional("DIAG_LOG_MASS1")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@ using TBF.Rig.Network.RestAPI;
|
||||
using TBF.Rig.Network.RestAPI.facade;
|
||||
using TBF.Rig.Output.Printers.GroupPrinting.Single;
|
||||
using TBF.UiBridge;
|
||||
using SharedComponents;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
@ -508,7 +507,26 @@ namespace TBF.Rig.Sequences
|
||||
///
|
||||
/// This is a normal batch (not a restored one) => Display 'Cycle Begin Form'
|
||||
///
|
||||
if (!OpenCycleBeginForm())
|
||||
/// Open iPerlCommunicationForm
|
||||
if (simultWithPurgingTests.Count > 0)
|
||||
{
|
||||
ProcessData.RegisterReaders = StateMachine.GetMetersPath(simultWithPurgingTests[0]).RegisterReaders;
|
||||
}
|
||||
else
|
||||
{
|
||||
//get throw test instances and if Smart Reader SerialNo found use it
|
||||
for (int i = 0; i < StateMachine.TestInstances.Length; i++)
|
||||
{
|
||||
Test test = StateMachine.TestInstances[i].Test;
|
||||
if (test is ITestMethodSmart)
|
||||
{
|
||||
ProcessData.RegisterReaders = StateMachine.GetMetersPath(test).RegisterReaders;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!OpenCycleBeginForm(ProcessData.RegisterReaders))
|
||||
{
|
||||
goto stop;
|
||||
}
|
||||
@ -1536,7 +1554,7 @@ namespace TBF.Rig.Sequences
|
||||
}
|
||||
|
||||
// ✍️ Uloženie do vlastného logu
|
||||
LiveLogCache.Instance.AddLog(logBuilder.ToString());
|
||||
//LiveLogCache.Instance.AddLog(logBuilder.ToString());
|
||||
|
||||
Bridge.OnError(this, "Chyba pri aktualizácii výsledkov v MySQL.");
|
||||
goto error;
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
using Config.Entities;
|
||||
using FluentNHibernate.Data;
|
||||
using log4net;
|
||||
using SharedComponents;
|
||||
///
|
||||
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
@ -1394,7 +1393,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollectionMassFlow
|
||||
[Conditional("DIAG_LOG_MASS1")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using SharedComponents;
|
||||
|
||||
///
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
@ -558,7 +557,7 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
[Conditional("DIAG_LOG_PUMP2")]
|
||||
public static void Log1(string format, params object[] args)
|
||||
{
|
||||
LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
//LiveLogCache.Instance.AddLog(string.Format(format, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ using log4net;
|
||||
using SchematicDrawing;
|
||||
using TBF.Rig.ControlBoard.Uni;
|
||||
using TBF.Boxes;
|
||||
using SharedComponents;
|
||||
|
||||
namespace TBF.Rig.Uni.RegValveLowRegulTimeSaturation
|
||||
{
|
||||
|
||||
@ -658,6 +658,7 @@
|
||||
<Compile Include="Rig\GenericDevices\ITankDraining.cs" />
|
||||
<Compile Include="Rig\GenericDevices\ITankDrainingCfg.cs" />
|
||||
<Compile Include="Rig\GenericDevices\ITempControl.cs" />
|
||||
<Compile Include="Rig\GenericDevices\ITestMethodSmart.cs" />
|
||||
<Compile Include="Rig\GenericDevices\ITestMethodWith2ndPass.cs" />
|
||||
<Compile Include="Rig\GenericDevices\IVolumeMeter.cs" />
|
||||
<Compile Include="Rig\Hart\Common\Enums.cs" />
|
||||
@ -3795,10 +3796,6 @@
|
||||
<Project>{0f79ca69-9dbc-41f3-a6fc-5a2937365343}</Project>
|
||||
<Name>SchematicDrawing</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SharedComponents\SharedComponents.csproj">
|
||||
<Project>{8f942729-f454-4c99-ba6c-746962065ae3}</Project>
|
||||
<Name>SharedComponents</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj">
|
||||
<Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project>
|
||||
<Name>SharedDatabase</Name>
|
||||
|
||||
@ -13,13 +13,9 @@ using Common;
|
||||
using Config.Entities;
|
||||
using Dirichlet.Numerics;
|
||||
using SchematicDrawing;
|
||||
using SharedDatabase;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using TBF.UI.Shared;
|
||||
using AppDiagnostic;
|
||||
using SharedComponents;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace TBF.UI
|
||||
{
|
||||
@ -1165,12 +1161,12 @@ namespace TBF.UI
|
||||
ILog loger = LogManager.GetLogger("logCache");
|
||||
log.Debug("ahoj, ideme");*/
|
||||
|
||||
LiveLogCache.Instance.AddLog("=== Live diagnostic entry ===");
|
||||
DiagApi liveDiagApi = new DiagApi();
|
||||
//LiveLogCache.Instance.AddLog("=== Live diagnostic entry ===");
|
||||
//DiagApi liveDiagApi = new DiagApi();
|
||||
|
||||
/*try
|
||||
{
|
||||
// Predpokladáme, že ApplicationDiagnostic.exe je v rovnakom adresári ako hlavná aplikácia
|
||||
// Predpoklad<EFBFBD>me, <20>e ApplicationDiagnostic.exe je v rovnakom adres<65>ri ako hlavn<76> aplik<69>cia
|
||||
string exePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "AppDiagnostic.exe");
|
||||
|
||||
if (File.Exists(exePath))
|
||||
@ -1178,7 +1174,7 @@ namespace TBF.UI
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = exePath,
|
||||
UseShellExecute = true // Spustí aplikáciu ako samostatný proces
|
||||
UseShellExecute = true // Spust<EFBFBD> aplik<69>ciu ako samostatn<74> proces
|
||||
};
|
||||
System.Diagnostics.Process.Start(startInfo);
|
||||
}
|
||||
|
||||
@ -38,12 +38,20 @@
|
||||
<conversionPattern value="%date %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="LogCache" type="AppDiagnostic.LogCacheAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger -->
|
||||
<root>
|
||||
<level value="WARN" />
|
||||
</root>
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="MemoryAppender" />
|
||||
</root>
|
||||
|
||||
<!-- Set process loggers -->
|
||||
<logger name="AllResults"><level value="INFO" /><appender-ref ref="AllResults" /></logger>
|
||||
|
||||
@ -38,12 +38,20 @@
|
||||
<conversionPattern value="%date %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="LogCache" type="AppDiagnostic.LogCacheAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger -->
|
||||
<root>
|
||||
<level value="WARN" />
|
||||
</root>
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="MemoryAppender" />
|
||||
</root>
|
||||
|
||||
<!-- Set process loggers -->
|
||||
<logger name="AllResults"><level value="INFO" /><appender-ref ref="AllResults" /></logger>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user