Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05665288ab | ||
|
|
8af89136e7 | ||
|
|
5b6461fa0a | ||
|
|
1f51924bc8 | ||
|
|
b1f3b72a96 | ||
|
|
dfc0661300 | ||
|
|
f747755301 | ||
|
|
ad2c1d615f |
@@ -26,6 +26,8 @@ GenericTest/bin/
|
||||
GenericTest/obj/
|
||||
GraphLib/bin/
|
||||
GraphLib/obj/
|
||||
LabelPrinting/bin/
|
||||
LabelPrinting/obj/
|
||||
MergeResultsDBs/bin/
|
||||
MergeResultsDBs/obj/
|
||||
OrderManagement/bin/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -25,7 +25,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Common.Forms
|
||||
{
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -53,20 +56,20 @@ namespace Common.Forms
|
||||
public event EventHandler<MessageEventArgs> UpdateMessageHandler;
|
||||
void OnUpdateMessage(object sender, MessageEventArgs args)
|
||||
{
|
||||
if (args.Message != null) label1.Text = args.Message;
|
||||
if (args != null && args.Message != null) label1.Text = args.Message;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called from the state machine when an operation forces a modeless dialog close.
|
||||
/// </summary>
|
||||
public static void CloseForm()
|
||||
public void CloseForm()
|
||||
{
|
||||
if (CloseFormHandler == null) return;
|
||||
try { CloseFormHandler(null, null); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
static public event EventHandler<EventArgs> CloseFormHandler;
|
||||
public event EventHandler<EventArgs> CloseFormHandler;
|
||||
void OnCloseForm(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace GenericTest
|
||||
const int ActivityMsgsCount = 7;
|
||||
ActivityEventArgs[] activityEvents; /// Activity messages displayed in the main window
|
||||
|
||||
|
||||
Common.Forms.ModelessForm modelessForm;
|
||||
|
||||
NHibernate.ISession dbSession; /// MySQL database session
|
||||
static OracleConnection oracleConn; /// Oracle database connection (server is in Stara Tura)
|
||||
#if RF_TEST_400_900
|
||||
@@ -115,7 +116,8 @@ namespace GenericTest
|
||||
UpdateTitle();
|
||||
|
||||
/// Open a modeless form that is closed after initialization and loading the main window
|
||||
new Thread(() => Application.Run(new Common.Forms.ModelessForm("Loading workflows from a database"))).Start();
|
||||
modelessForm = new Common.Forms.ModelessForm("Loading workflows from a database");
|
||||
new Thread(() => Application.Run(modelessForm)).Start();
|
||||
|
||||
|
||||
activityEvents = new ActivityEventArgs[ActivityMsgsCount];
|
||||
@@ -159,7 +161,7 @@ namespace GenericTest
|
||||
StarSensorReading();
|
||||
}
|
||||
|
||||
Common.Forms.ModelessForm.CloseForm(); /// Close the modeless information form
|
||||
if (modelessForm != null) modelessForm.CloseForm(); /// Close the modeless information form
|
||||
}
|
||||
|
||||
private void startButton_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace GenericTest
|
||||
{
|
||||
if (exc is QuitAppException)
|
||||
{
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
//Common.Forms.ModelessForm.CloseForm();
|
||||
log.FatalFormat(Strings.Program_was_not_started_0, exc.Message);
|
||||
MessageBox.Show(exc.Message,
|
||||
Strings.Warning,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace LabelPrinting
|
||||
{
|
||||
public class Cnst
|
||||
{
|
||||
public const int ExtraPieces = 10;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E4531D13-317C-4D9F-809F-5533B5C3C8BF}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LabelPrinting</RootNamespace>
|
||||
<AssemblyName>LabelPrinting</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>LabelPrinting.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Gma.QrCodeNet.Encoding">
|
||||
<HintPath>..\packages\QrCode.Net.0.4.0.0\net40\Gma.QrCodeNet.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<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="Cnst.cs" />
|
||||
<Compile Include="LocalSettings.cs" />
|
||||
<Compile Include="MainWnd.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWnd.Designer.cs">
|
||||
<DependentUpon>MainWnd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Printers\DataMatrixAndTextPrintDoc.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SettingsDlg.Designer.cs">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="MainWnd.resx">
|
||||
<DependentUpon>MainWnd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Resources\Strings.cs.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.sk.resx" />
|
||||
<EmbeddedResource Include="SettingsDlg.resx">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common\Common.csproj">
|
||||
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Config\Config.csproj">
|
||||
<Project>{743df7db-c7b6-42eb-986d-0f485e5588e4}</Project>
|
||||
<Name>Config</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataMatrix4Net\DataMatrix4Net.csproj">
|
||||
<Project>{7cd2b5b4-3304-4151-b8b4-76a8b8af9b06}</Project>
|
||||
<Name>DataMatrix4Net</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GenCode128\GenCode128.csproj">
|
||||
<Project>{32817bf9-e380-4467-9c7f-936f4b122bc7}</Project>
|
||||
<Name>GenCode128</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Results\Results.csproj">
|
||||
<Project>{9d0dcc88-dc81-47eb-9fdd-4c3907871bfb}</Project>
|
||||
<Name>Results</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj">
|
||||
<Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project>
|
||||
<Name>SharedDatabase</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TBF\TBF.csproj">
|
||||
<Project>{8648fd92-cda1-4c3a-b5f9-fe547ce1fa48}</Project>
|
||||
<Name>TBF</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Users\Users.csproj">
|
||||
<Project>{6e5cb0e9-e1b6-4e5d-ac6e-b1049e180f2b}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="SampleConfig\log4netConfig.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</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>
|
||||
@@ -0,0 +1,245 @@
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace LabelPrinting
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to be serialized to an XML file...
|
||||
/// </summary>
|
||||
[XmlRootAttribute("SNPrinting")]
|
||||
public class LocalSettings
|
||||
{
|
||||
static XmlSerializer serializer = XmlSerializer.FromTypes(new[] { typeof(LocalSettings) })[0];
|
||||
|
||||
/// Configuration file ecryption/decryption key and initialization vector
|
||||
static byte[] key = new byte[] { 83, 254, 105, 64, 184, 201, 195, 127, 52, 99, 77, 45, 252, 132, 163, 156 };
|
||||
static byte[] IV = new byte[] { 189, 23, 137, 56, 204, 241, 242, 118, 28, 89, 9, 198, 224, 111, 186, 125 };
|
||||
|
||||
public Mode Mode;
|
||||
public string Language; /// User interface language used as CultureInfo(..) constructor argument
|
||||
public int DelayBetweenLabels; /// Delay between printing two consecutive labels in ms
|
||||
public bool IsUserLoginRequired; /// true = require user login on program start-up
|
||||
public string LabelPrinterCfg;
|
||||
public string TracingDBConnString; /// Connection string to MySQL database with production tracing records
|
||||
public string UsersDBConnString; /// Connection string to MySQL database with authorized users
|
||||
public string[] SapNumberHistory; /// SAP number history
|
||||
public string[] SeparatorHistory; /// Separator history
|
||||
public int CurrentSNTrail; /// Serial number trail to be printed now
|
||||
public int RemainingSNsCount; /// Remaining count of serial numbers to be printed in this session
|
||||
|
||||
|
||||
/// Parameterless constructor required by serialization
|
||||
public LocalSettings() { }
|
||||
|
||||
public LocalSettings(bool createNew)
|
||||
{
|
||||
if (createNew)
|
||||
{
|
||||
Mode = Mode.TbfLabelPrinter;
|
||||
Language = "EN";
|
||||
DelayBetweenLabels = 1000;
|
||||
IsUserLoginRequired = false;
|
||||
LabelPrinterCfg = new TBF.Rig.Output.Printers.Label.Factory().DefaultConfig().CreateDbEntity().Parameters;
|
||||
TracingDBConnString = string.Empty;
|
||||
UsersDBConnString = string.Empty;
|
||||
SapNumberHistory = new string[] { };
|
||||
SeparatorHistory = new string[] { "4VQ" };
|
||||
CurrentSNTrail = 1;
|
||||
RemainingSNsCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load public fields of this class from the XML file.
|
||||
/// </summary>
|
||||
/// <returns>LocalSettings object or null when Load() fails</returns>
|
||||
public static LocalSettings Load(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isEncrypted = true;
|
||||
using (StreamReader reader = new StreamReader(fileName))
|
||||
{
|
||||
isEncrypted = !reader.ReadLine().StartsWith("<?xml version=");
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
if (isEncrypted)
|
||||
{
|
||||
/// Write settings to a string
|
||||
StringBuilder plain = new StringBuilder();
|
||||
|
||||
using (RijndaelManaged aes = new RijndaelManaged { Padding = PaddingMode.Zeros })
|
||||
{
|
||||
using (FileStream fsCrypt = new FileStream(fileName, FileMode.Open))
|
||||
{
|
||||
using (ICryptoTransform decryptor = aes.CreateDecryptor(key, IV))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(fsCrypt, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (MemoryStream mStream = new MemoryStream())
|
||||
{
|
||||
using (var writer = new BinaryWriter(mStream))
|
||||
{
|
||||
int data;
|
||||
while ((data = cs.ReadByte()) != -1)
|
||||
{
|
||||
if (data != 0) writer.Write((byte)data);
|
||||
}
|
||||
writer.Flush();
|
||||
mStream.Position = 0;
|
||||
|
||||
using (var reader = new StreamReader(mStream))
|
||||
{
|
||||
return serializer.Deserialize(reader) as LocalSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (StreamReader reader = new StreamReader(fileName))
|
||||
{
|
||||
return serializer.Deserialize(reader) as LocalSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save public fields of this class to the XML file.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
/// Encrypt and write to file 'Program.LocalSettingsFileName'
|
||||
using (RijndaelManaged aes = new RijndaelManaged { Padding = PaddingMode.Zeros })
|
||||
{
|
||||
using (FileStream fsCrypt = new FileStream(Program.LocalSettingsFileName, FileMode.Create))
|
||||
{
|
||||
using (ICryptoTransform encryptor = aes.CreateEncryptor(key, IV))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(fsCrypt, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
using (MemoryStream mStream = new MemoryStream())
|
||||
{
|
||||
using (var writer = new StreamWriter(mStream))
|
||||
{
|
||||
/// Serialize and write settings to a memory stream
|
||||
serializer.Serialize(writer, this);
|
||||
writer.Flush();
|
||||
mStream.Position = 0;
|
||||
|
||||
using (var reader = new StreamReader(mStream))
|
||||
{
|
||||
/// Encrypt and write to file 'Program.LocalSettingsFileName'
|
||||
int data;
|
||||
while ((data = mStream.ReadByte()) != -1) cs.WriteByte((byte)data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates history stored in a string array by a new latest string.
|
||||
/// </summary>
|
||||
/// <param name="lastStrValue">Last entered string</param>
|
||||
/// <returns>true = history updated</returns>
|
||||
public static bool UpdateHistory(string lastStrValue, ref string[] history)
|
||||
{
|
||||
const int MaxHistoryLen = 10;
|
||||
|
||||
if (string.IsNullOrEmpty(lastStrValue)) return false;
|
||||
|
||||
int currentHistoryLength = (history != null) ? history.Length : 0;
|
||||
|
||||
int match = -1;
|
||||
for (int i = 0; i < currentHistoryLength; i++)
|
||||
{
|
||||
if (history[i] == lastStrValue)
|
||||
{
|
||||
match = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match >= 0 || currentHistoryLength >= MaxHistoryLen)
|
||||
{
|
||||
/// History does not have to be extended (because of a match) or should not be extended (because of the lenght)
|
||||
if (match < 0) match = currentHistoryLength - 1;
|
||||
|
||||
for (int j = match; j > 0; j--)
|
||||
{
|
||||
history[j] = history[j - 1];
|
||||
}
|
||||
history[0] = lastStrValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// History wiil be extended, new item inserted at the beginning
|
||||
string[] newHistory = new string[currentHistoryLength + 1];
|
||||
newHistory[0] = lastStrValue;
|
||||
for (int j = 1; j <= currentHistoryLength; j++)
|
||||
{
|
||||
newHistory[j] = history[j - 1];
|
||||
}
|
||||
history = newHistory;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="comboBox">Puchase order ComboBox</param>
|
||||
public static void PrepareCombo(string[] history, System.Windows.Forms.ComboBox comboBox)
|
||||
{
|
||||
if (history != null)
|
||||
{
|
||||
for (int i = 0; i < history.Length; i++)
|
||||
{
|
||||
comboBox.Items.Add(history[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (comboBox.Items.Count > 0)
|
||||
{
|
||||
comboBox.Text = comboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum Mode
|
||||
{
|
||||
TbfLabelPrinter,
|
||||
Standalone,
|
||||
WithDatabase,
|
||||
}
|
||||
}
|
||||
Generated
+197
@@ -0,0 +1,197 @@
|
||||
namespace LabelPrinting
|
||||
{
|
||||
partial class MainWnd
|
||||
{
|
||||
/// <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.snTrailTextBox = new System.Windows.Forms.TextBox();
|
||||
this.countTextBox = new System.Windows.Forms.TextBox();
|
||||
this.snTrailLabel = new System.Windows.Forms.Label();
|
||||
this.countLabel = new System.Windows.Forms.Label();
|
||||
this.sapNumberLabel = new System.Windows.Forms.Label();
|
||||
this.separatorLabel = new System.Windows.Forms.Label();
|
||||
this.startButton = new System.Windows.Forms.Button();
|
||||
this.sapNumberComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.separatorComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.interruptButton = new System.Windows.Forms.Button();
|
||||
this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainMenuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// snTrailTextBox
|
||||
//
|
||||
this.snTrailTextBox.Location = new System.Drawing.Point(230, 97);
|
||||
this.snTrailTextBox.Name = "snTrailTextBox";
|
||||
this.snTrailTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.snTrailTextBox.TabIndex = 8;
|
||||
//
|
||||
// countTextBox
|
||||
//
|
||||
this.countTextBox.Location = new System.Drawing.Point(230, 123);
|
||||
this.countTextBox.Name = "countTextBox";
|
||||
this.countTextBox.Size = new System.Drawing.Size(72, 20);
|
||||
this.countTextBox.TabIndex = 1;
|
||||
//
|
||||
// snTrailLabel
|
||||
//
|
||||
this.snTrailLabel.AutoSize = true;
|
||||
this.snTrailLabel.Location = new System.Drawing.Point(35, 100);
|
||||
this.snTrailLabel.Name = "snTrailLabel";
|
||||
this.snTrailLabel.Size = new System.Drawing.Size(110, 13);
|
||||
this.snTrailLabel.TabIndex = 7;
|
||||
this.snTrailLabel.Text = "First S/N trail (9 digits)";
|
||||
//
|
||||
// countLabel
|
||||
//
|
||||
this.countLabel.AutoSize = true;
|
||||
this.countLabel.Location = new System.Drawing.Point(35, 126);
|
||||
this.countLabel.Name = "countLabel";
|
||||
this.countLabel.Size = new System.Drawing.Size(65, 13);
|
||||
this.countLabel.TabIndex = 0;
|
||||
this.countLabel.Text = "S/N-s count";
|
||||
//
|
||||
// sapNumberLabel
|
||||
//
|
||||
this.sapNumberLabel.AutoSize = true;
|
||||
this.sapNumberLabel.Location = new System.Drawing.Point(35, 48);
|
||||
this.sapNumberLabel.Name = "sapNumberLabel";
|
||||
this.sapNumberLabel.Size = new System.Drawing.Size(111, 13);
|
||||
this.sapNumberLabel.TabIndex = 3;
|
||||
this.sapNumberLabel.Text = "SAP number ( 8 digits)";
|
||||
//
|
||||
// separatorLabel
|
||||
//
|
||||
this.separatorLabel.AutoSize = true;
|
||||
this.separatorLabel.Location = new System.Drawing.Point(35, 74);
|
||||
this.separatorLabel.Name = "separatorLabel";
|
||||
this.separatorLabel.Size = new System.Drawing.Size(124, 13);
|
||||
this.separatorLabel.TabIndex = 5;
|
||||
this.separatorLabel.Text = "Separator ( 3 characters)";
|
||||
//
|
||||
// startButton
|
||||
//
|
||||
this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.startButton.Location = new System.Drawing.Point(439, 63);
|
||||
this.startButton.Name = "startButton";
|
||||
this.startButton.Size = new System.Drawing.Size(117, 54);
|
||||
this.startButton.TabIndex = 2;
|
||||
this.startButton.Text = "Start printing";
|
||||
this.startButton.UseVisualStyleBackColor = true;
|
||||
this.startButton.Click += new System.EventHandler(this.startButton_Click);
|
||||
//
|
||||
// sapNumberComboBox
|
||||
//
|
||||
this.sapNumberComboBox.FormattingEnabled = true;
|
||||
this.sapNumberComboBox.Location = new System.Drawing.Point(230, 45);
|
||||
this.sapNumberComboBox.Name = "sapNumberComboBox";
|
||||
this.sapNumberComboBox.Size = new System.Drawing.Size(121, 21);
|
||||
this.sapNumberComboBox.TabIndex = 9;
|
||||
//
|
||||
// separatorComboBox
|
||||
//
|
||||
this.separatorComboBox.FormattingEnabled = true;
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(230, 71);
|
||||
this.separatorComboBox.Name = "separatorComboBox";
|
||||
this.separatorComboBox.Size = new System.Drawing.Size(72, 21);
|
||||
this.separatorComboBox.TabIndex = 10;
|
||||
//
|
||||
// interruptButton
|
||||
//
|
||||
this.interruptButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.interruptButton.Enabled = false;
|
||||
this.interruptButton.Location = new System.Drawing.Point(590, 63);
|
||||
this.interruptButton.Name = "interruptButton";
|
||||
this.interruptButton.Size = new System.Drawing.Size(117, 54);
|
||||
this.interruptButton.TabIndex = 11;
|
||||
this.interruptButton.Text = "Interrupt";
|
||||
this.interruptButton.UseVisualStyleBackColor = true;
|
||||
this.interruptButton.Click += new System.EventHandler(this.interruptButton_Click);
|
||||
//
|
||||
// mainMenuStrip
|
||||
//
|
||||
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.settingsToolStripMenuItem});
|
||||
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainMenuStrip.Name = "mainMenuStrip";
|
||||
this.mainMenuStrip.Size = new System.Drawing.Size(742, 24);
|
||||
this.mainMenuStrip.TabIndex = 12;
|
||||
this.mainMenuStrip.Text = "mainMenuStrip";
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.settingsToolStripMenuItem.Text = "Settings";
|
||||
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
|
||||
//
|
||||
// MainWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(742, 168);
|
||||
this.Controls.Add(this.interruptButton);
|
||||
this.Controls.Add(this.separatorComboBox);
|
||||
this.Controls.Add(this.sapNumberComboBox);
|
||||
this.Controls.Add(this.startButton);
|
||||
this.Controls.Add(this.separatorLabel);
|
||||
this.Controls.Add(this.sapNumberLabel);
|
||||
this.Controls.Add(this.countLabel);
|
||||
this.Controls.Add(this.snTrailLabel);
|
||||
this.Controls.Add(this.countTextBox);
|
||||
this.Controls.Add(this.snTrailTextBox);
|
||||
this.Controls.Add(this.mainMenuStrip);
|
||||
this.MainMenuStrip = this.mainMenuStrip;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MainWnd";
|
||||
this.Text = "S/N Printing";
|
||||
this.Load += new System.EventHandler(this.MainWnd_Load);
|
||||
this.mainMenuStrip.ResumeLayout(false);
|
||||
this.mainMenuStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox snTrailTextBox;
|
||||
private System.Windows.Forms.TextBox countTextBox;
|
||||
private System.Windows.Forms.Label snTrailLabel;
|
||||
private System.Windows.Forms.Label countLabel;
|
||||
private System.Windows.Forms.Label sapNumberLabel;
|
||||
private System.Windows.Forms.Label separatorLabel;
|
||||
private System.Windows.Forms.Button startButton;
|
||||
private System.Windows.Forms.ComboBox sapNumberComboBox;
|
||||
private System.Windows.Forms.ComboBox separatorComboBox;
|
||||
private System.Windows.Forms.Button interruptButton;
|
||||
private System.Windows.Forms.MenuStrip mainMenuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,480 @@
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using DataMatrix4Net;
|
||||
using SharedDatabase.Entities;
|
||||
using LabelPrinting.Resources;
|
||||
using TBF.Rig.Output.Printers.Label;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using Results.Entities;
|
||||
|
||||
namespace LabelPrinting
|
||||
{
|
||||
public partial class MainWnd : Form
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
||||
|
||||
private readonly Factory factory;
|
||||
private readonly Printer printer;
|
||||
|
||||
string programNameAndVer;
|
||||
string prefix; /// S/N prefix after parsing/verification by the UI
|
||||
string separator; /// Separator after parsing/verification by the UI
|
||||
int currentSNTrail; /// Current S/N trai (1st S/N trail after parsing/verification by the UI)
|
||||
int totalCount; /// Total S/N count after parsing/verification by the UI
|
||||
int remainingCount; /// Remaining S/N-s count
|
||||
IList<OrderInfo> orderInfos; /// null in Standalone mode
|
||||
Timer timer;
|
||||
bool interrupt;
|
||||
|
||||
public MainWnd()
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = programNameAndVer = string.Format("{0} v.{1}", Program.ProgramName, Program.Version); ;
|
||||
factory = new Factory();
|
||||
}
|
||||
|
||||
public MainWnd(IList<OrderInfo> orderInfos)
|
||||
: this()
|
||||
{
|
||||
this.orderInfos = orderInfos;
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.TbfLabelPrinter)
|
||||
{
|
||||
try
|
||||
{
|
||||
var cmpntEntity = Config.Entities.Component.CreateFromCfg("Printer", factory.ClassName, string.Empty, 1,
|
||||
DebugMode.Normal, LogLevel.Off,
|
||||
Program.LocalSettings.LabelPrinterCfg);
|
||||
printer = factory.GetComponent(factory.CmpntCfgFromCmpntEntity(cmpntEntity), null) as Printer;
|
||||
printer.Initialize();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Cannot create or initialize a printer",
|
||||
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string culture = Program.LocalSettings.Language.Replace('_', '-');
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Selected language is not supported.\nUsing English.",
|
||||
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
timer = new Timer();
|
||||
timer.Interval = Program.LocalSettings.DelayBetweenLabels; /// [ms] default = 1000
|
||||
timer.Tick += new EventHandler(timer_Tick);
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
startButton.Text = Strings.Start_printing;
|
||||
interruptButton.Text = Strings.Interrupt;
|
||||
settingsToolStripMenuItem.Text = Strings.Settings;
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.TbfLabelPrinter)
|
||||
{
|
||||
sapNumberLabel.Text = Strings.Order;
|
||||
separatorLabel.Text = string.Empty;
|
||||
separatorComboBox.Visible = false;
|
||||
snTrailLabel.Text = Strings.Serial_number;
|
||||
}
|
||||
else
|
||||
{
|
||||
sapNumberLabel.Text = Strings.SAP_number_8_digits;
|
||||
separatorLabel.Text = Strings.Separator_3_characters;
|
||||
snTrailLabel.Text = Strings.First_SN_trail_9_digits;
|
||||
}
|
||||
|
||||
countLabel.Text = Strings.Labels_count;
|
||||
}
|
||||
|
||||
private void MainWnd_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
LocalSettings.PrepareCombo(Program.LocalSettings.SapNumberHistory, sapNumberComboBox);
|
||||
LocalSettings.PrepareCombo(Program.LocalSettings.SeparatorHistory, separatorComboBox);
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.TbfLabelPrinter)
|
||||
{
|
||||
snTrailTextBox.Text = string.Empty;
|
||||
countTextBox.Text = Math.Max(Program.LocalSettings.RemainingSNsCount, 1).ToString();
|
||||
|
||||
snTrailLabel.Top -= 26;
|
||||
snTrailTextBox.Top -= 26;
|
||||
countLabel.Top -= 26;
|
||||
countTextBox.Top -= 26;
|
||||
|
||||
this.ActiveControl = snTrailTextBox;
|
||||
}
|
||||
else if (Program.LocalSettings.Mode == Mode.Standalone)
|
||||
{
|
||||
snTrailTextBox.Text = Program.LocalSettings.CurrentSNTrail.ToString("D9");
|
||||
countTextBox.Text = Math.Max(Program.LocalSettings.RemainingSNsCount, 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (orderInfos == null) throw new Exception("Missing OrderInfo-s from production tracing database");
|
||||
|
||||
currentSNTrail = 0;
|
||||
foreach (var oi in orderInfos)
|
||||
{
|
||||
if (oi.BaseNr1 + oi.PiecesCount + Cnst.ExtraPieces > currentSNTrail)
|
||||
{
|
||||
currentSNTrail = oi.BaseNr1 + oi.PiecesCount + Cnst.ExtraPieces;
|
||||
}
|
||||
}
|
||||
|
||||
snTrailTextBox.Text = currentSNTrail.ToString("D9");
|
||||
snTrailTextBox.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start printing labels
|
||||
/// </summary>
|
||||
private void startButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!int.TryParse(countTextBox.Text, out totalCount) || totalCount <= 0)
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_SNs_count);
|
||||
return;
|
||||
}
|
||||
remainingCount = totalCount;
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.TbfLabelPrinter)
|
||||
{
|
||||
var wm = new Results.Entities.WaterMeter();
|
||||
wm.PurchaseOrder = string.IsNullOrEmpty(sapNumberComboBox.Text) ? string.Empty : sapNumberComboBox.Text;
|
||||
wm.SerialNr = string.IsNullOrEmpty(snTrailTextBox.Text) ? string.Empty : snTrailTextBox.Text;
|
||||
|
||||
LocalSettings.UpdateHistory(sapNumberComboBox.Text, ref Program.LocalSettings.SapNumberHistory);
|
||||
//Program.LocalSettings.CurrentSNTrail = snTrailTextBox.Text;
|
||||
Program.LocalSettings.RemainingSNsCount = remainingCount;
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
startButton.Enabled = false;
|
||||
interruptButton.Enabled = true;
|
||||
interrupt = false;
|
||||
|
||||
printer.PrintResults(wm, "document name");
|
||||
|
||||
remainingCount--;
|
||||
IncrementSN(snTrailTextBox);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Program.LocalSettings.Mode == Mode.Standalone || Program.LocalSettings.Mode == Mode.WithDatabase
|
||||
|
||||
int sapNumber;
|
||||
if (sapNumberComboBox.Text.Length != 8 || !int.TryParse(sapNumberComboBox.Text, out sapNumber) || sapNumber <= 0 || sapNumber > 99999999)
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_SAP_number);
|
||||
return;
|
||||
}
|
||||
|
||||
if (separatorComboBox.Text.Length != 3)
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_separator);
|
||||
return;
|
||||
}
|
||||
|
||||
if (snTrailTextBox.Text.Length != 9 || !int.TryParse(snTrailTextBox.Text, out currentSNTrail))
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_first_SN_trail);
|
||||
return;
|
||||
}
|
||||
else if (Program.LocalSettings.Mode == Mode.Standalone && currentSNTrail < Program.LocalSettings.CurrentSNTrail)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}, {1} {2:D9}", Strings.Invalid_first_SN_trail, Strings.min, Program.LocalSettings.CurrentSNTrail));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.Standalone && currentSNTrail > Program.LocalSettings.CurrentSNTrail)
|
||||
{
|
||||
if (MessageBox.Show(string.Format("{0} {1:D9}{2}{3}{4}",
|
||||
Strings.You_are_skipping,
|
||||
Program.LocalSettings.CurrentSNTrail,
|
||||
(currentSNTrail == Program.LocalSettings.CurrentSNTrail + 1) ? "" : string.Format(" ... {0:D9}", currentSNTrail - 1),
|
||||
Environment.NewLine,
|
||||
Strings.Are_you_sure),
|
||||
string.Empty,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question) == DialogResult.No)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Program.LocalSettings.Mode == Mode.WithDatabase)
|
||||
{
|
||||
SaveNewOrderInfo(ref currentSNTrail, totalCount);
|
||||
}
|
||||
|
||||
prefix = sapNumberComboBox.Text;
|
||||
separator = separatorComboBox.Text;
|
||||
|
||||
sapNumberComboBox.Enabled = false;
|
||||
separatorComboBox.Enabled = false;
|
||||
snTrailTextBox.Enabled = false;
|
||||
countTextBox.Enabled = false;
|
||||
|
||||
LocalSettings.UpdateHistory(sapNumberComboBox.Text, ref Program.LocalSettings.SapNumberHistory);
|
||||
LocalSettings.UpdateHistory(separatorComboBox.Text, ref Program.LocalSettings.SeparatorHistory);
|
||||
|
||||
Program.LocalSettings.CurrentSNTrail = currentSNTrail;
|
||||
Program.LocalSettings.RemainingSNsCount = remainingCount;
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
startButton.Enabled = false;
|
||||
interruptButton.Enabled = true;
|
||||
interrupt = false;
|
||||
|
||||
PrintOneLabel();
|
||||
}
|
||||
|
||||
if (remainingCount > 0)
|
||||
{
|
||||
timer.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = string.Format("{0} ... {1}", programNameAndVer, Strings.completed);
|
||||
MessageBox.Show(string.Format(Strings.x_labels_printed, totalCount));
|
||||
SaveSettingsUpdateAndEnableUI();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save a record tp OrderInfo table that coresponds to printed labels
|
||||
/// </summary>
|
||||
/// <param name="currentSNTrail">Start S/N trail number</param>
|
||||
/// <param name="totalCount">Printed labels count</param>
|
||||
/// <returns>true when successful</returns>
|
||||
bool SaveNewOrderInfo(ref int currentSNTrail, int totalCount)
|
||||
{
|
||||
ISession session = SharedDatabase.TracingDB.CreateSession(Program.LocalSettings.TracingDBConnString);
|
||||
ITransaction transaction = session.BeginTransaction();
|
||||
OrderInfo oi = new OrderInfo();
|
||||
bool successfullySaved = false;
|
||||
try
|
||||
{
|
||||
var orders = session.QueryOver<OrderInfo>().List();
|
||||
|
||||
/// Determine current S/N trail once again
|
||||
int snTrail = 0;
|
||||
foreach (var o in orders)
|
||||
{
|
||||
if (o.BaseNr1 + o.PiecesCount + Cnst.ExtraPieces > snTrail)
|
||||
{
|
||||
snTrail = o.BaseNr1 + o.PiecesCount + Cnst.ExtraPieces;
|
||||
}
|
||||
}
|
||||
|
||||
/// Compare current S/N trail with the newly obtained one, update if necessary
|
||||
if (snTrail > currentSNTrail) currentSNTrail = snTrail;
|
||||
|
||||
oi.POName = "0000000";
|
||||
oi.PiecesCount = totalCount;
|
||||
oi.TestProcedure = string.Empty;
|
||||
oi.BaseNr1 = currentSNTrail;
|
||||
oi.BaseNr2 = 0;
|
||||
oi.BaseNr3 = 0;
|
||||
oi.BaseNr4 = 0;
|
||||
oi.BaseNr5 = 0;
|
||||
oi.Remark = "Manual S/N printing";
|
||||
oi.Workflow = null;
|
||||
orders.Add(oi);
|
||||
session.SaveOrUpdate(oi);
|
||||
transaction.Commit();
|
||||
successfullySaved = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("MySQL database transaction rolled back, data not comitted: {0}", exc.Message);
|
||||
transaction.Rollback();
|
||||
}
|
||||
|
||||
return successfullySaved;
|
||||
}
|
||||
|
||||
|
||||
void timer_Tick(object sender, EventArgs args)
|
||||
{
|
||||
timer.Stop();
|
||||
|
||||
if (interrupt)
|
||||
{
|
||||
Text = string.Format("{0} ... {1}", programNameAndVer, Strings.interrupted);
|
||||
MessageBox.Show(string.Format(Strings.x_labels_printed, totalCount - remainingCount));
|
||||
SaveSettingsUpdateAndEnableUI();
|
||||
}
|
||||
else if (Program.LocalSettings.Mode == Mode.TbfLabelPrinter)
|
||||
{
|
||||
var wm = new Results.Entities.WaterMeter();
|
||||
wm.PurchaseOrder = string.IsNullOrEmpty(sapNumberComboBox.Text) ? string.Empty : sapNumberComboBox.Text;
|
||||
wm.SerialNr = string.IsNullOrEmpty(snTrailTextBox.Text) ? string.Empty : snTrailTextBox.Text;
|
||||
|
||||
printer.PrintResults(wm, "document name");
|
||||
|
||||
remainingCount--;
|
||||
IncrementSN(snTrailTextBox);
|
||||
|
||||
if (remainingCount > 0)
|
||||
{
|
||||
timer.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = string.Format("{0} ... {1}", programNameAndVer, Strings.completed);
|
||||
MessageBox.Show(string.Format(Strings.x_labels_printed, totalCount));
|
||||
SaveSettingsUpdateAndEnableUI();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Program.LocalSettings.Mode == Mode.Standalone || Program.LocalSettings.Mode == Mode.WithDatabase
|
||||
|
||||
PrintOneLabel();
|
||||
|
||||
if (remainingCount > 0)
|
||||
{
|
||||
timer.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = string.Format("{0} ... {1}", programNameAndVer, Strings.completed);
|
||||
MessageBox.Show(string.Format(Strings.x_labels_printed, totalCount));
|
||||
SaveSettingsUpdateAndEnableUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char[] digits = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
||||
///
|
||||
void IncrementSN(TextBox tb)
|
||||
{
|
||||
if (tb != null)
|
||||
{
|
||||
string currentSN = tb.Text;
|
||||
|
||||
int currentSnNr;
|
||||
int startIx = currentSN.IndexOfAny(digits);
|
||||
if (startIx >= 0)
|
||||
{
|
||||
int lastDigitPosPlus1 = startIx + 1;
|
||||
var listOfDigits = new List<char>(digits);
|
||||
while (lastDigitPosPlus1 < currentSN.Length && listOfDigits.Contains(currentSN[lastDigitPosPlus1]))
|
||||
{
|
||||
lastDigitPosPlus1++;
|
||||
}
|
||||
int digitsCount = lastDigitPosPlus1 - startIx;
|
||||
|
||||
if (int.TryParse(currentSN.Substring(startIx, digitsCount), out currentSnNr) && currentSnNr >= 0)
|
||||
{
|
||||
currentSnNr++;
|
||||
string newSN = currentSnNr.ToString();
|
||||
int len = newSN.Length;
|
||||
if (len <= digitsCount)
|
||||
{
|
||||
tb.Text = currentSN.Substring(0, startIx + digitsCount - len) + newSN + currentSN.Substring(startIx + digitsCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
tb.Text = currentSN.Substring(0, startIx) + newSN + currentSN.Substring(startIx + digitsCount); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void PrintOneLabel()
|
||||
{
|
||||
if (remainingCount > 0)
|
||||
{
|
||||
string code = string.Format("{0}{1}{2:D9}", prefix, separator, currentSNTrail);
|
||||
Text = string.Format("{0} ... {1} ... {2} / {3}", programNameAndVer, code, totalCount - remainingCount + 1, totalCount);
|
||||
DataMatrix matrix = new DataMatrix(code, SymbolSize.SquareAuto);
|
||||
new Printers.DataMatrixAndTextPrintDoc(matrix.Matrix, code.Replace(separator.Substring(0, 2), "\n")).Print();
|
||||
currentSNTrail++;
|
||||
remainingCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void SaveSettingsUpdateAndEnableUI()
|
||||
{
|
||||
if (Program.LocalSettings.Mode != Mode.TbfLabelPrinter) snTrailTextBox.Text = currentSNTrail.ToString("D9");
|
||||
countTextBox.Text = remainingCount.ToString();
|
||||
|
||||
Program.LocalSettings.CurrentSNTrail = currentSNTrail;
|
||||
Program.LocalSettings.RemainingSNsCount = remainingCount;
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
sapNumberComboBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
snTrailTextBox.Enabled = (Program.LocalSettings.Mode == Mode.TbfLabelPrinter || Program.LocalSettings.Mode == Mode.Standalone);
|
||||
countTextBox.Enabled = true;
|
||||
|
||||
startButton.Enabled = true;
|
||||
interruptButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void interruptButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
interrupt = true;
|
||||
}
|
||||
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Connect to the database of users and log in a user
|
||||
try
|
||||
{
|
||||
SharedDatabase.UsersDB.ConnectionString = Program.LocalSettings.UsersDBConnString;
|
||||
SharedDatabase.UsersDB.DbType = Common.DBType.MySql;
|
||||
|
||||
DialogResult dr = new SharedDatabase.Forms.LoginDlg().ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
string msg = string.Format("Failed to connect to the database of users:{0}{1}", Environment.NewLine, exc.Message);
|
||||
log.Error(msg);
|
||||
MessageBox.Show(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
/// Modify program settings
|
||||
try
|
||||
{
|
||||
DialogResult dr = new SettingsDlg(Program.LocalSettings).ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
Program.LocalSettings.Save();
|
||||
MessageBox.Show(Strings.Program_restart_is_required);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
string msg = string.Format("Error occurred, settings were not modified:{0}{1}", Environment.NewLine, exc.Message);
|
||||
log.Error(msg);
|
||||
MessageBox.Show(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="mainMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,120 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Printing;
|
||||
using Gma.QrCodeNet.Encoding;
|
||||
using DataMatrix4Net;
|
||||
|
||||
namespace LabelPrinting.Printers
|
||||
{
|
||||
public class DataMatrixAndTextPrintDoc : PrintDocument
|
||||
{
|
||||
const float mm = 1 / 0.254F; /// 1 mm expressed in 1/100 inch
|
||||
|
||||
int printWidth;
|
||||
int printHeight;
|
||||
int leftMargin;
|
||||
int topMargin;
|
||||
|
||||
|
||||
BitMatrix bitMatrix;
|
||||
string text;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="bitmap">Bitmap to be printed</param>
|
||||
/// <param name="paperWidth">Label width</param>
|
||||
/// <param name="paperHeight">Label height</param>
|
||||
/// <param name="landscape">true = landscape</param>
|
||||
public DataMatrixAndTextPrintDoc(BitMatrix bitMatrix, string text, bool landscape = false)
|
||||
{
|
||||
this.bitMatrix = bitMatrix;
|
||||
this.text = text;
|
||||
|
||||
DefaultPageSettings.Landscape = landscape;
|
||||
|
||||
/// Set print area size and margins (in dots using 80 dpi)
|
||||
if (landscape)
|
||||
{
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
leftMargin = base.DefaultPageSettings.Margins.Top; /// X
|
||||
topMargin = base.DefaultPageSettings.Margins.Left; /// Y
|
||||
}
|
||||
else
|
||||
{
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
||||
topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e); /// Run base code
|
||||
}
|
||||
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
base.OnPrintPage(e); /// Run base code
|
||||
DrawLabel(e.Graphics, bitMatrix, text);
|
||||
e.HasMorePages = false;
|
||||
}
|
||||
|
||||
public static void DrawLabel(Graphics g, BitMatrix bitMatrix, string text)
|
||||
{
|
||||
string[] lines = text.Split(new char[] { '\n' });
|
||||
|
||||
/// Assuming 100 dpi (printer), drawing size: 2 inch (width) x 1 inch (height)
|
||||
const float W = 18 * mm;
|
||||
const float H = 10 * mm;
|
||||
|
||||
const float L1 = 7.0f * mm;
|
||||
const float L2 = 7.0f * mm;
|
||||
const float T1 = 3.5f * mm;
|
||||
const float T2 = 5.5f * mm;
|
||||
|
||||
const float QRL = 1.0f * mm;
|
||||
const float QRT = 2.5f * mm;
|
||||
const float QrSize = 5.5f * mm;
|
||||
|
||||
string fontFamily = "Arial";
|
||||
Font font = new Font(fontFamily, 4.5f, FontStyle.Bold);
|
||||
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
g.Clear(Color.White);
|
||||
|
||||
if (lines.Length > 0)
|
||||
{
|
||||
g.DrawString(lines[0], font, Brushes.Black, new RectangleF(L1, T1, W - L1, H - T1));
|
||||
}
|
||||
|
||||
if (lines.Length > 1)
|
||||
{
|
||||
g.DrawString(lines[1], font, Brushes.Black, new RectangleF(L2, T2, W - L2, H - T2));
|
||||
}
|
||||
|
||||
g.Flush();
|
||||
|
||||
float QrPixSize = QrSize / bitMatrix.Width;
|
||||
for (int i = 0; i < bitMatrix.Height; i++)
|
||||
{
|
||||
for (int j = 0; j < bitMatrix.Width; j++)
|
||||
{
|
||||
if (bitMatrix[j, i])
|
||||
{
|
||||
g.FillRectangle(Brushes.Black, new RectangleF(QRL + QrPixSize * j, QRT + QrPixSize * i, QrPixSize, QrPixSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using LabelPrinting.Resources;
|
||||
|
||||
namespace LabelPrinting
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// Constants
|
||||
public static GID[] SettingsAccessLevel = new GID[] { GID.TraceabilityManagement }; /// Group membership to access settings
|
||||
public const string ProgramName = "LabelPrinting";
|
||||
public const string ConfigFName = "config.xml";
|
||||
public const string BackupConfigFName = "config.backup.xml";
|
||||
public const string Log4NetConfigFName = "log4netConfig.xml";
|
||||
|
||||
/// Program information
|
||||
public static readonly string Version; /// version string
|
||||
public static readonly DateTime BuildDateTime; /// date and time of program build
|
||||
public static readonly string ExeDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LogDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
|
||||
/// Local settings
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
/// log4net
|
||||
static ILog log;
|
||||
|
||||
|
||||
static Program()
|
||||
{
|
||||
/// Program version string
|
||||
Assembly thisAssembly = Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
BuildDateTime = new FileInfo(thisAssembly.Location).LastWriteTime;
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExeDirectory = Path.GetDirectoryName(thisAssembly.Location);
|
||||
ConfigDirectory = Path.Combine(ExeDirectory, "..\\Cfg");
|
||||
LogDirectory = Path.Combine(ExeDirectory, "..", "Logs");
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, ConfigFName);
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, BackupConfigFName);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
///
|
||||
/// Check if another instance is running
|
||||
///
|
||||
Assembly thisAssembly = Assembly.GetExecutingAssembly();
|
||||
string processName = Path.GetFileNameWithoutExtension(thisAssembly.Location);
|
||||
if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", string.Format(Strings.Program_0_is_running_already, ProgramName),
|
||||
Environment.NewLine,
|
||||
Strings.Close_it_please),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Asterisk);
|
||||
return;
|
||||
}
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
|
||||
|
||||
bool configDirectoryCreated = false;
|
||||
if (!Directory.Exists(ConfigDirectory) || new DirectoryInfo(ConfigDirectory).GetFileSystemInfos().Length == 0)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Program_is_running_for_the_1st_time_on_this_PC,
|
||||
Environment.NewLine,
|
||||
Strings.Default_settings_are_used),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
///
|
||||
/// Create a new config subdirectory
|
||||
///
|
||||
Directory.CreateDirectory(ConfigDirectory);
|
||||
configDirectoryCreated = true;
|
||||
|
||||
LocalSettings = new LocalSettings(true);
|
||||
LocalSettings.Save();
|
||||
|
||||
if (File.Exists(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName)))
|
||||
{
|
||||
File.Copy(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName),
|
||||
Path.Combine(ConfigDirectory, Log4NetConfigFName));
|
||||
}
|
||||
|
||||
File.SetAttributes(Path.Combine(ConfigDirectory, Log4NetConfigFName), FileAttributes.Normal);
|
||||
}
|
||||
|
||||
///
|
||||
/// Configue and start logging
|
||||
///
|
||||
log4net.Config.XmlConfigurator.Configure(new FileInfo(Path.Combine(ConfigDirectory, Log4NetConfigFName)));
|
||||
log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
log.FatalFormat("{0} ver.{1}", ProgramName, Version);
|
||||
log.FatalFormat("Executable directory is {0}", ExeDirectory);
|
||||
if (configDirectoryCreated)
|
||||
{
|
||||
log.Fatal("A new config directory and configuration files created !");
|
||||
}
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(LocalSettingsFileName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
LocalSettings = LocalSettings.Load(LocalSettingsBackupName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
log.FatalFormat("Local settings: Could not load file {0}, nor {1}.", ConfigFName, BackupConfigFName);
|
||||
log.Fatal("Application terminated.");
|
||||
MessageBox.Show(string.Format("Could not load file {0}, nor {1}.", ConfigFName, BackupConfigFName), "Fatal error");
|
||||
return; /// Fatal error
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalSettings.Save(); /// Save the settings to overwrite the wrong file
|
||||
log.FatalFormat("Local settings: Could not load file {0}, successfully loaded {1}", ConfigFName, BackupConfigFName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Loading local seetings from the regular config file was successful. Update the backup
|
||||
File.Copy(LocalSettingsFileName, LocalSettingsBackupName, true);
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
///
|
||||
/// User login
|
||||
///
|
||||
if (LocalSettings.IsUserLoginRequired && !string.IsNullOrEmpty(LocalSettings.UsersDBConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
UsersDB.ConnectionString = LocalSettings.UsersDBConnString;
|
||||
UsersDB.DbType = DBType.MySql;
|
||||
|
||||
DialogResult dr = new SharedDatabase.Forms.LoginDlg().ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to connect to database of users: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
IList<OrderInfo> orderInfos = null;
|
||||
while (LocalSettings.Mode == Mode.WithDatabase)
|
||||
{
|
||||
try
|
||||
{
|
||||
ISession session = TracingDB.CreateSession(LocalSettings.TracingDBConnString);
|
||||
orderInfos = session.QueryOver<OrderInfo>().List();
|
||||
break;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.FatalFormat("Failed to connect to production tracing database: {0}", exc.Message);
|
||||
if (exc.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerException: {0}", exc.InnerException.Message);
|
||||
}
|
||||
|
||||
MessageBox.Show(string.Format("Failed to connect to production tracing database:{0}{1}", Environment.NewLine, exc.Message));
|
||||
|
||||
if (new SettingsDlg(LocalSettings).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LocalSettings.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
MainWnd dlg = new MainWnd(orderInfos);
|
||||
Application.Run(dlg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogException(log, "Exception in Application.Run(MainWnd)", e);
|
||||
|
||||
MessageBox.Show("Program crashed:" +
|
||||
Environment.NewLine + Environment.NewLine + e.Message +
|
||||
((e.InnerException == null) ? string.Empty : (Environment.NewLine + e.InnerException.Message)) +
|
||||
Environment.NewLine + e.StackTrace,
|
||||
"Fatal error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
Exception e = args.ExceptionObject as Exception;
|
||||
if (e == null) return;
|
||||
|
||||
LogException(log, "Unhandled exception", e);
|
||||
|
||||
MessageBox.Show("Program crashed:" +
|
||||
Environment.NewLine + Environment.NewLine + e.Message +
|
||||
((e.InnerException == null) ? string.Empty : (Environment.NewLine + e.InnerException.Message)) +
|
||||
Environment.NewLine + e.StackTrace,
|
||||
"Fatal error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
static void LogException(ILog log, string description, Exception e)
|
||||
{
|
||||
log.FatalFormat("---------------( {0} )---------------", description);
|
||||
log.FatalFormat("Message : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
log.FatalFormat("StackTrace : {0}{1}", Environment.NewLine, e.StackTrace);
|
||||
log.Fatal("--------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
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("LabelPrinting")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LabelPrinting")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[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("270db60d-5938-40be-b15c-e2bc3c7ddb86")]
|
||||
|
||||
// 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("1.0.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.6.0")]
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 LabelPrinting.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SNPrinting.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 LabelPrinting.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+414
@@ -0,0 +1,414 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 LabelPrinting.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", "17.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("LabelPrinting.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 Are you sure?.
|
||||
/// </summary>
|
||||
internal static string Are_you_sure {
|
||||
get {
|
||||
return ResourceManager.GetString("Are_you_sure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
internal static string Cancel {
|
||||
get {
|
||||
return ResourceManager.GetString("Cancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Close it please using 'Task manager'..
|
||||
/// </summary>
|
||||
internal static string Close_it_please {
|
||||
get {
|
||||
return ResourceManager.GetString("Close_it_please", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to completed.
|
||||
/// </summary>
|
||||
internal static string completed {
|
||||
get {
|
||||
return ResourceManager.GetString("completed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connection string for production tracing database.
|
||||
/// </summary>
|
||||
internal static string Connection_string_tracing_DB {
|
||||
get {
|
||||
return ResourceManager.GetString("Connection_string_tracing_DB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connection string for database of users.
|
||||
/// </summary>
|
||||
internal static string Connection_string_users_DB {
|
||||
get {
|
||||
return ResourceManager.GetString("Connection_string_users_DB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Database.
|
||||
/// </summary>
|
||||
internal static string Database {
|
||||
get {
|
||||
return ResourceManager.GetString("Database", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default settings are used..
|
||||
/// </summary>
|
||||
internal static string Default_settings_are_used {
|
||||
get {
|
||||
return ResourceManager.GetString("Default_settings_are_used", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay between labels.
|
||||
/// </summary>
|
||||
internal static string Delay_between_labes {
|
||||
get {
|
||||
return ResourceManager.GetString("Delay_between_labes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error.
|
||||
/// </summary>
|
||||
internal static string Error {
|
||||
get {
|
||||
return ResourceManager.GetString("Error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to First S/N trail (9 digits).
|
||||
/// </summary>
|
||||
internal static string First_SN_trail_9_digits {
|
||||
get {
|
||||
return ResourceManager.GetString("First_SN_trail_9_digits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Interrupt.
|
||||
/// </summary>
|
||||
internal static string Interrupt {
|
||||
get {
|
||||
return ResourceManager.GetString("Interrupt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to interrupted.
|
||||
/// </summary>
|
||||
internal static string interrupted {
|
||||
get {
|
||||
return ResourceManager.GetString("interrupted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid.
|
||||
/// </summary>
|
||||
internal static string Invalid {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid first S/N trail.
|
||||
/// </summary>
|
||||
internal static string Invalid_first_SN_trail {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_first_SN_trail", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid language.
|
||||
/// </summary>
|
||||
internal static string Invalid_language {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_language", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid SAP number.
|
||||
/// </summary>
|
||||
internal static string Invalid_SAP_number {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_SAP_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid separator.
|
||||
/// </summary>
|
||||
internal static string Invalid_separator {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_separator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid labels count.
|
||||
/// </summary>
|
||||
internal static string Invalid_SNs_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_SNs_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Labels count.
|
||||
/// </summary>
|
||||
internal static string Labels_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Labels_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Language, Sprache, Jazyk.
|
||||
/// </summary>
|
||||
internal static string Language_etc {
|
||||
get {
|
||||
return ResourceManager.GetString("Language_etc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to min..
|
||||
/// </summary>
|
||||
internal static string min {
|
||||
get {
|
||||
return ResourceManager.GetString("min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mode.
|
||||
/// </summary>
|
||||
internal static string Mode {
|
||||
get {
|
||||
return ResourceManager.GetString("Mode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order.
|
||||
/// </summary>
|
||||
internal static string Order {
|
||||
get {
|
||||
return ResourceManager.GetString("Order", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program '{0}' is running already..
|
||||
/// </summary>
|
||||
internal static string Program_0_is_running_already {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_0_is_running_already", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program is running for the 1st time on this PC..
|
||||
/// </summary>
|
||||
internal static string Program_is_running_for_the_1st_time_on_this_PC {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_is_running_for_the_1st_time_on_this_PC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program restart is required.
|
||||
/// </summary>
|
||||
internal static string Program_restart_is_required {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_restart_is_required", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to SAP number (8 digits).
|
||||
/// </summary>
|
||||
internal static string SAP_number_8_digits {
|
||||
get {
|
||||
return ResourceManager.GetString("SAP_number_8_digits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save.
|
||||
/// </summary>
|
||||
internal static string Save {
|
||||
get {
|
||||
return ResourceManager.GetString("Save", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Separator (3 characters).
|
||||
/// </summary>
|
||||
internal static string Separator_3_characters {
|
||||
get {
|
||||
return ResourceManager.GetString("Separator_3_characters", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Serial number.
|
||||
/// </summary>
|
||||
internal static string Serial_number {
|
||||
get {
|
||||
return ResourceManager.GetString("Serial_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Settings.
|
||||
/// </summary>
|
||||
internal static string Settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Standalone.
|
||||
/// </summary>
|
||||
internal static string Standalone {
|
||||
get {
|
||||
return ResourceManager.GetString("Standalone", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start printing.
|
||||
/// </summary>
|
||||
internal static string Start_printing {
|
||||
get {
|
||||
return ResourceManager.GetString("Start_printing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User login is required.
|
||||
/// </summary>
|
||||
internal static string User_login_is_required {
|
||||
get {
|
||||
return ResourceManager.GetString("User_login_is_required", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
internal static string Warning {
|
||||
get {
|
||||
return ResourceManager.GetString("Warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to With a database.
|
||||
/// </summary>
|
||||
internal static string With_database {
|
||||
get {
|
||||
return ResourceManager.GetString("With_database", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} labels printed.
|
||||
/// </summary>
|
||||
internal static string x_labels_printed {
|
||||
get {
|
||||
return ResourceManager.GetString("x_labels_printed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are skipping.
|
||||
/// </summary>
|
||||
internal static string You_are_skipping {
|
||||
get {
|
||||
return ResourceManager.GetString("You_are_skipping", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
<?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="Cancel" xml:space="preserve">
|
||||
<value>Zrušit</value>
|
||||
</data>
|
||||
<data name="Close_it_please" xml:space="preserve">
|
||||
<value>Zavřete ho prosím 'Správcem úloh' (Task manager).</value>
|
||||
</data>
|
||||
<data name="completed" xml:space="preserve">
|
||||
<value>dokončeno</value>
|
||||
</data>
|
||||
<data name="Connection_string_tracing_DB" xml:space="preserve">
|
||||
<value>Konfigurace databáze sledování výroby</value>
|
||||
</data>
|
||||
<data name="Connection_string_users_DB" xml:space="preserve">
|
||||
<value>Konfigurace databáze uživatelů</value>
|
||||
</data>
|
||||
<data name="Database" xml:space="preserve">
|
||||
<value>Databáze</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Použijí sa výchozí nastavení</value>
|
||||
</data>
|
||||
<data name="Delay_between_labes" xml:space="preserve">
|
||||
<value>Zpoždění mezi tiskemm štítků</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
<data name="Interrupt" xml:space="preserve">
|
||||
<value>Prerušit</value>
|
||||
</data>
|
||||
<data name="interrupted" xml:space="preserve">
|
||||
<value>prerušeno</value>
|
||||
</data>
|
||||
<data name="Invalid_first_SN_trail" xml:space="preserve">
|
||||
<value>Neplatný konec sériového čísla</value>
|
||||
</data>
|
||||
<data name="Invalid_SAP_number" xml:space="preserve">
|
||||
<value>Neplatné číslo součástky (SAP číslo)</value>
|
||||
</data>
|
||||
<data name="Invalid_separator" xml:space="preserve">
|
||||
<value>Neplatný oddělovač</value>
|
||||
</data>
|
||||
<data name="Invalid_SNs_count" xml:space="preserve">
|
||||
<value>Neplatný počet štítků</value>
|
||||
</data>
|
||||
<data name="Language_etc" xml:space="preserve">
|
||||
<value>Language, Sprache, Jazyk</value>
|
||||
</data>
|
||||
<data name="min." xml:space="preserve">
|
||||
<value>min.</value>
|
||||
</data>
|
||||
<data name="Mode" xml:space="preserve">
|
||||
<value>Režim činnosti</value>
|
||||
</data>
|
||||
<data name="Program_0_is_running_already" xml:space="preserve">
|
||||
<value>Program '{0}' už běží.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program byl spuštěn na tomto počítači poprvé.</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Uložit</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Nastavení</value>
|
||||
</data>
|
||||
<data name="Standalone" xml:space="preserve">
|
||||
<value>Samostatný</value>
|
||||
</data>
|
||||
<data name="Start_printing" xml:space="preserve">
|
||||
<value>Spustit tisk</value>
|
||||
</data>
|
||||
<data name="User_login_is_required" xml:space="preserve">
|
||||
<value>Vyžaduje se prihlášení užívatele</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Upozornení</value>
|
||||
</data>
|
||||
<data name="With_database" xml:space="preserve">
|
||||
<value>S databází</value>
|
||||
</data>
|
||||
<data name="You_are_skipping" xml:space="preserve">
|
||||
<value>Vynechávate</value>
|
||||
</data>
|
||||
<data name="First_SN_trail_9_digits" xml:space="preserve">
|
||||
<value>První konec sériového čísla (9 číslic)</value>
|
||||
</data>
|
||||
<data name="SAP_number_8_digits" xml:space="preserve">
|
||||
<value>SAP číslo (8 číslic)</value>
|
||||
</data>
|
||||
<data name="Separator_3_characters" xml:space="preserve">
|
||||
<value>Oddělovač (3 znaky)</value>
|
||||
</data>
|
||||
<data name="Labels_count" xml:space="preserve">
|
||||
<value>Počet štítků</value>
|
||||
</data>
|
||||
<data name="Program_restart_is_required" xml:space="preserve">
|
||||
<value>Je potřebný restart programu</value>
|
||||
</data>
|
||||
<data name="x_labels_printed" xml:space="preserve">
|
||||
<value>Bylo vytištěných {0} štítků</value>
|
||||
</data>
|
||||
<data name="Invalid" xml:space="preserve">
|
||||
<value>Neplatný</value>
|
||||
</data>
|
||||
<data name="Invalid_language" xml:space="preserve">
|
||||
<value>Neplatný jazyk</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Objednávka</value>
|
||||
</data>
|
||||
<data name="Serial_number" xml:space="preserve">
|
||||
<value>Sériové číslo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,237 @@
|
||||
<?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="Close_it_please" xml:space="preserve">
|
||||
<value>Close it please using 'Task manager'.</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Default settings are used.</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="Interrupt" xml:space="preserve">
|
||||
<value>Interrupt</value>
|
||||
</data>
|
||||
<data name="Invalid_first_SN_trail" xml:space="preserve">
|
||||
<value>Invalid first S/N trail</value>
|
||||
</data>
|
||||
<data name="Invalid_SAP_number" xml:space="preserve">
|
||||
<value>Invalid SAP number</value>
|
||||
</data>
|
||||
<data name="Invalid_separator" xml:space="preserve">
|
||||
<value>Invalid separator</value>
|
||||
</data>
|
||||
<data name="Invalid_SNs_count" xml:space="preserve">
|
||||
<value>Invalid labels count</value>
|
||||
</data>
|
||||
<data name="Program_0_is_running_already" xml:space="preserve">
|
||||
<value>Program '{0}' is running already.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program is running for the 1st time on this PC.</value>
|
||||
</data>
|
||||
<data name="Start_printing" xml:space="preserve">
|
||||
<value>Start printing</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
<data name="completed" xml:space="preserve">
|
||||
<value>completed</value>
|
||||
</data>
|
||||
<data name="interrupted" xml:space="preserve">
|
||||
<value>interrupted</value>
|
||||
</data>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Are you sure?</value>
|
||||
</data>
|
||||
<data name="min" xml:space="preserve">
|
||||
<value>min.</value>
|
||||
</data>
|
||||
<data name="You_are_skipping" xml:space="preserve">
|
||||
<value>You are skipping</value>
|
||||
</data>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="Connection_string_tracing_DB" xml:space="preserve">
|
||||
<value>Connection string for production tracing database</value>
|
||||
</data>
|
||||
<data name="Connection_string_users_DB" xml:space="preserve">
|
||||
<value>Connection string for database of users</value>
|
||||
</data>
|
||||
<data name="Database" xml:space="preserve">
|
||||
<value>Database</value>
|
||||
</data>
|
||||
<data name="Delay_between_labes" xml:space="preserve">
|
||||
<value>Delay between labels</value>
|
||||
</data>
|
||||
<data name="Language_etc" xml:space="preserve">
|
||||
<value>Language, Sprache, Jazyk</value>
|
||||
</data>
|
||||
<data name="Mode" xml:space="preserve">
|
||||
<value>Mode</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="Standalone" xml:space="preserve">
|
||||
<value>Standalone</value>
|
||||
</data>
|
||||
<data name="User_login_is_required" xml:space="preserve">
|
||||
<value>User login is required</value>
|
||||
</data>
|
||||
<data name="With_database" xml:space="preserve">
|
||||
<value>With a database</value>
|
||||
</data>
|
||||
<data name="First_SN_trail_9_digits" xml:space="preserve">
|
||||
<value>First S/N trail (9 digits)</value>
|
||||
</data>
|
||||
<data name="SAP_number_8_digits" xml:space="preserve">
|
||||
<value>SAP number (8 digits)</value>
|
||||
</data>
|
||||
<data name="Separator_3_characters" xml:space="preserve">
|
||||
<value>Separator (3 characters)</value>
|
||||
</data>
|
||||
<data name="Labels_count" xml:space="preserve">
|
||||
<value>Labels count</value>
|
||||
</data>
|
||||
<data name="Program_restart_is_required" xml:space="preserve">
|
||||
<value>Program restart is required</value>
|
||||
</data>
|
||||
<data name="x_labels_printed" xml:space="preserve">
|
||||
<value>{0} labels printed</value>
|
||||
</data>
|
||||
<data name="Invalid" xml:space="preserve">
|
||||
<value>Invalid</value>
|
||||
</data>
|
||||
<data name="Invalid_language" xml:space="preserve">
|
||||
<value>Invalid language</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="Serial_number" xml:space="preserve">
|
||||
<value>Serial number</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,234 @@
|
||||
<?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="Cancel" xml:space="preserve">
|
||||
<value>Zrušiť</value>
|
||||
</data>
|
||||
<data name="Close_it_please" xml:space="preserve">
|
||||
<value>Zavrite ho prosím 'Správcom úloh' (Task manager).</value>
|
||||
</data>
|
||||
<data name="completed" xml:space="preserve">
|
||||
<value>dokončené</value>
|
||||
</data>
|
||||
<data name="Connection_string_tracing_DB" xml:space="preserve">
|
||||
<value>Konfigurácia databáze sledovania výroby</value>
|
||||
</data>
|
||||
<data name="Connection_string_users_DB" xml:space="preserve">
|
||||
<value>Konfigurácia databáze užívateľov</value>
|
||||
</data>
|
||||
<data name="Database" xml:space="preserve">
|
||||
<value>Databáza</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Použijú sa základné nastavenia</value>
|
||||
</data>
|
||||
<data name="Delay_between_labes" xml:space="preserve">
|
||||
<value>Oneskorenie medzi tlačením štítkov</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
<data name="Interrupt" xml:space="preserve">
|
||||
<value>Prerušiť</value>
|
||||
</data>
|
||||
<data name="interrupted" xml:space="preserve">
|
||||
<value>prerušené</value>
|
||||
</data>
|
||||
<data name="Invalid_first_SN_trail" xml:space="preserve">
|
||||
<value>Neplatný chvost sériového čísla</value>
|
||||
</data>
|
||||
<data name="Invalid_SAP_number" xml:space="preserve">
|
||||
<value>Neplatné číslo súčiastky (SAP číslo)</value>
|
||||
</data>
|
||||
<data name="Invalid_separator" xml:space="preserve">
|
||||
<value>Neplatný oddelovač</value>
|
||||
</data>
|
||||
<data name="Invalid_SNs_count" xml:space="preserve">
|
||||
<value>Neplatný počet štítkov</value>
|
||||
</data>
|
||||
<data name="Language_etc" xml:space="preserve">
|
||||
<value>Language, Sprache, Jazyk</value>
|
||||
</data>
|
||||
<data name="min." xml:space="preserve">
|
||||
<value>min.</value>
|
||||
</data>
|
||||
<data name="Mode" xml:space="preserve">
|
||||
<value>Režim činnosti</value>
|
||||
</data>
|
||||
<data name="Program_0_is_running_already" xml:space="preserve">
|
||||
<value>Program '{0}' už beží.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program bol spustený na tomto počítači prvý krát.</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Uložiť</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Nastavenia</value>
|
||||
</data>
|
||||
<data name="Standalone" xml:space="preserve">
|
||||
<value>Samostatný</value>
|
||||
</data>
|
||||
<data name="Start_printing" xml:space="preserve">
|
||||
<value>Začať tlačiť</value>
|
||||
</data>
|
||||
<data name="User_login_is_required" xml:space="preserve">
|
||||
<value>Vyžaduje sa prihlásenie používateľa</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Upozornenie</value>
|
||||
</data>
|
||||
<data name="With_database" xml:space="preserve">
|
||||
<value>S databázou</value>
|
||||
</data>
|
||||
<data name="You_are_skipping" xml:space="preserve">
|
||||
<value>Vynechávate</value>
|
||||
</data>
|
||||
<data name="First_SN_trail_9_digits" xml:space="preserve">
|
||||
<value>Prvý chvost sériového čísla (9 číslic)</value>
|
||||
</data>
|
||||
<data name="SAP_number_8_digits" xml:space="preserve">
|
||||
<value>SAP číslo (8 číslic)</value>
|
||||
</data>
|
||||
<data name="Separator_3_characters" xml:space="preserve">
|
||||
<value>Oddeľovač (3 znaky)</value>
|
||||
</data>
|
||||
<data name="Labels_count" xml:space="preserve">
|
||||
<value>Počet štítkov</value>
|
||||
</data>
|
||||
<data name="Program_restart_is_required" xml:space="preserve">
|
||||
<value>Je potrebný reštart programu</value>
|
||||
</data>
|
||||
<data name="x_labels_printed" xml:space="preserve">
|
||||
<value>Bolo vytlačených {0} štítkov</value>
|
||||
</data>
|
||||
<data name="Invalid" xml:space="preserve">
|
||||
<value>Neplatný</value>
|
||||
</data>
|
||||
<data name="Invalid_language" xml:space="preserve">
|
||||
<value>Neplatný jazyk</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Objednávka</value>
|
||||
</data>
|
||||
<data name="Serial_number" xml:space="preserve">
|
||||
<value>Sériové číslo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,23 @@
|
||||
<log4net>
|
||||
<!-- Program log appenders -->
|
||||
<appender name="LabelPrintingLog" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="..\Logs\LabelPrintingLog.txt" />
|
||||
<appendToFile value="true" />
|
||||
<rollingMode value="Date" />
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger -->
|
||||
<root>
|
||||
<level value="WARN" />
|
||||
</root>
|
||||
|
||||
<!-- Set program loggers -->
|
||||
<logger name="LabelPrinting"> <appender-ref ref="LabelPrintingLog" /> <level value="WARN" /> </logger>
|
||||
|
||||
<!-- Set program logging levels -->
|
||||
<logger name="LabelPrinting.MainWnd"> <level value="INFO" /> </logger>
|
||||
</log4net>
|
||||
Generated
+283
@@ -0,0 +1,283 @@
|
||||
namespace LabelPrinting
|
||||
{
|
||||
partial class SettingsDlg
|
||||
{
|
||||
/// <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.modeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.tbfLabelPrinterRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.standaloneRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.withDBRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.commonGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.labelPrinterConfigButton = new System.Windows.Forms.Button();
|
||||
this.msLabel = new System.Windows.Forms.Label();
|
||||
this.delayTextBox = new System.Windows.Forms.TextBox();
|
||||
this.delayLabel = new System.Windows.Forms.Label();
|
||||
this.loginRequiredCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.languageComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.connStrForTracingGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.tracingDBConnStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.connStrForUsersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.usersDBConnStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.modeGroupBox.SuspendLayout();
|
||||
this.commonGroupBox.SuspendLayout();
|
||||
this.connStrForTracingGroupBox.SuspendLayout();
|
||||
this.connStrForUsersGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// modeGroupBox
|
||||
//
|
||||
this.modeGroupBox.Controls.Add(this.tbfLabelPrinterRadioButton);
|
||||
this.modeGroupBox.Controls.Add(this.standaloneRadioButton);
|
||||
this.modeGroupBox.Controls.Add(this.withDBRadioButton);
|
||||
this.modeGroupBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.modeGroupBox.Name = "modeGroupBox";
|
||||
this.modeGroupBox.Size = new System.Drawing.Size(197, 105);
|
||||
this.modeGroupBox.TabIndex = 15;
|
||||
this.modeGroupBox.TabStop = false;
|
||||
this.modeGroupBox.Text = "Mode";
|
||||
//
|
||||
// tbfLabelPrinterRadioButton
|
||||
//
|
||||
this.tbfLabelPrinterRadioButton.AutoSize = true;
|
||||
this.tbfLabelPrinterRadioButton.Location = new System.Drawing.Point(19, 23);
|
||||
this.tbfLabelPrinterRadioButton.Name = "tbfLabelPrinterRadioButton";
|
||||
this.tbfLabelPrinterRadioButton.Size = new System.Drawing.Size(156, 17);
|
||||
this.tbfLabelPrinterRadioButton.TabIndex = 0;
|
||||
this.tbfLabelPrinterRadioButton.TabStop = true;
|
||||
this.tbfLabelPrinterRadioButton.Text = "TBF compatible label printer";
|
||||
this.tbfLabelPrinterRadioButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// standaloneRadioButton
|
||||
//
|
||||
this.standaloneRadioButton.AutoSize = true;
|
||||
this.standaloneRadioButton.Location = new System.Drawing.Point(18, 46);
|
||||
this.standaloneRadioButton.Name = "standaloneRadioButton";
|
||||
this.standaloneRadioButton.Size = new System.Drawing.Size(143, 17);
|
||||
this.standaloneRadioButton.TabIndex = 1;
|
||||
this.standaloneRadioButton.TabStop = true;
|
||||
this.standaloneRadioButton.Text = "20 char s/n - Standalone";
|
||||
this.standaloneRadioButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// withDBRadioButton
|
||||
//
|
||||
this.withDBRadioButton.AutoSize = true;
|
||||
this.withDBRadioButton.Location = new System.Drawing.Point(18, 69);
|
||||
this.withDBRadioButton.Name = "withDBRadioButton";
|
||||
this.withDBRadioButton.Size = new System.Drawing.Size(158, 17);
|
||||
this.withDBRadioButton.TabIndex = 2;
|
||||
this.withDBRadioButton.TabStop = true;
|
||||
this.withDBRadioButton.Text = "20 char s/n - With database";
|
||||
this.withDBRadioButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// commonGroupBox
|
||||
//
|
||||
this.commonGroupBox.Controls.Add(this.labelPrinterConfigButton);
|
||||
this.commonGroupBox.Controls.Add(this.msLabel);
|
||||
this.commonGroupBox.Controls.Add(this.delayTextBox);
|
||||
this.commonGroupBox.Controls.Add(this.delayLabel);
|
||||
this.commonGroupBox.Controls.Add(this.loginRequiredCheckBox);
|
||||
this.commonGroupBox.Controls.Add(this.languageComboBox);
|
||||
this.commonGroupBox.Controls.Add(this.languageLabel);
|
||||
this.commonGroupBox.Location = new System.Drawing.Point(222, 12);
|
||||
this.commonGroupBox.Name = "commonGroupBox";
|
||||
this.commonGroupBox.Size = new System.Drawing.Size(316, 105);
|
||||
this.commonGroupBox.TabIndex = 16;
|
||||
this.commonGroupBox.TabStop = false;
|
||||
//
|
||||
// labelPrinterConfigButton
|
||||
//
|
||||
this.labelPrinterConfigButton.Location = new System.Drawing.Point(198, 73);
|
||||
this.labelPrinterConfigButton.Name = "labelPrinterConfigButton";
|
||||
this.labelPrinterConfigButton.Size = new System.Drawing.Size(93, 23);
|
||||
this.labelPrinterConfigButton.TabIndex = 6;
|
||||
this.labelPrinterConfigButton.Text = "TBF label config";
|
||||
this.labelPrinterConfigButton.UseVisualStyleBackColor = true;
|
||||
this.labelPrinterConfigButton.Click += new System.EventHandler(this.labelPrinterConfigButton_Click);
|
||||
//
|
||||
// msLabel
|
||||
//
|
||||
this.msLabel.AutoSize = true;
|
||||
this.msLabel.Location = new System.Drawing.Point(262, 51);
|
||||
this.msLabel.Name = "msLabel";
|
||||
this.msLabel.Size = new System.Drawing.Size(20, 13);
|
||||
this.msLabel.TabIndex = 5;
|
||||
this.msLabel.Text = "ms";
|
||||
//
|
||||
// delayTextBox
|
||||
//
|
||||
this.delayTextBox.Location = new System.Drawing.Point(198, 46);
|
||||
this.delayTextBox.Name = "delayTextBox";
|
||||
this.delayTextBox.Size = new System.Drawing.Size(52, 20);
|
||||
this.delayTextBox.TabIndex = 4;
|
||||
//
|
||||
// delayLabel
|
||||
//
|
||||
this.delayLabel.AutoSize = true;
|
||||
this.delayLabel.Location = new System.Drawing.Point(19, 51);
|
||||
this.delayLabel.Name = "delayLabel";
|
||||
this.delayLabel.Size = new System.Drawing.Size(108, 13);
|
||||
this.delayLabel.TabIndex = 3;
|
||||
this.delayLabel.Text = "Delay between labels";
|
||||
//
|
||||
// loginRequiredCheckBox
|
||||
//
|
||||
this.loginRequiredCheckBox.AutoSize = true;
|
||||
this.loginRequiredCheckBox.Location = new System.Drawing.Point(22, 79);
|
||||
this.loginRequiredCheckBox.Name = "loginRequiredCheckBox";
|
||||
this.loginRequiredCheckBox.Size = new System.Drawing.Size(114, 17);
|
||||
this.loginRequiredCheckBox.TabIndex = 2;
|
||||
this.loginRequiredCheckBox.Text = "User login required";
|
||||
this.loginRequiredCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// languageComboBox
|
||||
//
|
||||
this.languageComboBox.FormattingEnabled = true;
|
||||
this.languageComboBox.Location = new System.Drawing.Point(198, 17);
|
||||
this.languageComboBox.Name = "languageComboBox";
|
||||
this.languageComboBox.Size = new System.Drawing.Size(93, 21);
|
||||
this.languageComboBox.TabIndex = 1;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(19, 20);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(134, 13);
|
||||
this.languageLabel.TabIndex = 0;
|
||||
this.languageLabel.Text = "Language, Sprache, Jazyk";
|
||||
//
|
||||
// connStrForTracingGroupBox
|
||||
//
|
||||
this.connStrForTracingGroupBox.Controls.Add(this.tracingDBConnStringTextBox);
|
||||
this.connStrForTracingGroupBox.Location = new System.Drawing.Point(12, 127);
|
||||
this.connStrForTracingGroupBox.Name = "connStrForTracingGroupBox";
|
||||
this.connStrForTracingGroupBox.Size = new System.Drawing.Size(709, 50);
|
||||
this.connStrForTracingGroupBox.TabIndex = 17;
|
||||
this.connStrForTracingGroupBox.TabStop = false;
|
||||
this.connStrForTracingGroupBox.Text = "Connection string for production tracing records";
|
||||
//
|
||||
// tracingDBConnStringTextBox
|
||||
//
|
||||
this.tracingDBConnStringTextBox.Location = new System.Drawing.Point(19, 18);
|
||||
this.tracingDBConnStringTextBox.Name = "tracingDBConnStringTextBox";
|
||||
this.tracingDBConnStringTextBox.Size = new System.Drawing.Size(672, 20);
|
||||
this.tracingDBConnStringTextBox.TabIndex = 0;
|
||||
//
|
||||
// connStrForUsersGroupBox
|
||||
//
|
||||
this.connStrForUsersGroupBox.Controls.Add(this.usersDBConnStringTextBox);
|
||||
this.connStrForUsersGroupBox.Location = new System.Drawing.Point(12, 186);
|
||||
this.connStrForUsersGroupBox.Name = "connStrForUsersGroupBox";
|
||||
this.connStrForUsersGroupBox.Size = new System.Drawing.Size(709, 50);
|
||||
this.connStrForUsersGroupBox.TabIndex = 18;
|
||||
this.connStrForUsersGroupBox.TabStop = false;
|
||||
this.connStrForUsersGroupBox.Text = "Connection string for central DB of users";
|
||||
//
|
||||
// usersDBConnStringTextBox
|
||||
//
|
||||
this.usersDBConnStringTextBox.Location = new System.Drawing.Point(19, 18);
|
||||
this.usersDBConnStringTextBox.Name = "usersDBConnStringTextBox";
|
||||
this.usersDBConnStringTextBox.Size = new System.Drawing.Size(672, 20);
|
||||
this.usersDBConnStringTextBox.TabIndex = 0;
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.saveButton.Location = new System.Drawing.Point(559, 18);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(74, 47);
|
||||
this.saveButton.TabIndex = 19;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.UseVisualStyleBackColor = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(649, 18);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(71, 47);
|
||||
this.cancelButton.TabIndex = 20;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// SettingsDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(737, 250);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.saveButton);
|
||||
this.Controls.Add(this.connStrForUsersGroupBox);
|
||||
this.Controls.Add(this.connStrForTracingGroupBox);
|
||||
this.Controls.Add(this.commonGroupBox);
|
||||
this.Controls.Add(this.modeGroupBox);
|
||||
this.Name = "SettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "`";
|
||||
this.Load += new System.EventHandler(this.SettingsDlg_Load);
|
||||
this.modeGroupBox.ResumeLayout(false);
|
||||
this.modeGroupBox.PerformLayout();
|
||||
this.commonGroupBox.ResumeLayout(false);
|
||||
this.commonGroupBox.PerformLayout();
|
||||
this.connStrForTracingGroupBox.ResumeLayout(false);
|
||||
this.connStrForTracingGroupBox.PerformLayout();
|
||||
this.connStrForUsersGroupBox.ResumeLayout(false);
|
||||
this.connStrForUsersGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox modeGroupBox;
|
||||
private System.Windows.Forms.RadioButton standaloneRadioButton;
|
||||
private System.Windows.Forms.RadioButton withDBRadioButton;
|
||||
private System.Windows.Forms.GroupBox commonGroupBox;
|
||||
private System.Windows.Forms.ComboBox languageComboBox;
|
||||
private System.Windows.Forms.Label languageLabel;
|
||||
private System.Windows.Forms.Label msLabel;
|
||||
private System.Windows.Forms.TextBox delayTextBox;
|
||||
private System.Windows.Forms.Label delayLabel;
|
||||
private System.Windows.Forms.CheckBox loginRequiredCheckBox;
|
||||
private System.Windows.Forms.GroupBox connStrForTracingGroupBox;
|
||||
private System.Windows.Forms.TextBox tracingDBConnStringTextBox;
|
||||
private System.Windows.Forms.GroupBox connStrForUsersGroupBox;
|
||||
private System.Windows.Forms.TextBox usersDBConnStringTextBox;
|
||||
private System.Windows.Forms.Button saveButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.RadioButton tbfLabelPrinterRadioButton;
|
||||
private System.Windows.Forms.Button labelPrinterConfigButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
///
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using TBF.Rig.Output.Printers.Label;
|
||||
using LabelPrinting.Resources;
|
||||
|
||||
namespace LabelPrinting
|
||||
{
|
||||
public partial class SettingsDlg : Form
|
||||
{
|
||||
private readonly LocalSettings ls;
|
||||
private readonly Factory factory;
|
||||
|
||||
public SettingsDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
factory = new Factory();
|
||||
}
|
||||
|
||||
public SettingsDlg(LocalSettings localSettings)
|
||||
: this()
|
||||
{
|
||||
this.ls = localSettings;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Settings;
|
||||
modeGroupBox.Text = Strings.Mode;
|
||||
standaloneRadioButton.Text = "20 char s/n - " + Strings.Standalone;
|
||||
withDBRadioButton.Text = "20 char s/n - " + Strings.With_database;
|
||||
languageLabel.Text = Strings.Language_etc;
|
||||
delayLabel.Text = Strings.Delay_between_labes;
|
||||
loginRequiredCheckBox.Text = Strings.User_login_is_required;
|
||||
saveButton.Text = Strings.Save;
|
||||
cancelButton.Text = Strings.Cancel;
|
||||
connStrForTracingGroupBox.Text = Strings.Connection_string_tracing_DB;
|
||||
connStrForUsersGroupBox.Text = Strings.Connection_string_users_DB;
|
||||
}
|
||||
|
||||
private void SettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
languageComboBox.Items.Add("CS");
|
||||
languageComboBox.Items.Add("DE");
|
||||
languageComboBox.Items.Add("EN");
|
||||
languageComboBox.Items.Add("SK");
|
||||
languageComboBox.Items.Add("ZH_CN");
|
||||
languageComboBox.Text = ls.Language;
|
||||
|
||||
if (ls == null) return;
|
||||
|
||||
tbfLabelPrinterRadioButton.Checked = (ls.Mode == Mode.TbfLabelPrinter);
|
||||
standaloneRadioButton.Checked = (ls.Mode == Mode.Standalone);
|
||||
withDBRadioButton.Checked = (ls.Mode == Mode.WithDatabase);
|
||||
|
||||
loginRequiredCheckBox.Checked = ls.IsUserLoginRequired;
|
||||
|
||||
delayTextBox.Text = ls.DelayBetweenLabels.ToString();
|
||||
|
||||
tracingDBConnStringTextBox.Text = ls.TracingDBConnString;
|
||||
usersDBConnStringTextBox.Text = ls.UsersDBConnString;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies UI content
|
||||
/// </summary>
|
||||
/// <returns>None-empty string (message) when invalid</returns>
|
||||
string IsUIContentValid()
|
||||
{
|
||||
if (!languageComboBox.Items.Contains(languageComboBox.Text))
|
||||
{
|
||||
return Strings.Invalid_language;
|
||||
}
|
||||
|
||||
int idummy;
|
||||
if (!int.TryParse(delayTextBox.Text, out idummy) || idummy < 0 || idummy > 5000)
|
||||
{
|
||||
return string.Format("{0} {1}", Strings.Invalid, delayLabel.Text);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates settings, checks for differences compared to previous setrtings
|
||||
/// </summary>
|
||||
/// <returns>true when settings are different</returns>
|
||||
bool UpdateSettings()
|
||||
{
|
||||
if (ls == null) return false;
|
||||
|
||||
bool isDifferent = false;
|
||||
|
||||
Mode mode = tbfLabelPrinterRadioButton.Checked ? Mode.TbfLabelPrinter : standaloneRadioButton.Checked ? Mode.Standalone : Mode.WithDatabase;
|
||||
if (ls.Mode != mode)
|
||||
{
|
||||
ls.Mode = mode;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.Language != languageComboBox.Text)
|
||||
{
|
||||
ls.Language = languageComboBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.IsUserLoginRequired != loginRequiredCheckBox.Checked)
|
||||
{
|
||||
ls.IsUserLoginRequired = loginRequiredCheckBox.Checked;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.TracingDBConnString != tracingDBConnStringTextBox.Text)
|
||||
{
|
||||
ls.TracingDBConnString = tracingDBConnStringTextBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.UsersDBConnString != usersDBConnStringTextBox.Text)
|
||||
{
|
||||
ls.UsersDBConnString = usersDBConnStringTextBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
return isDifferent;
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message = IsUIContentValid();
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
UpdateSettings();
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void labelPrinterConfigButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var cmpntEntity = Config.Entities.Component.CreateFromCfg("Printer", factory.ClassName, string.Empty, 1,
|
||||
DebugMode.Normal, LogLevel.Off, ls.LabelPrinterCfg);
|
||||
|
||||
var cfgForm = new TBF.UI.Bench.Components.ComponentParametersDlg(this);
|
||||
cfgForm.ComponentCfgCtrl = new PrinterCfgCtrl();
|
||||
cfgForm.ComponentCfgCtrl.Config = factory.CmpntCfgFromCmpntEntity(cmpntEntity);
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
|
||||
if (cfgForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ls.LabelPrinterCfg = cfgForm.ComponentCfgCtrl.Config.CreateDbEntity().Parameters;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -23,6 +23,8 @@ namespace ProductionTracing
|
||||
{
|
||||
const string OpenFileDlg_SaveFileDlg_Filter = "{0} (*.que)|*.que|{1} (*.*)|*.*";
|
||||
|
||||
ModelessForm modelessForm;
|
||||
|
||||
string[] args;
|
||||
FiltersConfig filtersConfig; /// Serializable configuration of filters and displayed results
|
||||
QueryResults currentQR;
|
||||
@@ -190,8 +192,9 @@ namespace ProductionTracing
|
||||
private void executeQueryBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateAndSaveHistory();
|
||||
|
||||
Thread thread = new Thread(() => Application.Run(new Common.Forms.ModelessForm(Strings.searching)));
|
||||
|
||||
modelessForm = new ModelessForm(Strings.searching);
|
||||
Thread thread = new Thread(() => Application.Run(modelessForm));
|
||||
thread.CurrentCulture = CultureInfo.CurrentCulture;
|
||||
thread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||
thread.Start();
|
||||
@@ -220,7 +223,7 @@ namespace ProductionTracing
|
||||
catch (Exception exc)
|
||||
{
|
||||
if (session != null && session.IsOpen) session.Close();
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
if (modelessForm != null) modelessForm.CloseForm();
|
||||
MessageBox.Show(exc.Message,
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
@@ -233,7 +236,7 @@ namespace ProductionTracing
|
||||
tabControl.TabPages.Add(newTabPage);
|
||||
tabControl.SelectTab(newTabPage);
|
||||
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
if (modelessForm != null) modelessForm.CloseForm();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -109,6 +109,7 @@ namespace Results.Entities
|
||||
///
|
||||
public virtual string Workflow { get; set; } /// Not mapped to DB !!! Production tracing workflow name
|
||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||
public virtual bool PrintLabel { get; set; } /// Not mapped to DB !!!
|
||||
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
@@ -467,6 +468,7 @@ namespace Results.Entities
|
||||
#if IPERL
|
||||
FWVersion = string.Empty;
|
||||
#endif
|
||||
PrintLabel = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -529,6 +531,7 @@ namespace Results.Entities
|
||||
|
||||
Workflow = src.Workflow; /// Not mapped to DB
|
||||
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
||||
PrintLabel = src.PrintLabel; /// Not mapped to DB
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
@@ -723,6 +726,7 @@ namespace Results.Entities
|
||||
|
||||
writer.Write(Workflow);
|
||||
writer.Write(LastRecordIsNok);
|
||||
writer.Write(PrintLabel);
|
||||
|
||||
/// Save WaterMeterData or WaterMeterData.Id
|
||||
if (WaterMeterData != null && savedWMDatas != null && !savedWMDatas.Contains(WaterMeterData))
|
||||
@@ -823,6 +827,7 @@ namespace Results.Entities
|
||||
|
||||
Workflow = reader.ReadString();
|
||||
LastRecordIsNok = reader.ReadBoolean();
|
||||
PrintLabel = reader.ReadBoolean();
|
||||
|
||||
/// Retrieve TestData
|
||||
if (reader.ReadBoolean())
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace Results.Output.Printers.Label
|
||||
readonly Font font;
|
||||
|
||||
/// Data to print
|
||||
Results.Entities.Batch batch;
|
||||
LabelPrinterCfg cfg;
|
||||
Results.Entities.WaterMeter wm;
|
||||
|
||||
@@ -36,11 +35,10 @@ namespace Results.Output.Printers.Label
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public LabelPrintDocument(Results.Entities.Batch batch, LabelPrinterCfg cfg, Results.Entities.WaterMeter wm, string documentName)
|
||||
public LabelPrintDocument(LabelPrinterCfg cfg, Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
DocumentName = documentName;
|
||||
|
||||
this.batch = batch;
|
||||
this.cfg = cfg;
|
||||
this.wm = wm;
|
||||
this.itemsToPrint = WMeterRsltItemSpec.FromStrArray(cfg.ItemsToPrint);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -29,7 +29,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace SharedDatabase.Entities
|
||||
///
|
||||
public virtual string Workflow { get; set; } /// Not mapped to DB !!! Production tracing workflow name
|
||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||
public virtual bool PrintLabel { get; set; } /// Not mapped to DB !!!
|
||||
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
@@ -469,6 +470,7 @@ namespace SharedDatabase.Entities
|
||||
#if IPERL
|
||||
FWVersion = string.Empty;
|
||||
#endif
|
||||
PrintLabel = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -531,6 +533,7 @@ namespace SharedDatabase.Entities
|
||||
|
||||
Workflow = src.Workflow; /// Not mapped to DB
|
||||
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
||||
PrintLabel = src.PrintLabel; /// Not mapped to DB
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
@@ -725,6 +728,7 @@ namespace SharedDatabase.Entities
|
||||
|
||||
writer.Write(Workflow);
|
||||
writer.Write(LastRecordIsNok);
|
||||
writer.Write(PrintLabel);
|
||||
|
||||
/// Save WaterMeterData or WaterMeterData.Id
|
||||
if (WaterMeterData != null && savedWMDatas != null && !savedWMDatas.Contains(WaterMeterData))
|
||||
@@ -825,6 +829,7 @@ namespace SharedDatabase.Entities
|
||||
|
||||
Workflow = reader.ReadString();
|
||||
LastRecordIsNok = reader.ReadBoolean();
|
||||
PrintLabel = reader.ReadBoolean();
|
||||
|
||||
/// Retrieve TestData
|
||||
if (reader.ReadBoolean())
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -25,7 +25,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -98,6 +98,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductionTracing", "Produc
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S640TestApp", "S640TestApp\S640TestApp.csproj", "{EE097B5A-8162-45B1-9643-4969FC3A8921}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabelPrinting", "LabelPrinting\LabelPrinting.csproj", "{E4531D13-317C-4D9F-809F-5533B5C3C8BF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -432,6 +434,18 @@ Global
|
||||
{EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E4531D13-317C-4D9F-809F-5533B5C3C8BF}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.9.2130.0")]
|
||||
[assembly: AssemblyFileVersion("3.9.2130.0")]
|
||||
[assembly: AssemblyVersion("3.9.2135.0")]
|
||||
[assembly: AssemblyFileVersion("3.9.2135.0")]
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<value>(offline)</value>
|
||||
</data>
|
||||
<data name="About_Test_Bench_Framework" xml:space="preserve">
|
||||
<value>O zkušební stolici Framework</value>
|
||||
<value>O Test Bench Framework</value>
|
||||
</data>
|
||||
<data name="Activity" xml:space="preserve">
|
||||
<value>Činnost</value>
|
||||
@@ -1752,4 +1752,7 @@
|
||||
<data name="Paths" xml:space="preserve">
|
||||
<value>Cesty</value>
|
||||
</data>
|
||||
<data name="About" xml:space="preserve">
|
||||
<value>O</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -15,6 +15,7 @@ namespace TBF.Rig.DataEntry
|
||||
[Description("Last from history")] HistoryLast,
|
||||
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK
|
||||
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
|
||||
[Description("Set")] Set, /// Set to 'yes' when the form is open
|
||||
Count,
|
||||
}
|
||||
|
||||
@@ -39,6 +40,7 @@ namespace TBF.Rig.DataEntry
|
||||
[Description("WM Remark")] WmRemark,
|
||||
[Description("Batch remark")] BatchRemark,
|
||||
[Description("Batch and WM remark")] BatchAndWmRemark,
|
||||
[Description("Print label")] PrintLabel,
|
||||
#if ORACLE_DB
|
||||
[Description("Prefix")] Prefix,
|
||||
[Description("Suffix")] Suffix,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.DataEntry
|
||||
{
|
||||
@@ -30,9 +31,10 @@ namespace TBF.Rig.DataEntry
|
||||
case Ct.BatchOrder: return (wm.Batch != null && wm.Batch.PurchaseOrder != null) ? wm.Batch.PurchaseOrder : string.Empty;
|
||||
case Ct.BatchAndWmOrder: return (wm.Batch != null && wm.Batch.PurchaseOrder != null) ? wm.Batch.PurchaseOrder : string.Empty;
|
||||
|
||||
case Ct.WmRemark: return (!wm.Disabled && wm.Remark != null) ? wm.Remark : string.Empty;
|
||||
case Ct.BatchRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.BatchAndWmRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.WmRemark: return (!wm.Disabled && wm.Remark != null) ? wm.Remark : string.Empty;
|
||||
case Ct.BatchRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.BatchAndWmRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.PrintLabel: return wm.PrintLabel ? Strings.yes : Strings.no;
|
||||
#if ORACLE_DB
|
||||
case Ct.Prefix: return (!wm.Disabled && wm.Prefix != null) ? wm.Prefix : string.Empty;
|
||||
case Ct.Suffix: return (!wm.Disabled && wm.Suffix != null) ? wm.Suffix : string.Empty;
|
||||
@@ -77,6 +79,10 @@ namespace TBF.Rig.DataEntry
|
||||
case Ct.BatchAndWmRemark:
|
||||
if (wm.Batch != null) wm.Batch.Remark = value;
|
||||
return;
|
||||
|
||||
case Ct.PrintLabel:
|
||||
wm.PrintLabel = (value == Strings.yes);
|
||||
return;
|
||||
#if ORACLE_DB
|
||||
case Ct.Prefix: wm.Prefix = value; return;
|
||||
case Ct.Suffix: wm.Suffix = value; return;
|
||||
|
||||
@@ -124,6 +124,18 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
comboBoxes = new ComboBox[colItems.Count, wmsCount];
|
||||
checkBoxes = new CheckBox[wmsCount];
|
||||
|
||||
/// Make Auto s/n button visible if there is either Ct.SerialNr or Ct.SerialNrAux column
|
||||
int buttonsWidth = 350;
|
||||
for (int k = 0; k < colItems.Count; k++)
|
||||
{
|
||||
if ((colItems[k].Content == Ct.SerialNr || colItems[k].Content == Ct.SerialNrAux) && colItems[k].Action != Ac.LoadReadOnly)
|
||||
{
|
||||
autoSNButton.Visible = true;
|
||||
buttonsWidth += 147;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// Layout related readonly variables derived from argument 'sz'
|
||||
switch (sz)
|
||||
{
|
||||
@@ -132,7 +144,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
meterHeight = 26; /// Height of a ComboBox control
|
||||
margin = 20;
|
||||
spacing = 8;
|
||||
buttonsWidth = 350;
|
||||
this.buttonsWidth = buttonsWidth;
|
||||
hdrHeight = 120;
|
||||
labelWid = 31;
|
||||
checkBoxWid = 23;
|
||||
@@ -144,7 +156,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
meterHeight = 31; /// Height of a ComboBox control
|
||||
margin = 25;
|
||||
spacing = 10;
|
||||
buttonsWidth = 350;
|
||||
this.buttonsWidth = buttonsWidth;
|
||||
hdrHeight = 140;
|
||||
labelWid = 34;
|
||||
checkBoxWid = 23;
|
||||
@@ -155,7 +167,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
meterHeight = 37; /// Height of a ComboBox control
|
||||
margin = 30;
|
||||
spacing = 12;
|
||||
buttonsWidth = 350;
|
||||
this.buttonsWidth = buttonsWidth;
|
||||
hdrHeight = 160;
|
||||
labelWid = 40;
|
||||
checkBoxWid = 23;
|
||||
@@ -236,6 +248,8 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
///
|
||||
/// Table
|
||||
///
|
||||
int commonCheckBoxLeft = 0;
|
||||
int commonCheckBoxTop = 0;
|
||||
int columnsTop = Math.Max(hdrHeight, groupBoxHeight + 2 * margin + spacing);
|
||||
for (int j = 0; j < linesCount; j++)
|
||||
{
|
||||
@@ -294,14 +308,22 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
TabIndex = tabIndex++,
|
||||
Parent = this,
|
||||
};
|
||||
|
||||
|
||||
comboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
|
||||
comboBox.TextChanged += new System.EventHandler(this.comboBox_TextChanged);
|
||||
comboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox_KeyPress);
|
||||
|
||||
var lastVals = GetHistoryFromLS(isEnd, k);
|
||||
comboBox.Items.Add(lastVals.Length > wmPos0 ? lastVals[wmPos0] : string.Empty); /// History in drop-down menu
|
||||
|
||||
|
||||
if (ci.Content == Ct.PrintLabel)
|
||||
{
|
||||
comboBox.Items.Add(Strings.yes);
|
||||
comboBox.Items.Add(Strings.no);
|
||||
}
|
||||
else
|
||||
{
|
||||
var lastVals = GetHistoryFromLS(isEnd, k);
|
||||
comboBox.Items.Add(lastVals.Length > wmPos0 ? lastVals[wmPos0] : string.Empty); /// History in drop-down menu
|
||||
}
|
||||
|
||||
left += ci.Width + spacing;
|
||||
comboBoxes[k, wmPos0] = comboBox;
|
||||
this.Controls.Add(comboBox);
|
||||
@@ -316,10 +338,26 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
};
|
||||
checkBoxes[wmPos0] = checkBox;
|
||||
this.Controls.Add(checkBox);
|
||||
|
||||
if (commonCheckBoxLeft == 0)
|
||||
{
|
||||
commonCheckBoxLeft = left;
|
||||
commonCheckBoxTop = columnsTop - meterHeight;
|
||||
}
|
||||
}
|
||||
|
||||
okButton.TabIndex = tabIndex++;
|
||||
clearButton.TabIndex = tabIndex++;
|
||||
|
||||
var commonCheckBox = new CheckBox
|
||||
{
|
||||
Location = new Point(commonCheckBoxLeft, commonCheckBoxTop + 6),
|
||||
Size = new Size(checkBoxWid, 23),
|
||||
TabIndex = tabIndex++,
|
||||
Parent = this,
|
||||
};
|
||||
commonCheckBox.CheckedChanged += new System.EventHandler(commonCheckBox_CheckedChanged);
|
||||
this.Controls.Add(commonCheckBox);
|
||||
}
|
||||
|
||||
///
|
||||
@@ -327,7 +365,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
///
|
||||
Rectangle screenRectangle = this.RectangleToScreen(this.ClientRectangle);
|
||||
int titleBarHeight = screenRectangle.Top - this.Top;
|
||||
Size = new Size(Math.Max(meterWidth * linesCount + margin * (linesCount + 1), margin + groupBoxWidth + buttonsWidth),
|
||||
Size = new Size(Math.Max(meterWidth * linesCount + margin * (linesCount + 1), margin + groupBoxWidth + this.buttonsWidth),
|
||||
titleBarHeight + columnsTop + lineSize * (meterHeight + spacing) + margin);
|
||||
|
||||
Localize();
|
||||
@@ -445,6 +483,10 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
case Ac.LoadReadOnly:
|
||||
commonComboBoxes[ix].Text = DEUtils.GetContent(commonItems[ix].Content, firstValidWM);
|
||||
break;
|
||||
|
||||
case Ac.Set:
|
||||
commonComboBoxes[ix].Text = Strings.yes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,6 +514,13 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
comboBoxes[k, i].Text = DEUtils.GetContent(colItems[k].Content, WaterMeters[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case Ac.Set:
|
||||
for (int i = 0; i < wmsCount; i++)
|
||||
{
|
||||
comboBoxes[k, i].Text = Strings.yes;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,18 +626,94 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
private void commonCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
InitializeBoxes();
|
||||
bool state = (sender as CheckBox).Checked;
|
||||
for (int i = 0; i < wmsCount; i++)
|
||||
{
|
||||
checkBoxes[i].Checked = state;
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateWMsFromBoxes();
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
InitializeBoxes();
|
||||
}
|
||||
|
||||
private void autoSNButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
///
|
||||
/// Find the 1st enabled water meter
|
||||
///
|
||||
int firstIx;
|
||||
for (firstIx = 0; firstIx < wmsCount; firstIx++)
|
||||
{
|
||||
if (checkBoxes[firstIx].Checked) break;
|
||||
}
|
||||
if (firstIx == wmsCount)
|
||||
{
|
||||
return; /// There is not any enabled water meter
|
||||
}
|
||||
|
||||
char[] digits = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
||||
|
||||
///
|
||||
/// Find a column with serial numbers
|
||||
///
|
||||
for (int k = 0; k < colItems.Count; k++)
|
||||
{
|
||||
if ((colItems[k].Content == Ct.SerialNr || colItems[k].Content == Ct.SerialNrAux) && colItems[k].Action != Ac.LoadReadOnly)
|
||||
{
|
||||
///
|
||||
/// Column with serial numbers found => perform an auto s/n assignment
|
||||
///
|
||||
string firstSN = comboBoxes[k, firstIx].Text;
|
||||
|
||||
int firstSnNr;
|
||||
int startIx = firstSN.IndexOfAny(digits);
|
||||
if (startIx >= 0)
|
||||
{
|
||||
int lastDigitPosPlus1 = startIx + 1;
|
||||
var listOfDigits = new List<char>(digits);
|
||||
while (lastDigitPosPlus1 < firstSN.Length && listOfDigits.Contains(firstSN[lastDigitPosPlus1]))
|
||||
{
|
||||
lastDigitPosPlus1++;
|
||||
}
|
||||
int digitsCount = lastDigitPosPlus1 - startIx;
|
||||
|
||||
if (int.TryParse(firstSN.Substring(startIx, digitsCount), out firstSnNr) && firstSnNr >= 0)
|
||||
{
|
||||
for (int ix = firstIx + 1; ix < wmsCount; ix++)
|
||||
{
|
||||
if (checkBoxes[ix].Checked)
|
||||
{
|
||||
firstSnNr++;
|
||||
string newSN = firstSnNr.ToString();
|
||||
int len = newSN.Length;
|
||||
if (len <= digitsCount)
|
||||
{
|
||||
comboBoxes[k, ix].Text = firstSN.Substring(0, startIx + digitsCount - len) + newSN + firstSN.Substring(startIx + digitsCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBoxes[k, ix].Text = firstSN.Substring(0, startIx) + newSN + firstSN.Substring(startIx + digitsCount); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox_SelectedIndexChanged(object sndr, EventArgs e)
|
||||
{
|
||||
if (!isHandlersEnabled) return;
|
||||
@@ -599,7 +724,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
|
||||
isHandlersEnabled = false;
|
||||
|
||||
if (k >= 0 && comboBoxes[k, j].Text == comboBoxes[k, j].Items[0].ToString())
|
||||
if (k >= 0 && colItems[k].Content != Ct.PrintLabel && comboBoxes[k, j].Text == comboBoxes[k, j].Items[0].ToString())
|
||||
{
|
||||
for (int i = 0; i < wmsCount; i++)
|
||||
{
|
||||
|
||||
+11
@@ -34,6 +34,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBgEnForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.autoSNButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
@@ -52,11 +53,20 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// autoSNButton
|
||||
//
|
||||
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.autoSNButton.Name = "autoSNButton";
|
||||
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||
//
|
||||
// CycleBgEnForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.Controls.Add(this.autoSNButton);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
@@ -71,5 +81,6 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.Button autoSNButton;
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="clearButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -181,6 +181,42 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>clearButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="autoSNButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>648, 26</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 63</value>
|
||||
</data>
|
||||
<data name="autoSNButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Text" xml:space="preserve">
|
||||
<value>Auto s/n</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>autoSNButton.Name" xml:space="preserve">
|
||||
<value>autoSNButton</value>
|
||||
</data>
|
||||
<data name=">>autoSNButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>autoSNButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>autoSNButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
|
||||
BgItemContent = new Ct[1] { Ct.BatchAndWmOrder };
|
||||
BgItemCaption = new string[1] { "Order nr." };
|
||||
BgItemAction = new Ac[1] { Ac.Clear };
|
||||
BgItemAction = new Ac[1] { Ac.HistoryLast };
|
||||
BgItemWidth = new int[1] { 200 };
|
||||
|
||||
BgColumnContent = new Ct[1] { Ct.SerialNr };
|
||||
@@ -563,6 +563,7 @@ namespace TBF.Rig.DataEntry.Uni
|
||||
Ct.ArchivePath.ToDescription(),
|
||||
Ct.WmOrder.ToDescription(),
|
||||
Ct.WmRemark.ToDescription(),
|
||||
Ct.PrintLabel.ToDescription(),
|
||||
};
|
||||
}
|
||||
case 2:
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Printing;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using Common.Forms;
|
||||
using Results.Output.Printers.Enhanced;
|
||||
using log4net;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.Enhanced
|
||||
{
|
||||
@@ -31,22 +32,35 @@ namespace TBF.Rig.Output.Printers.Enhanced
|
||||
IList<Results.WMeterRsltItemSpec> testItems;
|
||||
string footer;
|
||||
|
||||
bool printingCompleted = false;
|
||||
bool statusDlgShown = false;
|
||||
ModelessForm modelessForm;
|
||||
|
||||
public Printer() { }
|
||||
|
||||
public Printer() { }
|
||||
|
||||
public Printer(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems);
|
||||
@@ -132,38 +146,67 @@ namespace TBF.Rig.Output.Printers.Enhanced
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, batch.StartTime, batch.EndTime, batch.BatchNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0:yyyyMMdd-HHmm}", batch.EndTime);
|
||||
}
|
||||
|
||||
PrintResults(batch, documentName);
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
printingCompleted = false;
|
||||
statusDlgShown = false;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
string message;
|
||||
if (printingCompleted || printerCfg.DebugLevel != DebugMode.Normal)
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
else if (PrinterStatus.IsOnline(printerCfg.PrinterName, out message))
|
||||
{
|
||||
if (statusDlgShown)
|
||||
{
|
||||
statusDlgShown = false;
|
||||
if (modelessForm != null) modelessForm.Close();
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
/// Printer is online => Print results now
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, batch.StartTime, batch.EndTime, batch.BatchNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0:yyyyMMdd-HHmm}", batch.EndTime);
|
||||
}
|
||||
|
||||
PrintResults(batch, documentName);
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
|
||||
printingCompleted = true;
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!statusDlgShown)
|
||||
{
|
||||
statusDlgShown = true;
|
||||
modelessForm = new ModelessForm(message);
|
||||
new Thread(() => System.Windows.Forms.Application.Run(modelessForm)).Start();
|
||||
}
|
||||
|
||||
return Event.Busy;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using Common;
|
||||
using Common.Forms;
|
||||
using Results.Output.Printers.Label;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.Label
|
||||
@@ -19,30 +21,36 @@ namespace TBF.Rig.Output.Printers.Label
|
||||
|
||||
public bool SupressPrinting { get { return (printerCfg.NrOfCopies == 0); } }
|
||||
|
||||
/// <summary> Data to print </summary>
|
||||
Results.Entities.Batch batch;
|
||||
Results.Entities.Batch batch; /// Data to print
|
||||
IList<Results.WMeterRsltItemSpec> commonItems; /// Items to print
|
||||
bool printingCompleted = false;
|
||||
bool statusDlgShown = false;
|
||||
ModelessForm modelessForm;
|
||||
|
||||
///
|
||||
/// Items to print
|
||||
///
|
||||
IList<Results.WMeterRsltItemSpec> commonItems;
|
||||
|
||||
|
||||
public Printer() { }
|
||||
public Printer() { }
|
||||
|
||||
public Printer(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.ItemsToPrint);
|
||||
}
|
||||
@@ -108,29 +116,58 @@ namespace TBF.Rig.Output.Printers.Label
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
printingCompleted = false;
|
||||
statusDlgShown = false;
|
||||
}
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && (!printerCfg.GoodOnly || wm.Passed))
|
||||
{
|
||||
PrintResults(batch, wm, string.Format("{0}-{1}", batch.BatchNr, wm.WMPosition));
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
string message;
|
||||
if (printingCompleted || printerCfg.DebugLevel != DebugMode.Normal)
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
else if (PrinterStatus.IsOnline(printerCfg.PrinterName, out message))
|
||||
{
|
||||
if (statusDlgShown)
|
||||
{
|
||||
statusDlgShown = false;
|
||||
if (modelessForm != null) modelessForm.Close();
|
||||
}
|
||||
|
||||
/// Printer is online => Print results now
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && wm.PrintLabel && (!printerCfg.GoodOnly || wm.Passed))
|
||||
{
|
||||
PrintResults(wm, string.Format("{0}-{1}", batch.BatchNr, wm.WMPosition));
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
|
||||
printingCompleted = true;
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!statusDlgShown)
|
||||
{
|
||||
statusDlgShown = true;
|
||||
modelessForm = new ModelessForm(message);
|
||||
new Thread(() => System.Windows.Forms.Application.Run(modelessForm)).Start();
|
||||
}
|
||||
|
||||
return Event.Busy;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
@@ -139,7 +176,7 @@ namespace TBF.Rig.Output.Printers.Label
|
||||
}
|
||||
|
||||
|
||||
void PrintResults(Results.Entities.Batch batch, Results.Entities.WaterMeter wm, string documentName)
|
||||
public void PrintResults(Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
LabelPrinterCfg cfg = new LabelPrinterCfg
|
||||
{
|
||||
@@ -162,8 +199,8 @@ namespace TBF.Rig.Output.Printers.Label
|
||||
|
||||
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
|
||||
{
|
||||
string docNameEx = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}_{1}"), documentName, i);
|
||||
var pd = new Results.Output.Printers.Label.LabelPrintDocument(batch, cfg, wm, docNameEx);
|
||||
string docNameEx = string.Format((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}_{1}", documentName, i);
|
||||
var pd = new LabelPrintDocument(cfg, wm, docNameEx);
|
||||
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
|
||||
pd.Print();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.Label
|
||||
|
||||
@@ -7,6 +7,7 @@ using log4net;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using Results.Output.Printers.MultiLabel;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.MultiLabel
|
||||
{
|
||||
@@ -34,15 +35,24 @@ namespace TBF.Rig.Output.Printers.MultiLabel
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.ItemsToPrint);
|
||||
}
|
||||
@@ -112,16 +122,19 @@ namespace TBF.Rig.Output.Printers.MultiLabel
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
PrintResults(batch, string.Format("{0}", batch.BatchNr));
|
||||
PrintResults(batch, string.Format("{0}", batch.BatchNr));
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Threading;
|
||||
using Results.Entities;
|
||||
using Results.Output.Printers.OnePerBatch;
|
||||
using log4net;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.OnePerBatch
|
||||
{
|
||||
@@ -38,15 +39,24 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems1);
|
||||
@@ -150,45 +160,48 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && (!printerCfg.GoodOnly || wm.Passed))
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, wm.StartTime(), wm.EndTime(), wm.BatchNr(), wm.WMPosition, wm.SerialNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0}", batch.BatchNr, wm.WMPosition);
|
||||
}
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
/// The following condition prevents printing empty AutoTest results protocols
|
||||
if (string.IsNullOrEmpty(printerCfg.AutoTestParam) || wm.AutoMeterTestRslts(printerCfg.AutoTestParam).Count > 0)
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && (!printerCfg.GoodOnly || wm.Passed))
|
||||
{
|
||||
PrintResults(batch, wm, documentName);
|
||||
break;
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, wm.StartTime(), wm.EndTime(), wm.BatchNr(), wm.WMPosition, wm.SerialNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0}", batch.BatchNr, wm.WMPosition);
|
||||
}
|
||||
|
||||
/// The following condition prevents printing empty AutoTest results protocols
|
||||
if (string.IsNullOrEmpty(printerCfg.AutoTestParam) || wm.AutoMeterTestRslts(printerCfg.AutoTestParam).Count > 0)
|
||||
{
|
||||
PrintResults(batch, wm, documentName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Threading;
|
||||
using Results.Entities;
|
||||
using Results.Output.Printers.OnePerMeter;
|
||||
using log4net;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.OnePerMeter
|
||||
{
|
||||
@@ -38,15 +39,24 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems1);
|
||||
@@ -155,38 +165,41 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && (!printerCfg.GoodOnly || wm.Passed))
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, wm.StartTime(), wm.EndTime(), wm.BatchNr(), wm.WMPosition, wm.SerialNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0}-{1}", batch.BatchNr, wm.WMPosition);
|
||||
}
|
||||
|
||||
PrintResults(batch, wm, documentName);
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && (!printerCfg.GoodOnly || wm.Passed))
|
||||
{
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, wm.StartTime(), wm.EndTime(), wm.BatchNr(), wm.WMPosition, wm.SerialNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0}-{1}", batch.BatchNr, wm.WMPosition);
|
||||
}
|
||||
|
||||
PrintResults(batch, wm, documentName);
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
///
|
||||
/// Copyright (c) 2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Management;
|
||||
|
||||
namespace TBF.Rig.Output.Printers
|
||||
{
|
||||
public static class PrinterStatus
|
||||
{
|
||||
///
|
||||
/// See also https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-printer
|
||||
///
|
||||
|
||||
public enum DetectedErrorState : UInt16
|
||||
{
|
||||
Unknown = 0,
|
||||
Other = 1,
|
||||
No_Error = 2,
|
||||
Low_Paper = 3,
|
||||
No_Paper = 4,
|
||||
Low_Toner = 5,
|
||||
No_Toner = 6,
|
||||
Door_Open = 7,
|
||||
Jammed = 8,
|
||||
Offline = 9,
|
||||
Service_Requested = 10,
|
||||
Output_Bin_Full = 11,
|
||||
}
|
||||
|
||||
public enum ExtendedPrinterStatus : UInt16
|
||||
{
|
||||
Other = 1,
|
||||
Unknown = 2,
|
||||
Idle = 3,
|
||||
Printing = 4,
|
||||
Warming_Up = 5,
|
||||
Stopped_Printing = 6,
|
||||
Offline = 7,
|
||||
Paused = 8,
|
||||
Error = 9,
|
||||
Busy = 10,
|
||||
Not_Aavailable = 11,
|
||||
Waiting = 12,
|
||||
Processing = 13,
|
||||
Initialization = 14,
|
||||
Power_Save = 15,
|
||||
Pending_Deletion = 16,
|
||||
IO_Active = 17,
|
||||
Manual_Feed = 18,
|
||||
}
|
||||
|
||||
public static void GetStatus(string printerName)
|
||||
{
|
||||
/// Perform the search for printers and return the listing as a collection
|
||||
var mgmtSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Printer");
|
||||
var mgmtCollection = mgmtSearcher.Get();
|
||||
|
||||
foreach (ManagementObject wmiObj in mgmtCollection)
|
||||
{
|
||||
if (wmiObj["Name"].ToString().ToLower() == printerName.ToLower())
|
||||
{
|
||||
/// Management object name fits the printer name
|
||||
|
||||
var state = (ExtendedPrinterStatus)int.Parse(wmiObj["ExtendedPrinterStatus"].ToString());
|
||||
if (state == ExtendedPrinterStatus.Other ||
|
||||
state == ExtendedPrinterStatus.Unknown ||
|
||||
state == ExtendedPrinterStatus.Offline ||
|
||||
state == ExtendedPrinterStatus.Error ||
|
||||
state == ExtendedPrinterStatus.Not_Aavailable)
|
||||
{
|
||||
var message = string.Format("Printer '{0}' state is '{1}'", printerName, state.ToString().Replace('_', ' '));
|
||||
throw new ApplicationException(message);
|
||||
}
|
||||
|
||||
var error = (DetectedErrorState)int.Parse(wmiObj["DetectedErrorState"].ToString());
|
||||
if (error != DetectedErrorState.No_Error)
|
||||
{
|
||||
var message = string.Format("Printer '{0}' error state is '{1}'", printerName, error.ToString().Replace('_', ' '));
|
||||
throw new ApplicationException(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when printer is online, without errors.
|
||||
/// </summary>
|
||||
/// <param name="printerName">Printer name</param>
|
||||
/// <param name="message">Error message when printer is not online</param>
|
||||
/// <returns>true when online, false when there are any errors or printer is not online</returns>
|
||||
public static bool IsOnline(string printerName, out string message)
|
||||
{
|
||||
// TODO: Uncomment the following line and resolve problems : Unknown status/error always returned
|
||||
// if (string.IsNullOrEmpty(printerName))
|
||||
{
|
||||
/// Default printer
|
||||
message = string.Empty;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Perform the search for printers and return the listing as a collection
|
||||
var mgmtSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Printer");
|
||||
var mgmtCollection = mgmtSearcher.Get();
|
||||
|
||||
foreach (ManagementObject wmiObj in mgmtCollection)
|
||||
{
|
||||
if (wmiObj["Name"].ToString().ToLower() == printerName.ToLower())
|
||||
{
|
||||
/// Management object name fits the printer name
|
||||
|
||||
var state = (ExtendedPrinterStatus)int.Parse(wmiObj["ExtendedPrinterStatus"].ToString());
|
||||
if (state == ExtendedPrinterStatus.Other ||
|
||||
state == ExtendedPrinterStatus.Unknown ||
|
||||
state == ExtendedPrinterStatus.Offline ||
|
||||
state == ExtendedPrinterStatus.Error ||
|
||||
state == ExtendedPrinterStatus.Not_Aavailable)
|
||||
{
|
||||
message = string.Format("Printer '{0}' state is '{1}'", printerName, state.ToString().Replace('_', ' '));
|
||||
return false;
|
||||
}
|
||||
|
||||
var error = (DetectedErrorState)int.Parse(wmiObj["DetectedErrorState"].ToString());
|
||||
if (error != DetectedErrorState.No_Error)
|
||||
{
|
||||
message = string.Format("Printer '{0}' error state is '{1}'", printerName, error.ToString().Replace('_', ' '));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
message = string.Empty;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using System.Globalization;
|
||||
using System.Threading;
|
||||
using Results.Output.Printers.Zapiska;
|
||||
using log4net;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Output.Printers.Zapiska
|
||||
{
|
||||
@@ -37,15 +38,24 @@ namespace TBF.Rig.Output.Printers.Zapiska
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
ApplyConfig();
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
string message;
|
||||
if (!PrinterStatus.IsOnline(printerCfg.PrinterName, out message)) throw new ApplicationException(message);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
void ApplyConfig()
|
||||
{
|
||||
header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems1);
|
||||
@@ -137,27 +147,30 @@ namespace TBF.Rig.Output.Printers.Zapiska
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (printerCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, batch.StartTime, batch.EndTime, batch.BatchNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0:yyyyMMdd-HHmm}", batch.EndTime);
|
||||
}
|
||||
string documentName;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(printerCfg.DocName)) throw (new Exception());
|
||||
documentName = string.Format(printerCfg.DocName, batch.StartTime, batch.EndTime, batch.BatchNr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
documentName = string.Format("{0:yyyyMMdd-HHmm}", batch.EndTime);
|
||||
}
|
||||
|
||||
PrintResults(batch, documentName);
|
||||
PrintResults(batch, documentName);
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
|
||||
@@ -1227,11 +1227,11 @@ namespace TBF.Rig.Sequences
|
||||
Bridge.OnActivity(this, Strings.Enter_protocol_data);
|
||||
|
||||
//--------------------------------
|
||||
GenericDevices.IDataEntry dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IDataEntry;
|
||||
IDataEntry dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as IDataEntry;
|
||||
if (dataEntryCmpnt is IHasCycleEndForm)
|
||||
{
|
||||
IOperation showCycleEndFormOp =
|
||||
(dataEntryCmpnt as GenericDevices.IHasCycleEndForm).ShowCycleEndFormOp(TBF.Rig.Sequences.ProcessData.BatchRslts.Batch.WaterMeters);
|
||||
(dataEntryCmpnt as IHasCycleEndForm).ShowCycleEndFormOp(BatchRslts.Batch.WaterMeters);
|
||||
|
||||
if (showCycleEndFormOp != null)
|
||||
{
|
||||
@@ -1240,8 +1240,7 @@ namespace TBF.Rig.Sequences
|
||||
.AddOperation(showCycleEndFormOp)
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.UiCmdStop)) goto stop;
|
||||
}
|
||||
|
||||
+6
-4
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -50,7 +50,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -60,7 +60,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -70,7 +70,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -133,6 +133,7 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Web" />
|
||||
@@ -1002,6 +1003,7 @@
|
||||
<Compile Include="Rig\Output\Printers\OnePerMeter\PrinterCfgCtrl.designer.cs">
|
||||
<DependentUpon>PrinterCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Rig\Output\Printers\PrinterStatus.cs" />
|
||||
<Compile Include="Rig\Output\Printers\Zapiska\FactoryCompound.cs" />
|
||||
<Compile Include="Rig\Output\Printers\Zapiska\FactoryHeatMeters.cs" />
|
||||
<Compile Include="Rig\Output\Printers\Zapiska\FactorySingle.cs" />
|
||||
|
||||
@@ -268,9 +268,6 @@
|
||||
<data name="aboutTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 22</value>
|
||||
</data>
|
||||
<data name="aboutTSMenuItem.Text" xml:space="preserve">
|
||||
<value>O</value>
|
||||
</data>
|
||||
<data name="mainMenuStrip.Text" xml:space="preserve">
|
||||
<value>Záhlaví hlavního menu</value>
|
||||
</data>
|
||||
|
||||
+21
-1
@@ -108,6 +108,8 @@ namespace TBF.UI.Procedures
|
||||
this.parametersTabPage = new System.Windows.Forms.TabPage();
|
||||
this.parametersListViewEx = new Common.Forms.ListViewEx();
|
||||
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
|
||||
this.printer3NokLabel = new System.Windows.Forms.Label();
|
||||
this.printer3ComboBox = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
|
||||
this.mainSplitContainer.Panel1.SuspendLayout();
|
||||
this.mainSplitContainer.Panel2.SuspendLayout();
|
||||
@@ -150,6 +152,8 @@ namespace TBF.UI.Procedures
|
||||
//
|
||||
// generalTabPage
|
||||
//
|
||||
this.generalTabPage.Controls.Add(this.printer3NokLabel);
|
||||
this.generalTabPage.Controls.Add(this.printer3ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.variantNokLabel);
|
||||
this.generalTabPage.Controls.Add(this.eventTrigger3NokLabel);
|
||||
this.generalTabPage.Controls.Add(this.eventTrigger2NokLabel);
|
||||
@@ -694,6 +698,20 @@ namespace TBF.UI.Procedures
|
||||
resources.ApplyResources(this.sharedButtons, "sharedButtons");
|
||||
this.sharedButtons.Name = "sharedButtons";
|
||||
//
|
||||
// printer3NokLabel
|
||||
//
|
||||
resources.ApplyResources(this.printer3NokLabel, "printer3NokLabel");
|
||||
this.printer3NokLabel.ForeColor = System.Drawing.Color.Red;
|
||||
this.printer3NokLabel.Name = "printer3NokLabel";
|
||||
//
|
||||
// printer3ComboBox
|
||||
//
|
||||
this.printer3ComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.printer3ComboBox, "printer3ComboBox");
|
||||
this.printer3ComboBox.Name = "printer3ComboBox";
|
||||
this.printer3ComboBox.SelectedIndexChanged += new System.EventHandler(this.printer3ComboBox_SelectedIndexChanged);
|
||||
this.printer3ComboBox.TextChanged += new System.EventHandler(this.printer3ComboBox_TextChanged);
|
||||
//
|
||||
// ProcedureDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -795,5 +813,7 @@ namespace TBF.UI.Procedures
|
||||
private System.Windows.Forms.Label dataEntryNokLabel;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label variantNokLabel;
|
||||
}
|
||||
private System.Windows.Forms.Label printer3NokLabel;
|
||||
private System.Windows.Forms.ComboBox printer3ComboBox;
|
||||
}
|
||||
}
|
||||
@@ -152,6 +152,7 @@ namespace TBF.UI.Procedures
|
||||
dataEntryComboBox.Items.Add("---");
|
||||
printer1ComboBox.Items.Add("---");
|
||||
printer2ComboBox.Items.Add("---");
|
||||
printer3ComboBox.Items.Add("---");
|
||||
fileWriter1ComboBox.Items.Add("---");
|
||||
fileWriter2ComboBox.Items.Add("---");
|
||||
fileWriter3ComboBox.Items.Add("---");
|
||||
@@ -171,6 +172,7 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
printer1ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
printer2ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
printer3ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
}
|
||||
if (cmpnt is IResultsWriter)
|
||||
{
|
||||
@@ -425,6 +427,7 @@ namespace TBF.UI.Procedures
|
||||
transitionEndComboBox.Enabled = false;
|
||||
printer1ComboBox.Enabled = false;
|
||||
printer2ComboBox.Enabled = false;
|
||||
printer3ComboBox.Enabled = false;
|
||||
fileWriter1ComboBox.Enabled = false;
|
||||
fileWriter2ComboBox.Enabled = false;
|
||||
fileWriter3ComboBox.Enabled = false;
|
||||
@@ -559,13 +562,15 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
printer1ComboBox.Text = "---";
|
||||
printer2ComboBox.Text = "---";
|
||||
}
|
||||
else
|
||||
printer3ComboBox.Text = "---";
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] fields = LoadedProcedure.ResultsPrinter.Split(new char[] { '~' });
|
||||
printer1ComboBox.Text = fields[0];
|
||||
printer2ComboBox.Text = (fields.Length == 2) ? fields[1] : "---";
|
||||
}
|
||||
printer2ComboBox.Text = (fields.Length >= 2) ? fields[1] : "---";
|
||||
printer3ComboBox.Text = (fields.Length >= 3) ? fields[2] : "---";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(LoadedProcedure.ResultsWriter))
|
||||
{
|
||||
@@ -639,16 +644,35 @@ namespace TBF.UI.Procedures
|
||||
///
|
||||
/// Printers
|
||||
///
|
||||
if (printer1ComboBox.Items.Contains(printer1ComboBox.Text) && printer2ComboBox.Items.Contains(printer2ComboBox.Text))
|
||||
if (printer1ComboBox.Items.Contains(printer1ComboBox.Text) &&
|
||||
printer2ComboBox.Items.Contains(printer2ComboBox.Text) &&
|
||||
printer3ComboBox.Items.Contains(printer3ComboBox.Text))
|
||||
{
|
||||
bool pr = !printer1ComboBox.Text.Equals("---");
|
||||
bool pr2 = !printer2ComboBox.Text.Equals("---") && !printer2ComboBox.Text.Equals(printer1ComboBox.Text);
|
||||
bool first = true;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!printer1ComboBox.Text.Equals("---"))
|
||||
{
|
||||
sb.Append(printer1ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (!pr && !pr2) LoadedProcedure.ResultsPrinter = string.Empty;
|
||||
else if (pr && !pr2) LoadedProcedure.ResultsPrinter = printer1ComboBox.Text;
|
||||
else if (!pr && pr2) LoadedProcedure.ResultsPrinter = printer2ComboBox.Text;
|
||||
else LoadedProcedure.ResultsPrinter = printer1ComboBox.Text + '~' + printer2ComboBox.Text;
|
||||
}
|
||||
if (!printer2ComboBox.Text.Equals("---") && !printer2ComboBox.Text.Equals(printer1ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(printer2ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (!printer3ComboBox.Text.Equals("---") && !printer3ComboBox.Text.Equals(printer1ComboBox.Text)
|
||||
&& !printer3ComboBox.Text.Equals(printer2ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(printer3ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
|
||||
LoadedProcedure.ResultsPrinter = sb.ToString();
|
||||
}
|
||||
|
||||
///
|
||||
/// File writers
|
||||
@@ -2355,6 +2379,7 @@ namespace TBF.UI.Procedures
|
||||
#endif
|
||||
printer1ComboBox.Enabled = true;
|
||||
printer2ComboBox.Enabled = true;
|
||||
printer3ComboBox.Enabled = true;
|
||||
fileWriter1ComboBox.Enabled = true;
|
||||
fileWriter2ComboBox.Enabled = true;
|
||||
fileWriter3ComboBox.Enabled = true;
|
||||
@@ -3325,6 +3350,7 @@ namespace TBF.UI.Procedures
|
||||
private void transitionEndComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer1ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer2ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer3ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter1ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter2ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter3ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
@@ -3339,6 +3365,7 @@ namespace TBF.UI.Procedures
|
||||
private void transitionEndComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer1ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer2ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void printer3ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter1ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter2ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
private void fileWriter3ComboBox_TextChanged(object sender, EventArgs e) { ShowNokComponents(); }
|
||||
@@ -3355,6 +3382,7 @@ namespace TBF.UI.Procedures
|
||||
transitionEndNokLabel.Visible = !transitionEndComboBox.Items.Contains(transitionEndComboBox.Text);
|
||||
printer1NokLabel.Visible = !printer1ComboBox.Items.Contains(printer1ComboBox.Text);
|
||||
printer2NokLabel.Visible = !printer2ComboBox.Items.Contains(printer2ComboBox.Text);
|
||||
printer3NokLabel.Visible = !printer3ComboBox.Items.Contains(printer3ComboBox.Text);
|
||||
fileWriter1NokLabel.Visible = !fileWriter1ComboBox.Items.Contains(fileWriter1ComboBox.Text);
|
||||
fileWriter2NokLabel.Visible = !fileWriter2ComboBox.Items.Contains(fileWriter2ComboBox.Text);
|
||||
fileWriter3NokLabel.Visible = !fileWriter3ComboBox.Items.Contains(fileWriter3ComboBox.Text);
|
||||
|
||||
@@ -129,6 +129,63 @@
|
||||
<data name="mainSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 248</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>63</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.Text" xml:space="preserve">
|
||||
<value>!</value>
|
||||
</data>
|
||||
<data name="printer3NokLabel.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>printer3NokLabel.Name" xml:space="preserve">
|
||||
<value>printer3NokLabel</value>
|
||||
</data>
|
||||
<data name=">>printer3NokLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>printer3NokLabel.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer3NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="printer3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 243</value>
|
||||
</data>
|
||||
<data name="printer3ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
</data>
|
||||
<data name="printer3ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>printer3ComboBox.Name" xml:space="preserve">
|
||||
<value>printer3ComboBox</value>
|
||||
</data>
|
||||
<data name=">>printer3ComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>printer3ComboBox.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="variantNokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -160,7 +217,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>variantNokLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="eventTrigger3NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -172,7 +229,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventTrigger3NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 409</value>
|
||||
<value>473, 432</value>
|
||||
</data>
|
||||
<data name="eventTrigger3NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -196,7 +253,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger3NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="eventTrigger2NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -208,7 +265,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventTrigger2NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 386</value>
|
||||
<value>473, 409</value>
|
||||
</data>
|
||||
<data name="eventTrigger2NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -232,7 +289,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger2NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="eventTrigger1NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -244,7 +301,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventTrigger1NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 363</value>
|
||||
<value>473, 386</value>
|
||||
</data>
|
||||
<data name="eventTrigger1NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -268,7 +325,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger1NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="fileWriter5NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -280,7 +337,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWriter5NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 340</value>
|
||||
<value>473, 363</value>
|
||||
</data>
|
||||
<data name="fileWriter5NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -304,7 +361,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter5NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="fileWriter4NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -316,7 +373,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWriter4NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 317</value>
|
||||
<value>473, 340</value>
|
||||
</data>
|
||||
<data name="fileWriter4NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -340,7 +397,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter4NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="fileWriter3NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -352,7 +409,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWriter3NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 294</value>
|
||||
<value>473, 317</value>
|
||||
</data>
|
||||
<data name="fileWriter3NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -376,7 +433,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter3NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="fileWriter2NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -388,7 +445,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWriter2NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 271</value>
|
||||
<value>473, 294</value>
|
||||
</data>
|
||||
<data name="fileWriter2NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -412,7 +469,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter2NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="fileWriter1NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -424,7 +481,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWriter1NokLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>473, 248</value>
|
||||
<value>473, 271</value>
|
||||
</data>
|
||||
<data name="fileWriter1NokLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>11, 13</value>
|
||||
@@ -448,7 +505,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter1NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="printer2NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -484,7 +541,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer2NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="printer1NokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -520,7 +577,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer1NokLabel.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="transitionEndNokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -556,7 +613,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndNokLabel.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="transitionStartNokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -592,7 +649,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartNokLabel.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="dataEntryNokLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -628,7 +685,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryNokLabel.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -658,10 +715,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="fileWriter5ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 335</value>
|
||||
<value>188, 358</value>
|
||||
</data>
|
||||
<data name="fileWriter5ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -679,10 +736,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter5ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="eventTrigger3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 404</value>
|
||||
<value>188, 427</value>
|
||||
</data>
|
||||
<data name="eventTrigger3ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -700,10 +757,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="eventTrigger2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 381</value>
|
||||
<value>188, 404</value>
|
||||
</data>
|
||||
<data name="eventTrigger2ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -721,10 +778,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="eventTrigger1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 358</value>
|
||||
<value>188, 381</value>
|
||||
</data>
|
||||
<data name="eventTrigger1ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -742,7 +799,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -751,7 +808,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 364</value>
|
||||
<value>20, 387</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 13</value>
|
||||
@@ -772,7 +829,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTriggersLabel.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -796,7 +853,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -826,7 +883,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileLabel.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>833, 382</value>
|
||||
@@ -850,7 +907,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodTextBox.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -883,7 +940,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodLabel.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>650, 358</value>
|
||||
@@ -907,7 +964,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -940,7 +997,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -970,7 +1027,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>manualControlDisabledCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1000,7 +1057,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>mustBeCompleteCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1030,7 +1087,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>protectedCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1060,10 +1117,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton3.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 312</value>
|
||||
<value>188, 335</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -1081,10 +1138,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter4ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 289</value>
|
||||
<value>188, 312</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -1102,7 +1159,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 220</value>
|
||||
@@ -1123,10 +1180,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>32</value>
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 266</value>
|
||||
<value>188, 289</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -1144,7 +1201,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>33</value>
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1174,7 +1231,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton2.ZOrder" xml:space="preserve">
|
||||
<value>34</value>
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1204,7 +1261,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton1.ZOrder" xml:space="preserve">
|
||||
<value>35</value>
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 174</value>
|
||||
@@ -1225,7 +1282,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndComboBox.ZOrder" xml:space="preserve">
|
||||
<value>36</value>
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1255,7 +1312,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndLabel.ZOrder" xml:space="preserve">
|
||||
<value>37</value>
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 151</value>
|
||||
@@ -1276,7 +1333,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartComboBox.ZOrder" xml:space="preserve">
|
||||
<value>38</value>
|
||||
<value>40</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1306,10 +1363,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartLabel.ZOrder" xml:space="preserve">
|
||||
<value>39</value>
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 243</value>
|
||||
<value>188, 266</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>282, 21</value>
|
||||
@@ -1327,7 +1384,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>40</value>
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 197</value>
|
||||
@@ -1348,7 +1405,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>41</value>
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 128</value>
|
||||
@@ -1369,7 +1426,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryComboBox.ZOrder" xml:space="preserve">
|
||||
<value>42</value>
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name="fileWritersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1378,7 +1435,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="fileWritersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 248</value>
|
||||
<value>20, 271</value>
|
||||
</data>
|
||||
<data name="fileWritersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>56, 13</value>
|
||||
@@ -1399,7 +1456,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWritersLabel.ZOrder" xml:space="preserve">
|
||||
<value>43</value>
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name="printersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1429,7 +1486,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printersLabel.ZOrder" xml:space="preserve">
|
||||
<value>44</value>
|
||||
<value>46</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1459,7 +1516,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryLabel.ZOrder" xml:space="preserve">
|
||||
<value>45</value>
|
||||
<value>47</value>
|
||||
</data>
|
||||
<data name="notesTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>502, 220</value>
|
||||
@@ -1483,7 +1540,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>notesTextBox.ZOrder" xml:space="preserve">
|
||||
<value>46</value>
|
||||
<value>48</value>
|
||||
</data>
|
||||
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1513,7 +1570,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label18.ZOrder" xml:space="preserve">
|
||||
<value>47</value>
|
||||
<value>49</value>
|
||||
</data>
|
||||
<data name="variantTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 105</value>
|
||||
@@ -1534,7 +1591,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>variantTextBox.ZOrder" xml:space="preserve">
|
||||
<value>48</value>
|
||||
<value>50</value>
|
||||
</data>
|
||||
<data name="variantLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1564,7 +1621,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>variantLabel.ZOrder" xml:space="preserve">
|
||||
<value>49</value>
|
||||
<value>51</value>
|
||||
</data>
|
||||
<data name="lastChangedOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 82</value>
|
||||
@@ -1585,7 +1642,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>50</value>
|
||||
<value>52</value>
|
||||
</data>
|
||||
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1615,7 +1672,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label15.ZOrder" xml:space="preserve">
|
||||
<value>51</value>
|
||||
<value>53</value>
|
||||
</data>
|
||||
<data name="lastChangedByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 82</value>
|
||||
@@ -1636,7 +1693,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>52</value>
|
||||
<value>54</value>
|
||||
</data>
|
||||
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1666,7 +1723,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label16.ZOrder" xml:space="preserve">
|
||||
<value>53</value>
|
||||
<value>55</value>
|
||||
</data>
|
||||
<data name="createdOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 59</value>
|
||||
@@ -1687,7 +1744,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>54</value>
|
||||
<value>56</value>
|
||||
</data>
|
||||
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1717,7 +1774,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label14.ZOrder" xml:space="preserve">
|
||||
<value>55</value>
|
||||
<value>57</value>
|
||||
</data>
|
||||
<data name="createdByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 59</value>
|
||||
@@ -1738,7 +1795,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>56</value>
|
||||
<value>58</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1768,7 +1825,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>57</value>
|
||||
<value>59</value>
|
||||
</data>
|
||||
<data name="descriptionTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 36</value>
|
||||
@@ -1789,7 +1846,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>descriptionTextBox.ZOrder" xml:space="preserve">
|
||||
<value>58</value>
|
||||
<value>60</value>
|
||||
</data>
|
||||
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1819,7 +1876,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label12.ZOrder" xml:space="preserve">
|
||||
<value>59</value>
|
||||
<value>61</value>
|
||||
</data>
|
||||
<data name="procNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 13</value>
|
||||
@@ -1840,7 +1897,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>procNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>60</value>
|
||||
<value>62</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1870,7 +1927,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>61</value>
|
||||
<value>63</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 34</value>
|
||||
@@ -1879,7 +1936,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 433</value>
|
||||
<value>923, 456</value>
|
||||
</data>
|
||||
<data name="generalTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -2149,7 +2206,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>931, 471</value>
|
||||
<value>931, 494</value>
|
||||
</data>
|
||||
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -2191,7 +2248,7 @@
|
||||
<value>sharedButtons</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=3.9.2120.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=3.9.2132.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
@@ -2212,7 +2269,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 471</value>
|
||||
<value>1034, 494</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>931</value>
|
||||
@@ -2239,7 +2296,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 471</value>
|
||||
<value>1034, 494</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace WorkflowConfigurator
|
||||
{
|
||||
if (exc is QuitAppException)
|
||||
{
|
||||
ModelessForm.CloseForm();
|
||||
//ModelessForm.CloseForm();
|
||||
log.FatalFormat("Program was not running: {0}", exc.Message);
|
||||
MessageBox.Show(exc.Message,
|
||||
Strings.Warning,
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace Workplace
|
||||
public ISessionFactory SessionFactory;
|
||||
public ISession dbSession;
|
||||
|
||||
Common.Forms.ModelessForm modelessForm;
|
||||
|
||||
public IList<OrderInfo> AllOrders; /// All orders including the finished ones
|
||||
IList<OrderInfo> orders; /// New and active orders from the database
|
||||
IList<Process> workflows; /// Workflows from the database
|
||||
@@ -98,8 +100,8 @@ namespace Workplace
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
var form = new Common.Forms.ModelessForm(Strings.Loading_configuration_from_a_database);
|
||||
new System.Threading.Thread(() => Application.Run(form)).Start();
|
||||
modelessForm = new Common.Forms.ModelessForm(Strings.Loading_configuration_from_a_database);
|
||||
new System.Threading.Thread(() => Application.Run(modelessForm)).Start();
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
@@ -142,7 +144,7 @@ namespace Workplace
|
||||
|
||||
if (rslt != DialogResult.Yes)
|
||||
{
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
if (modelessForm != null) modelessForm.CloseForm();
|
||||
throw new Common.QuitAppException(Strings.Opening_database_failed);
|
||||
}
|
||||
}
|
||||
@@ -153,7 +155,7 @@ namespace Workplace
|
||||
var dr = Configure();
|
||||
if (dr != DialogResult.OK)
|
||||
{
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
if (modelessForm != null) modelessForm.CloseForm();
|
||||
throw new Common.QuitAppException(Strings.Opening_database_failed);
|
||||
}
|
||||
}
|
||||
@@ -269,7 +271,7 @@ namespace Workplace
|
||||
}
|
||||
}
|
||||
|
||||
Common.Forms.ModelessForm.CloseForm();
|
||||
if (modelessForm != null) modelessForm.CloseForm();
|
||||
loadedOnce = true;
|
||||
supressUINotifications = false;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ rmdir /s /q GenericTest\bin
|
||||
rmdir /s /q GenericTest\obj
|
||||
rmdir /s /q GraphLib\bin
|
||||
rmdir /s /q GraphLib\obj
|
||||
rmdir /s /q LabelPrinting\bin
|
||||
rmdir /s /q LabelPrinting\obj
|
||||
rmdir /s /q MergeResultsDBs\bin
|
||||
rmdir /s /q MergeResultsDBs\obj
|
||||
rmdir /s /q OrderManagement\bin\Debug
|
||||
|
||||
Reference in New Issue
Block a user