Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
@@ -0,0 +1,27 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Zapiska
{
public class FactoryCompound : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8) + ".Compound"; } }
public override string ToString() { return ClassName; }
public void ResetStaticProperties() { Printer.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Printer(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Printer(cfg); }
public IComponentCfg DefaultConfig() { return new PrinterCfg("Printer.Zapiska.Compound", this, Config.Entities.MetersKind.Combined); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(PrinterCfg.Serializer, component, this);
}
}
}
@@ -0,0 +1,27 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Zapiska
{
public class FactoryHeatMeters : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8) + ".HeatMeters"; } }
public override string ToString() { return ClassName; }
public void ResetStaticProperties() { Printer.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Printer(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Printer(cfg); }
public IComponentCfg DefaultConfig() { return new PrinterCfg("Printer.Zapiska.HeatMeters", this, Config.Entities.MetersKind.HeatMeter); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(PrinterCfg.Serializer, component, this);
}
}
}
@@ -0,0 +1,27 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Zapiska
{
public class FactorySingle : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8) + ".Single"; } }
public override string ToString() { return ClassName; }
public void ResetStaticProperties() { Printer.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Printer(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Printer(cfg); }
public IComponentCfg DefaultConfig() { return new PrinterCfg("Printer.Zapiska.Single", this, Config.Entities.MetersKind.Single); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(PrinterCfg.Serializer, component, this);
}
}
}
+219
View File
@@ -0,0 +1,219 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using Results.Output.Printers.Zapiska;
using log4net;
namespace TBF.Rig.Output.Printers.Zapiska
{
public class Printer : ComponentBase, IOperation, GenericDevices.IResultsPrinter
{
private static readonly ILog log = LogManager.GetLogger(typeof(Printer));
public override string ToString() { return string.Format("Output.Printers.Zapiska({0})", Cfg.ToString(1)); }
readonly PrinterCfg printerCfg;
public bool SupressPrinting { get { return printerCfg.SupressPrinting; } }
/// <summary> Data to print </summary>
Results.Entities.Batch batch;
///
/// Items to print
///
string header;
IList<Results.WMeterRsltItemSpec> commonItems;
IList<Results.WMeterRsltItemSpec> testItems;
string footer;
public Printer() { }
public Printer(Generic.IComponentCfg cfg)
: base(cfg)
{
printerCfg = cfg as PrinterCfg;
ApplyConfig();
log.Warn(this.ToString());
}
void ApplyConfig()
{
header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine);
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems1);
testItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.SelectedItems); /// TestID info will be overwritten later on
footer = string.IsNullOrEmpty(printerCfg.Footer) ? string.Empty : printerCfg.Footer.Replace("~", Environment.NewLine);
}
#region Configuration Change Handling
public static void OnCfgChange(object sender, CfgChangeArgs args)
{
if (CfgChangeHandler == null) return;
try { CfgChangeHandler(sender, args); }
catch (Exception e) { log.Error("CfgChangeHandler(...) failed", e); }
}
public static event EventHandler<CfgChangeArgs> CfgChangeHandler;
public override void StartChangeHandler()
{
CfgChangeHandler += delegate(object sender, CfgChangeArgs args)
{
PrinterCfg newCfg = args.Cfg as PrinterCfg;
if (newCfg != null && newCfg.Name.Equals(Name))
{
if (args.Command == CfgChangeCmd.CfgChange)
{
printerCfg.PageOrientation = newCfg.PageOrientation;
printerCfg.Template = newCfg.Template;
printerCfg.TopMargin = newCfg.TopMargin;
printerCfg.BottomMargin = newCfg.BottomMargin;
printerCfg.LeftMargin = newCfg.LeftMargin;
printerCfg.TitFntFml = newCfg.TitFntFml;
printerCfg.TitFntSz = newCfg.TitFntSz;
printerCfg.TitFntSty = newCfg.TitFntSty;
printerCfg.HdrFntFml = newCfg.HdrFntFml;
printerCfg.HdrFntSz = newCfg.HdrFntSz;
printerCfg.HdrFntSty = newCfg.HdrFntSty;
printerCfg.BodyFntFml = newCfg.BodyFntFml;
printerCfg.BodyFntSz = newCfg.BodyFntSz;
printerCfg.BodyFntSty = newCfg.BodyFntSty;
printerCfg.FooterFntFml = newCfg.FooterFntFml;
printerCfg.FooterFntSz = newCfg.FooterFntSz;
printerCfg.FooterFntSty = newCfg.FooterFntSty;
printerCfg.SupressPrinting = newCfg.SupressPrinting;
printerCfg.GoodOnly = newCfg.GoodOnly;
printerCfg.Culture = newCfg.Culture;
printerCfg.Header = newCfg.Header;
printerCfg.ColW0Pct = newCfg.ColW0Pct;
printerCfg.ColW1Pct = newCfg.ColW1Pct;
printerCfg.ColW2Pct = newCfg.ColW2Pct;
printerCfg.CommonItems1 = newCfg.CommonItems1;
printerCfg.CommonItems2 = newCfg.CommonItems2;
printerCfg.CommonItems3 = newCfg.CommonItems3;
printerCfg.SelectedItems = newCfg.SelectedItems;
printerCfg.BelowW0Pct = newCfg.BelowW0Pct;
printerCfg.BelowW1Pct = newCfg.BelowW1Pct;
printerCfg.BelowW2Pct = newCfg.BelowW2Pct;
printerCfg.BelowItems1 = newCfg.BelowItems1;
printerCfg.BelowItems2 = newCfg.BelowItems2;
printerCfg.BelowItems3 = newCfg.BelowItems3;
printerCfg.Footer = newCfg.Footer;
printerCfg.DocName = newCfg.DocName;
ApplyConfig();
}
}
};
}
#endregion Configuration Change Handling
/// <summary>
/// Prints the test cycle results, Events: Event.ResultsPrinted
/// </summary>
/// <param name="batch">Batch results to print</param>
/// <returns>Reference to the operation</returns>
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
{
this.batch = batch;
return this;
}
/// <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;
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsPrinted</returns>
public Event Run()
{
return Event.ResultsPrinted;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
}
void PrintResults(Results.Entities.Batch batch, string documentName)
{
if (batch.WaterMeters.Count > 0)
{
ZapiskaPrinterCfg cfg = new ZapiskaPrinterCfg {
PageOrientation = printerCfg.PageOrientation,
Template = printerCfg.Template,
TopMargin = printerCfg.TopMargin,
BottomMargin = printerCfg.BottomMargin,
LeftMargin = printerCfg.LeftMargin,
TitFntFml = printerCfg.TitFntFml,
TitFntSz = printerCfg.TitFntSz,
TitFntSty = printerCfg.TitFntSty,
HdrFntFml = printerCfg.HdrFntFml,
HdrFntSz = printerCfg.HdrFntSz,
HdrFntSty = printerCfg.HdrFntSty,
BodyFntFml = printerCfg.BodyFntFml,
BodyFntSz = printerCfg.BodyFntSz,
BodyFntSty = printerCfg.BodyFntSty,
FooterFntFml = printerCfg.FooterFntFml,
FooterFntSz = printerCfg.FooterFntSz,
FooterFntSty = printerCfg.FooterFntSty,
SupressPrinting = printerCfg.SupressPrinting,
GoodOnly = printerCfg.GoodOnly,
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
Header = printerCfg.Header,
ColW0Pct = printerCfg.ColW0Pct,
ColW1Pct = printerCfg.ColW1Pct,
ColW2Pct = printerCfg.ColW2Pct,
CommonItems1 = printerCfg.CommonItems1,
CommonItems2 = printerCfg.CommonItems2,
CommonItems3 = printerCfg.CommonItems3,
SelectedItems = printerCfg.SelectedItems,
BelowW0Pct = printerCfg.BelowW0Pct,
BelowW1Pct = printerCfg.BelowW1Pct,
BelowW2Pct = printerCfg.BelowW2Pct,
BelowItems1 = printerCfg.BelowItems1,
BelowItems2 = printerCfg.BelowItems2,
BelowItems3 = printerCfg.BelowItems3,
Footer = printerCfg.Footer,
};
new Results.Output.Printers.Zapiska.ZapiskaPrintDocument(batch, cfg, documentName).Print();
}
}
}
}
@@ -0,0 +1,114 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using System.Xml.Serialization;
using Config.Entities;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Zapiska
{
public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PrinterCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new PrinterCfgCtrl(); }
///
/// Serialized parameters
///
public PageOrientation PageOrientation;
public string Template;
public int TopMargin;
public int BottomMargin;
public int LeftMargin;
public string TitFntFml;
public string HdrFntFml;
public string BodyFntFml;
public string FooterFntFml;
public int TitFntSz;
public int HdrFntSz;
public int BodyFntSz;
public int FooterFntSz;
public int TitFntSty;
public int HdrFntSty;
public int BodyFntSty;
public int FooterFntSty;
public bool SupressPrinting; /// Bypass printing when true
public Culture Culture;
public bool GoodOnly;
public string Header; /// =Title
public int ColW0Pct;
public string[] CommonItems1;
public int ColW1Pct;
public string[] CommonItems2;
public int ColW2Pct;
public string[] CommonItems3;
public string[] SelectedItems;
public int BelowW0Pct;
public string[] BelowItems1;
public int BelowW1Pct;
public string[] BelowItems2;
public int BelowW2Pct;
public string[] BelowItems3;
public string Footer;
public string DocName;
[XmlIgnore]
public Config.Entities.MetersKind MetersKind;
/// Private parameterless constructor invoked by all other (public) constructors
PrinterCfg()
{
}
public PrinterCfg(string name, IComponentFactory factory, Config.Entities.MetersKind metersKind)
: this()
{
Name = name;
Factory = factory;
MetersKind = metersKind;
Template = string.Empty;
ParentName = string.Empty;
PageOrientation = PageOrientation.Portrait;
TopMargin = 100;
BottomMargin = 100;
LeftMargin = 100;
TitFntFml = "Arial";
TitFntSz = 18;
TitFntSty = 1;
HdrFntFml = "Arial";
HdrFntSz = 10;
HdrFntSty = 0;
BodyFntFml = "Arial";
BodyFntSz = 10;
BodyFntSty = 0;
FooterFntFml = "Arial";
FooterFntSz = 10;
FooterFntSty = 0;
SupressPrinting = false;
Header = string.Empty;
Footer = string.Empty;
DocName = string.Empty;
}
public string ToString(int i)
{
return string.Format("Name={0}, Orientation={1}, Margins T={2} B={3} L={4}, SupressPrinting={5}",
Name,
PageOrientation,
TopMargin,
BottomMargin,
LeftMargin,
SupressPrinting ? "yes" : "no"
);
}
}
}
+811
View File
@@ -0,0 +1,811 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
namespace TBF.Rig.Output.Printers.Zapiska
{
partial class PrinterCfgCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.orientationLabel = new System.Windows.Forms.Label();
this.orientationComboBox = new System.Windows.Forms.ComboBox();
this.topMarginTextBox = new System.Windows.Forms.TextBox();
this.topMarginLabel = new System.Windows.Forms.Label();
this.leftMarginTextBox = new System.Windows.Forms.TextBox();
this.bottomMarginTextBox = new System.Windows.Forms.TextBox();
this.cultureComboBox = new System.Windows.Forms.ComboBox();
this.cultureLabel = new System.Windows.Forms.Label();
this.commonItems1Button = new System.Windows.Forms.Button();
this.footerButton = new System.Windows.Forms.Button();
this.headerButton = new System.Windows.Forms.Button();
this.testItemsButton = new System.Windows.Forms.Button();
this.headerFontLabel = new System.Windows.Forms.Label();
this.titleFontLabel = new System.Windows.Forms.Label();
this.titleFontFamilyComboBox = new System.Windows.Forms.ComboBox();
this.headerFontFamilyComboBox = new System.Windows.Forms.ComboBox();
this.bodyFontFamilyComboBox = new System.Windows.Forms.ComboBox();
this.bodyFontLabel = new System.Windows.Forms.Label();
this.titleFontSizeTextBox = new System.Windows.Forms.TextBox();
this.headerFontSizeTextBox = new System.Windows.Forms.TextBox();
this.bodyFontSizeTextBox = new System.Windows.Forms.TextBox();
this.titleBoldCheckBox = new System.Windows.Forms.CheckBox();
this.titleItalicCheckBox = new System.Windows.Forms.CheckBox();
this.headerItalicCheckBox = new System.Windows.Forms.CheckBox();
this.headerBoldCheckBox = new System.Windows.Forms.CheckBox();
this.bodyItalicCheckBox = new System.Windows.Forms.CheckBox();
this.bodyBoldCheckBox = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.commonItems2Button = new System.Windows.Forms.Button();
this.commonItems3Button = new System.Windows.Forms.Button();
this.colW2TextBox = new System.Windows.Forms.TextBox();
this.colW1TextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.colW0TextBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.belowW0TextBox = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.belowW2TextBox = new System.Windows.Forms.TextBox();
this.belowW1TextBox = new System.Windows.Forms.TextBox();
this.belowItems3Button = new System.Windows.Forms.Button();
this.belowItems2Button = new System.Windows.Forms.Button();
this.belowItems1Button = new System.Windows.Forms.Button();
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
this.docNameTextBox = new System.Windows.Forms.TextBox();
this.docNameLabel = new System.Windows.Forms.Label();
this.footerItalicCheckBox = new System.Windows.Forms.CheckBox();
this.footerBoldCheckBox = new System.Windows.Forms.CheckBox();
this.footerFontSizeTextBox = new System.Windows.Forms.TextBox();
this.footerFontFamilyComboBox = new System.Windows.Forms.ComboBox();
this.footerFontLabel = new System.Windows.Forms.Label();
this.templateTextBox = new System.Windows.Forms.TextBox();
this.templateLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(142, 23);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(218, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(16, 26);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 6);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// supressPrintingCheckBox
//
this.supressPrintingCheckBox.AutoSize = true;
this.supressPrintingCheckBox.Enabled = false;
this.supressPrintingCheckBox.Location = new System.Drawing.Point(16, 220);
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
this.supressPrintingCheckBox.TabIndex = 38;
this.supressPrintingCheckBox.Text = "Supress printing";
this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
//
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(16, 68);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 3;
this.orientationLabel.Text = "Page orientation";
//
// orientationComboBox
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(142, 65);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(146, 21);
this.orientationComboBox.TabIndex = 4;
//
// topMarginTextBox
//
this.topMarginTextBox.Enabled = false;
this.topMarginTextBox.Location = new System.Drawing.Point(142, 87);
this.topMarginTextBox.Name = "topMarginTextBox";
this.topMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.topMarginTextBox.TabIndex = 6;
//
// topMarginLabel
//
this.topMarginLabel.AutoSize = true;
this.topMarginLabel.Location = new System.Drawing.Point(16, 90);
this.topMarginLabel.Name = "topMarginLabel";
this.topMarginLabel.Size = new System.Drawing.Size(116, 13);
this.topMarginLabel.TabIndex = 5;
this.topMarginLabel.Text = "Top/bottom/left margin";
//
// leftMarginTextBox
//
this.leftMarginTextBox.Enabled = false;
this.leftMarginTextBox.Location = new System.Drawing.Point(244, 87);
this.leftMarginTextBox.Name = "leftMarginTextBox";
this.leftMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.leftMarginTextBox.TabIndex = 8;
//
// bottomMarginTextBox
//
this.bottomMarginTextBox.Enabled = false;
this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 87);
this.bottomMarginTextBox.Name = "bottomMarginTextBox";
this.bottomMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.bottomMarginTextBox.TabIndex = 7;
//
// cultureComboBox
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(142, 196);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(218, 21);
this.cultureComboBox.TabIndex = 26;
//
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(16, 197);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 25;
this.cultureLabel.Text = "Cullture";
//
// commonItems1Button
//
this.commonItems1Button.Enabled = false;
this.commonItems1Button.Location = new System.Drawing.Point(301, 240);
this.commonItems1Button.Name = "commonItems1Button";
this.commonItems1Button.Size = new System.Drawing.Size(47, 23);
this.commonItems1Button.TabIndex = 33;
this.commonItems1Button.Text = "Col. 1";
this.commonItems1Button.UseVisualStyleBackColor = true;
this.commonItems1Button.Click += new System.EventHandler(this.commonItems1Button_Click);
//
// footerButton
//
this.footerButton.Enabled = false;
this.footerButton.Location = new System.Drawing.Point(142, 306);
this.footerButton.Name = "footerButton";
this.footerButton.Size = new System.Drawing.Size(312, 23);
this.footerButton.TabIndex = 37;
this.footerButton.Text = "Footer";
this.footerButton.UseVisualStyleBackColor = true;
this.footerButton.Click += new System.EventHandler(this.footerButton_Click);
//
// headerButton
//
this.headerButton.Enabled = false;
this.headerButton.Location = new System.Drawing.Point(142, 218);
this.headerButton.Name = "headerButton";
this.headerButton.Size = new System.Drawing.Size(312, 23);
this.headerButton.TabIndex = 27;
this.headerButton.Text = "Title";
this.headerButton.UseVisualStyleBackColor = true;
this.headerButton.Click += new System.EventHandler(this.headerButton_Click);
//
// testItemsButton
//
this.testItemsButton.Enabled = false;
this.testItemsButton.Location = new System.Drawing.Point(142, 262);
this.testItemsButton.Name = "testItemsButton";
this.testItemsButton.Size = new System.Drawing.Size(312, 23);
this.testItemsButton.TabIndex = 36;
this.testItemsButton.Text = "Water meter items";
this.testItemsButton.UseVisualStyleBackColor = true;
this.testItemsButton.Click += new System.EventHandler(this.testItemsButton_Click);
//
// headerFontLabel
//
this.headerFontLabel.AutoSize = true;
this.headerFontLabel.Location = new System.Drawing.Point(16, 133);
this.headerFontLabel.Name = "headerFontLabel";
this.headerFontLabel.Size = new System.Drawing.Size(112, 13);
this.headerFontLabel.TabIndex = 14;
this.headerFontLabel.Text = "Header font/size/style";
//
// titleFontLabel
//
this.titleFontLabel.AutoSize = true;
this.titleFontLabel.Location = new System.Drawing.Point(16, 111);
this.titleFontLabel.Name = "titleFontLabel";
this.titleFontLabel.Size = new System.Drawing.Size(97, 13);
this.titleFontLabel.TabIndex = 9;
this.titleFontLabel.Text = "Title font/size/style";
//
// titleFontFamilyComboBox
//
this.titleFontFamilyComboBox.Enabled = false;
this.titleFontFamilyComboBox.FormattingEnabled = true;
this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 108);
this.titleFontFamilyComboBox.Name = "titleFontFamilyComboBox";
this.titleFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.titleFontFamilyComboBox.TabIndex = 10;
//
// headerFontFamilyComboBox
//
this.headerFontFamilyComboBox.Enabled = false;
this.headerFontFamilyComboBox.FormattingEnabled = true;
this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 130);
this.headerFontFamilyComboBox.Name = "headerFontFamilyComboBox";
this.headerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.headerFontFamilyComboBox.TabIndex = 15;
//
// bodyFontFamilyComboBox
//
this.bodyFontFamilyComboBox.Enabled = false;
this.bodyFontFamilyComboBox.FormattingEnabled = true;
this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 152);
this.bodyFontFamilyComboBox.Name = "bodyFontFamilyComboBox";
this.bodyFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.bodyFontFamilyComboBox.TabIndex = 20;
//
// bodyFontLabel
//
this.bodyFontLabel.AutoSize = true;
this.bodyFontLabel.Location = new System.Drawing.Point(16, 155);
this.bodyFontLabel.Name = "bodyFontLabel";
this.bodyFontLabel.Size = new System.Drawing.Size(101, 13);
this.bodyFontLabel.TabIndex = 19;
this.bodyFontLabel.Text = "Body font/size/style";
//
// titleFontSizeTextBox
//
this.titleFontSizeTextBox.Enabled = false;
this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 108);
this.titleFontSizeTextBox.Name = "titleFontSizeTextBox";
this.titleFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.titleFontSizeTextBox.TabIndex = 11;
//
// headerFontSizeTextBox
//
this.headerFontSizeTextBox.Enabled = false;
this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 130);
this.headerFontSizeTextBox.Name = "headerFontSizeTextBox";
this.headerFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.headerFontSizeTextBox.TabIndex = 16;
//
// bodyFontSizeTextBox
//
this.bodyFontSizeTextBox.Enabled = false;
this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 152);
this.bodyFontSizeTextBox.Name = "bodyFontSizeTextBox";
this.bodyFontSizeTextBox.Size = new System.Drawing.Size(29, 20);
this.bodyFontSizeTextBox.TabIndex = 21;
//
// titleBoldCheckBox
//
this.titleBoldCheckBox.AutoSize = true;
this.titleBoldCheckBox.Enabled = false;
this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 111);
this.titleBoldCheckBox.Name = "titleBoldCheckBox";
this.titleBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleBoldCheckBox.TabIndex = 12;
this.titleBoldCheckBox.UseVisualStyleBackColor = true;
//
// titleItalicCheckBox
//
this.titleItalicCheckBox.AutoSize = true;
this.titleItalicCheckBox.Enabled = false;
this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 111);
this.titleItalicCheckBox.Name = "titleItalicCheckBox";
this.titleItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleItalicCheckBox.TabIndex = 13;
this.titleItalicCheckBox.UseVisualStyleBackColor = true;
//
// headerItalicCheckBox
//
this.headerItalicCheckBox.AutoSize = true;
this.headerItalicCheckBox.Enabled = false;
this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 133);
this.headerItalicCheckBox.Name = "headerItalicCheckBox";
this.headerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerItalicCheckBox.TabIndex = 18;
this.headerItalicCheckBox.UseVisualStyleBackColor = true;
//
// headerBoldCheckBox
//
this.headerBoldCheckBox.AutoSize = true;
this.headerBoldCheckBox.Enabled = false;
this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 133);
this.headerBoldCheckBox.Name = "headerBoldCheckBox";
this.headerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerBoldCheckBox.TabIndex = 17;
this.headerBoldCheckBox.UseVisualStyleBackColor = true;
//
// bodyItalicCheckBox
//
this.bodyItalicCheckBox.AutoSize = true;
this.bodyItalicCheckBox.Enabled = false;
this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 155);
this.bodyItalicCheckBox.Name = "bodyItalicCheckBox";
this.bodyItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyItalicCheckBox.TabIndex = 23;
this.bodyItalicCheckBox.UseVisualStyleBackColor = true;
//
// bodyBoldCheckBox
//
this.bodyBoldCheckBox.AutoSize = true;
this.bodyBoldCheckBox.Enabled = false;
this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 155);
this.bodyBoldCheckBox.Name = "bodyBoldCheckBox";
this.bodyBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyBoldCheckBox.TabIndex = 22;
this.bodyBoldCheckBox.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(296, 96);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 31;
this.label1.Text = "Bold";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(330, 96);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 13);
this.label2.TabIndex = 32;
this.label2.Text = "Ital.";
//
// commonItems2Button
//
this.commonItems2Button.Enabled = false;
this.commonItems2Button.Location = new System.Drawing.Point(354, 240);
this.commonItems2Button.Name = "commonItems2Button";
this.commonItems2Button.Size = new System.Drawing.Size(47, 23);
this.commonItems2Button.TabIndex = 34;
this.commonItems2Button.Text = "Col. 2";
this.commonItems2Button.UseVisualStyleBackColor = true;
this.commonItems2Button.Click += new System.EventHandler(this.commonItems2Button_Click);
//
// commonItems3Button
//
this.commonItems3Button.Enabled = false;
this.commonItems3Button.Location = new System.Drawing.Point(407, 240);
this.commonItems3Button.Name = "commonItems3Button";
this.commonItems3Button.Size = new System.Drawing.Size(47, 23);
this.commonItems3Button.TabIndex = 35;
this.commonItems3Button.Text = "Col. 3";
this.commonItems3Button.UseVisualStyleBackColor = true;
this.commonItems3Button.Click += new System.EventHandler(this.commonItems3Button_Click);
//
// colW2TextBox
//
this.colW2TextBox.Enabled = false;
this.colW2TextBox.Location = new System.Drawing.Point(245, 241);
this.colW2TextBox.Name = "colW2TextBox";
this.colW2TextBox.Size = new System.Drawing.Size(30, 20);
this.colW2TextBox.TabIndex = 31;
//
// colW1TextBox
//
this.colW1TextBox.Enabled = false;
this.colW1TextBox.Location = new System.Drawing.Point(192, 241);
this.colW1TextBox.Name = "colW1TextBox";
this.colW1TextBox.Size = new System.Drawing.Size(30, 20);
this.colW1TextBox.TabIndex = 29;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(222, 244);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(15, 13);
this.label3.TabIndex = 30;
this.label3.Text = "%";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(275, 244);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(15, 13);
this.label4.TabIndex = 32;
this.label4.Text = "%";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 243);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(97, 13);
this.label5.TabIndex = 28;
this.label5.Text = "Column widths in %";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(172, 244);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(15, 13);
this.label6.TabIndex = 40;
this.label6.Text = "%";
//
// colW0TextBox
//
this.colW0TextBox.Enabled = false;
this.colW0TextBox.Location = new System.Drawing.Point(142, 241);
this.colW0TextBox.Name = "colW0TextBox";
this.colW0TextBox.Size = new System.Drawing.Size(30, 20);
this.colW0TextBox.TabIndex = 39;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(172, 289);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(15, 13);
this.label7.TabIndex = 50;
this.label7.Text = "%";
//
// belowW0TextBox
//
this.belowW0TextBox.Enabled = false;
this.belowW0TextBox.Location = new System.Drawing.Point(142, 286);
this.belowW0TextBox.Name = "belowW0TextBox";
this.belowW0TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW0TextBox.TabIndex = 49;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(16, 288);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(97, 13);
this.label8.TabIndex = 41;
this.label8.Text = "Column widths in %";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(275, 289);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(15, 13);
this.label9.TabIndex = 45;
this.label9.Text = "%";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(222, 289);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(15, 13);
this.label10.TabIndex = 43;
this.label10.Text = "%";
//
// belowW2TextBox
//
this.belowW2TextBox.Enabled = false;
this.belowW2TextBox.Location = new System.Drawing.Point(245, 286);
this.belowW2TextBox.Name = "belowW2TextBox";
this.belowW2TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW2TextBox.TabIndex = 44;
//
// belowW1TextBox
//
this.belowW1TextBox.Enabled = false;
this.belowW1TextBox.Location = new System.Drawing.Point(192, 286);
this.belowW1TextBox.Name = "belowW1TextBox";
this.belowW1TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW1TextBox.TabIndex = 42;
//
// belowItems3Button
//
this.belowItems3Button.Enabled = false;
this.belowItems3Button.Location = new System.Drawing.Point(407, 284);
this.belowItems3Button.Name = "belowItems3Button";
this.belowItems3Button.Size = new System.Drawing.Size(47, 23);
this.belowItems3Button.TabIndex = 48;
this.belowItems3Button.Text = "Col. 3";
this.belowItems3Button.UseVisualStyleBackColor = true;
this.belowItems3Button.Click += new System.EventHandler(this.belowItems3Button_Click);
//
// belowItems2Button
//
this.belowItems2Button.Enabled = false;
this.belowItems2Button.Location = new System.Drawing.Point(354, 284);
this.belowItems2Button.Name = "belowItems2Button";
this.belowItems2Button.Size = new System.Drawing.Size(47, 23);
this.belowItems2Button.TabIndex = 47;
this.belowItems2Button.Text = "Col. 2";
this.belowItems2Button.UseVisualStyleBackColor = true;
this.belowItems2Button.Click += new System.EventHandler(this.belowItems2Button_Click);
//
// belowItems1Button
//
this.belowItems1Button.Enabled = false;
this.belowItems1Button.Location = new System.Drawing.Point(301, 284);
this.belowItems1Button.Name = "belowItems1Button";
this.belowItems1Button.Size = new System.Drawing.Size(47, 23);
this.belowItems1Button.TabIndex = 46;
this.belowItems1Button.Text = "Col. 1";
this.belowItems1Button.UseVisualStyleBackColor = true;
this.belowItems1Button.Click += new System.EventHandler(this.belowItems1Button_Click);
//
// goodOnlyCheckBox
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Enabled = false;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(16, 266);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 51;
this.goodOnlyCheckBox.Text = "Good only";
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
//
// docNameTextBox
//
this.docNameTextBox.Enabled = false;
this.docNameTextBox.Location = new System.Drawing.Point(197, 329);
this.docNameTextBox.Name = "docNameTextBox";
this.docNameTextBox.Size = new System.Drawing.Size(163, 20);
this.docNameTextBox.TabIndex = 53;
//
// docNameLabel
//
this.docNameLabel.AutoSize = true;
this.docNameLabel.Location = new System.Drawing.Point(16, 332);
this.docNameLabel.Name = "docNameLabel";
this.docNameLabel.Size = new System.Drawing.Size(175, 13);
this.docNameLabel.TabIndex = 52;
this.docNameLabel.Text = "Doc.name (0=start 1-end, 2=batch):";
//
// footerItalicCheckBox
//
this.footerItalicCheckBox.AutoSize = true;
this.footerItalicCheckBox.Enabled = false;
this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 177);
this.footerItalicCheckBox.Name = "footerItalicCheckBox";
this.footerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerItalicCheckBox.TabIndex = 58;
this.footerItalicCheckBox.UseVisualStyleBackColor = true;
//
// footerBoldCheckBox
//
this.footerBoldCheckBox.AutoSize = true;
this.footerBoldCheckBox.Enabled = false;
this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 177);
this.footerBoldCheckBox.Name = "footerBoldCheckBox";
this.footerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerBoldCheckBox.TabIndex = 57;
this.footerBoldCheckBox.UseVisualStyleBackColor = true;
//
// footerFontSizeTextBox
//
this.footerFontSizeTextBox.Enabled = false;
this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 174);
this.footerFontSizeTextBox.Name = "footerFontSizeTextBox";
this.footerFontSizeTextBox.Size = new System.Drawing.Size(29, 20);
this.footerFontSizeTextBox.TabIndex = 56;
//
// footerFontFamilyComboBox
//
this.footerFontFamilyComboBox.Enabled = false;
this.footerFontFamilyComboBox.FormattingEnabled = true;
this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 174);
this.footerFontFamilyComboBox.Name = "footerFontFamilyComboBox";
this.footerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.footerFontFamilyComboBox.TabIndex = 55;
//
// footerFontLabel
//
this.footerFontLabel.AutoSize = true;
this.footerFontLabel.Location = new System.Drawing.Point(16, 177);
this.footerFontLabel.Name = "footerFontLabel";
this.footerFontLabel.Size = new System.Drawing.Size(107, 13);
this.footerFontLabel.TabIndex = 54;
this.footerFontLabel.Text = "Footer font/size/style";
//
// templateTextBox
//
this.templateTextBox.Enabled = false;
this.templateTextBox.Location = new System.Drawing.Point(142, 44);
this.templateTextBox.Name = "templateTextBox";
this.templateTextBox.Size = new System.Drawing.Size(218, 20);
this.templateTextBox.TabIndex = 60;
//
// templateLabel
//
this.templateLabel.AutoSize = true;
this.templateLabel.Location = new System.Drawing.Point(16, 47);
this.templateLabel.Name = "templateLabel";
this.templateLabel.Size = new System.Drawing.Size(51, 13);
this.templateLabel.TabIndex = 59;
this.templateLabel.Text = "Template";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.templateTextBox);
this.Controls.Add(this.templateLabel);
this.Controls.Add(this.footerItalicCheckBox);
this.Controls.Add(this.footerBoldCheckBox);
this.Controls.Add(this.footerFontSizeTextBox);
this.Controls.Add(this.footerFontFamilyComboBox);
this.Controls.Add(this.footerFontLabel);
this.Controls.Add(this.docNameTextBox);
this.Controls.Add(this.docNameLabel);
this.Controls.Add(this.goodOnlyCheckBox);
this.Controls.Add(this.label7);
this.Controls.Add(this.belowW0TextBox);
this.Controls.Add(this.label8);
this.Controls.Add(this.label9);
this.Controls.Add(this.label10);
this.Controls.Add(this.belowW2TextBox);
this.Controls.Add(this.belowW1TextBox);
this.Controls.Add(this.belowItems3Button);
this.Controls.Add(this.belowItems2Button);
this.Controls.Add(this.belowItems1Button);
this.Controls.Add(this.label6);
this.Controls.Add(this.colW0TextBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.colW2TextBox);
this.Controls.Add(this.colW1TextBox);
this.Controls.Add(this.commonItems3Button);
this.Controls.Add(this.commonItems2Button);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.bodyItalicCheckBox);
this.Controls.Add(this.bodyBoldCheckBox);
this.Controls.Add(this.headerItalicCheckBox);
this.Controls.Add(this.headerBoldCheckBox);
this.Controls.Add(this.titleItalicCheckBox);
this.Controls.Add(this.titleBoldCheckBox);
this.Controls.Add(this.bodyFontSizeTextBox);
this.Controls.Add(this.headerFontSizeTextBox);
this.Controls.Add(this.titleFontSizeTextBox);
this.Controls.Add(this.bodyFontFamilyComboBox);
this.Controls.Add(this.bodyFontLabel);
this.Controls.Add(this.headerFontFamilyComboBox);
this.Controls.Add(this.titleFontFamilyComboBox);
this.Controls.Add(this.cultureComboBox);
this.Controls.Add(this.cultureLabel);
this.Controls.Add(this.commonItems1Button);
this.Controls.Add(this.footerButton);
this.Controls.Add(this.headerButton);
this.Controls.Add(this.testItemsButton);
this.Controls.Add(this.bottomMarginTextBox);
this.Controls.Add(this.titleFontLabel);
this.Controls.Add(this.leftMarginTextBox);
this.Controls.Add(this.headerFontLabel);
this.Controls.Add(this.topMarginTextBox);
this.Controls.Add(this.topMarginLabel);
this.Controls.Add(this.orientationComboBox);
this.Controls.Add(this.orientationLabel);
this.Controls.Add(this.supressPrintingCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(492, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.Label orientationLabel;
private System.Windows.Forms.ComboBox orientationComboBox;
private System.Windows.Forms.TextBox topMarginTextBox;
private System.Windows.Forms.Label topMarginLabel;
private System.Windows.Forms.TextBox leftMarginTextBox;
private System.Windows.Forms.TextBox bottomMarginTextBox;
private System.Windows.Forms.ComboBox cultureComboBox;
private System.Windows.Forms.Label cultureLabel;
private System.Windows.Forms.Button commonItems1Button;
private System.Windows.Forms.Button footerButton;
private System.Windows.Forms.Button headerButton;
private System.Windows.Forms.Button testItemsButton;
private System.Windows.Forms.Label headerFontLabel;
private System.Windows.Forms.Label titleFontLabel;
private System.Windows.Forms.ComboBox titleFontFamilyComboBox;
private System.Windows.Forms.ComboBox headerFontFamilyComboBox;
private System.Windows.Forms.ComboBox bodyFontFamilyComboBox;
private System.Windows.Forms.Label bodyFontLabel;
private System.Windows.Forms.TextBox titleFontSizeTextBox;
private System.Windows.Forms.TextBox headerFontSizeTextBox;
private System.Windows.Forms.TextBox bodyFontSizeTextBox;
private System.Windows.Forms.CheckBox titleBoldCheckBox;
private System.Windows.Forms.CheckBox titleItalicCheckBox;
private System.Windows.Forms.CheckBox headerItalicCheckBox;
private System.Windows.Forms.CheckBox headerBoldCheckBox;
private System.Windows.Forms.CheckBox bodyItalicCheckBox;
private System.Windows.Forms.CheckBox bodyBoldCheckBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button commonItems2Button;
private System.Windows.Forms.Button commonItems3Button;
private System.Windows.Forms.TextBox colW2TextBox;
private System.Windows.Forms.TextBox colW1TextBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox colW0TextBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox belowW0TextBox;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox belowW2TextBox;
private System.Windows.Forms.TextBox belowW1TextBox;
private System.Windows.Forms.Button belowItems3Button;
private System.Windows.Forms.Button belowItems2Button;
private System.Windows.Forms.Button belowItems1Button;
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
private System.Windows.Forms.TextBox docNameTextBox;
private System.Windows.Forms.Label docNameLabel;
private System.Windows.Forms.CheckBox footerItalicCheckBox;
private System.Windows.Forms.CheckBox footerBoldCheckBox;
private System.Windows.Forms.TextBox footerFontSizeTextBox;
private System.Windows.Forms.ComboBox footerFontFamilyComboBox;
private System.Windows.Forms.Label footerFontLabel;
private System.Windows.Forms.TextBox templateTextBox;
private System.Windows.Forms.Label templateLabel;
}
}
@@ -0,0 +1,519 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.Rig.Generic;
using TBF.Resources;
using TBF.Rig.Configs;
namespace TBF.Rig.Output.Printers.Zapiska
{
public partial class PrinterCfgCtrl : ConfigCtrlUtils, IComponentCfgCtrl
{
static readonly ILog log = LogManager.GetLogger(typeof(PrinterCfgCtrl));
public bool ShowMore { get { return false; } }
PrinterCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as PrinterCfg;
Redraw();
}
}
string header;
string[] commonItems1;
string[] commonItems2;
string[] commonItems3;
string[] testItems;
string[] belowItems1;
string[] belowItems2;
string[] belowItems3;
string footer;
public PrinterCfgCtrl()
{
InitializeComponent();
Localize();
orientationComboBox.Items.Add(PageOrientation.Portrait.ToString());
orientationComboBox.Items.Add(PageOrientation.Landscape.ToString());
foreach (var ff in System.Drawing.FontFamily.Families)
{
titleFontFamilyComboBox.Items.Add(ff.Name);
headerFontFamilyComboBox.Items.Add(ff.Name);
bodyFontFamilyComboBox.Items.Add(ff.Name);
footerFontFamilyComboBox.Items.Add(ff.Name);
}
}
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
header = config.Header;
commonItems1 = config.CommonItems1;
commonItems2 = config.CommonItems2;
commonItems3 = config.CommonItems3;
testItems = config.SelectedItems;
belowItems1 = config.BelowItems1;
belowItems2 = config.BelowItems2;
belowItems3 = config.BelowItems3;
footer = config.Footer;
Redraw();
}
void Localize()
{
nameLabel.Text = Strings.Name;
cultureLabel.Text = "Culture";
headerButton.Text = Strings.Header;
commonItems1Button.Text = "Common 1";
commonItems2Button.Text = "Common 2";
commonItems3Button.Text = "Common 3";
testItemsButton.Text = "Test items";
footerButton.Text = Strings.Footer;
}
public void Closing()
{
}
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
topMarginTextBox.Text = config.TopMargin.ToString();
bottomMarginTextBox.Text = config.BottomMargin.ToString();
leftMarginTextBox.Text = config.LeftMargin.ToString();
titleFontFamilyComboBox.Text = config.TitFntFml;
titleFontSizeTextBox.Text = config.TitFntSz.ToString();
titleBoldCheckBox.Checked = ((config.TitFntSty & (int)System.Drawing.FontStyle.Bold) != 0);
titleItalicCheckBox.Checked = ((config.TitFntSty & (int)System.Drawing.FontStyle.Italic) != 0);
headerFontFamilyComboBox.Text = config.HdrFntFml;
headerFontSizeTextBox.Text = config.HdrFntSz.ToString();
headerBoldCheckBox.Checked = ((config.HdrFntSty & (int)System.Drawing.FontStyle.Bold) != 0);
headerItalicCheckBox.Checked = ((config.HdrFntSty & (int)System.Drawing.FontStyle.Italic) != 0);
bodyFontFamilyComboBox.Text = config.BodyFntFml;
bodyFontSizeTextBox.Text = config.BodyFntSz.ToString();
bodyBoldCheckBox.Checked = ((config.BodyFntSty & (int)System.Drawing.FontStyle.Bold) != 0);
bodyItalicCheckBox.Checked = ((config.BodyFntSty & (int)System.Drawing.FontStyle.Italic) != 0);
footerFontFamilyComboBox.Text = config.FooterFntFml;
footerFontSizeTextBox.Text = config.FooterFntSz.ToString();
footerBoldCheckBox.Checked = ((config.FooterFntSty & (int)System.Drawing.FontStyle.Bold) != 0);
footerItalicCheckBox.Checked = ((config.FooterFntSty & (int)System.Drawing.FontStyle.Italic) != 0);
colW0TextBox.Text = config.ColW0Pct.ToString();
colW1TextBox.Text = config.ColW1Pct.ToString();
colW2TextBox.Text = config.ColW2Pct.ToString();
belowW0TextBox.Text = config.BelowW0Pct.ToString();
belowW1TextBox.Text = config.BelowW1Pct.ToString();
belowW2TextBox.Text = config.BelowW2Pct.ToString();
supressPrintingCheckBox.Checked = config.SupressPrinting;
goodOnlyCheckBox.Checked = config.GoodOnly;
cultureComboBox.Text = config.Culture.ToString();
docNameTextBox.Text = config.DocName;
}
public void Unlock()
{
nameTextBox.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
topMarginTextBox.Enabled = true;
bottomMarginTextBox.Enabled = true;
leftMarginTextBox.Enabled = true;
titleFontFamilyComboBox.Enabled = true;
titleFontSizeTextBox.Enabled = true;
titleBoldCheckBox.Enabled = true;
titleItalicCheckBox.Enabled = true;
headerFontFamilyComboBox.Enabled = true;
headerFontSizeTextBox.Enabled = true;
headerBoldCheckBox.Enabled = true;
headerItalicCheckBox.Enabled = true;
bodyFontFamilyComboBox.Enabled = true;
bodyFontSizeTextBox.Enabled = true;
bodyBoldCheckBox.Enabled = true;
bodyItalicCheckBox.Enabled = true;
footerFontFamilyComboBox.Enabled = true;
footerFontSizeTextBox.Enabled = true;
footerBoldCheckBox.Enabled = true;
footerItalicCheckBox.Enabled = true;
supressPrintingCheckBox.Enabled = true;
goodOnlyCheckBox.Enabled = true;
cultureComboBox.Enabled = true;
headerButton.Enabled = true;
colW0TextBox.Enabled = true;
colW1TextBox.Enabled = true;
colW2TextBox.Enabled = true;
commonItems1Button.Enabled = true;
commonItems2Button.Enabled = true;
commonItems3Button.Enabled = true;
testItemsButton.Enabled = true;
belowW0TextBox.Enabled = true;
belowW1TextBox.Enabled = true;
belowW2TextBox.Enabled = true;
belowItems1Button.Enabled = true;
belowItems2Button.Enabled = true;
belowItems3Button.Enabled = true;
footerButton.Enabled = true;
docNameTextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
if ((int)GetOrientation(orientationComboBox.Text) < 0)
{
message += Environment.NewLine + "Invalid 'Page orientation'";
flags |= CfgUpdateFlags.Error;
}
int dummy, dummy2, dummy3;
if (!int.TryParse(topMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 500)
{
message += Environment.NewLine + "'Top margin' should be between 0 and 500";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(bottomMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
{
message += Environment.NewLine + "'Bottom margin' should be between 0 and 200";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(leftMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
{
message += Environment.NewLine + "Left margin' should be between 0 and 200";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(titleFontSizeTextBox.Text, out dummy) || dummy < 6 || dummy > 48)
{
message += Environment.NewLine + "Title font size should be between 6 and 48";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(headerFontSizeTextBox.Text, out dummy) || dummy < 6 || dummy > 48)
{
message += Environment.NewLine + "Header font size should be between 6 and 48";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(bodyFontSizeTextBox.Text, out dummy) || dummy < 6 || dummy > 48)
{
message += Environment.NewLine + "Body font size should be between 6 and 48";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(footerFontSizeTextBox.Text, out dummy) || dummy < 4 || dummy > 48)
{
message += Environment.NewLine + "Footer font size' should be between 4 and 48";
flags |= CfgUpdateFlags.Error;
}
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid culture";
}
if (!int.TryParse(colW0TextBox.Text, out dummy) || dummy < 0 || dummy > 100)
{
message += Environment.NewLine + "Column width 0 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(colW1TextBox.Text, out dummy2) || dummy2 < 0 || dummy2 > 100)
{
message += Environment.NewLine + "Column width 1 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(colW2TextBox.Text, out dummy3) || dummy3 < 0 || dummy3 > 100)
{
message += Environment.NewLine + "Column width 2 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (dummy + dummy2 + dummy3 > 100)
{
message += Environment.NewLine + "Sum of column widths should be <= 100";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(belowW0TextBox.Text, out dummy) || dummy < 0 || dummy > 100)
{
message += Environment.NewLine + "Column width 0 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(belowW1TextBox.Text, out dummy2) || dummy2 < 0 || dummy2 > 100)
{
message += Environment.NewLine + "Column width 1 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(belowW2TextBox.Text, out dummy3) || dummy3 < 0 || dummy3 > 100)
{
message += Environment.NewLine + "Column width 2 should be between 0 and 100";
flags |= CfgUpdateFlags.Error;
}
if (dummy + dummy2 + dummy3 > 100)
{
message += Environment.NewLine + "Sum of column widths should be <= 100";
flags |= CfgUpdateFlags.Error;
}
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
if (config.Name != nameTextBox.Text)
{
config.Name = nameTextBox.Text;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
flags |= UpdateDifferent(ref config.Template, templateTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
{
config.PageOrientation = GetOrientation(orientationComboBox.Text);
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
}
flags |= UpdateDifferent(ref config.TopMargin, topMarginTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BottomMargin, bottomMarginTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.LeftMargin, leftMarginTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
/// Title font properties
flags |= UpdateDifferent(ref config.TitFntFml, titleFontFamilyComboBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.TitFntSz, titleFontSizeTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
int tmp = (titleBoldCheckBox.Checked ? (int)System.Drawing.FontStyle.Bold : 0)
+ (titleItalicCheckBox.Checked ? (int)System.Drawing.FontStyle.Italic : 0);
flags |= UpdateDifferent(ref config.TitFntSty, tmp, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
/// Header font properties
flags |= UpdateDifferent(ref config.HdrFntFml, headerFontFamilyComboBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.HdrFntSz, headerFontSizeTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
tmp = (headerBoldCheckBox.Checked ? (int)System.Drawing.FontStyle.Bold : 0)
+ (headerItalicCheckBox.Checked ? (int)System.Drawing.FontStyle.Italic : 0);
flags |= UpdateDifferent(ref config.HdrFntSty, tmp, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
/// Body font properties
flags |= UpdateDifferent(ref config.BodyFntFml, bodyFontFamilyComboBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BodyFntSz, int.Parse(bodyFontSizeTextBox.Text), CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
tmp = (bodyBoldCheckBox.Checked ? (int)System.Drawing.FontStyle.Bold : 0)
+ (bodyItalicCheckBox.Checked ? (int)System.Drawing.FontStyle.Italic : 0);
flags |= UpdateDifferent(ref config.BodyFntSty, tmp, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
/// Footer font properties
flags |= UpdateDifferent(ref config.FooterFntFml, footerFontFamilyComboBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.FooterFntSz, int.Parse(footerFontSizeTextBox.Text), CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
tmp = (footerBoldCheckBox.Checked ? (int)System.Drawing.FontStyle.Bold : 0)
+ (footerItalicCheckBox.Checked ? (int)System.Drawing.FontStyle.Italic : 0);
flags |= UpdateDifferent(ref config.FooterFntSty, tmp, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.ColW0Pct, colW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.ColW1Pct, colW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.ColW2Pct, colW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowW0Pct, belowW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowW1Pct, belowW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowW2Pct, belowW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.Header, header, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.Footer, footer, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.CommonItems1, commonItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.CommonItems2, commonItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.CommonItems3, commonItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.SelectedItems, testItems, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowItems1, belowItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowItems2, belowItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.BelowItems3, belowItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
for (Culture i = 0; i < Culture.Count; i++)
{
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
{
config.Culture = i;
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
break;
}
}
flags |= UpdateDifferent(ref config.DocName, docNameTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
{
Printer.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
}
return flags;
}
private void headerButton_Click(object sender, EventArgs e)
{
HeaderFooterDlg dlg = new HeaderFooterDlg(true, string.IsNullOrEmpty(header) ? string.Empty : header.Replace("~", Environment.NewLine));
if (dlg.ShowDialog() == DialogResult.OK)
{
header = dlg.EditedText.Replace(Environment.NewLine, "~");
}
}
private void commonItems1Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems1),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
commonItems1 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void commonItems2Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems2),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
commonItems2 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void commonItems3Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems3),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
commonItems3 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void testItemsButton_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(testItems),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
testItems = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void belowItems1Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems1),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
belowItems1 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void belowItems2Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems2),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
belowItems2 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void belowItems3Button_Click(object sender, EventArgs e)
{
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
{
MetersKind = config.MetersKind,
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems3),
};
if (dlg.ShowDialog() == DialogResult.OK)
{
belowItems3 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
}
}
private void footerButton_Click(object sender, EventArgs e)
{
HeaderFooterDlg dlg = new HeaderFooterDlg(false, string.IsNullOrEmpty(footer) ? string.Empty : footer.Replace("~", Environment.NewLine));
if (dlg.ShowDialog() == DialogResult.OK)
{
footer = dlg.EditedText.Replace(Environment.NewLine, "~");
}
}
#region Configuration Change Handling
public static void OnCmdResponse(object sender, CmdResponseArgs args)
{
if (CmdResponseHandler == null) return;
try { CmdResponseHandler(sender, args); }
catch (Exception e) { log.Error("CmdResponseHandler(...) failed", e); }
}
public static event EventHandler<CmdResponseArgs> CmdResponseHandler;
public void StartResponseHandler() { }
public void StopResponseHandler() { }
#endregion Configuration Change Handling
}
}
@@ -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>