Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3c21a5ba0 |
-11
@@ -66,17 +66,6 @@ WorkflowConfigurator/bin/
|
||||
WorkflowConfigurator/obj/
|
||||
Workplace/bin/
|
||||
Workplace/obj/
|
||||
DataStreamInterfaceTest/bin/
|
||||
DataStreamInterfaceTest/obj/
|
||||
DataStreamMeter/bin/
|
||||
DataStreamMeter/obj/
|
||||
Events/bin/
|
||||
Events/obj/
|
||||
TracingDB/bin/
|
||||
TracingDB/obj/
|
||||
Users/bin/
|
||||
Users/obj/
|
||||
.vs/
|
||||
.idea/
|
||||
*.suo
|
||||
*.bak
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<log4net>
|
||||
<appender name="LogCacheAppender" type="Namespace.LogCacheAppender, AssemblyName">
|
||||
<param name="Cache" value="YourCacheInstance" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="LogCacheAppender" />
|
||||
</root>
|
||||
</log4net>
|
||||
</configuration>
|
||||
@@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>AppDiagnostic</RootNamespace>
|
||||
<AssemblyName>AppDiagnostic</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.3.0.3\lib\net462\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BufferedListView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DiagApi.cs" />
|
||||
<Compile Include="LogAdapter.cs" />
|
||||
<Compile Include="LogFilter.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<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,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public class BufferedListView : ListView
|
||||
{
|
||||
public BufferedListView()
|
||||
{
|
||||
// Zapne dvojité bufferovanie pre ListView
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||
this.UpdateStyles();
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
public class DiagApi
|
||||
{
|
||||
private static MainForm diagWindow; // Udržiava referenciu na existujúce okno
|
||||
|
||||
public DiagApi()
|
||||
{
|
||||
if (diagWindow == null || diagWindow.IsDisposed) // Ak okno neexistuje, vytvoríme ho
|
||||
{
|
||||
diagWindow = new MainForm();
|
||||
diagWindow.FormClosing += (s, e) =>
|
||||
{
|
||||
diagWindow = null; // Keď sa zavrie, vyčistíme referenciu
|
||||
};
|
||||
diagWindow.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
diagWindow.BringToFront(); // Ak už beží, len ho presunieme na vrch
|
||||
diagWindow.WindowState = FormWindowState.Normal; // Ak je minimalizované, obnovíme ho
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
using SharedComponents;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
public class LogAdapter
|
||||
{
|
||||
private ListView _listView;
|
||||
public string _filterText = string.Empty;
|
||||
private bool _isUserScrolling = false; // Indikátor, že používateľ manuálne scrolluje
|
||||
private bool _autoScrollEnabled = true; // Indikátor, že automatické scrollovanie je povolené
|
||||
private Timer _refreshTimer;
|
||||
private const int RefreshInterval = 1000;
|
||||
|
||||
public LogAdapter(ListView listView)
|
||||
{
|
||||
_listView = listView;
|
||||
|
||||
// Nastavenie ListView
|
||||
_listView.View = View.Details;
|
||||
_listView.Columns.Clear();
|
||||
_listView.Columns.Add("Logs");
|
||||
|
||||
_listView.Scrollable = true;
|
||||
|
||||
// Nastavenie šírky stĺpca na celú šírku ListView
|
||||
AdjustColumnWidth();
|
||||
|
||||
// Udalosť pre dynamickú zmenu veľkosti stĺpca pri zmene veľkosti ListView
|
||||
_listView.Resize += (sender, args) => AdjustColumnWidth();
|
||||
|
||||
// Pridanie udalosti pre manuálne skrolovanie
|
||||
_listView.MouseWheel += ListView_MouseWheel;
|
||||
|
||||
// Inicializácia časovača na pravidelný refresh
|
||||
_refreshTimer = new Timer { Interval = RefreshInterval };
|
||||
_refreshTimer.Tick += (sender, args) => RefreshListView();
|
||||
_refreshTimer.Start();
|
||||
}
|
||||
|
||||
private void ListView_MouseWheel(object sender, MouseEventArgs e)
|
||||
{
|
||||
_isUserScrolling = true;
|
||||
|
||||
// Ak sa manuálnym scrollovaním používateľ dostane na koniec, obnovíme automatické scrollovanie
|
||||
if (IsOnLastItem())
|
||||
{
|
||||
_isUserScrolling = false;
|
||||
_autoScrollEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_autoScrollEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshListView()
|
||||
{
|
||||
//LiveLogCache.Instance.AddLog(string.Format("-------------------------------RunDeviceAfter()-------------------------------"));
|
||||
|
||||
if (_listView.InvokeRequired)
|
||||
{
|
||||
_listView.Invoke(new Action(RefreshListView));
|
||||
return;
|
||||
}
|
||||
|
||||
_listView.BeginUpdate();
|
||||
try
|
||||
{
|
||||
// Získanie pozície prvého viditeľného prvku pre stabilizáciu scrollovania
|
||||
int topIndexBeforeRefresh = _listView.TopItem?.Index ?? 0;
|
||||
|
||||
// Pred pridaním nových položiek si pamätáme, či bol používateľ na poslednej položke
|
||||
bool wasOnLastItem = IsOnLastItem();
|
||||
|
||||
// Uchovanie aktuálne označených položiek (indexov)
|
||||
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();
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// Obnovenie označených položiek
|
||||
foreach (var index in selectedIndices)
|
||||
{
|
||||
if (index < _listView.Items.Count)
|
||||
{
|
||||
_listView.Items[index].Selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Ak bol používateľ na poslednom prvku, nastavíme focus a scroll na posledný prvok
|
||||
if (_autoScrollEnabled && wasOnLastItem && _listView.Items.Count > 0)
|
||||
{
|
||||
var lastItemIndex = _listView.Items.Count - 1;
|
||||
_listView.EnsureVisible(lastItemIndex);
|
||||
_listView.Items[lastItemIndex].Focused = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ak používateľ nebol na spodku, vrátime sa na predchádzajúcu pozíciu scrollu
|
||||
if (topIndexBeforeRefresh < _listView.Items.Count)
|
||||
{
|
||||
_listView.TopItem = _listView.Items[topIndexBeforeRefresh];
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_listView.EndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ApplyFilter(string filterText)
|
||||
{
|
||||
_filterText = filterText?.Trim() ?? string.Empty;
|
||||
RefreshListView();
|
||||
}
|
||||
|
||||
private bool IsOnLastItem()
|
||||
{
|
||||
if (_listView.Items.Count == 0)
|
||||
return false;
|
||||
|
||||
// Získame poslednú položku
|
||||
int lastItemIndex = _listView.Items.Count - 1;
|
||||
var lastItem = _listView.Items[lastItemIndex];
|
||||
|
||||
// Overíme, či je posledná položka úplne viditeľná
|
||||
return lastItem.Bounds.Bottom <= _listView.ClientRectangle.Bottom;
|
||||
}
|
||||
|
||||
public void EnableAutoScroll()
|
||||
{
|
||||
_autoScrollEnabled = true;
|
||||
}
|
||||
|
||||
public void DisableAutoScroll()
|
||||
{
|
||||
_autoScrollEnabled = false;
|
||||
}
|
||||
|
||||
private void AdjustColumnWidth()
|
||||
{
|
||||
if (_listView.Columns.Count > 0)
|
||||
{
|
||||
_listView.Columns[0].Width = _listView.ClientSize.Width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
using SharedComponents;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
public class LogFilter
|
||||
{
|
||||
private ListView _listView;
|
||||
private string _filterText = string.Empty; // Pre uloženie aktuálneho filtrovaného reťazca
|
||||
|
||||
// Konstruktor
|
||||
public LogFilter(ListView listView)
|
||||
{
|
||||
_listView = listView;
|
||||
}
|
||||
|
||||
// Metóda na aplikovanie filtra na ListView
|
||||
public void ApplyFilter(string filterText)
|
||||
{
|
||||
_filterText = filterText.ToLower(); // Ukladáme text filtra bez ohľadu na veľkosť písmen
|
||||
|
||||
// Po aplikovaní filtra obnovíme zobrazenie
|
||||
RefreshListView();
|
||||
}
|
||||
|
||||
public void RefreshListView()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Skontrolujeme, či sme na hlavnom vlákne a v prípade potreby použijeme Invoke
|
||||
if (_listView.InvokeRequired)
|
||||
{
|
||||
// Použijeme Invoke, ak nie sme na hlavnom vlákne
|
||||
_listView.Invoke(new Action(RefreshListView));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Vymazanie existujúcich položiek
|
||||
_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);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Zachytíme výnimku, ak sa niečo pokazí, a zobrazíme ju užívateľovi
|
||||
MessageBox.Show($"An error occurred while refreshing the log view: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
// Môžete pridať ďalšie metódy na zobrazenie alebo efekt pre nové položky, ak je to potrebné
|
||||
private void ApplyNewItemEffect(ListViewItem item)
|
||||
{
|
||||
// Prípadný efekt pre nový pridaný log
|
||||
// Môžete pridať animáciu alebo zmenu farby atď.
|
||||
item.ForeColor = Color.Green; // Napríklad zmeníme farbu písma na zelenú
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-278
@@ -1,278 +0,0 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
//private BufferedListView memoListView;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderTime;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderMessage;
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.columnHeaderTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderMessage = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.refreshMemoButton = new System.Windows.Forms.Button();
|
||||
this.button6 = new System.Windows.Forms.Button();
|
||||
this.button7 = new System.Windows.Forms.Button();
|
||||
this.filterManagementPanel = new System.Windows.Forms.Panel();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.filterButton = new System.Windows.Forms.Button();
|
||||
this.filterTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.wndControlPanel = new System.Windows.Forms.Panel();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.flowControlsPanel = new System.Windows.Forms.Panel();
|
||||
this.runButton = new System.Windows.Forms.Button();
|
||||
this.stopButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.memoListView = new BufferedListView();
|
||||
this.panel1.SuspendLayout();
|
||||
this.filterManagementPanel.SuspendLayout();
|
||||
this.wndControlPanel.SuspendLayout();
|
||||
this.flowControlsPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// columnHeaderTime
|
||||
//
|
||||
this.columnHeaderTime.Text = "Time";
|
||||
this.columnHeaderTime.Width = 150;
|
||||
//
|
||||
// columnHeaderMessage
|
||||
//
|
||||
this.columnHeaderMessage.Text = "Message";
|
||||
this.columnHeaderMessage.Width = 350;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.panel1.Controls.Add(this.refreshMemoButton);
|
||||
this.panel1.Controls.Add(this.button6);
|
||||
this.panel1.Controls.Add(this.button7);
|
||||
this.panel1.Location = new System.Drawing.Point(189, 356);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(283, 26);
|
||||
this.panel1.TabIndex = 16;
|
||||
//
|
||||
// refreshMemoButton
|
||||
//
|
||||
this.refreshMemoButton.Location = new System.Drawing.Point(108, 0);
|
||||
this.refreshMemoButton.Name = "refreshMemoButton";
|
||||
this.refreshMemoButton.Size = new System.Drawing.Size(84, 26);
|
||||
this.refreshMemoButton.TabIndex = 17;
|
||||
this.refreshMemoButton.Text = "Refresh memo";
|
||||
this.refreshMemoButton.UseVisualStyleBackColor = true;
|
||||
this.refreshMemoButton.Click += new System.EventHandler(this.refreshMemoButton_Click);
|
||||
//
|
||||
// button6
|
||||
//
|
||||
this.button6.Location = new System.Drawing.Point(0, 0);
|
||||
this.button6.Name = "button6";
|
||||
this.button6.Size = new System.Drawing.Size(102, 26);
|
||||
this.button6.TabIndex = 4;
|
||||
this.button6.Text = "Clean diag cache";
|
||||
this.button6.UseVisualStyleBackColor = true;
|
||||
this.button6.Click += new System.EventHandler(this.button6_Click);
|
||||
//
|
||||
// button7
|
||||
//
|
||||
this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button7.Location = new System.Drawing.Point(198, 0);
|
||||
this.button7.Name = "button7";
|
||||
this.button7.Size = new System.Drawing.Size(72, 26);
|
||||
this.button7.TabIndex = 5;
|
||||
this.button7.Text = "Save logs";
|
||||
this.button7.UseVisualStyleBackColor = true;
|
||||
this.button7.Click += new System.EventHandler(this.button7_Click);
|
||||
//
|
||||
// filterManagementPanel
|
||||
//
|
||||
this.filterManagementPanel.Controls.Add(this.button5);
|
||||
this.filterManagementPanel.Controls.Add(this.filterButton);
|
||||
this.filterManagementPanel.Controls.Add(this.filterTextBox);
|
||||
this.filterManagementPanel.Controls.Add(this.label2);
|
||||
this.filterManagementPanel.Location = new System.Drawing.Point(127, 6);
|
||||
this.filterManagementPanel.Name = "filterManagementPanel";
|
||||
this.filterManagementPanel.Size = new System.Drawing.Size(393, 26);
|
||||
this.filterManagementPanel.TabIndex = 15;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.Enabled = false;
|
||||
this.button5.Location = new System.Drawing.Point(294, 4);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(81, 20);
|
||||
this.button5.TabIndex = 11;
|
||||
this.button5.Text = "Add new filter";
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// filterButton
|
||||
//
|
||||
this.filterButton.Location = new System.Drawing.Point(225, 4);
|
||||
this.filterButton.Name = "filterButton";
|
||||
this.filterButton.Size = new System.Drawing.Size(64, 20);
|
||||
this.filterButton.TabIndex = 10;
|
||||
this.filterButton.Text = "Set filter";
|
||||
this.filterButton.UseVisualStyleBackColor = true;
|
||||
this.filterButton.Click += new System.EventHandler(this.filterButton_Click_1);
|
||||
//
|
||||
// filterTextBox
|
||||
//
|
||||
this.filterTextBox.Location = new System.Drawing.Point(33, 4);
|
||||
this.filterTextBox.Name = "filterTextBox";
|
||||
this.filterTextBox.Size = new System.Drawing.Size(187, 20);
|
||||
this.filterTextBox.TabIndex = 7;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 8);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(29, 13);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Filter";
|
||||
//
|
||||
// wndControlPanel
|
||||
//
|
||||
this.wndControlPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.wndControlPanel.Controls.Add(this.button2);
|
||||
this.wndControlPanel.Location = new System.Drawing.Point(831, 356);
|
||||
this.wndControlPanel.Name = "wndControlPanel";
|
||||
this.wndControlPanel.Size = new System.Drawing.Size(70, 26);
|
||||
this.wndControlPanel.TabIndex = 14;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(3, 0);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(64, 26);
|
||||
this.button2.TabIndex = 2;
|
||||
this.button2.Text = "Close";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// flowControlsPanel
|
||||
//
|
||||
this.flowControlsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.flowControlsPanel.Controls.Add(this.runButton);
|
||||
this.flowControlsPanel.Controls.Add(this.stopButton);
|
||||
this.flowControlsPanel.Location = new System.Drawing.Point(12, 356);
|
||||
this.flowControlsPanel.Name = "flowControlsPanel";
|
||||
this.flowControlsPanel.Size = new System.Drawing.Size(133, 26);
|
||||
this.flowControlsPanel.TabIndex = 13;
|
||||
//
|
||||
// runButton
|
||||
//
|
||||
this.runButton.Enabled = false;
|
||||
this.runButton.Location = new System.Drawing.Point(0, 0);
|
||||
this.runButton.Name = "runButton";
|
||||
this.runButton.Size = new System.Drawing.Size(64, 26);
|
||||
this.runButton.TabIndex = 4;
|
||||
this.runButton.Text = "Run";
|
||||
this.runButton.UseVisualStyleBackColor = true;
|
||||
this.runButton.Click += new System.EventHandler(this.runButton_Click);
|
||||
//
|
||||
// stopButton
|
||||
//
|
||||
this.stopButton.Location = new System.Drawing.Point(69, 0);
|
||||
this.stopButton.Name = "stopButton";
|
||||
this.stopButton.Size = new System.Drawing.Size(64, 26);
|
||||
this.stopButton.TabIndex = 5;
|
||||
this.stopButton.Text = "Stop";
|
||||
this.stopButton.UseVisualStyleBackColor = true;
|
||||
this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 19);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(76, 13);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "Flow of events";
|
||||
//
|
||||
// memoListView
|
||||
//
|
||||
this.memoListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.memoListView.FullRowSelect = true;
|
||||
this.memoListView.GridLines = true;
|
||||
this.memoListView.HideSelection = false;
|
||||
this.memoListView.Location = new System.Drawing.Point(12, 38);
|
||||
this.memoListView.Name = "memoListView";
|
||||
this.memoListView.Size = new System.Drawing.Size(889, 312);
|
||||
this.memoListView.TabIndex = 0;
|
||||
this.memoListView.UseCompatibleStateImageBehavior = false;
|
||||
this.memoListView.View = System.Windows.Forms.View.Details;
|
||||
|
||||
this.memoListView.DoubleClick += new System.EventHandler(this.MemoListView_DoubleClick);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(913, 388);
|
||||
this.Controls.Add(this.memoListView);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.filterManagementPanel);
|
||||
this.Controls.Add(this.wndControlPanel);
|
||||
this.Controls.Add(this.flowControlsPanel);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "MainForm";
|
||||
this.Text = "Application live diagnostic";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.filterManagementPanel.ResumeLayout(false);
|
||||
this.filterManagementPanel.PerformLayout();
|
||||
this.wndControlPanel.ResumeLayout(false);
|
||||
this.flowControlsPanel.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button button6;
|
||||
private System.Windows.Forms.Button button7;
|
||||
private System.Windows.Forms.Panel filterManagementPanel;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.Button filterButton;
|
||||
private System.Windows.Forms.TextBox filterTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Panel wndControlPanel;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Panel flowControlsPanel;
|
||||
private System.Windows.Forms.Button runButton;
|
||||
private System.Windows.Forms.Button stopButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button refreshMemoButton;
|
||||
private BufferedListView memoListView;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,266 +0,0 @@
|
||||
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.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;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private bool stopUpdate = false; // Premenná na zastavenie aktualizácie
|
||||
private int lastDisplayedLogIndex = 0;
|
||||
private bool autoScrollEnabled = true; // Automatický posun, predvolene povolený
|
||||
private MainForm appDiagnosticForm;
|
||||
private Timer refreshTimer;
|
||||
private LogAdapter _logAdapter; // Pre LogAdapter
|
||||
private LogFilter _logFilter; // LogFilter objekt pre filtráciu
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Inicializujeme LogAdapter a priradíme ho k memoListView
|
||||
_logAdapter = new LogAdapter(memoListView);
|
||||
|
||||
RefreshLogView();
|
||||
|
||||
// Pripojenie na udalosť pri pridaní nového logu
|
||||
// nakoľko sa memo refreshuje cyklicky, tak refresh na udalosť nepotrebujem
|
||||
//LiveLogCache.Instance.LogAdded += OnLogAdded;
|
||||
|
||||
// Vytvoríme LogFilter objekt
|
||||
//_logFilter = new LogFilter(memoListView);
|
||||
}
|
||||
|
||||
private void OnLogAdded(string log)
|
||||
{
|
||||
try
|
||||
{
|
||||
RefreshLogView();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Error in OnLogAdded: {ex.Message}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshLogView()
|
||||
{
|
||||
// Skontrolujte, či voláme z iného vlákna
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke((Action)RefreshLogView);
|
||||
return;
|
||||
}
|
||||
|
||||
memoListView.BeginUpdate(); // Zabraňuje vizuálnym aktualizáciám počas vykresľovania
|
||||
|
||||
try
|
||||
{
|
||||
// Skontrolujte, či je užívateľ na poslednom viditeľnom zázname
|
||||
if (memoListView.Items.Count > 0)
|
||||
{
|
||||
var lastVisibleIndex = memoListView.TopItem.Index + memoListView.ClientRectangle.Height / memoListView.Items[0].Bounds.Height;
|
||||
autoScrollEnabled = lastVisibleIndex >= memoListView.Items.Count - 1;
|
||||
}
|
||||
|
||||
// Získajte nové logy od posledného indexu
|
||||
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));
|
||||
}
|
||||
|
||||
// Aktualizujte posledný zobrazený index
|
||||
lastDisplayedLogIndex = LiveLogCache.Instance.Logs.Count;
|
||||
|
||||
// Ak je autoScrollEnabled, posuňte sa na posledný záznam
|
||||
if (autoScrollEnabled && memoListView.Items.Count > 0)
|
||||
{
|
||||
memoListView.EnsureVisible(memoListView.Items.Count - 1);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
memoListView.EndUpdate(); // Umožní vizuálne aktualizácie
|
||||
}
|
||||
}
|
||||
|
||||
// Táto metóda sa spustí pri scrollovaní v memoListView (tzn. ak sa používateľ dostane na spodok listu)
|
||||
private void memoListView_Scroll(object sender, EventArgs e)
|
||||
{
|
||||
// Skontrolujte, či používateľ dosiahol spodok ListView
|
||||
if (memoListView.Items.Count > 0 &&
|
||||
memoListView.Items[memoListView.Items.Count - 1].Bounds.Bottom <= memoListView.ClientSize.Height)
|
||||
{
|
||||
// Ak áno, načítame ďalšie logy
|
||||
RefreshLogView();
|
||||
}
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e)
|
||||
{
|
||||
//LiveLogCache.Instance.AddLog("Nový log z hlavnej aplikácie");
|
||||
|
||||
LiveLogCache.Instance.ClearLogs();
|
||||
ClearListView();
|
||||
}
|
||||
|
||||
private void runButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (stopUpdate) // Ak je časovač zastavený, spustíme ho
|
||||
{
|
||||
stopUpdate = false; // Zastav aktualizáciu
|
||||
runButton.Enabled = false; // Zakážeme tlačidlo Start počas behu
|
||||
stopButton.Enabled = true; // Povolenie tlačidla Stop
|
||||
refreshTimer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void stopButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!stopUpdate) // Ak časovač beží, môžeme ho zastaviť
|
||||
{
|
||||
stopUpdate = true; // Spusti aktualizáciu
|
||||
runButton.Enabled = true; // Povolenie tlačidla Start
|
||||
stopButton.Enabled = false; // Zakážeme tlačidlo Stop
|
||||
refreshTimer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearListView()
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new Action(ClearListView));
|
||||
return;
|
||||
}
|
||||
|
||||
memoListView.Items.Clear();
|
||||
}
|
||||
|
||||
private void refreshMemoButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveLogsToFile();
|
||||
//LiveLogCache.Instance.AddLog("Toto je nový log.");
|
||||
}
|
||||
|
||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
{
|
||||
// Odpojenie udalosti, keď sa okno zatvára, inak môže po opätovnom spustení okna a pridaní nového itemu do listu zhhodiť program
|
||||
// nakoľko sa memo refreshuje cyklicky, tak refresh na udalosť nepotrebujem
|
||||
//LiveLogCache.Instance.LogAdded -= OnLogAdded;
|
||||
|
||||
_logAdapter = null;
|
||||
|
||||
base.OnFormClosing(e);
|
||||
}
|
||||
|
||||
private void filterButton_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
// Aplikujeme filter na základe textu z filterTextBox
|
||||
string filterText = filterTextBox.Text;
|
||||
//_logFilter.ApplyFilter(filterText); // Aplikovanie filtra
|
||||
_logAdapter.ApplyFilter(filterText);
|
||||
}
|
||||
private void SubForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Vaša logika pri uzatváraní formy
|
||||
// this.Hide(); // Podforma sa len skryje
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Ošetrenie výnimky
|
||||
MessageBox.Show("Chyba pri zatváraní pod-aplikácie: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveLogsToFile()
|
||||
{
|
||||
using (SaveFileDialog saveFileDialog = new SaveFileDialog())
|
||||
{
|
||||
saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
|
||||
saveFileDialog.Title = "Save TBF live logs";
|
||||
saveFileDialog.DefaultExt = "txt";
|
||||
saveFileDialog.FileName = "TBFLiveLogs.txt";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Načítanie všetkých logov z LiveLogCache
|
||||
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount());
|
||||
|
||||
// Uloženie logov do vybraného súboru
|
||||
File.WriteAllLines(saveFileDialog.FileName, logs);
|
||||
|
||||
MessageBox.Show("Logs saved successfully.", "Save TBF live logs", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error occurred while saving TBF live logs: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
//this.Hide(); // Podforma sa len skryje
|
||||
}
|
||||
|
||||
private void MemoListView_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (memoListView.SelectedItems.Count > 0)
|
||||
{
|
||||
var selectedItem = memoListView.SelectedItems[0];
|
||||
int selectedIndex = memoListView.Items.IndexOf(selectedItem);
|
||||
|
||||
if (selectedIndex >= 0)
|
||||
{
|
||||
// Zrušenie filtra
|
||||
_logAdapter._filterText = string.Empty;
|
||||
|
||||
// Načítanie logov od indexu vybraného riadku
|
||||
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);
|
||||
}
|
||||
memoListView.EndUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AppDiagnostic
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("AppDiagnostic")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AppDiagnostic")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("fa9abad1-7184-4295-ade8-d44f2e3de6b2")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AppDiagnostic.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppDiagnostic.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AppDiagnostic.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="3.0.3" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -17,7 +17,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -25,13 +25,13 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
+1
-43
@@ -105,14 +105,6 @@ namespace Common
|
||||
///
|
||||
[Description("pulse/kWh")] ppkWh, /// * 1 pulse/kWh
|
||||
[Description("kWh/pulse")] kWhpp, /// 1 kWh/pulse
|
||||
|
||||
///
|
||||
[Description("A")] A, /// *1 A
|
||||
[Description("mA")] mA, /// 1 mA = 0.001 A
|
||||
///
|
||||
[Description("V")] V, /// *1 V
|
||||
[Description("mV")] mV, /// 1 mV = 0.001 V
|
||||
|
||||
|
||||
Count
|
||||
}
|
||||
@@ -143,8 +135,6 @@ namespace Common
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Datum und Uhrzeit")] DateTime,
|
||||
[Description("Aufgezählt")] Enumerated,
|
||||
[Description("Strom")] Current,
|
||||
[Description("Spannung")] Voltage,
|
||||
#elif LANG_PL
|
||||
[Description("Objętość")] Volume,
|
||||
[Description("Przepływ")] Flow,
|
||||
@@ -168,8 +158,6 @@ namespace Common
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Data i czas")] DateTime,
|
||||
[Description("Wyliczone")] Enumerated,
|
||||
[Description("Prąd")] Current,
|
||||
[Description("Napięcie")] Voltage,
|
||||
#elif LANG_CS
|
||||
[Description("Objem")] Volume,
|
||||
[Description("Průtok")] Flow,
|
||||
@@ -193,8 +181,6 @@ namespace Common
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Datum a čas")] DateTime,
|
||||
[Description("Vyjmenované")] Enumerated,
|
||||
[Description("Proud")] Current,
|
||||
[Description("Napětí")] Voltage,
|
||||
#elif LANG_IT
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flusso")] Flow,
|
||||
@@ -218,8 +204,6 @@ namespace Common
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Data e ora")] DateTime,
|
||||
[Description("Enumerato")] Enumerated,
|
||||
[Description("Corrente")] Current,
|
||||
[Description("Voltaggio")] Voltage,
|
||||
#else
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flow")] Flow,
|
||||
@@ -243,8 +227,6 @@ namespace Common
|
||||
[Description("Boolean")] Boolean,
|
||||
[Description("Date and time")] DateTime,
|
||||
[Description("Enumerated")] Enumerated,
|
||||
[Description("Current")] Current,
|
||||
[Description("Voltage")] Voltage,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
@@ -260,8 +242,7 @@ namespace Common
|
||||
{
|
||||
return unit == Unit.l || unit == Unit.m3ph || unit == Unit.kg || unit == Unit.s || unit == Unit.C ||
|
||||
unit == Unit.bar || unit == Unit.RPct || unit == Unit.Pct || unit == Unit.mm || unit == Unit.kgpm3 ||
|
||||
unit == Unit.J || unit == Unit.uSpcm || unit == Unit.ppl || unit == Unit.ppkWh || unit == Unit.A ||
|
||||
unit == Unit.V;
|
||||
unit == Unit.J || unit == Unit.uSpcm || unit == Unit.ppl || unit == Unit.ppkWh;
|
||||
}
|
||||
|
||||
public static bool IsQuantity(Unit unit, Quantity quantity)
|
||||
@@ -370,14 +351,6 @@ namespace Common
|
||||
case Unit.ppkWh:
|
||||
case Unit.kWhpp:
|
||||
return Quantity.PulsePerKWh;
|
||||
|
||||
case Unit.A:
|
||||
case Unit.mA:
|
||||
return Quantity.Current;
|
||||
|
||||
case Unit.V:
|
||||
case Unit.mV:
|
||||
return Quantity.Voltage;
|
||||
|
||||
default:
|
||||
return Quantity.Number;
|
||||
@@ -399,8 +372,6 @@ namespace Common
|
||||
public static bool IsPulsePerLtr(Unit unit) { return IsQuantity(unit, Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit unit) { return IsQuantity(unit, Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit unit) { return IsQuantity(unit, Quantity.Conductivity); }
|
||||
public static bool IsCurrent(Unit unit) { return IsQuantity(unit, Quantity.Current); }
|
||||
public static bool IsVoltage(Unit unit) { return IsQuantity(unit, Quantity.Voltage); }
|
||||
|
||||
|
||||
|
||||
@@ -484,13 +455,6 @@ namespace Common
|
||||
case Unit.dm3pp:
|
||||
case Unit.lpdeg:
|
||||
case Unit.dm3pdeg: return (v <= float.Epsilon) ? 0 : 1/v;
|
||||
|
||||
/// Current: internal representation in A
|
||||
case Unit.mA: return 1000 * v; /// 1000 mA = 1 A
|
||||
|
||||
/// Voltage: internal representation in V
|
||||
case Unit.mV: return 1000 * v; /// 1000 mV = 1 V
|
||||
|
||||
|
||||
default: return v; /// Do not convert
|
||||
}
|
||||
@@ -570,12 +534,6 @@ namespace Common
|
||||
|
||||
/// Electrical conductivity
|
||||
case Unit.mSpm: return 10 * v;
|
||||
|
||||
/// Current: internal representation in A
|
||||
case Unit.mA: return 0.001 * v; /// 1 mA = 0.001 A
|
||||
|
||||
/// Voltage: internal representation in V
|
||||
case Unit.mV: return 0.001 * v; /// 1 mV = 0.001 V
|
||||
|
||||
/// Invert
|
||||
case Unit.kWhpp:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -43,7 +43,7 @@
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
@@ -68,7 +68,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CalendarEvent\ICalendarEvent.cs" />
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="Entities\BenchPath.cs" />
|
||||
<Compile Include="Entities\CustomEvent.cs" />
|
||||
<Compile Include="Entities\Component.cs" />
|
||||
@@ -96,7 +95,6 @@
|
||||
<Compile Include="Entities\VirtualBenchStep.cs" />
|
||||
<Compile Include="CalendarEvent\Utils.cs" />
|
||||
<Compile Include="FluentCommon.cs" />
|
||||
<Compile Include="Formulas.cs" />
|
||||
<Compile Include="Mappings\BenchPathMap.cs" />
|
||||
<Compile Include="Mappings\ComponentMap.cs" />
|
||||
<Compile Include="Mappings\ComponentProcedureMap.cs" />
|
||||
@@ -117,7 +115,6 @@
|
||||
<Compile Include="Mappings\UncertaintyMap.cs" />
|
||||
<Compile Include="Mappings\UserMap.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PurchaseResources.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
using System;
|
||||
|
||||
//formulas.cs has been added cause iPerl from master-2 ...MF
|
||||
|
||||
namespace Config
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public const string AdminUsername = "admin";
|
||||
public const string AdminPassword = "staratura";
|
||||
public const string SQLiteDbFName = "SQLite.db";
|
||||
|
||||
#if DN100 || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || CEVAK_200
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 1;
|
||||
#elif MUNICH
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif MALTA_WSD25
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 1;
|
||||
#elif BADGER_MALA_TRAT || BERLIN || FUZHOU_150 || FUZHOU_300 || GELSENWASSER || GENESIS || IZRAEL_200 || PETERSBURG_200 || SENTEC || SLM_150 || TORINO_50
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 1;
|
||||
#elif PUCHONG_200
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif RUM_MOB
|
||||
public const int WMsCount = 8;
|
||||
public const int LineSize = 8;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif TURA_SPECIAL
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif DEWA_300 || FUZHOU_100 || ROMA_200 || LUXEMBURG_40
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif DUBAJ_50
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 5;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif SLM_END || WARSAW_END
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 5;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 4;
|
||||
#elif SLM_50
|
||||
public const int WMsCount = 12;
|
||||
public const int LineSize = 12;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 6;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif ALZIR_25 || BAHRAIN_50 || CEVAK_40 || FEWA_50 || FILIPINY_50 || FUZHOU_50 || HONGKONG_50 || IZRAEL_25 || JUZNA_AFRIKA_50 || KEMPNO_50 || KRAKOW_50 || MILWAUKEE || MURES_40 || PETERSBURG_50 || TORUN_50 || WARSAW_50 || ZAMBIA || ZODINO
|
||||
public const int WMsCount = 20;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif TURA_IPERL || TURA_IPERL_NEW
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 20;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif IZRAEL_50
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#endif
|
||||
|
||||
public static double RealDensity = 0; /// true water density [kg/m3]
|
||||
public static double AtTemperature = 0; /// measured at temperature [°C]
|
||||
public static double Buoyancy = 0;
|
||||
}
|
||||
}
|
||||
@@ -22,9 +22,6 @@ namespace Config.Entities
|
||||
public virtual string PressMtrUp { get; set; }
|
||||
public virtual string PressMtrDown { get; set; }
|
||||
public virtual string PressMtrDelta { get; set; }
|
||||
public virtual string ElectricMtrUp { get; set; }
|
||||
public virtual string ElectricMtrDown { get; set; }
|
||||
public virtual string ElectricMtrDelta { get; set; }
|
||||
public virtual string StopBFValve { get; set; }
|
||||
|
||||
/// Valves
|
||||
@@ -62,9 +59,6 @@ namespace Config.Entities
|
||||
result.PressMtrUp = PressMtrUp;
|
||||
result.PressMtrDown = PressMtrDown;
|
||||
result.PressMtrDelta = PressMtrDelta;
|
||||
result.ElectricMtrUp = ElectricMtrUp;
|
||||
result.ElectricMtrDown = ElectricMtrDown;
|
||||
result.ElectricMtrDelta = ElectricMtrDelta;
|
||||
result.StopBFValve = StopBFValve;
|
||||
result.ValvesOpen = ValvesOpen;
|
||||
result.ValvesClose = ValvesClose;
|
||||
|
||||
@@ -18,9 +18,8 @@ namespace Config.Entities
|
||||
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string RegValve { get; set; }
|
||||
public virtual int RegulMinStep { get; set; }
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string StartValve { get; set; }
|
||||
public virtual string Diverter { get; set; }
|
||||
public virtual string TempMtrDiv { get; set; }
|
||||
@@ -40,7 +39,6 @@ namespace Config.Entities
|
||||
{
|
||||
ValvesOpen = string.Empty;
|
||||
ValvesClose = string.Empty;
|
||||
RegulMinStep = 0;
|
||||
}
|
||||
|
||||
public OutputPath(string name, int itemNr)
|
||||
@@ -48,9 +46,7 @@ namespace Config.Entities
|
||||
{
|
||||
Name = name;
|
||||
ItemNr = itemNr;
|
||||
RegulMinStep = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public virtual OutputPath Clone(string name, int itemNr)
|
||||
{
|
||||
@@ -62,8 +58,7 @@ namespace Config.Entities
|
||||
result.FlowUnit = FlowUnit;
|
||||
result.Selector = Selector;
|
||||
result.RegValve = RegValve;
|
||||
result.RegulMinStep = RegulMinStep;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.PidCoef = PidCoef;
|
||||
result.StartValve = StartValve;
|
||||
result.Diverter = Diverter;
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace Config.Entities
|
||||
public virtual Unit TempUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit PressUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit LengthUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit ElectricUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
|
||||
/// Wrappers
|
||||
public virtual double QfromM3ph()
|
||||
@@ -210,7 +209,6 @@ namespace Config.Entities
|
||||
result.TempUnit = TempUnit;
|
||||
result.PressUnit = PressUnit;
|
||||
result.LengthUnit = LengthUnit;
|
||||
result.ElectricUnit = ElectricUnit;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
return result;
|
||||
|
||||
@@ -128,11 +128,10 @@ namespace Config
|
||||
case GID.Administrators:
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
case GID.TraceabilityManagement:
|
||||
//#elif LANG_PL
|
||||
#endif
|
||||
#elif LANG_PL
|
||||
case GID.MetrologicalAuthority:
|
||||
case GID.WaterMeterAuthority:
|
||||
|
||||
#endif
|
||||
admin.AddGroup(group);
|
||||
session.SaveOrUpdate(group); /// Save this group
|
||||
break;
|
||||
|
||||
@@ -1,410 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Common;
|
||||
|
||||
//formulas.cs has been added cause iPerl from master-2 ...MF
|
||||
|
||||
namespace Config
|
||||
{
|
||||
public static class Formulas
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Formulas));
|
||||
|
||||
|
||||
///
|
||||
/// Wrappers
|
||||
///
|
||||
public static double RealDensity() { return Data.RealDensity; }
|
||||
public static double AtTemperature() { return Data.AtTemperature; }
|
||||
public static double Buoyancy() { return Data.Buoyancy; }
|
||||
|
||||
|
||||
/// Private tables with coeficients to calculate specific enthalpy
|
||||
static readonly int[] Ii;
|
||||
static readonly int[] Ji;
|
||||
static readonly double[] ni;
|
||||
|
||||
/// Private table with coeficients to calculate temperature of a platinum thermometer
|
||||
static readonly double[] Di;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
static Formulas()
|
||||
{
|
||||
///
|
||||
/// Initialize tables to calculate specific enthalpies
|
||||
///
|
||||
Ii = new int[34] { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 8, 8, 21, 23, 29, 30, 31, 32 };
|
||||
Ji = new int[34] { -2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0, 1, 3, -3, 0, 1, 3, 17, -4, 0, 6, -5, -2, 10, -8, -11, -6, -29, -31, -38, -39, -40, -41 };
|
||||
ni = new double[34] {
|
||||
0.14632971213167, /// 1
|
||||
-0.84548187169114, /// 2
|
||||
-0.37563603672040E1, /// 3
|
||||
0.33855169168385E1, /// 4
|
||||
-0.95791963387872, /// 5
|
||||
0.15772038513228, /// 6
|
||||
-0.16616417199501E-1, /// 7
|
||||
0.81214629983568E-3, /// 8
|
||||
0.28319080123804E-3, /// 9
|
||||
-0.60706301565874E-3, /// 10
|
||||
-0.18990068218419E-1, /// 11
|
||||
-0.32529748770505E-1, /// 12
|
||||
-0.21841717175414E-1, /// 13
|
||||
-0.52838357969930E-4, /// 14
|
||||
-0.47184321073267E-3, /// 15
|
||||
-0.30001780793026E-3, /// 16
|
||||
0.47661393906987E-4, /// 17
|
||||
-0.44141845330846E-5, /// 18
|
||||
-0.72694996297594E-15, /// 19
|
||||
-0.31679644845054E-4, /// 20
|
||||
-0.28270797985312E-5, /// 21
|
||||
-0.85205128120103E-9, /// 22
|
||||
-0.22425281908000E-5, /// 23
|
||||
-0.65171222895601E-6, /// 24
|
||||
-0.14341729937924E-12, /// 25
|
||||
-0.40516996860117E-6, /// 26
|
||||
-0.12734301741641E-8, /// 27
|
||||
-0.17424871230634E-9, /// 28
|
||||
-0.68762131295531E-18, /// 29
|
||||
0.14478307828521E-19, /// 30
|
||||
0.26335781662795E-22, /// 31
|
||||
-0.11947622640071E-22, /// 32
|
||||
0.18228094581404E-23, /// 33
|
||||
-0.93537087292458E-25, /// 34
|
||||
};
|
||||
|
||||
///
|
||||
/// Initialize a table to calculate temperature of a platinum thermometer from resistance
|
||||
///
|
||||
Di = new double[]
|
||||
{
|
||||
439.932854,
|
||||
472.418020,
|
||||
37.684494,
|
||||
7.472018,
|
||||
2.920828,
|
||||
0.005184,
|
||||
-0.963864,
|
||||
-0.188732,
|
||||
0.191203,
|
||||
0.049025,
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate density of distilled water from temperature
|
||||
/// </summary>
|
||||
/// <param name="t">ITS-90 temperature in [°C]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static double DistilledWaterDensityFromTemp(double t)
|
||||
{
|
||||
if (t <= 40)
|
||||
{
|
||||
const double c0 = 999.839564;
|
||||
const double c1 = 0.067998613;
|
||||
const double c2 = -0.0091101468;
|
||||
const double c3 = 0.00010058299;
|
||||
const double c4 = -0.0000011275659;
|
||||
const double c5 = 6.5985371e-09;
|
||||
|
||||
return ((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0;
|
||||
}
|
||||
else
|
||||
{
|
||||
const double a0 = 9.9983952E2;
|
||||
const double a1 = 1.6952577E1;
|
||||
const double a2 = -7.9905127E-3;
|
||||
const double a3 = -4.6241757E-5;
|
||||
const double a4 = 1.0584601E-7;
|
||||
const double a5 = -2.8103006E-10;
|
||||
const double b = 1.6887236E-2;
|
||||
|
||||
return (((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + a0) / (1.0 + b * t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate density of distilled water from temperature (obsolete)
|
||||
/// </summary>
|
||||
/// <param name="t">IPTS-68 temperature in [°C]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static double DistilledWaterDensityFromTempIPTS68(double t)
|
||||
{
|
||||
const double a0 = 999.842594;
|
||||
const double a1 = 0.06793952;
|
||||
const double a2 = -0.009095290;
|
||||
const double a3 = 0.0001001685;
|
||||
const double a4 = -0.000001120083;
|
||||
const double a5 = 6.536332e-09;
|
||||
|
||||
return ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + a0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate density by comparing calculated data and data from a certificate
|
||||
/// </summary>
|
||||
/// <param name="realDensity">Density from a certificate in [kg/m3]</param>
|
||||
/// <param name="atTemperature">Temperature from a certificate in [°C]</param>
|
||||
/// <returns>Density correction in [kg/m3]</returns>
|
||||
public static double DensityCorrection(double realDensity, double atTemperature)
|
||||
{
|
||||
/// Calculated data
|
||||
double calculatedDensity = DistilledWaterDensityFromTemp(atTemperature);
|
||||
|
||||
return realDensity - calculatedDensity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate corrected (real) water density from temperature
|
||||
/// </summary>
|
||||
/// <param name="t">Temperature in [°C]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static double WaterDensityFromTemp(double t)
|
||||
{
|
||||
return DistilledWaterDensityFromTemp(t) + DensityCorrection(RealDensity(), AtTemperature());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate corrected (real) water density from temperature
|
||||
/// </summary>
|
||||
/// <param name="t">Temperature in [°C]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static double WaterDensityFromTempPress(double temp, double pressure)
|
||||
{
|
||||
double x0 = 5.08821E-10;
|
||||
double x1 = 1.2639418;
|
||||
double x2 = 0.2660269;
|
||||
double x3 = 0.3734838;
|
||||
double x4 = 2.0205242;
|
||||
double theta = temp / 100.0;
|
||||
double B = x0 * (((x3 * theta + x2) * theta + x1) * theta + 1) / (1 + x4 * theta);
|
||||
|
||||
return WaterDensityFromTemp(temp) * (1 + B * Units.ConvertTo(Unit.Pa, pressure));
|
||||
}
|
||||
|
||||
|
||||
public static float AirDensityFromAmbientVales(float tempC, float pressureBar, float humiPct)
|
||||
{
|
||||
double pressurePa = 100000.0 * (double)pressureBar; /// [Pa]
|
||||
double tempKelvin = 273.15 + (double)tempC;
|
||||
double coef1 = 1.2811805 / 10000.0 * tempKelvin * tempKelvin
|
||||
- 1.950987 / 100.0 * tempKelvin
|
||||
+ 34.04926034
|
||||
- 6.353631 * 1000.0 / tempKelvin;
|
||||
double coef3 = humiPct / 100.0 * System.Math.Exp(coef1) / pressurePa;
|
||||
double airDensityKgm3 = 0.00348353 * pressurePa * (1.0 - 0.378 * coef3) / tempKelvin; /// kg/m3
|
||||
return (float)airDensityKgm3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert 'pulses' to 'volume', prevent division by zero
|
||||
/// </summary>
|
||||
public static double VolumeFromPulses(int pulses, double pulsesPerLiter)
|
||||
{
|
||||
if (pulsesPerLiter <= double.Epsilon) return 0;
|
||||
return Convert.ToDouble(pulses) / pulsesPerLiter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the error in % from 'measured' and 'true' volume, prevent division by zero
|
||||
/// </summary>
|
||||
public static double ErrorFromVolumes(double measuredVolume, double trueVolume)
|
||||
{
|
||||
if (-float.Epsilon <= trueVolume && trueVolume <= float.Epsilon)
|
||||
{
|
||||
if (-float.Epsilon <= measuredVolume && measuredVolume <= float.Epsilon)
|
||||
{
|
||||
log.WarnFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, -100.0);
|
||||
return -100.0;
|
||||
}
|
||||
|
||||
log.WarnFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, 99.0);
|
||||
return 99.0;
|
||||
}
|
||||
|
||||
double error = 100.0 * (measuredVolume - trueVolume) / trueVolume;
|
||||
log.InfoFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculates corrected value from a list of corrections by interpolation.
|
||||
/// It is assumed that values in the list 'corrections' are sorted.
|
||||
/// </summary>
|
||||
/// <param name="rawMeasurement">Raw uncorrected value</param>
|
||||
/// <param name="corrections">Sorted (value, correction) pairs</param>
|
||||
/// <returns>Corrected value</returns>
|
||||
public static double CorrectedValue(double rawValue, IList<IMeasurementCorrection> corrections)
|
||||
{
|
||||
return rawValue + GetCorrection(rawValue, corrections);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a correction from a list of corrections by interpolation.
|
||||
/// It is assumed that values in the list 'corrections' are sorted.
|
||||
/// </summary>
|
||||
/// <param name="rawMeasurement">Raw uncorrected value</param>
|
||||
/// <param name="corrections">Sorted (value, correction) pairs</param>
|
||||
/// <returns>Corrected value</returns>
|
||||
public static double GetCorrection(double rawValue, IList<IMeasurementCorrection> corrections)
|
||||
{
|
||||
if ((corrections == null) || (corrections.Count == 0)) return 0; /// No correction
|
||||
|
||||
if (rawValue < corrections[0].Measurement)
|
||||
{
|
||||
/// rawValue is below the lowest value in the correction table
|
||||
return corrections[0].Correction;
|
||||
}
|
||||
|
||||
int count = corrections.Count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
if (rawValue < corrections[i].Measurement)
|
||||
{
|
||||
double d1 = rawValue - corrections[i - 1].Measurement;
|
||||
double d2 = corrections[i].Measurement - rawValue;
|
||||
|
||||
if (d1 + d2 <= float.Epsilon)
|
||||
{
|
||||
/// Neigboring values in the corection table are close to each other -> calculate the average
|
||||
return (corrections[i - 1].Correction + corrections[i].Correction) / 2.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Interpolate the correction from neigboring values in the corection table
|
||||
return (corrections[i - 1].Correction * d2 + corrections[i].Correction * d1) / (d1 + d2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// rawValue is above the highest value in the correction table
|
||||
return corrections[count - 1].Correction;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts a measurement error to a correction (used when preparing correction tables).
|
||||
/// </summary>
|
||||
/// <param name="measuredValue">Measured value (in arbitrary units)</param>
|
||||
/// <param name="error">Measurement error in %</param>
|
||||
/// <returns>Correction in the same units as the measured value</returns>
|
||||
public static double CorrectionFromError(double measuredValue, double error)
|
||||
{
|
||||
double trueValue = measuredValue / (1 + error/100);
|
||||
double correction = trueValue - measuredValue;
|
||||
return correction;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the heat coefficient for water
|
||||
/// </summary>
|
||||
/// <param name="pressure">Pressure [bar]</param>
|
||||
/// <param name="T_in">Inlet temperature [°C]</param>
|
||||
/// <param name="T_out">Outlet temperature [°C]</param>
|
||||
/// <param name="flowMeasuredAtInlet">true = flow measured @inlet, false = flow measured @outlet</param>
|
||||
/// <returns> Heat coefficient for water [J/(m3 K)]</returns>
|
||||
public static double HeatCoefficientWater(double pressure, double T_in, double T_out, bool flowMeasuredAtInlet)
|
||||
{
|
||||
if (T_in == T_out) return 0;
|
||||
|
||||
const double R = 461.526; /// [J kg^-1 K^-1]
|
||||
const double p_star_Pa = 16.53E6; /// [Pa] (=16.53 MPa)
|
||||
const double T_star = 1386.0; /// [K]
|
||||
|
||||
double T_in_K = Units.ConvertTo(Unit.K, T_in);
|
||||
double T_out_K = Units.ConvertTo(Unit.K, T_out);
|
||||
double tau_in = T_star / T_in_K;
|
||||
double tau_out = T_star / T_out_K;
|
||||
double pi = Units.ConvertTo(Unit.Pa, pressure) / p_star_Pa;
|
||||
|
||||
double h_in = tau_in * GammaTau(pi, tau_in) * R * T_in_K;
|
||||
double h_out = tau_out * GammaTau(pi, tau_out) * R * T_out_K;
|
||||
|
||||
double ni = flowMeasuredAtInlet ? GammaPi(pi, tau_in) * R * T_in_K / p_star_Pa
|
||||
: GammaPi(pi, tau_out) * R * T_out_K / p_star_Pa;
|
||||
|
||||
return (h_in - h_out) / (ni * (T_in - T_out));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gamma(pi) see also STN EN 1434-1 Annex A (A.4)
|
||||
/// </summary>
|
||||
/// <param name="pi">pi = p / p* where p* = 16.53 MPa</param>
|
||||
/// <param name="tau">tau = T* / T where T* = 1386 K</param>
|
||||
/// <returns>gamma(pi)</returns>
|
||||
static double GammaPi(double pi, double tau)
|
||||
{
|
||||
double result = 0;
|
||||
for (int i = 0; i < 34; i++)
|
||||
{
|
||||
result -= ni[i] * Ii[i] * Math.Pow(7.1 - pi, Ii[i] - 1) * Math.Pow(tau - 1.222, Ji[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gamma(tau) see also STN EN 1434-1 Annex A (A.7)
|
||||
/// </summary>
|
||||
/// <param name="pi">pi = p / p* where p* = 16.53 MPa</param>
|
||||
/// <param name="tau">tau = T* / T where T* = 1386 K</param>
|
||||
/// <returns>gamma(tau)</returns>
|
||||
static double GammaTau(double pi, double tau)
|
||||
{
|
||||
double result = 0;
|
||||
for (int i = 0; i < 34; i++)
|
||||
{
|
||||
result += ni[i] * Math.Pow(7.1 - pi, Ii[i]) * Ji[i] * Math.Pow(tau - 1.222, Ji[i] - 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conversion of measured resistance of a platinum thermometer to temperature according to ITS-90
|
||||
/// </summary>
|
||||
/// <param name="R">Measured resistance in [°C]</param>
|
||||
/// <param name="R001C">Calibrated resistance in Ohm at 0.01°C</param>
|
||||
/// <param name="a7">Calibrated ITS-90 coefficient a7</param>
|
||||
/// <param name="b7">Calibrated ITS-90 coefficient b7</param>
|
||||
/// <param name="c7">Calibrated ITS-90 coefficient c7</param>
|
||||
/// <returns>Temperature in [°C]</returns>
|
||||
public static double PlatinumResistanceTM_ITS90_R2T(double R, double R001C, double a7, double b7, double c7)
|
||||
{
|
||||
double w = R / R001C; /// ratio
|
||||
double r1 = w - 1.0;
|
||||
double dw = r1 * (a7 + r1 * (b7 + r1 * c7)); /// = a7*r1 + b7*r1^2 + c7*r1^3
|
||||
double wr = w - dw;
|
||||
double x = (wr - 2.64) / 1.64;
|
||||
|
||||
double sum = 0;
|
||||
for (int i = Di.Length - 1; i >= 0; i--)
|
||||
{
|
||||
sum = sum * x + Di[i];
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conversion of measured resistance of a platinum thermometer to temperature using Callendar-Van Dusen equations
|
||||
/// </summary>
|
||||
/// <param name="R">Measured resistance in [°C]</param>
|
||||
/// <param name="R0">Calibrated resistance in Ohm at 0°C</param>
|
||||
/// <param name="A">Calibration coefficient a</param>
|
||||
/// <param name="B">Calibration coefficient b</param>
|
||||
/// <returns>Temperature in [°C]</returns>
|
||||
public static double PlatinumResistanceTM_ITS27_R2T(double R, double R0, double A, double B)
|
||||
{
|
||||
if (R0 * R0 * A * A - 4 * R0 * B * (R0 - R) <= 0) return 0; /// Out of range
|
||||
|
||||
return (-(R0 * A) + Math.Sqrt(R0 * R0 * A * A - 4 * R0 * B * (R0 - R))) / (2 * R0 * B);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,6 @@ namespace Config.Mappings
|
||||
Map(x => x.PressMtrUp);
|
||||
Map(x => x.PressMtrDown);
|
||||
Map(x => x.PressMtrDelta);
|
||||
//Map(x => x.ElectricMtrUp);
|
||||
//Map(x => x.ElectricMtrDown);
|
||||
//Map(x => x.ElectricMtrDelta);
|
||||
Map(x => x.StopBFValve);
|
||||
Map(x => x.ValvesOpen)
|
||||
.CustomType("StringClob")
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace Config.Mappings
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.RegValve);
|
||||
Map(x => x.RegulMinStep);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.PidCoef);
|
||||
Map(x => x.StartValve);
|
||||
Map(x => x.Diverter);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Config
|
||||
{
|
||||
public class PurchaseResources
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
22fa51b09dbd9afa4c5d73fd5d4267426f09bc510527f701d437b89d74765cc0
|
||||
@@ -0,0 +1,18 @@
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\Doc\Software interface for datastream water meters.docx
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\DataStreamInterfaceTest.exe.config
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\DataStreamInterfaceTest.exe
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\DataStreamInterfaceTest.pdb
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\DataStreamInterface.dll
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\bin\Debug\DataStreamInterface.pdb
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.csproj.AssemblyReference.cache
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.DemoMainWnd.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.GetDblValueDlg.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.GetFrameBoundariesDlg.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.GetIntegerNumberDlg.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.GetStateDlg.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.Properties.Resources.resources
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.csproj.GenerateResource.cache
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.csproj.CoreCompileInputs.cache
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStre.F4216CC0.Up2Date
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.exe
|
||||
C:\VSProjects\proj9\tbf\DataStreamInterfaceTest\obj\Debug\DataStreamInterfaceTest.pdb
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -40,8 +40,9 @@
|
||||
<StartupObject>DeviceTest.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,541 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Iesi.Collections</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Iesi.Collections.Generic.LinkedHashSet`1">
|
||||
<summary>
|
||||
Implementation of ISet that also maintains a linked list over all elements.
|
||||
Enumeration of this set is guaranteed to return the elements in the order
|
||||
they were added.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the collection.
|
||||
</summary>
|
||||
<returns>
|
||||
A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>1</filterpriority>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#IEnumerable#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through a collection.
|
||||
</summary>
|
||||
<returns>
|
||||
An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>2</filterpriority>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#ICollection{T}#Add(`0)">
|
||||
<summary>
|
||||
Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Clear">
|
||||
<summary>
|
||||
Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. </exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Contains(`0)">
|
||||
<summary>
|
||||
Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.CopyTo(`0[],System.Int32)">
|
||||
<summary>
|
||||
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
|
||||
</summary>
|
||||
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Remove(`0)">
|
||||
<summary>
|
||||
Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains all elements that are present in either the current set or the specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.IntersectWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are also in a specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.ExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Removes all elements in the specified collection from the current set.
|
||||
</summary>
|
||||
<param name="other">The collection of items to remove from the set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.SymmetricExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.IsSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether a set is a subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.IsSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.IsProperSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a correct superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the <see cref="T:System.Collections.Generic.ISet`1"/> object is a correct superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set. </param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.IsProperSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a proper (strict) subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a correct subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Overlaps(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set overlaps with the specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set and <paramref name="other"/> share at least one common element; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.SetEquals(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set and the specified collection contain the same elements.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is equal to <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Add(`0)">
|
||||
<summary>
|
||||
Adds an element to the current set and returns a value to indicate if the element was successfully added.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the element is added to the set; false if the element is already in the set.
|
||||
</returns>
|
||||
<param name="item">The element to add to the set.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.CountOthers(System.Collections.Generic.IEnumerable{`0},System.Int32@)">
|
||||
<summary>
|
||||
Count the elements in the given collection and determine both the total
|
||||
count and how many of the elements that are present in the current set.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.AsSet(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Cast the given collection to an ISet<T> if possible. If not,
|
||||
return a new set containing the items.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Unlink(Iesi.Collections.Generic.LinkedHashSet{`0}.LinkedHashNode{`0})">
|
||||
<summary>
|
||||
Unlink a node from the linked list by updating the node pointers in
|
||||
its preceeding and subsequent node. Also update the _first and _last
|
||||
pointers if necessary.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.Count">
|
||||
<summary>
|
||||
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#ICollection{T}#IsReadOnly">
|
||||
<summary>
|
||||
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="T:Iesi.Collections.Generic.ReadOnlySet`1">
|
||||
<summary>
|
||||
<p>Implements a read-only <c>Set</c> wrapper.</p>
|
||||
<p>Although this is advertised as immutable, it really isn't. Anyone with access to the
|
||||
wrapped set can still change the set.</p>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.#ctor(System.Collections.Generic.ISet{`0})">
|
||||
<summary>
|
||||
Constructs an immutable (read-only) <c>Set</c> wrapper.
|
||||
</summary>
|
||||
<param name="basisSet">The <c>Set</c> that is wrapped.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#IEnumerable#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through a collection.
|
||||
</summary>
|
||||
<returns>
|
||||
An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>2</filterpriority>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the collection.
|
||||
</summary>
|
||||
<returns>
|
||||
A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>1</filterpriority>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ICollection{T}#Add(`0)">
|
||||
<summary>
|
||||
Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ICollection{T}#Clear">
|
||||
<summary>
|
||||
Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.Contains(`0)">
|
||||
<summary>
|
||||
Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.CopyTo(`0[],System.Int32)">
|
||||
<summary>
|
||||
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
|
||||
</summary>
|
||||
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ICollection{T}#Remove(`0)">
|
||||
<summary>
|
||||
Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#Add(`0)">
|
||||
<summary>
|
||||
Adds an element to the current set and returns a value to indicate if the element was successfully added.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the element is added to the set; false if the element is already in the set.
|
||||
</returns>
|
||||
<param name="item">The element to add to the set.</param>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#UnionWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#IntersectWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are also in a specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#ExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Removes all elements in the specified collection from the current set.
|
||||
</summary>
|
||||
<param name="other">The collection of items to remove from the set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#SymmetricExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
<exception cref="T:System.NotSupportedException"> is always thrown</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.IsSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether a set is a subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.IsSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.IsProperSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a correct superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the <see cref="T:System.Collections.Generic.ISet`1"/> object is a correct superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set. </param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.IsProperSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a property (strict) subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a correct subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.Overlaps(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set overlaps with the specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set and <paramref name="other"/> share at least one common element; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.SetEquals(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set and the specified collection contain the same elements.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is equal to <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.Count">
|
||||
<summary>
|
||||
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.IsReadOnly">
|
||||
<summary>
|
||||
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
|
||||
</summary>
|
||||
<returns>
|
||||
True.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="T:Iesi.Collections.Generic.SynchronizedSet`1">
|
||||
<summary>
|
||||
<p>Implements a thread-safe <c>Set</c> wrapper. The implementation is extremely conservative,
|
||||
serializing critical sections to prevent possible deadlocks, and locking on everything.
|
||||
The one exception is for enumeration, which is inherently not thread-safe. For this, you
|
||||
have to <c>lock</c> the <c>SyncRoot</c> object for the duration of the enumeration.</p>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.#ctor(System.Collections.Generic.ISet{`0})">
|
||||
<summary>
|
||||
Constructs a thread-safe <c>ISet</c> wrapper.
|
||||
</summary>
|
||||
<param name="basisSet">The <c>Set</c> object that this object will wrap.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.System#Collections#Generic#ICollection{T}#Add(`0)">
|
||||
<summary>
|
||||
Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Clear">
|
||||
<summary>
|
||||
Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. </exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Contains(`0)">
|
||||
<summary>
|
||||
Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.CopyTo(`0[],System.Int32)">
|
||||
<summary>
|
||||
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
|
||||
</summary>
|
||||
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Remove(`0)">
|
||||
<summary>
|
||||
Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.IntersectWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are also in a specified collection.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.ExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Removes all elements in the specified collection from the current set.
|
||||
</summary>
|
||||
<param name="other">The collection of items to remove from the set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.SymmetricExceptWith(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.
|
||||
</summary>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.IsSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether a set is a subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.IsSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.IsProperSupersetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a correct superset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the <see cref="T:System.Collections.Generic.ISet`1"/> object is a correct superset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set. </param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.IsProperSubsetOf(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set is a property (strict) subset of a specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is a correct subset of <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Overlaps(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set overlaps with the specified collection.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set and <paramref name="other"/> share at least one common element; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.SetEquals(System.Collections.Generic.IEnumerable{`0})">
|
||||
<summary>
|
||||
Determines whether the current set and the specified collection contain the same elements.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the current set is equal to <paramref name="other"/>; otherwise, false.
|
||||
</returns>
|
||||
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Add(`0)">
|
||||
<summary>
|
||||
Adds an element to the current set and returns a value to indicate if the element was successfully added.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the element is added to the set; false if the element is already in the set.
|
||||
</returns>
|
||||
<param name="item">The element to add to the set.</param>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.System#Collections#IEnumerable#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through a collection. Enumeration is inherently not
|
||||
thread-safe. Use a <c>lock</c> on the <c>SyncRoot</c> to synchronize the entire enumeration process.
|
||||
</summary>
|
||||
<returns>
|
||||
An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>2</filterpriority>
|
||||
</member>
|
||||
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the collection. Enumeration is inherently not
|
||||
thread-safe. Use a <c>lock</c> on the <c>SyncRoot</c> to synchronize the entire enumeration process.
|
||||
</summary>
|
||||
<returns>
|
||||
A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
|
||||
</returns>
|
||||
<filterpriority>1</filterpriority>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.Count">
|
||||
<summary>
|
||||
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</summary>
|
||||
<returns>
|
||||
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.IsReadOnly">
|
||||
<summary>
|
||||
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
|
||||
</summary>
|
||||
<returns>
|
||||
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
|
||||
</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
e4ab36b7b0030299e8d3f9c15f8edfab217c00c33b5d908f61099287ac9a64d6
|
||||
@@ -1,17 +0,0 @@
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Events.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Events.pdb
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Common.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Iesi.Collections.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\MySql.Data.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\NHibernate.dll
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Common.pdb
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.pdb
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.xml
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\Iesi.Collections.xml
|
||||
C:\Users\micha\git\tbf\Events\bin\Debug\NHibernate.xml
|
||||
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.AssemblyReference.cache
|
||||
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.CoreCompileInputs.cache
|
||||
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.Up2Date
|
||||
C:\Users\micha\git\tbf\Events\obj\Debug\Events.dll
|
||||
C:\Users\micha\git\tbf\Events\obj\Debug\Events.pdb
|
||||
Binary file not shown.
Binary file not shown.
@@ -49,7 +49,7 @@
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -38,8 +38,8 @@
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
@@ -62,7 +62,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Config\Config.csproj">
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -48,8 +48,8 @@
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -49,8 +49,8 @@
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net40" />
|
||||
<package id="Iesi.Collections" version="4.0.0.4000" targetFramework="net40" />
|
||||
<package id="NHibernate" version="4.0.4.4000" targetFramework="net40" />
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -34,8 +34,8 @@
|
||||
<Reference Include="Gma.QrCodeNet.Encoding">
|
||||
<HintPath>..\packages\QrCode.Net.0.4.0.0\net40\Gma.QrCodeNet.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -181,18 +181,6 @@ namespace Results.Entities
|
||||
return WaterMeters.Count - PassedMetersCount();
|
||||
}
|
||||
|
||||
|
||||
public virtual int PassedMetersCountE15()
|
||||
{
|
||||
int count = 0;
|
||||
foreach (var mtr in WaterMeters) if (mtr.PassedFromTestsE15()) count++;
|
||||
return count;
|
||||
}
|
||||
public virtual int FailedMetersCountE15()
|
||||
{
|
||||
return WaterMeters.Count - PassedMetersCountE15();
|
||||
}
|
||||
|
||||
public virtual long ErrorFlags()
|
||||
{
|
||||
long result = 0;
|
||||
|
||||
@@ -29,12 +29,8 @@ namespace Results.Entities
|
||||
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
||||
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
#if IPERL
|
||||
public virtual int CalibFactor { get; set; }
|
||||
public virtual int CalibFactorLNA { get; set; }
|
||||
public virtual int Q2CorrRL { get; set; }
|
||||
public virtual int Q2CorrLR { get; set; }
|
||||
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
|
||||
public virtual float X1 { get; set; }
|
||||
public virtual float X2 { get; set; }
|
||||
@@ -170,10 +166,6 @@ namespace Results.Entities
|
||||
TestDone = src.TestDone;
|
||||
Passed = src.Passed;
|
||||
#if IPERL
|
||||
CalibFactor = src.CalibFactor;
|
||||
CalibFactorLNA = src.CalibFactorLNA;
|
||||
Q2CorrRL = src.Q2CorrRL;
|
||||
Q2CorrLR = src.Q2CorrLR;
|
||||
ExtraDataPath = src.ExtraDataPath;
|
||||
X1 = src.X1;
|
||||
X2 = src.X2;
|
||||
@@ -217,10 +209,6 @@ namespace Results.Entities
|
||||
writer.Write(TestDone);
|
||||
writer.Write(Passed);
|
||||
#if IPERL
|
||||
writer.Write(CalibFactor);
|
||||
writer.Write(CalibFactorLNA);
|
||||
writer.Write(Q2CorrRL);
|
||||
writer.Write(Q2CorrLR);
|
||||
writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty);
|
||||
writer.Write(X1);
|
||||
writer.Write(X2);
|
||||
@@ -261,10 +249,6 @@ namespace Results.Entities
|
||||
TestDone = reader.ReadBoolean();
|
||||
Passed = reader.ReadBoolean();
|
||||
#if IPERL
|
||||
CalibFactor = reader.ReadInt32();
|
||||
CalibFactorLNA = reader.ReadInt32();
|
||||
Q2CorrRL = reader.ReadInt32();
|
||||
Q2CorrLR = reader.ReadInt32();
|
||||
ExtraDataPath = reader.ReadString();
|
||||
X1 = reader.ReadSingle();
|
||||
X2 = reader.ReadSingle();
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class PurchaseBox
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string BoxNo { get; set; }
|
||||
|
||||
public virtual PurchaseOrder PurchaseOrder { get; set; }
|
||||
public virtual IList<PurchaseWaterMeterData> PurchaseWaterMeterDataList { get; set; }
|
||||
|
||||
public PurchaseBox()
|
||||
{
|
||||
PurchaseWaterMeterDataList = new List<PurchaseWaterMeterData>();
|
||||
}
|
||||
|
||||
public PurchaseBox(string boxNo, PurchaseOrder purchaseOrder)
|
||||
{
|
||||
PurchaseWaterMeterDataList = new List<PurchaseWaterMeterData>();
|
||||
BoxNo = boxNo;
|
||||
PurchaseOrder = purchaseOrder;
|
||||
}
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="boxNo"></param>
|
||||
/// <param name="boxDataId">unused now</param>
|
||||
/// <param name="purchaseOrder"></param>
|
||||
public PurchaseBox(string boxNo, int boxDataId, PurchaseOrder purchaseOrder)
|
||||
{
|
||||
PurchaseWaterMeterDataList = new List<PurchaseWaterMeterData>();
|
||||
BoxNo = boxNo;
|
||||
PurchaseOrder = purchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
insert into 'wrcswindon298-r'.purchase_orderdata (Id, PurchaseOrder)
|
||||
values (1, 'Order 123'),
|
||||
(2, 'Order 124'),
|
||||
(3, 'Order 125');
|
||||
|
||||
insert into 'wrcswindon298-r'.purchase_boxdata (Id, BoxNo, PurchaseOrderId)
|
||||
values (2, 'B 001', 3),
|
||||
(3, 'B 002', 2),
|
||||
(4, 'B 003', 1),
|
||||
(5, 'B 011', 3),
|
||||
(6, 'B 012', 2),
|
||||
(7, 'B 013', 1);
|
||||
|
||||
insert into 'wrcswindon298-r'.purchase_watermeterdata (Id, SerialNo, WaterMeterData_id, PurchaseBoxId)
|
||||
values (2, 'SN-123456-1', null, 2),
|
||||
(3, 'SN_123456-2', null, 2),
|
||||
(4, 'SN_123456-3', null, 2),
|
||||
(5, 'SN_123456-4', null, 2),
|
||||
(6, 'SN_132456-5', null, 2),
|
||||
(7, 'SN_123456-6', null, 2),
|
||||
(8, 'SN-123457-1', null, 5),
|
||||
(9, 'SN_123457-2', null, 5),
|
||||
(10, 'SN_123457-3', null, 5),
|
||||
(11, 'SN_123457-4', null, 5),
|
||||
(12, 'SN_132457-5', null, 5),
|
||||
(13, 'SN_123457-6', null, 5),
|
||||
(14, 'SN-1234-1', null, 2),
|
||||
(15, 'SN_1234-2', null, 3),
|
||||
(16, 'SN_1234-3', null, 4),
|
||||
(17, 'SN_1234-4', null, 5),
|
||||
(18, 'SN_1324-5', null, 6),
|
||||
(19, 'SN_1234-6', null, 7);
|
||||
@@ -1,41 +0,0 @@
|
||||
create table purchase_orderdata
|
||||
(
|
||||
Id int auto_increment
|
||||
primary key,
|
||||
PurchaseOrder varchar(255) null
|
||||
);
|
||||
|
||||
create table purchase_boxdata
|
||||
(
|
||||
Id int auto_increment
|
||||
primary key,
|
||||
BoxNo varchar(255) null,
|
||||
PurchaseOrderId int null comment 'index to Purchase order',
|
||||
constraint purchase_boxdata_toOrder___fk
|
||||
foreign key (PurchaseOrderId) references purchase_orderdata (Id)
|
||||
);
|
||||
|
||||
create index idx_boxdata_boxNo
|
||||
on purchase_boxdata (BoxNo);
|
||||
|
||||
create index idx_orderdata_purchaseOrder
|
||||
on purchase_orderdata (PurchaseOrder);
|
||||
|
||||
create table purchase_watermeterdata
|
||||
(
|
||||
Id int auto_increment
|
||||
primary key,
|
||||
SerialNo varchar(255) null,
|
||||
WaterMeterData_id int null,
|
||||
PurchaseBoxId int null,
|
||||
constraint UKgcnskfro3he4kwysdeldnvubf
|
||||
unique (WaterMeterData_id),
|
||||
constraint FKc376smwypchilry1au44u2uj6
|
||||
foreign key (WaterMeterData_id) references watermeter (Id),
|
||||
constraint purchase_watermeterdata_purchase_boxdata_Id_fk
|
||||
foreign key (PurchaseBoxId) references purchase_boxdata (Id)
|
||||
);
|
||||
|
||||
create index idx_watermeterdata_serialNo
|
||||
on purchase_watermeterdata (SerialNo);
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class PurchaseOrder
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual IList<PurchaseBox> PurchaseBoxList { get; set; }
|
||||
|
||||
public PurchaseOrder()
|
||||
{
|
||||
PurchaseBoxList = new List<PurchaseBox>();
|
||||
}
|
||||
|
||||
public PurchaseOrder(string name)
|
||||
{
|
||||
PurchaseBoxList = new List<PurchaseBox>();
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class PurchaseWaterMeterData
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string SerialNo { get; set; }
|
||||
public virtual PurchaseBox PurchaseBoxId { get; set; }
|
||||
public virtual int WaterMeterResults { get; set; }
|
||||
|
||||
public PurchaseWaterMeterData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PurchaseWaterMeterData(string serialNo, PurchaseBox purchaseBox)
|
||||
{
|
||||
SerialNo = serialNo;
|
||||
PurchaseBoxId = purchaseBox;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
@@ -247,17 +246,10 @@ namespace Results.Entities
|
||||
public virtual float TempLimHi() { return TestData.TempLimHi; }
|
||||
public virtual bool Evaluate() { return TestData.Evaluate; }
|
||||
public virtual Publish Publish() { return (Publish)TestData.Publish; }
|
||||
|
||||
public virtual bool TestCollected { get; set; } /// Not mapped to DB - just help method to Collect
|
||||
public virtual bool TestMeasured { get; set; } /// Not mapped to DB - just help method to Collect
|
||||
|
||||
|
||||
|
||||
public TestRslt()
|
||||
{
|
||||
TestCollected = false;
|
||||
TestMeasured = false;
|
||||
|
||||
MethodClass = string.Empty;
|
||||
Remark = string.Empty;
|
||||
}
|
||||
@@ -398,9 +390,6 @@ namespace Results.Entities
|
||||
Counter3 = src.Counter3;
|
||||
Counter4 = src.Counter4;
|
||||
Counter5 = src.Counter5;
|
||||
|
||||
TestCollected = src.TestCollected;
|
||||
TestMeasured = src.TestMeasured;
|
||||
}
|
||||
|
||||
/// <summary> Wrapper </summary>
|
||||
@@ -439,7 +428,7 @@ namespace Results.Entities
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84} TestMeasured={85} TestCollected={86}",
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, Qdetected, Flow,
|
||||
@@ -455,7 +444,7 @@ namespace Results.Entities
|
||||
TempDivMean, TempDivStart, TempDivEnd, TempDivMin, TempDivMax,
|
||||
FlowMean, FlowStart, FlowEnd, FlowMin, FlowMax,
|
||||
Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10,
|
||||
DiverterStart, DiverterEnd, TestMeasured, TestCollected);
|
||||
DiverterStart, DiverterEnd);
|
||||
}
|
||||
|
||||
|
||||
@@ -597,8 +586,6 @@ namespace Results.Entities
|
||||
writer.Write(Counter3);
|
||||
writer.Write(Counter4);
|
||||
writer.Write(Counter5);
|
||||
writer.Write(TestMeasured);
|
||||
writer.Write(TestCollected);
|
||||
}
|
||||
|
||||
public virtual void ReadBinary(BinaryReader reader, IList<TestData> testDatas)
|
||||
@@ -740,8 +727,6 @@ namespace Results.Entities
|
||||
Counter3 = reader.ReadInt32();
|
||||
Counter4 = reader.ReadInt32();
|
||||
Counter5 = reader.ReadInt32();
|
||||
TestMeasured = reader.ReadBoolean();
|
||||
TestCollected = reader.ReadBoolean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,12 +189,6 @@ namespace Results.Entities
|
||||
{
|
||||
return ErrorFlagsFromTests() | ErrorFlags;
|
||||
}
|
||||
|
||||
public virtual long ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask errorFlagsQuestion)
|
||||
{
|
||||
long errorFlagsMask = (long)errorFlagsQuestion;
|
||||
return ErrorFlagsFromTests() & errorFlagsMask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert combined errorFlags of all tests to string
|
||||
@@ -276,24 +270,6 @@ namespace Results.Entities
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
public virtual bool PassedFromTestsE15()
|
||||
{
|
||||
//TODO BUMI this will just let us is E15
|
||||
bool passed = (ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask.E15) == 0);
|
||||
|
||||
//TODO BUMI Check This may be not needed ?
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.Evaluate() && (!mtr.TestDone))
|
||||
{
|
||||
passed = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Three state test results and/or water meter result (Algeria PT25 requirement).
|
||||
|
||||
@@ -349,8 +349,6 @@ namespace Results
|
||||
Pulses_main, /// 295 Compound main meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
||||
Pulses_aux, /// 296 Compound aux meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
||||
|
||||
Failed_meters_countE15, /// 297
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
public class PurchaseBoxMap : ClassMap<PurchaseBox>
|
||||
{
|
||||
public PurchaseBoxMap()
|
||||
{
|
||||
Table("purchase_boxdata");
|
||||
Id(x => x.Id);
|
||||
Map(x => x.BoxNo);
|
||||
|
||||
// Map the foreign key to PurchaseOrder correctly
|
||||
References(x => x.PurchaseOrder)
|
||||
.Column("PurchaseOrderId") // Replace this with the correct column name
|
||||
.Not.Nullable();
|
||||
|
||||
|
||||
HasMany(x => x.PurchaseWaterMeterDataList)
|
||||
.Cascade.All()
|
||||
.KeyColumn("PurchaseBoxId") // This should match the foreign key in `purchase_boxdata`
|
||||
.Inverse() // This is important if `PurchaseBox` holds the foreign key
|
||||
.LazyLoad(); // Optional: Depends on your performance needs
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
public class PurchaseOrderMap : ClassMap<PurchaseOrder>
|
||||
{
|
||||
public PurchaseOrderMap()
|
||||
{
|
||||
Table("purchase_orderdata");
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Name).Column("PurchaseOrder");
|
||||
|
||||
HasMany(x => x.PurchaseBoxList)
|
||||
.Cascade.All()
|
||||
.KeyColumn("PurchaseOrderId") // This should match the foreign key in `purchase_boxdata`
|
||||
.Inverse() // This is important if `PurchaseBox` holds the foreign key
|
||||
.LazyLoad(); // Optional: Depends on your performance needs
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
public class PurchaseWaterMeterDataMap : ClassMap<PurchaseWaterMeterData>
|
||||
{
|
||||
public PurchaseWaterMeterDataMap()
|
||||
{
|
||||
Table("purchase_watermeterdata");
|
||||
Id(x => x.Id);
|
||||
Map(x => x.SerialNo);
|
||||
|
||||
// Map the foreign key to PurchaseOrder correctly
|
||||
References(x => x.PurchaseBoxId)
|
||||
.Column("PurchaseBoxId") // Replace this with the correct column name
|
||||
.Not.Nullable();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user