Statistics project added, ver. 2.18.1088

This commit is contained in:
Milan Hanajik 2018-12-10 21:17:00 +01:00
parent 9417415781
commit 695cca6509
24 changed files with 2530 additions and 0 deletions

2
.gitignore vendored
View File

@ -14,6 +14,8 @@ Results/bin/
Results/obj/
ResultsBrowser/bin/
ResultsBrowser/obj/
Statistics/bin/
Statistics/obj/
TBF/bin/
TBF/obj/
TBFSetup/Debug/

21
Statistics/Program.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Statistics
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new StatisticsDlg());
}
}
}

View File

@ -0,0 +1,36 @@
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("Statistics")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Statistics")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[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("9e674819-ed89-4d9a-a4e8-3bf2cc69cfc2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.18.1088.0")]
[assembly: AssemblyFileVersion("2.18.1088.0")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <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 Statistics.Properties {
using System;
/// <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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Statistics.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;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?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>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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 Statistics.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.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;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?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>

117
Statistics/Resources/Strings.Designer.cs generated Normal file
View File

@ -0,0 +1,117 @@
//------------------------------------------------------------------------------
// <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 Statistics.Resources {
using System;
/// <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 Strings {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Strings() {
}
/// <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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Statistics.Resources.Strings", typeof(Strings).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;
}
}
/// <summary>
/// Looks up a localized string similar to Flow.
/// </summary>
internal static string Flow {
get {
return ResourceManager.GetString("Flow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to From.
/// </summary>
internal static string From {
get {
return ResourceManager.GetString("From", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Statistics.
/// </summary>
internal static string Statistics {
get {
return ResourceManager.GetString("Statistics", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Time period.
/// </summary>
internal static string Time_period {
get {
return ResourceManager.GetString("Time_period", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to To.
/// </summary>
internal static string To {
get {
return ResourceManager.GetString("To", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Water meters.
/// </summary>
internal static string Water_meters {
get {
return ResourceManager.GetString("Water_meters", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Flow" xml:space="preserve">
<value>Flow</value>
</data>
<data name="From" xml:space="preserve">
<value>From</value>
</data>
<data name="Statistics" xml:space="preserve">
<value>Statistics</value>
</data>
<data name="Time_period" xml:space="preserve">
<value>Time period</value>
</data>
<data name="To" xml:space="preserve">
<value>To</value>
</data>
<data name="Water_meters" xml:space="preserve">
<value>Water meters</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Flow" xml:space="preserve">
<value>Prietok</value>
</data>
<data name="From" xml:space="preserve">
<value>Od</value>
</data>
<data name="Statistics" xml:space="preserve">
<value>Štatistiky</value>
</data>
<data name="Time_period" xml:space="preserve">
<value>Časový úsek</value>
</data>
<data name="To" xml:space="preserve">
<value>Do</value>
</data>
<data name="Water_meters" xml:space="preserve">
<value>Vodomery</value>
</data>
</root>

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Statistics</RootNamespace>
<AssemblyName>Statistics</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</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|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections">
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="NHibernate">
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<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.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Resources\Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="StatisticsDlg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="StatisticsDlg.Designer.cs">
<DependentUpon>StatisticsDlg.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UserControls\Enums.cs" />
<Compile Include="UserControls\MidOrWaterMetersCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UserControls\MidOrWaterMetersCtrl.Designer.cs">
<DependentUpon>MidOrWaterMetersCtrl.cs</DependentUpon>
</Compile>
<Compile Include="UserControls\StatisticsCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UserControls\StatisticsCtrl.Designer.cs">
<DependentUpon>StatisticsCtrl.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Resources\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.sk.resx" />
<EmbeddedResource Include="StatisticsDlg.resx">
<DependentUpon>StatisticsDlg.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>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="UserControls\MidOrWaterMetersCtrl.resx">
<DependentUpon>MidOrWaterMetersCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserControls\StatisticsCtrl.resx">
<DependentUpon>StatisticsCtrl.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.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>
<ProjectReference Include="..\Results\Results.csproj">
<Project>{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}</Project>
<Name>Results</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

294
Statistics/StatisticsDlg.Designer.cs generated Normal file
View File

@ -0,0 +1,294 @@
namespace Statistics
{
partial class StatisticsDlg
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.timePeriodGroupBox = new System.Windows.Forms.GroupBox();
this.timePeriodCheckBox = new System.Windows.Forms.CheckBox();
this.toLabel1 = new System.Windows.Forms.Label();
this.fromLabel1 = new System.Windows.Forms.Label();
this.dateTimeFromPicker = new System.Windows.Forms.DateTimePicker();
this.dateTimeToPicker = new System.Windows.Forms.DateTimePicker();
this.midsTabControl = new System.Windows.Forms.TabControl();
this.wr10TabPage = new System.Windows.Forms.TabPage();
this.wr11TabPage = new System.Windows.Forms.TabPage();
this.wr13TabPage = new System.Windows.Forms.TabPage();
this.wr14TabPage = new System.Windows.Forms.TabPage();
this.wr15TabPage = new System.Windows.Forms.TabPage();
this.wmsBenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.i1BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.i2BbenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.i3BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.i4BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.timePeriodGroupBox.SuspendLayout();
this.midsTabControl.SuspendLayout();
this.wr10TabPage.SuspendLayout();
this.wr11TabPage.SuspendLayout();
this.wr13TabPage.SuspendLayout();
this.wr14TabPage.SuspendLayout();
this.wr15TabPage.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.timePeriodGroupBox);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.midsTabControl);
this.splitContainer1.Size = new System.Drawing.Size(1368, 826);
this.splitContainer1.SplitterDistance = 90;
this.splitContainer1.TabIndex = 0;
//
// timePeriodGroupBox
//
this.timePeriodGroupBox.Controls.Add(this.timePeriodCheckBox);
this.timePeriodGroupBox.Controls.Add(this.toLabel1);
this.timePeriodGroupBox.Controls.Add(this.fromLabel1);
this.timePeriodGroupBox.Controls.Add(this.dateTimeFromPicker);
this.timePeriodGroupBox.Controls.Add(this.dateTimeToPicker);
this.timePeriodGroupBox.Location = new System.Drawing.Point(12, 10);
this.timePeriodGroupBox.Name = "timePeriodGroupBox";
this.timePeriodGroupBox.Size = new System.Drawing.Size(296, 74);
this.timePeriodGroupBox.TabIndex = 2;
this.timePeriodGroupBox.TabStop = false;
//
// timePeriodCheckBox
//
this.timePeriodCheckBox.AutoSize = true;
this.timePeriodCheckBox.Location = new System.Drawing.Point(6, -2);
this.timePeriodCheckBox.Name = "timePeriodCheckBox";
this.timePeriodCheckBox.Size = new System.Drawing.Size(81, 17);
this.timePeriodCheckBox.TabIndex = 4;
this.timePeriodCheckBox.Text = "Time period";
this.timePeriodCheckBox.UseVisualStyleBackColor = true;
this.timePeriodCheckBox.CheckedChanged += new System.EventHandler(this.timePeriodCheckBox_CheckedChanged);
//
// toLabel1
//
this.toLabel1.AutoSize = true;
this.toLabel1.Location = new System.Drawing.Point(31, 48);
this.toLabel1.Name = "toLabel1";
this.toLabel1.Size = new System.Drawing.Size(20, 13);
this.toLabel1.TabIndex = 3;
this.toLabel1.Text = "To";
//
// fromLabel1
//
this.fromLabel1.AutoSize = true;
this.fromLabel1.Location = new System.Drawing.Point(31, 23);
this.fromLabel1.Name = "fromLabel1";
this.fromLabel1.Size = new System.Drawing.Size(30, 13);
this.fromLabel1.TabIndex = 2;
this.fromLabel1.Text = "From";
//
// dateTimeFromPicker
//
this.dateTimeFromPicker.Location = new System.Drawing.Point(81, 19);
this.dateTimeFromPicker.Name = "dateTimeFromPicker";
this.dateTimeFromPicker.Size = new System.Drawing.Size(200, 20);
this.dateTimeFromPicker.TabIndex = 0;
//
// dateTimeToPicker
//
this.dateTimeToPicker.Location = new System.Drawing.Point(81, 44);
this.dateTimeToPicker.Name = "dateTimeToPicker";
this.dateTimeToPicker.Size = new System.Drawing.Size(200, 20);
this.dateTimeToPicker.TabIndex = 1;
//
// midsTabControl
//
this.midsTabControl.Controls.Add(this.wr10TabPage);
this.midsTabControl.Controls.Add(this.wr11TabPage);
this.midsTabControl.Controls.Add(this.wr13TabPage);
this.midsTabControl.Controls.Add(this.wr14TabPage);
this.midsTabControl.Controls.Add(this.wr15TabPage);
this.midsTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.midsTabControl.Location = new System.Drawing.Point(0, 0);
this.midsTabControl.Name = "midsTabControl";
this.midsTabControl.SelectedIndex = 0;
this.midsTabControl.Size = new System.Drawing.Size(1368, 732);
this.midsTabControl.TabIndex = 0;
//
// wr10TabPage
//
this.wr10TabPage.Controls.Add(this.wmsBenchesControl);
this.wr10TabPage.Location = new System.Drawing.Point(4, 22);
this.wr10TabPage.Name = "wr10TabPage";
this.wr10TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr10TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr10TabPage.TabIndex = 0;
this.wr10TabPage.Text = "Water meters";
this.wr10TabPage.UseVisualStyleBackColor = true;
//
// wr11TabPage
//
this.wr11TabPage.Controls.Add(this.i1BenchesControl);
this.wr11TabPage.Location = new System.Drawing.Point(4, 22);
this.wr11TabPage.Name = "wr11TabPage";
this.wr11TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr11TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr11TabPage.TabIndex = 1;
this.wr11TabPage.Text = "I1";
this.wr11TabPage.UseVisualStyleBackColor = true;
//
// wr13TabPage
//
this.wr13TabPage.Controls.Add(this.i2BbenchesControl);
this.wr13TabPage.Location = new System.Drawing.Point(4, 22);
this.wr13TabPage.Name = "wr13TabPage";
this.wr13TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr13TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr13TabPage.TabIndex = 2;
this.wr13TabPage.Text = "I2";
this.wr13TabPage.UseVisualStyleBackColor = true;
//
// wr14TabPage
//
this.wr14TabPage.Controls.Add(this.i3BenchesControl);
this.wr14TabPage.Location = new System.Drawing.Point(4, 22);
this.wr14TabPage.Name = "wr14TabPage";
this.wr14TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr14TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr14TabPage.TabIndex = 3;
this.wr14TabPage.Text = "I3";
this.wr14TabPage.UseVisualStyleBackColor = true;
//
// wr15TabPage
//
this.wr15TabPage.Controls.Add(this.i4BenchesControl);
this.wr15TabPage.Location = new System.Drawing.Point(4, 22);
this.wr15TabPage.Name = "wr15TabPage";
this.wr15TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr15TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr15TabPage.TabIndex = 4;
this.wr15TabPage.Text = "I4";
this.wr15TabPage.UseVisualStyleBackColor = true;
//
// wmsBenchesControl
//
this.wmsBenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wmsBenchesControl.Location = new System.Drawing.Point(3, 3);
this.wmsBenchesControl.Name = "wmsBenchesControl";
this.wmsBenchesControl.Size = new System.Drawing.Size(1354, 700);
this.wmsBenchesControl.TabIndex = 0;
//
// i1BenchesControl
//
this.i1BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i1BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i1BenchesControl.Name = "i1BenchesControl";
this.i1BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i1BenchesControl.TabIndex = 0;
//
// i2BbenchesControl
//
this.i2BbenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i2BbenchesControl.Location = new System.Drawing.Point(3, 3);
this.i2BbenchesControl.Name = "i2BbenchesControl";
this.i2BbenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i2BbenchesControl.TabIndex = 0;
//
// i3BenchesControl
//
this.i3BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i3BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i3BenchesControl.Name = "i3BenchesControl";
this.i3BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i3BenchesControl.TabIndex = 0;
//
// i4BenchesControl
//
this.i4BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i4BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i4BenchesControl.Name = "i4BenchesControl";
this.i4BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i4BenchesControl.TabIndex = 0;
//
// StatisticsDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1368, 826);
this.Controls.Add(this.splitContainer1);
this.Name = "StatisticsDlg";
this.Text = "Statistics";
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.timePeriodGroupBox.ResumeLayout(false);
this.timePeriodGroupBox.PerformLayout();
this.midsTabControl.ResumeLayout(false);
this.wr10TabPage.ResumeLayout(false);
this.wr11TabPage.ResumeLayout(false);
this.wr13TabPage.ResumeLayout(false);
this.wr14TabPage.ResumeLayout(false);
this.wr15TabPage.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TabControl midsTabControl;
private System.Windows.Forms.TabPage wr10TabPage;
private System.Windows.Forms.TabPage wr11TabPage;
private System.Windows.Forms.TabPage wr13TabPage;
private System.Windows.Forms.TabPage wr14TabPage;
private System.Windows.Forms.TabPage wr15TabPage;
private System.Windows.Forms.GroupBox timePeriodGroupBox;
private System.Windows.Forms.DateTimePicker dateTimeFromPicker;
private System.Windows.Forms.DateTimePicker dateTimeToPicker;
private System.Windows.Forms.Label toLabel1;
private System.Windows.Forms.Label fromLabel1;
private System.Windows.Forms.CheckBox timePeriodCheckBox;
private UserControls.MidOrWaterMetersCtrl wmsBenchesControl;
private UserControls.MidOrWaterMetersCtrl i1BenchesControl;
private UserControls.MidOrWaterMetersCtrl i2BbenchesControl;
private UserControls.MidOrWaterMetersCtrl i3BenchesControl;
private UserControls.MidOrWaterMetersCtrl i4BenchesControl;
}
}

162
Statistics/StatisticsDlg.cs Normal file
View File

@ -0,0 +1,162 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NHibernate;
using FluentNHibernate;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using Results;
using Results.Entities;
using Statistics.Resources;
using Statistics.UserControls;
namespace Statistics
{
public partial class StatisticsDlg : Form
{
static string[] testBenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
///
#if false
static string[] connectionStrings = new string[] {
"SERVER=10.42.128.197; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR10
"SERVER=10.42.128.98; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR11
"SERVER=10.42.128.152; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR13
"SERVER=10.42.128.143; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR14
"SERVER=10.42.128.63; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR15
"" /// PT7
};
#else
static string[] connectionStrings = new string[] {
"SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR10
"SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR11
"SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR13
"SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR14
"SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR15
"" /// PT7
};
#endif
///
static ISessionFactory[] sessionFactories = new ISessionFactory[6];
public StatisticsDlg()
{
InitializeComponent();
ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
for (MidId midId = 0; midId < MidId.Count; midId++)
{
int i = (int)midId;
midsTabControl.TabPages[i].Text = midId.ToString();
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).MidId = midId;
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Parent = this;
}
midsTabControl.TabPages[0].Text = Strings.Water_meters;
Localize();
}
void Localize()
{
Text = Strings.Statistics;
timePeriodCheckBox.Text = Strings.Time_period;
fromLabel1.Text = Strings.From;
toLabel1.Text = Strings.To;
}
private void StatisticsDlg_Load(object sender, EventArgs e)
{
for (int i = 0; i < testBenchNames.Length; i++)
{
if ((i < connectionStrings.Length) && !string.IsNullOrEmpty(connectionStrings[i]))
{
sessionFactories[i] = null;
try
{
sessionFactories[i] = Fluently.Configure()
.Database(MySQLConfiguration.Standard.ConnectionString(connectionStrings[i]))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Results.Entities.Batch>())
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
}
catch (Exception)
{
MessageBox.Show(string.Format("Cannot open one of database of {0}", testBenchNames[i]), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
void BuildSchema(NHibernate.Cfg.Configuration config)
{
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
new NHibernate.Tool.hbm2ddl.SchemaExport(config).SetOutputFile("db_schema");
}
private void ManageCheckGroupBox(CheckBox chk, GroupBox grp)
{
/// Make sure the CheckBox isn't in the GroupBox. This will only happen the first time.
if (chk.Parent == grp)
{
grp.Parent.Controls.Add(chk); /// Reparent the CheckBox so it's not in the GroupBox.
chk.Location = new Point(chk.Left + grp.Left, chk.Top + grp.Top); /// Adjust the CheckBox's location.
chk.BringToFront(); /// Move the CheckBox to the top of the stacking order.
}
/// Enable or disable the GroupBox.
grp.Enabled = chk.Checked;
}
private void timePeriodCheckBox_CheckedChanged(object sender, EventArgs e)
{
ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
}
public void UpdateRequest(int benchId, MidId midId)
{
if (benchId >= sessionFactories.Length || sessionFactories[benchId] == null || (midId == MidId.WaterMeters))
{
if (midId == MidId.WaterMeters)
{
MessageBox.Show("Loading statistics of water meters is not implemented yet");
}
else
{
MessageBox.Show(string.Format("Cannot load statistics of {0}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY"));
}
return;
}
try
{
ISession session = sessionFactories[benchId].OpenSession();
var listOfComponentsWithFlowmeter = session.QueryOver<Components>()
.Where(x => (x.Flowmeter == midId.ToString()))
.List();
IList<TestRslt> testRslts = new List<TestRslt>();
foreach (var cmpnts in listOfComponentsWithFlowmeter)
{
var listOfRslts = session.QueryOver<TestRslt>()
.Where(x => ((x.EndTime >= dateTimeFromPicker.Value) && (x.EndTime <= dateTimeToPicker.Value)))
.And(x => (x.Components == cmpnts))
.List();
foreach (var tr in listOfRslts) testRslts.Add(tr);
}
session.Close();
}
catch (Exception exc)
{
MessageBox.Show(string.Format("Error loading statistics of {0}\r\n{1}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY", exc.Message));
}
}
}
}

View File

@ -0,0 +1,120 @@
<?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>

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Statistics.UserControls
{
public enum MidId
{
/// When converted to 'int' it's the MID number, 0 = water meters
WaterMeters,
I1,
I2,
I3,
I4,
Count
}
}

View File

@ -0,0 +1,619 @@
namespace Statistics.UserControls
{
partial class MidOrWaterMetersCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.flow3GroupBox = new System.Windows.Forms.GroupBox();
this.flow3ToExclamation = new System.Windows.Forms.Label();
this.flow3FromExclamation = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.toLabel4 = new System.Windows.Forms.Label();
this.fromLabel4 = new System.Windows.Forms.Label();
this.flow3ToTextBox = new System.Windows.Forms.TextBox();
this.flow3FromTextBox = new System.Windows.Forms.TextBox();
this.flow3CheckBox = new System.Windows.Forms.CheckBox();
this.flow2GroupBox = new System.Windows.Forms.GroupBox();
this.flow2ToExclamation = new System.Windows.Forms.Label();
this.flow2FromExclamation = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.toLabel3 = new System.Windows.Forms.Label();
this.fromLabel3 = new System.Windows.Forms.Label();
this.flow2ToTextBox = new System.Windows.Forms.TextBox();
this.flow2FromTextBox = new System.Windows.Forms.TextBox();
this.flow2CheckBox = new System.Windows.Forms.CheckBox();
this.flow1GroupBox = new System.Windows.Forms.GroupBox();
this.flow1ToExclamation = new System.Windows.Forms.Label();
this.flow1FromExclamation = new System.Windows.Forms.Label();
this.m3hLabel2 = new System.Windows.Forms.Label();
this.m3hLabel1 = new System.Windows.Forms.Label();
this.toLabel2 = new System.Windows.Forms.Label();
this.fromLabel2 = new System.Windows.Forms.Label();
this.flow1ToTextBox = new System.Windows.Forms.TextBox();
this.flow1FromTextBox = new System.Windows.Forms.TextBox();
this.flow1CheckBox = new System.Windows.Forms.CheckBox();
this.benchesTabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.wr10StatisticsCtrl1 = new Statistics.UserControls.StatisticsCtrl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.wr11StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.wr13StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.wr14StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.wr15StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.pt7StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.flow3GroupBox.SuspendLayout();
this.flow2GroupBox.SuspendLayout();
this.flow1GroupBox.SuspendLayout();
this.benchesTabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
this.tabPage6.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.flow3GroupBox);
this.splitContainer1.Panel1.Controls.Add(this.flow2GroupBox);
this.splitContainer1.Panel1.Controls.Add(this.flow1GroupBox);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.benchesTabControl);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 90;
this.splitContainer1.TabIndex = 0;
//
// flow3GroupBox
//
this.flow3GroupBox.Controls.Add(this.flow3ToExclamation);
this.flow3GroupBox.Controls.Add(this.flow3FromExclamation);
this.flow3GroupBox.Controls.Add(this.label3);
this.flow3GroupBox.Controls.Add(this.label4);
this.flow3GroupBox.Controls.Add(this.toLabel4);
this.flow3GroupBox.Controls.Add(this.fromLabel4);
this.flow3GroupBox.Controls.Add(this.flow3ToTextBox);
this.flow3GroupBox.Controls.Add(this.flow3FromTextBox);
this.flow3GroupBox.Controls.Add(this.flow3CheckBox);
this.flow3GroupBox.Location = new System.Drawing.Point(473, 7);
this.flow3GroupBox.Name = "flow3GroupBox";
this.flow3GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow3GroupBox.TabIndex = 6;
this.flow3GroupBox.TabStop = false;
//
// flow3ToExclamation
//
this.flow3ToExclamation.AutoSize = true;
this.flow3ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow3ToExclamation.Location = new System.Drawing.Point(167, 48);
this.flow3ToExclamation.Name = "flow3ToExclamation";
this.flow3ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow3ToExclamation.TabIndex = 9;
this.flow3ToExclamation.Text = "!";
this.flow3ToExclamation.Visible = false;
//
// flow3FromExclamation
//
this.flow3FromExclamation.AutoSize = true;
this.flow3FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow3FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow3FromExclamation.Name = "flow3FromExclamation";
this.flow3FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow3FromExclamation.TabIndex = 8;
this.flow3FromExclamation.Text = "!";
this.flow3FromExclamation.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(178, 48);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(32, 13);
this.label3.TabIndex = 6;
this.label3.Text = "m3/h";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(177, 23);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 13);
this.label4.TabIndex = 5;
this.label4.Text = "m3/h";
//
// toLabel4
//
this.toLabel4.AutoSize = true;
this.toLabel4.Location = new System.Drawing.Point(14, 48);
this.toLabel4.Name = "toLabel4";
this.toLabel4.Size = new System.Drawing.Size(20, 13);
this.toLabel4.TabIndex = 4;
this.toLabel4.Text = "To";
//
// fromLabel4
//
this.fromLabel4.AutoSize = true;
this.fromLabel4.Location = new System.Drawing.Point(14, 23);
this.fromLabel4.Name = "fromLabel4";
this.fromLabel4.Size = new System.Drawing.Size(30, 13);
this.fromLabel4.TabIndex = 3;
this.fromLabel4.Text = "From";
//
// flow3ToTextBox
//
this.flow3ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow3ToTextBox.Name = "flow3ToTextBox";
this.flow3ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow3ToTextBox.TabIndex = 2;
this.flow3ToTextBox.TextChanged += new System.EventHandler(this.flow3ToTextBox_TextChanged);
//
// flow3FromTextBox
//
this.flow3FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow3FromTextBox.Name = "flow3FromTextBox";
this.flow3FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow3FromTextBox.TabIndex = 1;
this.flow3FromTextBox.TextChanged += new System.EventHandler(this.flow3FromTextBox_TextChanged);
//
// flow3CheckBox
//
this.flow3CheckBox.AutoSize = true;
this.flow3CheckBox.Location = new System.Drawing.Point(10, 0);
this.flow3CheckBox.Name = "flow3CheckBox";
this.flow3CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow3CheckBox.TabIndex = 0;
this.flow3CheckBox.Text = "Flow 3";
this.flow3CheckBox.UseVisualStyleBackColor = true;
this.flow3CheckBox.CheckedChanged += new System.EventHandler(this.flow3CheckBox_CheckedChanged);
//
// flow2GroupBox
//
this.flow2GroupBox.Controls.Add(this.flow2ToExclamation);
this.flow2GroupBox.Controls.Add(this.flow2FromExclamation);
this.flow2GroupBox.Controls.Add(this.label1);
this.flow2GroupBox.Controls.Add(this.label2);
this.flow2GroupBox.Controls.Add(this.toLabel3);
this.flow2GroupBox.Controls.Add(this.fromLabel3);
this.flow2GroupBox.Controls.Add(this.flow2ToTextBox);
this.flow2GroupBox.Controls.Add(this.flow2FromTextBox);
this.flow2GroupBox.Controls.Add(this.flow2CheckBox);
this.flow2GroupBox.Location = new System.Drawing.Point(240, 7);
this.flow2GroupBox.Name = "flow2GroupBox";
this.flow2GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow2GroupBox.TabIndex = 5;
this.flow2GroupBox.TabStop = false;
//
// flow2ToExclamation
//
this.flow2ToExclamation.AutoSize = true;
this.flow2ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow2ToExclamation.Location = new System.Drawing.Point(167, 49);
this.flow2ToExclamation.Name = "flow2ToExclamation";
this.flow2ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow2ToExclamation.TabIndex = 9;
this.flow2ToExclamation.Text = "!";
this.flow2ToExclamation.Visible = false;
//
// flow2FromExclamation
//
this.flow2FromExclamation.AutoSize = true;
this.flow2FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow2FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow2FromExclamation.Name = "flow2FromExclamation";
this.flow2FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow2FromExclamation.TabIndex = 8;
this.flow2FromExclamation.Text = "!";
this.flow2FromExclamation.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(178, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 6;
this.label1.Text = "m3/h";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(177, 23);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 5;
this.label2.Text = "m3/h";
//
// toLabel3
//
this.toLabel3.AutoSize = true;
this.toLabel3.Location = new System.Drawing.Point(14, 48);
this.toLabel3.Name = "toLabel3";
this.toLabel3.Size = new System.Drawing.Size(20, 13);
this.toLabel3.TabIndex = 4;
this.toLabel3.Text = "To";
//
// fromLabel3
//
this.fromLabel3.AutoSize = true;
this.fromLabel3.Location = new System.Drawing.Point(14, 23);
this.fromLabel3.Name = "fromLabel3";
this.fromLabel3.Size = new System.Drawing.Size(30, 13);
this.fromLabel3.TabIndex = 3;
this.fromLabel3.Text = "From";
//
// flow2ToTextBox
//
this.flow2ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow2ToTextBox.Name = "flow2ToTextBox";
this.flow2ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow2ToTextBox.TabIndex = 2;
this.flow2ToTextBox.TextChanged += new System.EventHandler(this.flow2ToTextBox_TextChanged);
//
// flow2FromTextBox
//
this.flow2FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow2FromTextBox.Name = "flow2FromTextBox";
this.flow2FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow2FromTextBox.TabIndex = 1;
this.flow2FromTextBox.TextChanged += new System.EventHandler(this.flow2FromTextBox_TextChanged);
//
// flow2CheckBox
//
this.flow2CheckBox.AutoSize = true;
this.flow2CheckBox.Location = new System.Drawing.Point(6, 0);
this.flow2CheckBox.Name = "flow2CheckBox";
this.flow2CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow2CheckBox.TabIndex = 0;
this.flow2CheckBox.Text = "Flow 2";
this.flow2CheckBox.UseVisualStyleBackColor = true;
this.flow2CheckBox.CheckedChanged += new System.EventHandler(this.flow2CheckBox_CheckedChanged);
//
// flow1GroupBox
//
this.flow1GroupBox.Controls.Add(this.flow1ToExclamation);
this.flow1GroupBox.Controls.Add(this.flow1FromExclamation);
this.flow1GroupBox.Controls.Add(this.m3hLabel2);
this.flow1GroupBox.Controls.Add(this.m3hLabel1);
this.flow1GroupBox.Controls.Add(this.toLabel2);
this.flow1GroupBox.Controls.Add(this.fromLabel2);
this.flow1GroupBox.Controls.Add(this.flow1ToTextBox);
this.flow1GroupBox.Controls.Add(this.flow1FromTextBox);
this.flow1GroupBox.Controls.Add(this.flow1CheckBox);
this.flow1GroupBox.Location = new System.Drawing.Point(7, 7);
this.flow1GroupBox.Name = "flow1GroupBox";
this.flow1GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow1GroupBox.TabIndex = 4;
this.flow1GroupBox.TabStop = false;
//
// flow1ToExclamation
//
this.flow1ToExclamation.AutoSize = true;
this.flow1ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow1ToExclamation.Location = new System.Drawing.Point(167, 49);
this.flow1ToExclamation.Name = "flow1ToExclamation";
this.flow1ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow1ToExclamation.TabIndex = 8;
this.flow1ToExclamation.Text = "!";
this.flow1ToExclamation.Visible = false;
//
// flow1FromExclamation
//
this.flow1FromExclamation.AutoSize = true;
this.flow1FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow1FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow1FromExclamation.Name = "flow1FromExclamation";
this.flow1FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow1FromExclamation.TabIndex = 7;
this.flow1FromExclamation.Text = "!";
this.flow1FromExclamation.Visible = false;
//
// m3hLabel2
//
this.m3hLabel2.AutoSize = true;
this.m3hLabel2.Location = new System.Drawing.Point(178, 48);
this.m3hLabel2.Name = "m3hLabel2";
this.m3hLabel2.Size = new System.Drawing.Size(32, 13);
this.m3hLabel2.TabIndex = 6;
this.m3hLabel2.Text = "m3/h";
//
// m3hLabel1
//
this.m3hLabel1.AutoSize = true;
this.m3hLabel1.Location = new System.Drawing.Point(177, 23);
this.m3hLabel1.Name = "m3hLabel1";
this.m3hLabel1.Size = new System.Drawing.Size(32, 13);
this.m3hLabel1.TabIndex = 5;
this.m3hLabel1.Text = "m3/h";
//
// toLabel2
//
this.toLabel2.AutoSize = true;
this.toLabel2.Location = new System.Drawing.Point(14, 48);
this.toLabel2.Name = "toLabel2";
this.toLabel2.Size = new System.Drawing.Size(20, 13);
this.toLabel2.TabIndex = 4;
this.toLabel2.Text = "To";
//
// fromLabel2
//
this.fromLabel2.AutoSize = true;
this.fromLabel2.Location = new System.Drawing.Point(14, 23);
this.fromLabel2.Name = "fromLabel2";
this.fromLabel2.Size = new System.Drawing.Size(30, 13);
this.fromLabel2.TabIndex = 3;
this.fromLabel2.Text = "From";
//
// flow1ToTextBox
//
this.flow1ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow1ToTextBox.Name = "flow1ToTextBox";
this.flow1ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow1ToTextBox.TabIndex = 2;
this.flow1ToTextBox.TextChanged += new System.EventHandler(this.flow1ToTextBox_TextChanged);
//
// flow1FromTextBox
//
this.flow1FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow1FromTextBox.Name = "flow1FromTextBox";
this.flow1FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow1FromTextBox.TabIndex = 1;
this.flow1FromTextBox.TextChanged += new System.EventHandler(this.flow1FromTextBox_TextChanged);
//
// flow1CheckBox
//
this.flow1CheckBox.AutoSize = true;
this.flow1CheckBox.Location = new System.Drawing.Point(6, 0);
this.flow1CheckBox.Name = "flow1CheckBox";
this.flow1CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow1CheckBox.TabIndex = 0;
this.flow1CheckBox.Text = "Flow 1";
this.flow1CheckBox.UseVisualStyleBackColor = true;
this.flow1CheckBox.CheckedChanged += new System.EventHandler(this.flow1CheckBox_CheckedChanged);
//
// benchesTabControl
//
this.benchesTabControl.Controls.Add(this.tabPage1);
this.benchesTabControl.Controls.Add(this.tabPage2);
this.benchesTabControl.Controls.Add(this.tabPage3);
this.benchesTabControl.Controls.Add(this.tabPage4);
this.benchesTabControl.Controls.Add(this.tabPage5);
this.benchesTabControl.Controls.Add(this.tabPage6);
this.benchesTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.benchesTabControl.Location = new System.Drawing.Point(0, 0);
this.benchesTabControl.Name = "benchesTabControl";
this.benchesTabControl.SelectedIndex = 0;
this.benchesTabControl.Size = new System.Drawing.Size(800, 356);
this.benchesTabControl.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.wr10StatisticsCtrl1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(792, 330);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "WR10";
this.tabPage1.UseVisualStyleBackColor = true;
//
// wr10StatisticsCtrl1
//
this.wr10StatisticsCtrl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr10StatisticsCtrl1.Location = new System.Drawing.Point(3, 3);
this.wr10StatisticsCtrl1.Name = "wr10StatisticsCtrl1";
this.wr10StatisticsCtrl1.Size = new System.Drawing.Size(786, 324);
this.wr10StatisticsCtrl1.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.wr11StatisticsCtrl);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(792, 320);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "WR11";
this.tabPage2.UseVisualStyleBackColor = true;
//
// wr11StatisticsCtrl
//
this.wr11StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr11StatisticsCtrl.Location = new System.Drawing.Point(3, 3);
this.wr11StatisticsCtrl.Name = "wr11StatisticsCtrl";
this.wr11StatisticsCtrl.Size = new System.Drawing.Size(786, 314);
this.wr11StatisticsCtrl.TabIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.wr13StatisticsCtrl);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(792, 320);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "WR13";
this.tabPage3.UseVisualStyleBackColor = true;
//
// wr13StatisticsCtrl
//
this.wr13StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr13StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr13StatisticsCtrl.Name = "wr13StatisticsCtrl";
this.wr13StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
this.wr13StatisticsCtrl.TabIndex = 0;
//
// tabPage4
//
this.tabPage4.Controls.Add(this.wr14StatisticsCtrl);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(792, 320);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "WR14";
this.tabPage4.UseVisualStyleBackColor = true;
//
// wr14StatisticsCtrl
//
this.wr14StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr14StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr14StatisticsCtrl.Name = "wr14StatisticsCtrl";
this.wr14StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
this.wr14StatisticsCtrl.TabIndex = 0;
//
// tabPage5
//
this.tabPage5.Controls.Add(this.wr15StatisticsCtrl);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Size = new System.Drawing.Size(792, 320);
this.tabPage5.TabIndex = 4;
this.tabPage5.Text = "WR15";
this.tabPage5.UseVisualStyleBackColor = true;
//
// wr15StatisticsCtrl
//
this.wr15StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr15StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr15StatisticsCtrl.Name = "wr15StatisticsCtrl";
this.wr15StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
this.wr15StatisticsCtrl.TabIndex = 0;
//
// tabPage6
//
this.tabPage6.Controls.Add(this.pt7StatisticsCtrl);
this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Size = new System.Drawing.Size(792, 320);
this.tabPage6.TabIndex = 5;
this.tabPage6.Text = "PT7";
this.tabPage6.UseVisualStyleBackColor = true;
//
// pt7StatisticsCtrl
//
this.pt7StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.pt7StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.pt7StatisticsCtrl.Name = "pt7StatisticsCtrl";
this.pt7StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
this.pt7StatisticsCtrl.TabIndex = 0;
//
// MidOrWaterMetersCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.splitContainer1);
this.Name = "MidOrWaterMetersCtrl";
this.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.flow3GroupBox.ResumeLayout(false);
this.flow3GroupBox.PerformLayout();
this.flow2GroupBox.ResumeLayout(false);
this.flow2GroupBox.PerformLayout();
this.flow1GroupBox.ResumeLayout(false);
this.flow1GroupBox.PerformLayout();
this.benchesTabControl.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
this.tabPage5.ResumeLayout(false);
this.tabPage6.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TabControl benchesTabControl;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TabPage tabPage6;
private StatisticsCtrl wr10StatisticsCtrl1;
private StatisticsCtrl wr11StatisticsCtrl;
private StatisticsCtrl wr13StatisticsCtrl;
private StatisticsCtrl wr14StatisticsCtrl;
private StatisticsCtrl wr15StatisticsCtrl;
private StatisticsCtrl pt7StatisticsCtrl;
private System.Windows.Forms.GroupBox flow3GroupBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label toLabel4;
private System.Windows.Forms.Label fromLabel4;
private System.Windows.Forms.TextBox flow3ToTextBox;
private System.Windows.Forms.TextBox flow3FromTextBox;
private System.Windows.Forms.CheckBox flow3CheckBox;
private System.Windows.Forms.GroupBox flow2GroupBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label toLabel3;
private System.Windows.Forms.Label fromLabel3;
private System.Windows.Forms.TextBox flow2ToTextBox;
private System.Windows.Forms.TextBox flow2FromTextBox;
private System.Windows.Forms.CheckBox flow2CheckBox;
private System.Windows.Forms.GroupBox flow1GroupBox;
private System.Windows.Forms.Label m3hLabel2;
private System.Windows.Forms.Label m3hLabel1;
private System.Windows.Forms.Label toLabel2;
private System.Windows.Forms.Label fromLabel2;
private System.Windows.Forms.TextBox flow1ToTextBox;
private System.Windows.Forms.TextBox flow1FromTextBox;
private System.Windows.Forms.CheckBox flow1CheckBox;
private System.Windows.Forms.Label flow1ToExclamation;
private System.Windows.Forms.Label flow1FromExclamation;
private System.Windows.Forms.Label flow3ToExclamation;
private System.Windows.Forms.Label flow3FromExclamation;
private System.Windows.Forms.Label flow2ToExclamation;
private System.Windows.Forms.Label flow2FromExclamation;
}
}

View File

@ -0,0 +1,171 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Statistics.Resources;
namespace Statistics.UserControls
{
public partial class MidOrWaterMetersCtrl : UserControl
{
public MidId MidId;
public StatisticsDlg Parent;
public bool Flow1Enabled { get { return flow1CheckBox.Checked; } }
public double Flow1From { get { return flow1From; } }
public double Flow1To { get { return flow1To; } }
public bool Flow2Enabled { get { return flow2CheckBox.Checked; } }
public double Flow2From { get { return flow2From; } }
public double Flow2To { get { return flow2To; } }
public bool Flow3Enabled { get { return flow3CheckBox.Checked; } }
public double Flow3From { get { return flow3From; } }
public double Flow3To { get { return flow3To; } }
/// All flows are in m3/h
double flow1From;
double flow1To;
double flow2From;
double flow2To;
double flow3From;
double flow3To;
StatisticsCtrl GetStatistics(int i)
{
if ((i >= 0) && (i < benchesTabControl.TabPages.Count) && benchesTabControl.TabPages[i].Controls.Count > 0)
{
return benchesTabControl.TabPages[i].Controls[0] as StatisticsCtrl;
}
else return null;
}
public void UpdateRequest(int benchId)
{
Parent.UpdateRequest(benchId, MidId);
}
public MidOrWaterMetersCtrl()
{
InitializeComponent();
ManageCheckGroupBox(flow1CheckBox, flow1GroupBox);
ManageCheckGroupBox(flow2CheckBox, flow2GroupBox);
ManageCheckGroupBox(flow3CheckBox, flow3GroupBox);
for (int i = 0; i < benchesTabControl.TabPages.Count; i++ )
{
TabPage tp = benchesTabControl.TabPages[i];
if ((tp.Controls.Count > 0) && (tp.Controls[0] is StatisticsCtrl))
{
(tp.Controls[0] as StatisticsCtrl).Id = i;
(tp.Controls[0] as StatisticsCtrl).BenchesCtrl = this;
}
}
}
void Localize()
{
flow1CheckBox.Text = string.Format("{0} 1", Strings.Flow);
flow2CheckBox.Text = string.Format("{0} 2", Strings.Flow);
flow3CheckBox.Text = string.Format("{0} 3", Strings.Flow);
fromLabel2.Text = Strings.From;
fromLabel3.Text = Strings.From;
fromLabel4.Text = Strings.From;
toLabel2.Text = Strings.To;
toLabel3.Text = Strings.To;
toLabel4.Text = Strings.To;
}
private void flow1CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow1CheckBox, flow1GroupBox); }
private void flow2CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow2CheckBox, flow2GroupBox); }
private void flow3CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow3CheckBox, flow3GroupBox); }
private void ManageCheckGroupBox(CheckBox chk, GroupBox grp)
{
/// Make sure the CheckBox isn't in the GroupBox. This will only happen the first time.
if (chk.Parent == grp)
{
grp.Parent.Controls.Add(chk); /// Reparent the CheckBox so it's not in the GroupBox.
chk.Location = new Point(chk.Left + grp.Left, chk.Top + grp.Top); /// Adjust the CheckBox's location.
chk.BringToFront(); /// Move the CheckBox to the top of the stacking order.
}
/// Enable or disable the GroupBox.
grp.Enabled = chk.Checked;
}
private void flow1FromTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow1FromTextBox.Text))
{
flow1From = 0;
flow1FromExclamation.Visible = false;
}
else
flow1FromExclamation.Visible = !(double.TryParse(flow1FromTextBox.Text, out flow1From) && (flow1From >= 0));
}
private void flow1ToTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow1ToTextBox.Text))
{
flow1To = 0;
flow1ToExclamation.Visible = false;
}
else
flow1ToExclamation.Visible = !(double.TryParse(flow1ToTextBox.Text, out flow1To) && (flow1To >= 0));
}
private void flow2FromTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow2FromTextBox.Text))
{
flow2From = 0;
flow2FromExclamation.Visible = false;
}
else
flow2FromExclamation.Visible = !(double.TryParse(flow2FromTextBox.Text, out flow2From) && (flow2From >= 0));
}
private void flow2ToTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow2ToTextBox.Text))
{
flow2To = 0;
flow2ToExclamation.Visible = false;
}
else
flow2ToExclamation.Visible = !(double.TryParse(flow2ToTextBox.Text, out flow2To) && (flow2To >= 0));
}
private void flow3FromTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow3FromTextBox.Text))
{
flow3From = 0;
flow3FromExclamation.Visible = false;
}
else
flow3FromExclamation.Visible = !(double.TryParse(flow3FromTextBox.Text, out flow3From) && (flow3From >= 0));
}
private void flow3ToTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(flow3ToTextBox.Text))
{
flow3To = 0;
flow3ToExclamation.Visible = false;
}
else
flow3ToExclamation.Visible = !(double.TryParse(flow3ToTextBox.Text, out flow3To) && (flow3To >= 0));
}
}
}

View File

@ -0,0 +1,120 @@
<?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>

View File

@ -0,0 +1,60 @@
namespace Statistics.UserControls
{
partial class StatisticsCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.updateButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// updateButton
//
this.updateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.updateButton.Location = new System.Drawing.Point(255, 11);
this.updateButton.Name = "updateButton";
this.updateButton.Size = new System.Drawing.Size(122, 43);
this.updateButton.TabIndex = 4;
this.updateButton.Text = "Update";
this.updateButton.UseVisualStyleBackColor = true;
this.updateButton.Click += new System.EventHandler(this.updateButton_Click);
//
// StatisticsCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.updateButton);
this.Name = "StatisticsCtrl";
this.Size = new System.Drawing.Size(388, 242);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button updateButton;
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Statistics.UserControls
{
public partial class StatisticsCtrl : UserControl
{
public int Id; /// Index of the tab page
public MidOrWaterMetersCtrl BenchesCtrl; /// Reference to the parent control
public StatisticsCtrl()
{
InitializeComponent();
}
private void updateButton_Click(object sender, EventArgs e)
{
if (BenchesCtrl != null) BenchesCtrl.UpdateRequest(Id);
}
}
}

View File

@ -0,0 +1,120 @@
<?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>

3
Statistics/app.config Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

12
TBF.sln
View File

@ -46,6 +46,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TracingDB", "TracingDB\Trac
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemCard", "GemCard\GemCard.csproj", "{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Statistics", "Statistics\Statistics.csproj", "{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -174,6 +176,16 @@ Global
{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}.Release|Mixed Platforms.Build.0 = Release|x86
{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}.Release|x86.ActiveCfg = Release|x86
{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}.Release|x86.Build.0 = Release|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Debug|Any CPU.ActiveCfg = Debug|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Debug|Mixed Platforms.Build.0 = Debug|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Debug|x86.ActiveCfg = Debug|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Debug|x86.Build.0 = Debug|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Release|Any CPU.ActiveCfg = Release|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Release|Mixed Platforms.ActiveCfg = Release|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Release|Mixed Platforms.Build.0 = Release|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Release|x86.ActiveCfg = Release|x86
{36755E1D-6FC3-4D9C-8DD3-0250D51532E0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -14,6 +14,8 @@ rmdir /s /q Results\bin
rmdir /s /q Results\obj
rmdir /s /q ResultsBrowser\bin
rmdir /s /q ResultsBrowser\obj
rmdir /s /q Statistics\bin
rmdir /s /q Statistics\obj
rmdir /s /q TBF\bin
rmdir /s /q TBF\obj
rmdir /s /q TBFSetup\Debug