Events, EventViewer, Common prjs, UI.EventLogs, UI.Calendar, EventTriggers, GetCalendarEvents() in WT/I.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -38,6 +38,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.Extended
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as ComponentCfg;
|
||||
Events.DB.SetBenchName(myCfg.TestBenchName);
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -40,6 +40,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as ComponentCfg;
|
||||
Events.DB.SetBenchName(myCfg.TestBenchName);
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,13 +218,13 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
{
|
||||
if (strValue == rdbu.ToDescription()) return true;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
{
|
||||
if (strValue == side.ToDescription()) return true;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
|
||||
@@ -5,10 +5,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.FlowMeter
|
||||
{
|
||||
public class FlowMeter : ComponentBase, GenericDevices.IFlowMeter
|
||||
public class FlowMeter : ComponentBase, Generic.IDevice, GenericDevices.IFlowMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(FlowMeter));
|
||||
public override string ToString() { return string.Format("FlowMeter({0})", Cfg.ToString(1)); }
|
||||
@@ -61,6 +62,55 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// IDevice interface functions
|
||||
///
|
||||
public void Initialize()
|
||||
{
|
||||
if (flowMeterCfg.CalibValidDate != DateTime.MinValue && flowMeterCfg.CalibValidDate.Date < DateTime.Now.Date)
|
||||
{
|
||||
throw new Exception(string.Format("{0}: {1}", Name, Strings.Calibration_certificate_validity_expired));
|
||||
}
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", Name);
|
||||
}
|
||||
public void RunDeviceBefore() { }
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { }
|
||||
public void StopDevice2() { }
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = flowMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy"))));
|
||||
if ((calibrationDue != DateTime.MinValue) && (DateTime.Now.Date <= calibrationDue.AddDays(-7)))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy")),
|
||||
false));
|
||||
}
|
||||
if ((calibrationDue != DateTime.MinValue) && (DateTime.Now.Date <= calibrationDue.Date))
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy")),
|
||||
true));
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public double ReadFlow() { return controlBoard.ReferenceFlow; }
|
||||
public double ReadFrequency() { return controlBoard.ReferenceFreq; }
|
||||
|
||||
|
||||
@@ -148,10 +148,11 @@ namespace TBF.BenchControl
|
||||
InfoRead,
|
||||
InfoNotRead,
|
||||
|
||||
/// At the end of cycle when saving /printing resultss
|
||||
ResultsPrinted,
|
||||
ResultsWritten,
|
||||
ResultsNotWritten,
|
||||
/// At the end of cycle when saving / printing / analyzing resultss
|
||||
ResultsPrinted, /// Printers
|
||||
ResultsWritten, /// File writers
|
||||
ResultsProcessed, /// Event triggers
|
||||
ErrorProcessingResults,
|
||||
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IEventTrigger : IResultsProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Analyze results of one batch of water meters and trigger appropriate events.
|
||||
/// Events: Event.ResultsProcessed, Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results of a batch of water meters</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ProcessResultsOp(Results.Entities.Batch batch);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
interface IHasCalendarEvents
|
||||
{
|
||||
IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,18 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IResultsPrinter : IComponent
|
||||
public interface IResultsPrinter : IResultsProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Prints the test cycle results, Events: Event.ResultsPrinted
|
||||
/// Prints results fo one batch of water meters.
|
||||
/// Events: Event.ResultsPrinted, Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation PrintResultsOp(Results.Entities.Batch batch);
|
||||
/// <param name="batch">Results of a batch of water meters</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ProcessResultsOp(Results.Entities.Batch batch);
|
||||
|
||||
/// <summary>
|
||||
/// When true printing at the end of cycle is bypassed.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IResultsProcessor : IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Process results of a batch of water meters. Do one of the following:
|
||||
/// - write them into a file
|
||||
/// - save them into a database
|
||||
/// - print them on a printer
|
||||
/// - analyze them and trigger appropriate events
|
||||
/// </summary>
|
||||
/// <param name="batch">Results of a batch of water meters</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ProcessResultsOp(Results.Entities.Batch batch);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IResultsWriter : IComponent
|
||||
public interface IResultsWriter : IResultsProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
/// Writes results of one batch of water meters into a file or a database.
|
||||
/// Events: Event.ResultsWritten, Event.Busy
|
||||
/// </summary>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation WriteResultsOp(Results.Entities.Batch batchResults);
|
||||
/// <param name="batch">Results of a batch of water meters</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ProcessResultsOp(Results.Entities.Batch batch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
/// <note>
|
||||
/// Implemented and tested on 15.10.2013 by Milan Hanajik
|
||||
/// </note>
|
||||
public class BalanceDev : TankDraining, IDevice, GenericDevices.IScale
|
||||
public class BalanceDev : TankDraining, IDevice, GenericDevices.IScale, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
/// <summary>
|
||||
/// Info: StartMassMeasurement() and "Balnce response = .., Mass = ..."
|
||||
@@ -109,6 +110,11 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
{
|
||||
base.Initalize();
|
||||
|
||||
if (balanceCfg.CalibValidDate != DateTime.MinValue && balanceCfg.CalibValidDate.Date < DateTime.Now.Date)
|
||||
{
|
||||
throw new Exception(string.Format("{0}: {1}", Name, Strings.Calibration_certificate_validity_expired));
|
||||
}
|
||||
|
||||
msrmntState = MsrmntState.Failed; /// Data not valid yet
|
||||
MsrmntTime = 0;
|
||||
|
||||
@@ -120,9 +126,39 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
serialPort.Handshake = balanceCfg.Handshake;
|
||||
serialPort.Open();
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", ToString());
|
||||
log.FatalFormat("Successfully initialized device {0}", Name);
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = balanceCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy"))));
|
||||
if ((calibrationDue != DateTime.MinValue) && (DateTime.Now.Date <= calibrationDue.AddDays(-7)))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy")),
|
||||
false));
|
||||
}
|
||||
if ((calibrationDue != DateTime.MinValue) && (DateTime.Now.Date <= calibrationDue.Date))
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString("dd.MM.yyyy")),
|
||||
true));
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public override bool IsEmpty()
|
||||
{
|
||||
return DrainValve.State ? (mass <= balanceCfg.Empty) : (mass <= balanceCfg.EmptyUp);
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
/// <param name="procedure">Procedure to print the results of</param>
|
||||
/// <param name="unsortedResults">Results to write into the file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (!tracingCfg.SaveTracingRecords)
|
||||
{
|
||||
@@ -284,11 +284,11 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
log.WarnFormat("{0} : Run() : currentOp = {1}", Name, currentOpState);
|
||||
opCompleted = true;
|
||||
if (SaveTracingRecords(batch) != Retv.OK) anyError = true;
|
||||
return anyError ? Event.ResultsNotWritten : Event.ResultsWritten;
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
return anyError ? Event.ResultsNotWritten : Event.ResultsWritten;
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace TBF.BenchControl.Output.DB.SaveDiverterCorrections
|
||||
/// <param name="procedure">Procedure to print the results of</param>
|
||||
/// <param name="unsortedResults">Results to write into the file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
throw new Exception("Sequence error");
|
||||
@@ -240,7 +240,7 @@ namespace TBF.BenchControl.Output.DB.SaveDiverterCorrections
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
return Event.ResultsNotWritten;
|
||||
return Event.ErrorProcessingResults;
|
||||
else
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
|
||||
/// <param name="procedure">Procedure to print the results of</param>
|
||||
/// <param name="unsortedResults">Results to write into the file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
throw new Exception("Sequence error");
|
||||
@@ -255,7 +255,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
return Event.ResultsNotWritten;
|
||||
return Event.ErrorProcessingResults;
|
||||
else
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (!dbCfg.SaveResults)
|
||||
{
|
||||
@@ -314,7 +314,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
return anyError ? Event.ResultsNotWritten : Event.ResultsWritten;
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Iperl
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { Trigger.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Trigger(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Trigger(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TriggerCfg(this.GetType().Namespace.Substring(24), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TriggerCfg.Serializer, component, this);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Iperl
|
||||
{
|
||||
public class Trigger : ComponentBase, IOperation, GenericDevices.IEventTrigger
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Trigger));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
readonly TriggerCfg triggerCfg;
|
||||
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
public Trigger() {}
|
||||
|
||||
public Trigger(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
triggerCfg = cfg as TriggerCfg;
|
||||
ApplyConfig();
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
void ApplyConfig()
|
||||
{
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
TriggerCfg newCfg = args.Cfg as TriggerCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.Culture = newCfg.Culture;
|
||||
triggerCfg.EliminateSpaces = newCfg.EliminateSpaces;
|
||||
triggerCfg.PrintCaption = newCfg.PrintCaption;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file
|
||||
/// Events:
|
||||
/// Event.ResultsWritten
|
||||
/// Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</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()
|
||||
{
|
||||
Process(batch);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsProcessed</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsProcessed;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Process(Results.Entities.Batch batch)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Iperl
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public Culture Culture;
|
||||
public bool EliminateSpaces;
|
||||
public bool PrintCaption;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TriggerCfg() {}
|
||||
|
||||
public TriggerCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Výsledky iPERL";
|
||||
Culture = Culture.EN;
|
||||
EliminateSpaces = false;
|
||||
PrintCaption = false;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source",
|
||||
"Culture",
|
||||
"Eliminate spaces",
|
||||
"Print caption",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
IList<string> listOfValues = new List<string>();
|
||||
if (i == 1)
|
||||
{
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++) listOfValues.Add(cu.ToString());
|
||||
return listOfValues;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
listOfValues.Add(Strings.yes);
|
||||
listOfValues.Add(Strings.no);
|
||||
return listOfValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case -1: return string.Format("Name={0}, FNameFmt={1}, NoSpaces={2}", Name, EventSource, EliminateSpaces);
|
||||
case 0: return EventSource;
|
||||
case 1: return Culture.ToString();
|
||||
case 2: return EliminateSpaces ? Strings.yes : Strings.no;
|
||||
case 3: return PrintCaption ? Strings.yes : Strings.no;
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString())
|
||||
{
|
||||
if (Culture != cu)
|
||||
{
|
||||
Culture = cu;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
case 2: EliminateSpaces = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: PrintCaption = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return true;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString()) return true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(TriggerCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource;
|
||||
prms.Culture = this.Culture;
|
||||
prms.EliminateSpaces = this.EliminateSpaces;
|
||||
prms.PrintCaption = this.PrintCaption;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { Trigger.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Trigger(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Trigger(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TriggerCfg(this.GetType().Namespace.Substring(24), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TriggerCfg.Serializer, component, this);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
public class Trigger : ComponentBase, IOperation, GenericDevices.IEventTrigger
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Trigger));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
readonly TriggerCfg triggerCfg;
|
||||
string src { get { return triggerCfg.EventSource; } }
|
||||
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
public Trigger() {}
|
||||
|
||||
public Trigger(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
triggerCfg = cfg as TriggerCfg;
|
||||
if (triggerCfg == null) throw new ArgumentException("triggerCfg");
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
TriggerCfg newCfg = args.Cfg as TriggerCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.FailedWMsPct = newCfg.FailedWMsPct;
|
||||
triggerCfg.Mid1Name = newCfg.Mid1Name;
|
||||
triggerCfg.Mid1RelErr = newCfg.Mid1RelErr;
|
||||
triggerCfg.Mid2Name = newCfg.Mid2Name;
|
||||
triggerCfg.Mid2RelErr = newCfg.Mid2RelErr;
|
||||
triggerCfg.Mid3Name = newCfg.Mid3Name;
|
||||
triggerCfg.Mid3RelErr = newCfg.Mid3RelErr;
|
||||
triggerCfg.Mid4Name = newCfg.Mid4Name;
|
||||
triggerCfg.Mid4RelErr = newCfg.Mid4RelErr;
|
||||
triggerCfg.Mid5Name = newCfg.Mid5Name;
|
||||
triggerCfg.Mid5RelErr = newCfg.Mid5RelErr;
|
||||
triggerCfg.E1 = newCfg.E1;
|
||||
triggerCfg.E2 = newCfg.E2;
|
||||
triggerCfg.E3 = newCfg.E3;
|
||||
triggerCfg.E4 = newCfg.E4;
|
||||
triggerCfg.E5 = newCfg.E5;
|
||||
triggerCfg.E6 = newCfg.E6;
|
||||
triggerCfg.E7 = newCfg.E7;
|
||||
triggerCfg.E8 = newCfg.E8;
|
||||
triggerCfg.E9 = newCfg.E9;
|
||||
triggerCfg.E10 = newCfg.E10;
|
||||
triggerCfg.E11 = newCfg.E11;
|
||||
triggerCfg.E12 = newCfg.E12;
|
||||
triggerCfg.E13 = newCfg.E13;
|
||||
triggerCfg.E14 = newCfg.E14;
|
||||
triggerCfg.E15 = newCfg.E15;
|
||||
triggerCfg.E16 = newCfg.E16;
|
||||
triggerCfg.E21 = newCfg.E21;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
triggerCfg.E26 = newCfg.E26;
|
||||
triggerCfg.E27 = newCfg.E27;
|
||||
triggerCfg.E28 = newCfg.E28;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file
|
||||
/// Events:
|
||||
/// Event.ResultsWritten
|
||||
/// Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</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()
|
||||
{
|
||||
Process(batch);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsProcessed</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsProcessed;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Process(Results.Entities.Batch batch)
|
||||
{
|
||||
if (batch == null || batch.WaterMeters == null || batch.WaterMeters.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = Events.DB.CreateSession();
|
||||
Events.DB.LoadSubscribers(session);
|
||||
|
||||
///
|
||||
/// Event on high percentage of failed meters
|
||||
///
|
||||
if (triggerCfg.FailedWMsPct > 0)
|
||||
{
|
||||
/// Triggering this event is enabled
|
||||
int failedWMs = batch.FailedMetersCount();
|
||||
int passedWMs = batch.PassedMetersCount();
|
||||
if (100 * failedWMs >= triggerCfg.FailedWMsPct * (failedWMs + passedWMs))
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.BadResults, Severity.Warning,
|
||||
"Príliš veľa chybných kusov v jednej dávke",
|
||||
string.Format("Číslo dávky: {0}\r\nspolu {1} kusov, dobrých {2} ks., chybných {3} ks.",
|
||||
batch.BatchNr, passedWMs + failedWMs, passedWMs, failedWMs),
|
||||
SubscriberGroup.Production);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Event MIDx relative error measured against a scale is too large
|
||||
///
|
||||
string[] midName = new string[] { triggerCfg.Mid1Name,
|
||||
triggerCfg.Mid2Name,
|
||||
triggerCfg.Mid3Name,
|
||||
triggerCfg.Mid4Name,
|
||||
triggerCfg.Mid5Name };
|
||||
double[] maxMidRelErr = new double[] { triggerCfg.Mid1RelErr,
|
||||
triggerCfg.Mid2RelErr,
|
||||
triggerCfg.Mid3RelErr,
|
||||
triggerCfg.Mid4RelErr,
|
||||
triggerCfg.Mid5RelErr };
|
||||
for (int i = 0; i < midName.Length; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(midName[i]))
|
||||
{
|
||||
/// MIDx enabled
|
||||
foreach (var tr in batch.TestRslts)
|
||||
{
|
||||
if (tr.RefFlowmeter() == midName[i] && tr.ErrorMaster >= maxMidRelErr[i])
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.EquipmentHW, Severity.Error,
|
||||
string.Format("Príliš veľká relatívna chyba merača prietoku {0} oproti váhe", midName[i]),
|
||||
string.Format("Číslo dávky: {0}\r\nPrietokomer: {1}\r\nRelatívna chyba: {2}%\r\nMax. dovolená chyba: {3}%",
|
||||
batch.BatchNr, midName[i], Utils.DoubleToStr(tr.ErrorMaster, 3), maxMidRelErr[i]),
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance | SubscriberGroup.Production);
|
||||
break; /// For each MID just one event is triggered
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Events on Ex flags
|
||||
///
|
||||
long eFlags = batch.ErrorFlags();
|
||||
long iFlags = batch.InfoFlags();
|
||||
///
|
||||
if (triggerCfg.E1) OnExTriggerEvent(session, eFlags, iFlags, 1);
|
||||
if (triggerCfg.E2) OnExTriggerEvent(session, eFlags, iFlags, 2);
|
||||
if (triggerCfg.E3) OnExTriggerEvent(session, eFlags, iFlags, 3);
|
||||
if (triggerCfg.E4) OnExTriggerEvent(session, eFlags, iFlags, 4);
|
||||
if (triggerCfg.E5) OnExTriggerEvent(session, eFlags, iFlags, 5);
|
||||
if (triggerCfg.E6) OnExTriggerEvent(session, eFlags, iFlags, 6);
|
||||
if (triggerCfg.E7) OnExTriggerEvent(session, eFlags, iFlags, 7);
|
||||
if (triggerCfg.E8) OnExTriggerEvent(session, eFlags, iFlags, 8);
|
||||
if (triggerCfg.E9) OnExTriggerEvent(session, eFlags, iFlags, 9);
|
||||
if (triggerCfg.E10) OnExTriggerEvent(session, eFlags, iFlags, 10);
|
||||
if (triggerCfg.E11) OnExTriggerEvent(session, eFlags, iFlags, 11);
|
||||
if (triggerCfg.E12) OnExTriggerEvent(session, eFlags, iFlags, 12);
|
||||
if (triggerCfg.E13) OnExTriggerEvent(session, eFlags, iFlags, 13);
|
||||
if (triggerCfg.E14) OnExTriggerEvent(session, eFlags, iFlags, 14);
|
||||
if (triggerCfg.E15) OnExTriggerEvent(session, eFlags, iFlags, 15);
|
||||
if (triggerCfg.E16) OnExTriggerEvent(session, eFlags, iFlags, 16);
|
||||
if (triggerCfg.E21) OnExTriggerEvent(session, eFlags, iFlags, 21);
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
if (triggerCfg.E26) OnExTriggerEvent(session, eFlags, iFlags, 26);
|
||||
if (triggerCfg.E27) OnExTriggerEvent(session, eFlags, iFlags, 27);
|
||||
if (triggerCfg.E28) OnExTriggerEvent(session, eFlags, iFlags, 28);
|
||||
#endif
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void OnExTriggerEvent(ISession session, long eFlags, long iFlags, int x)
|
||||
{
|
||||
long mask = 1L << (x - 1);
|
||||
|
||||
Severity severity;
|
||||
if ((eFlags & mask) != 0)
|
||||
{
|
||||
severity = Severity.Error;
|
||||
}
|
||||
else if ((iFlags & mask) != 0)
|
||||
{
|
||||
severity = Severity.Warning;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string moreInfo = string.Format("E{0}", x);
|
||||
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, src, EventClass.TestingProcess, severity,
|
||||
string.Format("Príznak chyby procesu E{0} je aktívny", x),
|
||||
string.Format("Číslo dávky: {0}\r\n{1}", batch.BatchNr, moreInfo),
|
||||
SubscriberGroup.Production);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Standard
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public int FailedWMsPct; /// 0 = off, 1..100% event is triggered when percentage reaches this level
|
||||
public string Mid1Name;
|
||||
public double Mid1RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid2Name;
|
||||
public double Mid2RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid3Name;
|
||||
public double Mid3RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid4Name;
|
||||
public double Mid4RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public string Mid5Name;
|
||||
public double Mid5RelErr; /// [%] Event is triggered when relative error of reference flowmeter against a scale reaches this level
|
||||
public bool E1;
|
||||
public bool E2;
|
||||
public bool E3;
|
||||
public bool E4;
|
||||
public bool E5;
|
||||
public bool E6;
|
||||
public bool E7;
|
||||
public bool E8;
|
||||
public bool E9;
|
||||
public bool E10;
|
||||
public bool E11;
|
||||
public bool E12;
|
||||
public bool E13;
|
||||
public bool E14;
|
||||
public bool E15;
|
||||
public bool E16;
|
||||
public bool E21;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
public bool E26;
|
||||
public bool E27;
|
||||
public bool E28;
|
||||
#endif
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TriggerCfg() {}
|
||||
|
||||
public TriggerCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Results"; /// 0
|
||||
FailedWMsPct = 20; /// 1
|
||||
Mid1Name = "I1"; /// 2
|
||||
Mid1RelErr = 0.5; /// 3
|
||||
Mid2Name = "I2"; /// 4
|
||||
Mid2RelErr = 0.5; /// 5
|
||||
Mid3Name = "I3"; /// 6
|
||||
Mid3RelErr = 0.5; /// 7
|
||||
Mid4Name = ""; /// 8
|
||||
Mid4RelErr = 0.5; /// 9
|
||||
Mid5Name = ""; /// 10
|
||||
Mid5RelErr = 0.5; /// 11
|
||||
E1 = false; /// 12
|
||||
E2 = false; /// 13
|
||||
E3 = false; /// 14
|
||||
E4 = false; /// 15
|
||||
E5 = false; /// 16
|
||||
E6 = false; /// 17
|
||||
E7 = false; /// 18
|
||||
E8 = false; /// 19
|
||||
E9 = false; /// 20
|
||||
E10 = false; /// 21
|
||||
E11 = false; /// 22
|
||||
E12 = false; /// 23
|
||||
E13 = false; /// 24
|
||||
E14 = false; /// 25
|
||||
E15 = false; /// 26
|
||||
E16 = false; /// 27
|
||||
E21 = false; /// 28
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
E26 = false; /// 29
|
||||
E27 = false; /// 30
|
||||
E28 = false; /// 31
|
||||
#endif
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source", /// 0
|
||||
"Percentage of failed meters", /// 1
|
||||
"MID 1 name", /// 2
|
||||
"MID 1 rel. error", /// 3
|
||||
"MID 2 name", /// 4
|
||||
"MID 2 rel. error", /// 5
|
||||
"MID 3 name", /// 6
|
||||
"MID 3 rel. error", /// 7
|
||||
"MID 4 name", /// 8
|
||||
"MID 4 rel. error", /// 9
|
||||
"MID 5 name", /// 10
|
||||
"MID 5 rel. error", /// 11
|
||||
"E1", /// 12
|
||||
"E2", /// 13
|
||||
"E3", /// 14
|
||||
"E4", /// 15
|
||||
"E5", /// 16
|
||||
"E6", /// 17
|
||||
"E7", /// 18
|
||||
"E8", /// 19
|
||||
"E9", /// 20
|
||||
"E10", /// 21
|
||||
"E11", /// 22
|
||||
"E12", /// 23
|
||||
"E13", /// 24
|
||||
"E14", /// 25
|
||||
"E15", /// 26
|
||||
"E16", /// 27
|
||||
"E21", /// 28
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
"E26", /// 29
|
||||
"E27", /// 30
|
||||
"E28", /// 31
|
||||
#endif
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
IList<string> listOfValues = new List<string>();
|
||||
if (i >= 12)
|
||||
{
|
||||
listOfValues.Add(Strings.yes);
|
||||
listOfValues.Add(Strings.no);
|
||||
return listOfValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case -1: return string.Format("Name={0}, EventSource={1}, FailedWMsPct={2}, ...", Name, EventSource, FailedWMsPct);
|
||||
case 0: return EventSource;
|
||||
case 1: return FailedWMsPct.ToString();
|
||||
case 2: return Mid1Name;
|
||||
case 3: return Mid1RelErr.ToString();
|
||||
case 4: return Mid2Name;
|
||||
case 5: return Mid2RelErr.ToString();
|
||||
case 6: return Mid3Name;
|
||||
case 7: return Mid3RelErr.ToString();
|
||||
case 8: return Mid4Name;
|
||||
case 9: return Mid4RelErr.ToString();
|
||||
case 10: return Mid5Name;
|
||||
case 11: return Mid5RelErr.ToString();
|
||||
case 12: return E1 ? Strings.yes : Strings.no;
|
||||
case 13: return E2 ? Strings.yes : Strings.no;
|
||||
case 14: return E3 ? Strings.yes : Strings.no;
|
||||
case 15: return E4 ? Strings.yes : Strings.no;
|
||||
case 16: return E5 ? Strings.yes : Strings.no;
|
||||
case 17: return E6 ? Strings.yes : Strings.no;
|
||||
case 18: return E7 ? Strings.yes : Strings.no;
|
||||
case 19: return E8 ? Strings.yes : Strings.no;
|
||||
case 20: return E9 ? Strings.yes : Strings.no;
|
||||
case 21: return E10 ? Strings.yes : Strings.no;
|
||||
case 22: return E11 ? Strings.yes : Strings.no;
|
||||
case 23: return E12 ? Strings.yes : Strings.no;
|
||||
case 24: return E13 ? Strings.yes : Strings.no;
|
||||
case 25: return E14 ? Strings.yes : Strings.no;
|
||||
case 26: return E15 ? Strings.yes : Strings.no;
|
||||
case 27: return E16 ? Strings.yes : Strings.no;
|
||||
case 28: return E21 ? Strings.yes : Strings.no;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29: return E26 ? Strings.yes : Strings.no;
|
||||
case 30: return E27 ? Strings.yes : Strings.no;
|
||||
case 31: return E28 ? Strings.yes : Strings.no;
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 1: FailedWMsPct = int.Parse(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 2: Mid1Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 3: Mid1RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 4: Mid2Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 5: Mid2RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 6: Mid3Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 7: Mid3RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 8: Mid4Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 9: Mid4RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 10: Mid5Name = strValue; return CfgUpdateFlags.AnyChange;
|
||||
case 11: Mid5RelErr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.AnyChange;
|
||||
case 12: E1 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 13: E2 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 14: E3 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 15: E4 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 16: E5 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 17: E6 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 18: E7 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 19: E8 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 20: E9 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 21: E10 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 22: E11 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 23: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 24: E12 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 25: E14 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 26: E15 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 27: E16 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 28: E21 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29: E26 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 30: E27 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
case 31: E28 = (strValue == Strings.yes); return CfgUpdateFlags.AnyChange;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate string form of a parameter value
|
||||
/// </summary>
|
||||
/// <param name="i">Parameter index</param>
|
||||
/// <param name="strValue">String form of a parameter</param>
|
||||
/// <param name="message">Message in case value is not valid</param>
|
||||
/// <returns>true when string form of a parameter is OK</returns>
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
int percentage;
|
||||
double relError;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
case 10:
|
||||
return true;
|
||||
case 1:
|
||||
if (int.TryParse(strValue, out percentage) && (0 <= percentage) && (percentage <= 100)) return true;
|
||||
message = "Percentage of failed meters is invalid, should be 1..100, 0 = off";
|
||||
return false;
|
||||
case 3:
|
||||
case 5:
|
||||
case 7:
|
||||
case 9:
|
||||
case 11:
|
||||
if (Utils.TryParseUDouble(strValue, out relError)) return true;
|
||||
message = "relative error of MID is invalid or less then 0";
|
||||
return false;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
#endif
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(TriggerCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource; /// 0
|
||||
prms.FailedWMsPct = this.FailedWMsPct; /// 1
|
||||
prms.Mid1Name = this.Mid1Name; /// 2
|
||||
prms.Mid1RelErr = this.Mid1RelErr; /// 3
|
||||
prms.Mid2Name = this.Mid2Name; /// 4
|
||||
prms.Mid2RelErr = this.Mid2RelErr; /// 5
|
||||
prms.Mid3Name = this.Mid3Name; /// 6
|
||||
prms.Mid3RelErr = this.Mid3RelErr; /// 7
|
||||
prms.Mid4Name = this.Mid4Name; /// 8
|
||||
prms.Mid4RelErr = this.Mid4RelErr; /// 9
|
||||
prms.Mid5Name = this.Mid5Name; /// 10
|
||||
prms.Mid5RelErr = this.Mid5RelErr; /// 11
|
||||
prms.E1 = this.E1; /// 12
|
||||
prms.E2 = this.E2; /// 13
|
||||
prms.E3 = this.E3; /// 14
|
||||
prms.E4 = this.E4; /// 15
|
||||
prms.E5 = this.E5; /// 16
|
||||
prms.E6 = this.E6; /// 17
|
||||
prms.E7 = this.E7; /// 18
|
||||
prms.E8 = this.E8; /// 19
|
||||
prms.E9 = this.E9; /// 20
|
||||
prms.E10 = this.E10; /// 21
|
||||
prms.E11 = this.E11; /// 22
|
||||
prms.E12 = this.E12; /// 23
|
||||
prms.E13 = this.E13; /// 24
|
||||
prms.E14 = this.E14; /// 25
|
||||
prms.E15 = this.E15; /// 26
|
||||
prms.E16 = this.E16; /// 27
|
||||
prms.E21 = this.E21; /// 28
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
prms.E26 = this.E26; /// 29
|
||||
prms.E27 = this.E27; /// 30
|
||||
prms.E28 = this.E28; /// 31
|
||||
#endif
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { Trigger.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Trigger(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Trigger(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TriggerCfg(this.GetType().Namespace.Substring(24), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TriggerCfg.Serializer, component, this);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
public class Trigger : ComponentBase, IOperation, GenericDevices.IEventTrigger
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Trigger));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
readonly TriggerCfg triggerCfg;
|
||||
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
public Trigger() {}
|
||||
|
||||
public Trigger(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
triggerCfg = cfg as TriggerCfg;
|
||||
ApplyConfig();
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
void ApplyConfig()
|
||||
{
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
TriggerCfg newCfg = args.Cfg as TriggerCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
triggerCfg.EventSource = newCfg.EventSource;
|
||||
triggerCfg.Culture = newCfg.Culture;
|
||||
triggerCfg.EliminateSpaces = newCfg.EliminateSpaces;
|
||||
triggerCfg.PrintCaption = newCfg.PrintCaption;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file
|
||||
/// Events:
|
||||
/// Event.ResultsWritten
|
||||
/// Event.Busy
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</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()
|
||||
{
|
||||
Process(batch);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsProcessed</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsProcessed;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Process(Results.Entities.Batch batch)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.EventTriggers.Statistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string EventSource;
|
||||
public Culture Culture;
|
||||
public bool EliminateSpaces;
|
||||
public bool PrintCaption;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TriggerCfg() {}
|
||||
|
||||
public TriggerCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
EventSource = "Štatistiky výsledkov";
|
||||
Culture = Culture.EN;
|
||||
EliminateSpaces = false;
|
||||
PrintCaption = false;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"Event source",
|
||||
"Culture",
|
||||
"Eliminate spaces",
|
||||
"Print caption",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public IList<string> ParamValues(int i)
|
||||
{
|
||||
IList<string> listOfValues = new List<string>();
|
||||
if (i == 1)
|
||||
{
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++) listOfValues.Add(cu.ToString());
|
||||
return listOfValues;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
listOfValues.Add(Strings.yes);
|
||||
listOfValues.Add(Strings.no);
|
||||
return listOfValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case -1: return string.Format("Name={0}, FNameFmt={1}, NoSpaces={2}", Name, EventSource, EliminateSpaces);
|
||||
case 0: return EventSource;
|
||||
case 1: return Culture.ToString();
|
||||
case 2: return EliminateSpaces ? Strings.yes : Strings.no;
|
||||
case 3: return PrintCaption ? Strings.yes : Strings.no;
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: EventSource = strValue; return CfgUpdateFlags.RestartRqrd;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString())
|
||||
{
|
||||
if (Culture != cu)
|
||||
{
|
||||
Culture = cu;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
case 2: EliminateSpaces = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: PrintCaption = (strValue == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return true;
|
||||
case 1:
|
||||
for (Culture cu = 0; cu < Culture.Count; cu++)
|
||||
{
|
||||
if (strValue == cu.ToString()) return true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(TriggerCfg prms)
|
||||
{
|
||||
prms.EventSource = this.EventSource;
|
||||
prms.Culture = this.Culture;
|
||||
prms.EliminateSpaces = this.EliminateSpaces;
|
||||
prms.PrintCaption = this.PrintCaption;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace TBF.BenchControl.Output.FileWriters.Elde
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -8,7 +8,7 @@ using log4net;
|
||||
namespace TBF.BenchControl.Output.FileWriters.ImageArchiver
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements an operation 'WriteResultsOp(batch)' that copies files from folder
|
||||
/// Implements an operation 'ProcessResultsOp(batch)' that copies files from folder
|
||||
/// Path.Combine(Program.ImagesDir, batch.BatchNr.ToString(), wm.WMPosition.ToString())
|
||||
/// for each water meter in the batch to a destination folder specified by the component properties.
|
||||
/// </summary>
|
||||
@@ -154,7 +154,7 @@ namespace TBF.BenchControl.Output.FileWriters.ImageArchiver
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
/// <param name="procedure">Procedure to print the results of</param>
|
||||
/// <param name="unsortedResults">Results to write into the file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
return Event.ResultsNotWritten;
|
||||
return Event.ErrorProcessingResults;
|
||||
else
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace TBF.BenchControl.Output.FileWriters.OneFilePerMeter
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into a file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace TBF.BenchControl.Output.FileWriters.Xml
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into files</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace TBF.BenchControl.Output.FileWriters.XmlBatch
|
||||
/// </summary>
|
||||
/// <param name="batch">Results to write into files</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace TBF.BenchControl.Output.Printers.Label
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace TBF.BenchControl.Output.Printers.MultiLabel
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace TBF.BenchControl.Output.Printers.Munich
|
||||
/// <param name="benchId">Procedure to print the results of</param>
|
||||
/// <param name="results">Results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace TBF.BenchControl.Output.Printers.Zapiska
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
public IOperation ProcessResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -1463,56 +1463,46 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
//------------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Saving_and_printing_results);
|
||||
State savingAndPrintingRslts = State.Create("MainSeq : Saving and printing results");
|
||||
//------------------------------------------------------
|
||||
|
||||
string[] writers = StateMachine.Procedure.ResultsWriter.Split(new char[] { '~' });
|
||||
foreach (var writerName in writers)
|
||||
string[] writers = (StateMachine.Procedure.ResultsWriter != null) ? StateMachine.Procedure.ResultsWriter.Split(new char[] { '~' }) : new string[0];
|
||||
string[] printers = (StateMachine.Procedure.ResultsPrinter != null) ? StateMachine.Procedure.ResultsPrinter.Split(new char[] { '~' }) : new string[0];
|
||||
string[] eventTriggers = (StateMachine.Procedure.EventTriggers != null) ? StateMachine.Procedure.EventTriggers.Split(new char[] { '~' }) : new string[0];
|
||||
string[] rsltProcessors = new string[writers.Length + printers.Length + eventTriggers.Length];
|
||||
writers.CopyTo(rsltProcessors, 0);
|
||||
printers.CopyTo(rsltProcessors, writers.Length);
|
||||
eventTriggers.CopyTo(rsltProcessors, writers.Length + printers.Length);
|
||||
///
|
||||
State savingAndPrintingRslts = State.Create("MainSeq : Saving and printing results");
|
||||
foreach (var rpName in rsltProcessors)
|
||||
{
|
||||
IResultsWriter writer = TbfComponents.FindComponent(writerName) as IResultsWriter;
|
||||
if (writer != null)
|
||||
IResultsProcessor rsltProcessor = TbfComponents.FindComponent(rpName) as IResultsProcessor;
|
||||
if (rsltProcessor != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
savingAndPrintingRslts.AddOperation(writer.WriteResultsOp(ProcessData.BatchRslts.Batch));
|
||||
savingAndPrintingRslts.AddOperation(rsltProcessor.ProcessResultsOp(ProcessData.BatchRslts.Batch));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Bridge.OnError(this, string.Format(Strings.Component_0_crashed_Results_not_saved, writerName));
|
||||
log.FatalFormat("FileWriter {0} crashed: {1}", writerName, exc.Message);
|
||||
Bridge.OnError(this, string.Format(Strings.Component_0_crashed_Results_not_saved, rpName));
|
||||
log.FatalFormat("FileWriter {0} crashed: {1}", rpName, exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string[] printers = StateMachine.Procedure.ResultsPrinter.Split(new char[] { '~' });
|
||||
foreach (var printerName in printers)
|
||||
{
|
||||
IResultsPrinter printer = TbfComponents.FindComponent(printerName) as IResultsPrinter;
|
||||
if (printer != null && !printer.SupressPrinting)
|
||||
{
|
||||
try
|
||||
{
|
||||
savingAndPrintingRslts.AddOperation(printer.PrintResultsOp(ProcessData.BatchRslts.Batch));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Bridge.OnError(this, string.Format(Strings.Component_0_crashed_Results_not_printed, printerName));
|
||||
log.FatalFormat("Printer {0} crashed: {1}", printerName, exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
savingAndPrintingRslts.AddOperation(checkUiOp).EnterState();
|
||||
do
|
||||
{
|
||||
savingAndPrintingRslts.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) goto stop;
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
bool resultsSent = !e.Contains(Event.ResultsNotWritten);
|
||||
///
|
||||
bool resultsSent = !e.Contains(Event.ErrorProcessingResults);
|
||||
ProcessData.BatchRslts.Batch.RsltsSent = resultsSent;
|
||||
|
||||
|
||||
///
|
||||
/// Save results to 'Results' MySQL database
|
||||
///
|
||||
|
||||
@@ -131,6 +131,9 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new Output.DB.SaveDiverterCorrections.Factory());
|
||||
Factories.Add(new Output.DB.SaveFlowmeterCorrections.Factory());
|
||||
Factories.Add(new Output.DB.SensusOracle.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Iperl.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Standard.Factory());
|
||||
Factories.Add(new Output.EventTriggers.Statistics.Factory());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactorySingle());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactoryCompound());
|
||||
Factories.Add(new Output.FileWriters.Basic.FactoryHeatMeters());
|
||||
|
||||
@@ -569,22 +569,6 @@ namespace TBF.BenchControl
|
||||
|
||||
if ((SimRoute & EmptyValve2) == EmptyValve2) Mass2sim -= DiffKg(10.0, time);
|
||||
if (Mass2sim < 0) Mass2sim = 0;
|
||||
|
||||
UiBridge.Bridge.OnLog(null, string.Format("I{1}/RV{2}: q1={3}, q2={4}, q3={5}, q4={6}, q5={7}, D123={8}{9}{10}, m1={11}, m2={12}, S={13}\r\n",
|
||||
time, refFlowmtrNo, regulValveNo,
|
||||
Flow1sim.ToString("F1"),
|
||||
Flow2sim.ToString("F1"),
|
||||
Flow3sim.ToString("F1"),
|
||||
Flow4sim.ToString("F1"),
|
||||
Flow5sim.ToString("F1"),
|
||||
(Div1sim ? "o" : "x"),
|
||||
(Div2sim ? "o" : "x"),
|
||||
(Div3sim ? "o" : "x"),
|
||||
Mass1sim.ToString("F1"),
|
||||
Mass2sim.ToString("F1"),
|
||||
((ulong)statusP).ToString("X")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -387,14 +387,14 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
aveFreqBefore /= (double)DetectionKernelSize;
|
||||
aveFreqAfter /= (double)DetectionKernelSize;
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format("time={0}, flow{1}, aveFlowB={2}, aveFlowA={3}, pulseFreq={4}, aveFreqB={5}, aveFreqA={6}\r\n",
|
||||
StateMachine.Time - startTime,
|
||||
flowsForDetection[0].ToString("F2"),
|
||||
aveFlowBefore.ToString("F2"),
|
||||
aveFlowAfter.ToString("F2"),
|
||||
pulseFreqsForDetection[0].ToString("F2"),
|
||||
aveFreqBefore.ToString("F2"),
|
||||
aveFreqAfter.ToString("F2")));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("time={0}, flow{1}, aveFlowB={2}, aveFlowA={3}, pulseFreq={4}, aveFreqB={5}, aveFreqA={6}\r\n",
|
||||
// StateMachine.Time - startTime,
|
||||
// flowsForDetection[0].ToString("F2"),
|
||||
// aveFlowBefore.ToString("F2"),
|
||||
// aveFlowAfter.ToString("F2"),
|
||||
// pulseFreqsForDetection[0].ToString("F2"),
|
||||
// aveFreqBefore.ToString("F2"),
|
||||
// aveFreqAfter.ToString("F2")));
|
||||
|
||||
//detectedFlow = (aveFlowBefore + aveFlowAfter) / 2;
|
||||
detectedFlow = aveFlowBefore;
|
||||
@@ -425,7 +425,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
Qfall = detectedFlow;
|
||||
}
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format("detected flow={0}\r\n", detectedFlow.ToString("F2")));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("detected flow={0}\r\n", detectedFlow.ToString("F2")));
|
||||
|
||||
float qfrom_detected = (float)(detectedFlow + testParams.RelativeQfrom);
|
||||
float qto_detected = (float)(detectedFlow + testParams.RelativeQto);
|
||||
|
||||
@@ -126,11 +126,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
|
||||
StateMachine.Time - startTime,
|
||||
pumpPower.ToString("F0"),
|
||||
PressUp.ToString(),
|
||||
PressDown.ToString()));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
|
||||
// StateMachine.Time - startTime,
|
||||
// pumpPower.ToString("F0"),
|
||||
// PressUp.ToString(),
|
||||
// PressDown.ToString()));
|
||||
|
||||
float step = (pumpPower < 40.0f) ? 4.7f : ((pumpPower < 60.0f) ? 3.3f : ((pumpPower < 80.0f) ? 2.2f : ((pumpPower < 90.0f) ? 1.5f : 1.2f)));
|
||||
|
||||
|
||||
@@ -108,11 +108,11 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
|
||||
StateMachine.Time - startTime,
|
||||
pumpPower.ToString("F0"),
|
||||
PressUp.ToString(),
|
||||
PressDown.ToString()));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
|
||||
// StateMachine.Time - startTime,
|
||||
// pumpPower.ToString("F0"),
|
||||
// PressUp.ToString(),
|
||||
// PressDown.ToString()));
|
||||
|
||||
float step = (pumpPower < 40.0f) ? 4.7f : ((pumpPower < 60.0f) ? 3.3f : ((pumpPower < 80.0f) ? 2.2f : ((pumpPower < 90.0f) ? 1.5f : 1.2f)));
|
||||
|
||||
|
||||
@@ -341,12 +341,11 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
aveFlowBefore /= (double)(DetectionKernelSize - 2);
|
||||
aveFlowAfter /= (double)(DetectionKernelSize - 2);
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format("Time={0}: Flow{1}, aveFlowB={2}, aveFlowA={3}\r\n",
|
||||
StateMachine.Time - startTime,
|
||||
flowsForDetection[0].ToString("F2"),
|
||||
aveFlowBefore.ToString("F2"),
|
||||
aveFlowAfter.ToString("F2")));
|
||||
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("Time={0}: Flow{1}, aveFlowB={2}, aveFlowA={3}\r\n",
|
||||
// StateMachine.Time - startTime,
|
||||
// flowsForDetection[0].ToString("F2"),
|
||||
// aveFlowBefore.ToString("F2"),
|
||||
// aveFlowAfter.ToString("F2")));
|
||||
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||
{
|
||||
@@ -374,11 +373,11 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
aveFreqBefore /= (double)(DetectionKernelSize);
|
||||
aveFreqAfter /= (double)(DetectionKernelSize);
|
||||
|
||||
UiBridge.Bridge.OnLog(this, string.Format(" WM{0}: pulseFreq={1}, aveFreqB={2}, aveFreqA={3}\r\n",
|
||||
BatchRslts.Batch.WaterMeters[i].WMPosition,
|
||||
pulseFreqsForDetection[i, 0].ToString("F2"),
|
||||
aveFreqBefore.ToString("F2"),
|
||||
aveFreqAfter.ToString("F2")));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format(" WM{0}: pulseFreq={1}, aveFreqB={2}, aveFreqA={3}\r\n",
|
||||
// BatchRslts.Batch.WaterMeters[i].WMPosition,
|
||||
// pulseFreqsForDetection[i, 0].ToString("F2"),
|
||||
// aveFreqBefore.ToString("F2"),
|
||||
// aveFreqAfter.ToString("F2")));
|
||||
|
||||
//detectedFlow[i] = (aveFlowBefore + aveFlowAfter) / 2;
|
||||
detectedFlow[i] = aveFlowBefore;
|
||||
@@ -410,7 +409,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
|
||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||
{
|
||||
UiBridge.Bridge.OnLog(this, string.Format("detected flow[{0}]={1}\r\n", i+1, detectedFlow[i].ToString("F4")));
|
||||
//UiBridge.Bridge.OnEvent(this, string.Format("detected flow[{0}]={1}\r\n", i+1, detectedFlow[i].ToString("F4")));
|
||||
}
|
||||
|
||||
int flowSetTime1 = StateMachine.Time;
|
||||
|
||||
+25
-7
@@ -11,6 +11,7 @@ using Users;
|
||||
using Users.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
using NHibernate;
|
||||
|
||||
namespace TBF
|
||||
{
|
||||
@@ -353,9 +354,22 @@ namespace TBF
|
||||
/// Save the selection to local settings
|
||||
LocalSettings.LastBenchName = Config.Data.CurrentBench.BenchName;
|
||||
|
||||
///
|
||||
/// Connect to Config database.
|
||||
/// This triggers an exception in case user is a power user and there is no Config database.
|
||||
///
|
||||
IList<Procedure> listOfProcedures = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config)
|
||||
.QueryOver<Procedure>()
|
||||
.Where(x => (x.ProcedureState == ProcedureState.Active))
|
||||
.And(x => (x.Name == LocalSettings.LastProcedureName))
|
||||
.List();
|
||||
|
||||
///
|
||||
/// Connect to Results database and determine the last saved batch number.
|
||||
///
|
||||
Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
Results.DB.LoadSharedData();
|
||||
Results.DB.LoadSharedData();
|
||||
int maxBatchNr = Results.DB.GetMaxSavedBatchNr();
|
||||
if (!Config.Data.CurrentBench.IsRealBench || Program.LocalSettings.BatchNr <= maxBatchNr)
|
||||
{
|
||||
@@ -365,12 +379,16 @@ namespace TBF
|
||||
log.FatalFormat("LocalSettings.BatchNr updated to {0}", Program.LocalSettings.BatchNr);
|
||||
}
|
||||
|
||||
/// This is to trigger an exception in case of a power user and no Config database
|
||||
IList<Procedure> listOfProcedures = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config)
|
||||
.QueryOver<Procedure>()
|
||||
.Where(x => (x.ProcedureState == ProcedureState.Active))
|
||||
.And(x => (x.Name == LocalSettings.LastProcedureName))
|
||||
.List();
|
||||
///
|
||||
/// Connect to Events database (if any) and load recent events from this test bench.
|
||||
///
|
||||
if (Config.Data.CurrentBench.EventsDBSettings.DbType != Users.Entities.DBType.None &&
|
||||
!string.IsNullOrEmpty(Config.Data.CurrentBench.EventsDBSettings.ConnectionString))
|
||||
{
|
||||
Events.DB.DbType = (Events.Entities.DBType)Config.Data.CurrentBench.EventsDBSettings.DbType;
|
||||
Events.DB.ConnectionString = Config.Data.CurrentBench.EventsDBSettings.ConnectionString;
|
||||
Events.DB.LoadRecentEvents(Events.DB.CreateSession(), loginDlgBench.BenchName, 7); /// Last 7 days
|
||||
}
|
||||
|
||||
retryLogin = false;
|
||||
break;
|
||||
|
||||
Generated
+306
@@ -168,6 +168,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Action.
|
||||
/// </summary>
|
||||
internal static string Action {
|
||||
get {
|
||||
return ResourceManager.GetString("Action", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activate / Deactivate Heads.
|
||||
/// </summary>
|
||||
@@ -267,6 +276,24 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All day.
|
||||
/// </summary>
|
||||
internal static string All_day {
|
||||
get {
|
||||
return ResourceManager.GetString("All_day", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All events.
|
||||
/// </summary>
|
||||
internal static string All_events {
|
||||
get {
|
||||
return ResourceManager.GetString("All_events", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All tests must be completed.
|
||||
/// </summary>
|
||||
@@ -501,6 +528,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bench.
|
||||
/// </summary>
|
||||
internal static string Bench {
|
||||
get {
|
||||
return ResourceManager.GetString("Bench", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bench.
|
||||
/// </summary>
|
||||
@@ -582,6 +618,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calendar.
|
||||
/// </summary>
|
||||
internal static string Calendar {
|
||||
get {
|
||||
return ResourceManager.GetString("Calendar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration.
|
||||
/// </summary>
|
||||
@@ -591,6 +636,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration certificate validity expired.
|
||||
/// </summary>
|
||||
internal static string Calibration_certificate_validity_expired {
|
||||
get {
|
||||
return ResourceManager.GetString("Calibration_certificate_validity_expired", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration coefficients.
|
||||
/// </summary>
|
||||
@@ -600,6 +654,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration due date is {0}.
|
||||
/// </summary>
|
||||
internal static string Calibration_due_date_is_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Calibration_due_date_is_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration Specialist.
|
||||
/// </summary>
|
||||
@@ -726,6 +789,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Class.
|
||||
/// </summary>
|
||||
internal static string Class {
|
||||
get {
|
||||
return ResourceManager.GetString("Class", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Clear results.
|
||||
/// </summary>
|
||||
@@ -942,6 +1014,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm read.
|
||||
/// </summary>
|
||||
internal static string Confirm_read {
|
||||
get {
|
||||
return ResourceManager.GetString("Confirm_read", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirmation.
|
||||
/// </summary>
|
||||
@@ -1122,6 +1203,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Date/time.
|
||||
/// </summary>
|
||||
internal static string Date_time {
|
||||
get {
|
||||
return ResourceManager.GetString("Date_time", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The database was successfully created!.
|
||||
/// </summary>
|
||||
@@ -1338,6 +1428,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to restore events database from file {0} ?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_restore_events_DB_from_file_0_qm {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_restore_events_DB_from_file_0_qm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to restore results database from file {0} ?.
|
||||
/// </summary>
|
||||
@@ -1779,6 +1878,33 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Evetn details.
|
||||
/// </summary>
|
||||
internal static string Event_details {
|
||||
get {
|
||||
return ResourceManager.GetString("Event_details", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Event logs.
|
||||
/// </summary>
|
||||
internal static string Event_logs {
|
||||
get {
|
||||
return ResourceManager.GetString("Event_logs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Event triggers.
|
||||
/// </summary>
|
||||
internal static string Event_triggers {
|
||||
get {
|
||||
return ResourceManager.GetString("Event_triggers", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Exit.
|
||||
/// </summary>
|
||||
@@ -1995,6 +2121,24 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Frequency.
|
||||
/// </summary>
|
||||
internal static string Frequency {
|
||||
get {
|
||||
return ResourceManager.GetString("Frequency", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fri.
|
||||
/// </summary>
|
||||
internal static string Fri {
|
||||
get {
|
||||
return ResourceManager.GetString("Fri", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to from.
|
||||
/// </summary>
|
||||
@@ -2130,6 +2274,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Help.
|
||||
/// </summary>
|
||||
internal static string Help {
|
||||
get {
|
||||
return ResourceManager.GetString("Help", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to History of changes.
|
||||
/// </summary>
|
||||
@@ -2184,6 +2337,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Import DB.
|
||||
/// </summary>
|
||||
internal static string Import_DB {
|
||||
get {
|
||||
return ResourceManager.GetString("Import_DB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Information.
|
||||
/// </summary>
|
||||
@@ -2787,6 +2949,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mon.
|
||||
/// </summary>
|
||||
internal static string Mon {
|
||||
get {
|
||||
return ResourceManager.GetString("Mon", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to More.
|
||||
/// </summary>
|
||||
@@ -2850,6 +3021,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New event.
|
||||
/// </summary>
|
||||
internal static string New_event {
|
||||
get {
|
||||
return ResourceManager.GetString("New_event", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PFeed.
|
||||
/// </summary>
|
||||
@@ -3093,6 +3273,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to On exact day.
|
||||
/// </summary>
|
||||
internal static string On_exact_day {
|
||||
get {
|
||||
return ResourceManager.GetString("On_exact_day", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to open.
|
||||
/// </summary>
|
||||
@@ -3984,6 +4173,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Read only.
|
||||
/// </summary>
|
||||
internal static string Read_only {
|
||||
get {
|
||||
return ResourceManager.GetString("Read_only", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ready.
|
||||
/// </summary>
|
||||
@@ -4416,6 +4614,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sat.
|
||||
/// </summary>
|
||||
internal static string Sat {
|
||||
get {
|
||||
return ResourceManager.GetString("Sat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save.
|
||||
/// </summary>
|
||||
@@ -4434,6 +4641,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save changes.
|
||||
/// </summary>
|
||||
internal static string Save_changes {
|
||||
get {
|
||||
return ResourceManager.GetString("Save_changes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save column widths.
|
||||
/// </summary>
|
||||
@@ -4749,6 +4965,24 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 Severity.
|
||||
/// </summary>
|
||||
internal static string Severity {
|
||||
get {
|
||||
return ResourceManager.GetString("Severity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Short description.
|
||||
/// </summary>
|
||||
@@ -4848,6 +5082,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Source.
|
||||
/// </summary>
|
||||
internal static string Source {
|
||||
get {
|
||||
return ResourceManager.GetString("Source", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to stable.
|
||||
/// </summary>
|
||||
@@ -5001,6 +5244,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sun.
|
||||
/// </summary>
|
||||
internal static string Sun {
|
||||
get {
|
||||
return ResourceManager.GetString("Sun", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Supress WM trills.
|
||||
/// </summary>
|
||||
@@ -5616,6 +5868,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Thu.
|
||||
/// </summary>
|
||||
internal static string Thu {
|
||||
get {
|
||||
return ResourceManager.GetString("Thu", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T stop - mass msrmt. [s].
|
||||
/// </summary>
|
||||
@@ -5661,6 +5922,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Title.
|
||||
/// </summary>
|
||||
internal static string Title {
|
||||
get {
|
||||
return ResourceManager.GetString("Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to to.
|
||||
/// </summary>
|
||||
@@ -5670,6 +5940,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Today.
|
||||
/// </summary>
|
||||
internal static string Today {
|
||||
get {
|
||||
return ResourceManager.GetString("Today", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Toler. red. [%].
|
||||
/// </summary>
|
||||
@@ -5724,6 +6003,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Tue.
|
||||
/// </summary>
|
||||
internal static string Tue {
|
||||
get {
|
||||
return ResourceManager.GetString("Tue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Turning direction.
|
||||
/// </summary>
|
||||
@@ -5769,6 +6057,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unconfirmed events.
|
||||
/// </summary>
|
||||
internal static string Unconfirmed_events {
|
||||
get {
|
||||
return ResourceManager.GetString("Unconfirmed_events", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unhandled error occured in .
|
||||
/// </summary>
|
||||
@@ -6102,6 +6399,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Wed.
|
||||
/// </summary>
|
||||
internal static string Wed {
|
||||
get {
|
||||
return ResourceManager.GetString("Wed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to State [liter].
|
||||
/// </summary>
|
||||
|
||||
@@ -1542,4 +1542,100 @@
|
||||
<data name="Program_version_does_not_match" xml:space="preserve">
|
||||
<value>Verze programu nesedí</value>
|
||||
</data>
|
||||
<data name="Calendar" xml:space="preserve">
|
||||
<value>Kalendář</value>
|
||||
</data>
|
||||
<data name="Event_logs" xml:space="preserve">
|
||||
<value>Události</value>
|
||||
</data>
|
||||
<data name="Help" xml:space="preserve">
|
||||
<value>Nápověda</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Nastavení</value>
|
||||
</data>
|
||||
<data name="All_events" xml:space="preserve">
|
||||
<value>Všechny události</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Stanice</value>
|
||||
</data>
|
||||
<data name="Class" xml:space="preserve">
|
||||
<value>Třída</value>
|
||||
</data>
|
||||
<data name="Confirm_read" xml:space="preserve">
|
||||
<value>Porvtdit pročtení</value>
|
||||
</data>
|
||||
<data name="Date_time" xml:space="preserve">
|
||||
<value>Datum a čas</value>
|
||||
</data>
|
||||
<data name="Severity" xml:space="preserve">
|
||||
<value>Závažnost</value>
|
||||
</data>
|
||||
<data name="Source" xml:space="preserve">
|
||||
<value>Původ</value>
|
||||
</data>
|
||||
<data name="Unconfirmed_events" xml:space="preserve">
|
||||
<value>Nepotvrzené události</value>
|
||||
</data>
|
||||
<data name="Fri" xml:space="preserve">
|
||||
<value>Pá.</value>
|
||||
</data>
|
||||
<data name="Mon" xml:space="preserve">
|
||||
<value>Pon.</value>
|
||||
</data>
|
||||
<data name="Sat" xml:space="preserve">
|
||||
<value>So.</value>
|
||||
</data>
|
||||
<data name="Sun" xml:space="preserve">
|
||||
<value>Ne.</value>
|
||||
</data>
|
||||
<data name="Thu" xml:space="preserve">
|
||||
<value>Čtv.</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>Dnes</value>
|
||||
</data>
|
||||
<data name="Tue" xml:space="preserve">
|
||||
<value>Út.</value>
|
||||
</data>
|
||||
<data name="Wed" xml:space="preserve">
|
||||
<value>Stř.</value>
|
||||
</data>
|
||||
<data name="Event_triggers" xml:space="preserve">
|
||||
<value>Spouštěče událostí</value>
|
||||
</data>
|
||||
<data name="New_event" xml:space="preserve">
|
||||
<value>Nová událost</value>
|
||||
</data>
|
||||
<data name="Event_details" xml:space="preserve">
|
||||
<value>Detaily události</value>
|
||||
</data>
|
||||
<data name="Save_changes" xml:space="preserve">
|
||||
<value>Uložit změny</value>
|
||||
</data>
|
||||
<data name="Calibration_certificate_validity_expired" xml:space="preserve">
|
||||
<value>Doba platnosti kalibrace vypršela</value>
|
||||
</data>
|
||||
<data name="Calibration_due_date_is_0" xml:space="preserve">
|
||||
<value>Platnost kalibrace končí dne {0}</value>
|
||||
</data>
|
||||
<data name="Action" xml:space="preserve">
|
||||
<value>Akce</value>
|
||||
</data>
|
||||
<data name="Frequency" xml:space="preserve">
|
||||
<value>Opakování</value>
|
||||
</data>
|
||||
<data name="On_exact_day" xml:space="preserve">
|
||||
<value>Pouze daný den</value>
|
||||
</data>
|
||||
<data name="Read_only" xml:space="preserve">
|
||||
<value>Pouze čtení</value>
|
||||
</data>
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>Název</value>
|
||||
</data>
|
||||
<data name="All_day" xml:space="preserve">
|
||||
<value>Celý den</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1497,4 +1497,43 @@
|
||||
<data name="Stop" xml:space="preserve">
|
||||
<value>Stopp</value>
|
||||
</data>
|
||||
<data name="Calendar" xml:space="preserve">
|
||||
<value>Kalender</value>
|
||||
</data>
|
||||
<data name="Event_logs" xml:space="preserve">
|
||||
<value>Veranstaltungen</value>
|
||||
</data>
|
||||
<data name="Help" xml:space="preserve">
|
||||
<value>Hilfe</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Einstellungen</value>
|
||||
</data>
|
||||
<data name="All_events" xml:space="preserve">
|
||||
<value>Alle Ereignisse</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Prüfstand</value>
|
||||
</data>
|
||||
<data name="Class" xml:space="preserve">
|
||||
<value>Klasse</value>
|
||||
</data>
|
||||
<data name="Confirm_read" xml:space="preserve">
|
||||
<value>Lesen bestätigen</value>
|
||||
</data>
|
||||
<data name="Date_time" xml:space="preserve">
|
||||
<value>Datum / Uhrzeit</value>
|
||||
</data>
|
||||
<data name="Severity" xml:space="preserve">
|
||||
<value>Schwere</value>
|
||||
</data>
|
||||
<data name="Source" xml:space="preserve">
|
||||
<value>Ursprung</value>
|
||||
</data>
|
||||
<data name="Unconfirmed_events" xml:space="preserve">
|
||||
<value>Unbestätigte Ereignisse</value>
|
||||
</data>
|
||||
<data name="Event_triggers" xml:space="preserve">
|
||||
<value>Ereignisauslöser</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -2149,4 +2149,106 @@
|
||||
<data name="Program_version_does_not_match" xml:space="preserve">
|
||||
<value>Program version does not match</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_restore_events_DB_from_file_0_qm" xml:space="preserve">
|
||||
<value>Do you want to restore events database from file {0} ?</value>
|
||||
</data>
|
||||
<data name="Import_DB" xml:space="preserve">
|
||||
<value>Import DB</value>
|
||||
</data>
|
||||
<data name="Calendar" xml:space="preserve">
|
||||
<value>Calendar</value>
|
||||
</data>
|
||||
<data name="Event_logs" xml:space="preserve">
|
||||
<value>Event logs</value>
|
||||
</data>
|
||||
<data name="Help" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="All_events" xml:space="preserve">
|
||||
<value>All events</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Bench</value>
|
||||
</data>
|
||||
<data name="Class" xml:space="preserve">
|
||||
<value>Class</value>
|
||||
</data>
|
||||
<data name="Confirm_read" xml:space="preserve">
|
||||
<value>Confirm read</value>
|
||||
</data>
|
||||
<data name="Date_time" xml:space="preserve">
|
||||
<value>Date/time</value>
|
||||
</data>
|
||||
<data name="Severity" xml:space="preserve">
|
||||
<value>Severity</value>
|
||||
</data>
|
||||
<data name="Source" xml:space="preserve">
|
||||
<value>Source</value>
|
||||
</data>
|
||||
<data name="Unconfirmed_events" xml:space="preserve">
|
||||
<value>Unconfirmed events</value>
|
||||
</data>
|
||||
<data name="Fri" xml:space="preserve">
|
||||
<value>Fri</value>
|
||||
</data>
|
||||
<data name="Mon" xml:space="preserve">
|
||||
<value>Mon</value>
|
||||
</data>
|
||||
<data name="Sat" xml:space="preserve">
|
||||
<value>Sat</value>
|
||||
</data>
|
||||
<data name="Sun" xml:space="preserve">
|
||||
<value>Sun</value>
|
||||
</data>
|
||||
<data name="Thu" xml:space="preserve">
|
||||
<value>Thu</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>Today</value>
|
||||
</data>
|
||||
<data name="Tue" xml:space="preserve">
|
||||
<value>Tue</value>
|
||||
</data>
|
||||
<data name="Wed" xml:space="preserve">
|
||||
<value>Wed</value>
|
||||
</data>
|
||||
<data name="Event_triggers" xml:space="preserve">
|
||||
<value>Event triggers</value>
|
||||
</data>
|
||||
<data name="New_event" xml:space="preserve">
|
||||
<value>New event</value>
|
||||
</data>
|
||||
<data name="Event_details" xml:space="preserve">
|
||||
<value>Evetn details</value>
|
||||
</data>
|
||||
<data name="Save_changes" xml:space="preserve">
|
||||
<value>Save changes</value>
|
||||
</data>
|
||||
<data name="Calibration_certificate_validity_expired" xml:space="preserve">
|
||||
<value>Calibration certificate validity expired</value>
|
||||
</data>
|
||||
<data name="Calibration_due_date_is_0" xml:space="preserve">
|
||||
<value>Calibration due date is {0}</value>
|
||||
</data>
|
||||
<data name="Action" xml:space="preserve">
|
||||
<value>Action</value>
|
||||
</data>
|
||||
<data name="Frequency" xml:space="preserve">
|
||||
<value>Frequency</value>
|
||||
</data>
|
||||
<data name="On_exact_day" xml:space="preserve">
|
||||
<value>On exact day</value>
|
||||
</data>
|
||||
<data name="Read_only" xml:space="preserve">
|
||||
<value>Read only</value>
|
||||
</data>
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>Title</value>
|
||||
</data>
|
||||
<data name="All_day" xml:space="preserve">
|
||||
<value>All day</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -171,4 +171,31 @@
|
||||
<data name="Evaporation" xml:space="preserve">
|
||||
<value>Odparovanie</value>
|
||||
</data>
|
||||
<data name="Fri" xml:space="preserve">
|
||||
<value>Pia.</value>
|
||||
</data>
|
||||
<data name="Mon" xml:space="preserve">
|
||||
<value>Pon.</value>
|
||||
</data>
|
||||
<data name="Sat" xml:space="preserve">
|
||||
<value>So.</value>
|
||||
</data>
|
||||
<data name="Sun" xml:space="preserve">
|
||||
<value>Ne.</value>
|
||||
</data>
|
||||
<data name="Thu" xml:space="preserve">
|
||||
<value>Štv.</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>Dnes</value>
|
||||
</data>
|
||||
<data name="Tue" xml:space="preserve">
|
||||
<value>Ut.</value>
|
||||
</data>
|
||||
<data name="Wed" xml:space="preserve">
|
||||
<value>Str.</value>
|
||||
</data>
|
||||
<data name="Event_triggers" xml:space="preserve">
|
||||
<value>Spúšťače udalostí</value>
|
||||
</data>
|
||||
</root>
|
||||
+78
-6
@@ -602,8 +602,11 @@
|
||||
<Compile Include="BenchControl\Elde\ValveEx\ValveFactory.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ICalibInfoCfg.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IEvaporation.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IEventTrigger.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IHasCalendarEvents.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IParallelOutput.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IReceivesDataFromRadio.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IResultsProcessor.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IStartInfoReader.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IHart.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IHasTestName.cs" />
|
||||
@@ -903,6 +906,15 @@
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\Enums.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Iperl\TriggerCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Statistics\TriggerCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\Factory.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\Trigger.cs" />
|
||||
<Compile Include="BenchControl\Output\EventTriggers\Standard\TriggerCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\FileWriters\Basic\FactoryCompound.cs" />
|
||||
<Compile Include="BenchControl\Output\FileWriters\Basic\FactoryHeatMeters.cs" />
|
||||
<Compile Include="BenchControl\Output\FileWriters\Basic\FactorySingle.cs" />
|
||||
@@ -1996,7 +2008,7 @@
|
||||
<Compile Include="UiBridge\EmergencyStopEventArgs.cs" />
|
||||
<Compile Include="UiBridge\Enums.cs" />
|
||||
<Compile Include="UiBridge\ImageEventArgs.cs" />
|
||||
<Compile Include="UiBridge\LogEventArgs.cs" />
|
||||
<Compile Include="UiBridge\EventEventArgs.cs" />
|
||||
<Compile Include="UiBridge\ProcedureCompletedEventArgs.cs" />
|
||||
<Compile Include="UiBridge\ProcedureSelectedEventArgs.cs" />
|
||||
<Compile Include="UiBridge\ProcessDataEventArgs.cs" />
|
||||
@@ -2164,6 +2176,49 @@
|
||||
<Compile Include="UI\Bench\Uncertainties\UncertaintiesDlg.designer.cs">
|
||||
<DependentUpon>UncertaintiesDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\CalendarCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\CalendarEventInstance.cs" />
|
||||
<Compile Include="UI\Calendar\CalendarTabPageCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\CalendarTabPageCtrl.designer.cs">
|
||||
<DependentUpon>CalendarTabPageCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\CalibrationDueDateEvent.cs" />
|
||||
<Compile Include="UI\Calendar\CalibrationReminderEvent.cs" />
|
||||
<Compile Include="UI\Calendar\CustomRecurringFunctionAttribute.cs" />
|
||||
<Compile Include="UI\Calendar\EventComparer.cs" />
|
||||
<Compile Include="UI\Calendar\EventDetailsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\EventDetailsForm.Designer.cs">
|
||||
<DependentUpon>EventDetailsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\EventToolTipCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\EventToolTipCtrl.Designer.cs">
|
||||
<DependentUpon>EventToolTipCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\HolidayEvent.cs" />
|
||||
<Compile Include="UI\Calendar\NavigateLeftButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\NavigateRightButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\RectangleComparer.cs" />
|
||||
<Compile Include="UI\Calendar\ScrollPanelCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\ScrollPanelCtrl.Designer.cs">
|
||||
<DependentUpon>ScrollPanelCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Calendar\TodayButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Camera\CameraPictureCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -2214,11 +2269,11 @@
|
||||
<Compile Include="UI\Help\AboutDlg.designer.cs">
|
||||
<DependentUpon>AboutDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Logs\LogsTabPageCtrl.cs">
|
||||
<Compile Include="UI\EventLogs\EventLogsTabPageCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Logs\LogsTabPageCtrl.designer.cs">
|
||||
<DependentUpon>LogsTabPageCtrl.cs</DependentUpon>
|
||||
<Compile Include="UI\EventLogs\EventLogsTabPageCtrl.designer.cs">
|
||||
<DependentUpon>EventLogsTabPageCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\MainWnd.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -3178,6 +3233,15 @@
|
||||
<EmbeddedResource Include="UI\Bench\Uncertainties\UncertaintiesDlg.resx">
|
||||
<DependentUpon>UncertaintiesDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Calendar\CalendarCtrl.resx">
|
||||
<DependentUpon>CalendarCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Calendar\CalendarTabPageCtrl.resx">
|
||||
<DependentUpon>CalendarTabPageCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Calendar\EventDetailsForm.resx">
|
||||
<DependentUpon>EventDetailsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Camera\CameraPictureCtrl.resx">
|
||||
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -3199,8 +3263,8 @@
|
||||
<EmbeddedResource Include="UI\Help\AboutDlg.resx">
|
||||
<DependentUpon>AboutDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Logs\LogsTabPageCtrl.resx">
|
||||
<DependentUpon>LogsTabPageCtrl.cs</DependentUpon>
|
||||
<EmbeddedResource Include="UI\EventLogs\EventLogsTabPageCtrl.resx">
|
||||
<DependentUpon>EventLogsTabPageCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\MainWnd.cs.resx">
|
||||
<DependentUpon>MainWnd.cs</DependentUpon>
|
||||
@@ -3449,6 +3513,10 @@
|
||||
</Content>
|
||||
</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>
|
||||
@@ -3457,6 +3525,10 @@
|
||||
<Project>{439D0878-C76E-452B-B17D-209A89E91D36}</Project>
|
||||
<Name>Dirichlet.Numerics</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Events\Events.csproj">
|
||||
<Project>{5d9b49e3-cdf9-4a27-80b4-58141d0eb0e0}</Project>
|
||||
<Name>Events</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GemCard\GemCard.csproj">
|
||||
<Project>{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}</Project>
|
||||
<Name>GemCard</Name>
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6CBC43B6-E950-49B2-B14A-563C50FCD5C3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Calendar4NET</RootNamespace>
|
||||
<AssemblyName>Calendar</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>bin\Debug\Calendar.xml</DocumentationFile>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CalendarCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CalendarEvent.cs" />
|
||||
<Compile Include="CustomEvent.cs" />
|
||||
<Compile Include="CustomRecurringFunctionAttribute.cs" />
|
||||
<Compile Include="EventComparer.cs" />
|
||||
<Compile Include="EventDetailsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EventDetailsForm.Designer.cs">
|
||||
<DependentUpon>EventDetailsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EventToolTipCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EventToolTipCtrl.Designer.cs">
|
||||
<DependentUpon>EventToolTipCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HolidayEvent.cs" />
|
||||
<Compile Include="ICalendarEvent.cs" />
|
||||
<Compile Include="NavigateLeftButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NavigateRightButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RectangleComparer.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RoundedRectangle.cs" />
|
||||
<Compile Include="CoolButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CoolButtonCtrl.Designer.cs">
|
||||
<DependentUpon>CoolButtonCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ScrollPanelCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ScrollPanelCtrl.Designer.cs">
|
||||
<DependentUpon>ScrollPanelCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TodayButtonCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="CalendarCtrl.resx">
|
||||
<DependentUpon>CalendarCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CoolButtonCtrl.resx">
|
||||
<DependentUpon>CoolButtonCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="EventDetailsForm.resx">
|
||||
<DependentUpon>EventDetailsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="EventToolTipCtrl.resx">
|
||||
<DependentUpon>EventToolTipCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="NavigateLeftButtonCtrl.resx">
|
||||
<DependentUpon>NavigateLeftButtonCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="NavigateRightButtonCtrl.resx">
|
||||
<DependentUpon>NavigateRightButtonCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.cs.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ScrollPanelCtrl.resx">
|
||||
<DependentUpon>ScrollPanelCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="TodayButtonCtrl.resx">
|
||||
<DependentUpon>TodayButtonCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</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>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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="_contextMenuStrip1.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,12 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal class CalendarEventInstance
|
||||
{
|
||||
public Config.CalendarEvent.ICalendarEvent Event { get; set; }
|
||||
public Rectangle EventArea { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,400 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Config.Entities;
|
||||
using Config.CalendarEvent;
|
||||
using Events.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
public partial class CalendarTabPageCtrl : UserControl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(CalendarTabPageCtrl));
|
||||
|
||||
IList<ICalendarEvent> eventsFromComponents;
|
||||
IList<CustomEvent> customEvents; /// Custom events loaded from the local config DB
|
||||
|
||||
Timer timer;
|
||||
DateTime lastTimeCalendarEventsServed;
|
||||
|
||||
public CalendarTabPageCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
eventsFromComponents = new List<ICalendarEvent>();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
newEventButton.Text = Strings.New_event;
|
||||
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Date_and_time, 100);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Frequency, 70);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Source, 50);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Title, 200);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Action);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Parameters);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.On_exact_day);
|
||||
calendarEventsListViewEx.Columns.Add(Strings.Read_only);
|
||||
}
|
||||
|
||||
void AddOne(ICalendarEvent evnt)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(evnt.Date.ToString(evnt.AllDay ? Constants.DateFormat : Constants.DateTimeFormat));
|
||||
lvi.SubItems.Add(Config.CalendarEvent.Utils.Freq2String(evnt.Frequency));
|
||||
lvi.SubItems.Add(evnt.Source);
|
||||
lvi.SubItems.Add(evnt.Title);
|
||||
lvi.SubItems.Add(Config.CalendarEvent.Utils.Action2String(evnt.AutoAction));
|
||||
lvi.SubItems.Add(evnt.Parameters);
|
||||
lvi.SubItems.Add(evnt.TriggerOnExactDayOnly ? Strings.yes : Strings.no);
|
||||
lvi.SubItems.Add(evnt.ReadOnly ? Strings.yes : Strings.no);
|
||||
lvi.Tag = evnt;
|
||||
|
||||
calendarEventsListViewEx.Items.Add(lvi);
|
||||
}
|
||||
|
||||
public void StartCalendar(IList<ICalendarEvent> eventsFromComponents)
|
||||
{
|
||||
this.eventsFromComponents = eventsFromComponents;
|
||||
|
||||
try
|
||||
{
|
||||
/// Read custom events from the database
|
||||
ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
customEvents = session.QueryOver<CustomEvent>().List();
|
||||
|
||||
TripplicateShiftCustomEvents(customEvents);
|
||||
|
||||
/// Calendar
|
||||
foreach (var evnt in eventsFromComponents) calendarCtrl1.AddEvent(evnt);
|
||||
foreach (var evnt in customEvents) calendarCtrl1.AddEvent(evnt);
|
||||
|
||||
/// List view in the right pane
|
||||
calendarEventsListViewEx.Items.Clear();
|
||||
foreach (var e in customEvents) AddOne(e);
|
||||
foreach (var e in eventsFromComponents) if (!e.Hidden) AddOne(e);
|
||||
|
||||
/// Serve events (determine if any event was triggered)
|
||||
lastTimeCalendarEventsServed = DateTime.Now;
|
||||
ServeCalendarEventsNotifWarnErrorFatal(lastTimeCalendarEventsServed, session, customEvents);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
customEvents = new List<CustomEvent>();
|
||||
log.ErrorFormat("Failed to load custom events from the LOCAL config database");
|
||||
}
|
||||
|
||||
calendarCtrl1.CalendarView = CalendarViews.Month;
|
||||
|
||||
timer = new System.Windows.Forms.Timer();
|
||||
timer.Interval = 300000; /// 300000 ms = 300 s = 5 min
|
||||
timer.Tick += new EventHandler(timer_Tick);
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// After StartCalendar() was called this function is invoked every 5 minutes
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void timer_Tick(object sender, EventArgs args)
|
||||
{
|
||||
DateTime currentTime = DateTime.Now;
|
||||
|
||||
if ((currentTime.Hour != lastTimeCalendarEventsServed.Hour) ||
|
||||
(currentTime.Minute % 30) != (lastTimeCalendarEventsServed.Minute % 30))
|
||||
{
|
||||
/// Serve events at the beginning of each half hour
|
||||
ServeCalendarEventsNotifWarnErrorFatal(currentTime);
|
||||
lastTimeCalendarEventsServed = currentTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Triggers events corresponding to triggered motification.warning/error calendar events.
|
||||
/// </summary>
|
||||
/// <param name="currentTime">Current time</param>
|
||||
void ServeCalendarEventsNotifWarnErrorFatal(DateTime currentTime, ISession parentSession = null, IList<CustomEvent> customEventsFromDB = null)
|
||||
{
|
||||
IList<Events.Entities.Event> eventsToTrigger = new List<Events.Entities.Event>();
|
||||
|
||||
foreach (var calEvent in eventsFromComponents)
|
||||
{
|
||||
AutoAction a = calEvent.AutoAction;
|
||||
if (a == AutoAction.Notification || a == AutoAction.Warning || a == AutoAction.Error || a == AutoAction.FatalErr)
|
||||
{
|
||||
if (Config.CalendarEvent.Utils.IsCalendarEventTrigerred(calEvent, currentTime))
|
||||
{
|
||||
eventsToTrigger.Add(new Events.Entities.Event(null,
|
||||
calEvent.Source,
|
||||
EventClass.Metrology,
|
||||
ToSeverity(calEvent.AutoAction),
|
||||
calEvent.Title,
|
||||
calEvent.Parameters,
|
||||
null,
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance |
|
||||
SubscriberGroup.Production | SubscriberGroup.Management));
|
||||
|
||||
if (calEvent.Frequency == Frequency.Once)
|
||||
{
|
||||
eventsFromComponents.Remove(calEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.CalendarEvent.Utils.UpdateRecurringDate(calEvent, currentTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var session = (parentSession != null) ? parentSession : Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
var customEvents = (customEventsFromDB != null) ? customEventsFromDB : session.QueryOver<CustomEvent>() .List();
|
||||
|
||||
foreach (var calEvent in customEvents)
|
||||
{
|
||||
AutoAction a = calEvent.AutoAction;
|
||||
if (a == AutoAction.Notification || a == AutoAction.Warning || a == AutoAction.Error || a == AutoAction.FatalErr)
|
||||
{
|
||||
if (Config.CalendarEvent.Utils.IsCalendarEventTrigerred(calEvent, currentTime))
|
||||
{
|
||||
eventsToTrigger.Add(new Events.Entities.Event(null,
|
||||
calEvent.Source,
|
||||
EventClass.Undefined,
|
||||
ToSeverity(calEvent.AutoAction),
|
||||
calEvent.Title,
|
||||
calEvent.Parameters,
|
||||
null,
|
||||
SubscriberGroup.Metrology | SubscriberGroup.Maintenance |
|
||||
SubscriberGroup.Production | SubscriberGroup.Management));
|
||||
|
||||
if (calEvent.Frequency == Frequency.Once)
|
||||
{
|
||||
session.Delete(calEvent);
|
||||
}
|
||||
else if (calEvent.UpdateRecurringDate(currentTime))
|
||||
{
|
||||
session.SaveOrUpdate(calEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
session.Flush();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to load or update CustomEvent-s in ServeTriggerEvtCalendarEvents(): {0}", exc.Message);
|
||||
}
|
||||
|
||||
if (eventsToTrigger.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
ISession session = global::Events.DB.CreateSession();
|
||||
global::Events.DB.LoadSubscribers(session);
|
||||
foreach (var e in eventsToTrigger)
|
||||
{
|
||||
TBF.UiBridge.Bridge.TriggerEvent(session, e);
|
||||
}
|
||||
session.Flush();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to trigger events in ServeTriggerEvtCalendarEvents(): {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns an array of parameters of selected actions.
|
||||
/// This function is not invoked from UI thread.
|
||||
/// </summary>
|
||||
/// <param name="selectedAction">Selected AutoAction</param>
|
||||
/// <param name="maxCount">Max. number of calendar events served</param>
|
||||
/// <returns>List of strings of triggered actions</returns>
|
||||
public static IList<string> ServeCalendarEventsInvokeXY(AutoAction selectedAction, int maxCount = 1)
|
||||
{
|
||||
DateTime currentTime = DateTime.Now;
|
||||
IList<string> parametersList = new List<string>();
|
||||
|
||||
if (maxCount <= 0) return parametersList;
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
var customEventsFromDB = session.QueryOver<CustomEvent>().List();
|
||||
|
||||
foreach (var calEvent in customEventsFromDB)
|
||||
{
|
||||
if (calEvent.AutoAction == selectedAction && Config.CalendarEvent.Utils.IsCalendarEventTrigerred(calEvent, currentTime))
|
||||
{
|
||||
parametersList.Add(calEvent.Parameters);
|
||||
|
||||
if (calEvent.Frequency == Frequency.Once)
|
||||
{
|
||||
session.Delete(calEvent);
|
||||
}
|
||||
else if (calEvent.UpdateRecurringDate(currentTime))
|
||||
{
|
||||
session.SaveOrUpdate(calEvent);
|
||||
}
|
||||
|
||||
if (parametersList.Count >= maxCount) break;
|
||||
}
|
||||
}
|
||||
session.Flush();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to load or update CustomEvent-s in ServeSelectedCalendarEvents(): {0}", exc.Message);
|
||||
}
|
||||
|
||||
if (parametersList.Count > 0)
|
||||
{
|
||||
/// TODO: Invoke calendar redraw in UI thread
|
||||
}
|
||||
|
||||
return parametersList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Convert calendar event AutoAction to event Severity
|
||||
/// </summary>
|
||||
/// <param name="action">AutoAction enum value</param>
|
||||
/// <returns>Severity enum value</returns>
|
||||
Events.Entities.Severity ToSeverity(AutoAction action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
default:
|
||||
case AutoAction.Notification: return global::Events.Entities.Severity.Notification;
|
||||
case AutoAction.Warning: return global::Events.Entities.Severity.Warning;
|
||||
case AutoAction.Error: return global::Events.Entities.Severity.Error;
|
||||
case AutoAction.FatalErr: return global::Events.Entities.Severity.FatalError;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TripplicateShiftCustomEvents(IList<CustomEvent> customEvents)
|
||||
{
|
||||
/// Tripplicate each custom event with frequency 'EveryShift'
|
||||
for (int i = customEvents.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (customEvents[i].Frequency == Frequency.EveryShift)
|
||||
{
|
||||
DateTime dt = customEvents[i].Date;
|
||||
|
||||
var ev2 = (CustomEvent)customEvents[i].Clone();
|
||||
ev2.Date = new DateTime(dt.Year, dt.Month, dt.Day, (dt.Hour + 8) % 24, dt.Minute, 0);
|
||||
ev2.ReadOnly = true;
|
||||
customEvents.Insert(i + 1, ev2);
|
||||
|
||||
var ev3 = (CustomEvent)customEvents[i].Clone();
|
||||
ev3.Date = new DateTime(dt.Year, dt.Month, dt.Day, (dt.Hour + 16) % 24, dt.Minute, 0);
|
||||
ev3.ReadOnly = true;
|
||||
customEvents.Insert(i + 2, ev3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void newEventButton_Click(object sender, EventArgs ea)
|
||||
{
|
||||
EventDetailsForm dlg = new EventDetailsForm();
|
||||
if (dlg.ShowDialog() == DialogResult.OK && dlg.NewEvent is CustomEvent)
|
||||
{
|
||||
try
|
||||
{
|
||||
ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
session.SaveOrUpdate(dlg.NewEvent as CustomEvent);
|
||||
session.Flush();
|
||||
|
||||
customEvents = session.QueryOver<CustomEvent>().List();
|
||||
TripplicateShiftCustomEvents(customEvents);
|
||||
|
||||
/// Calendar
|
||||
calendarCtrl1.ClearEvents();
|
||||
foreach (var e in eventsFromComponents) calendarCtrl1.AddEvent(e);
|
||||
foreach (var e in customEvents) calendarCtrl1.AddEvent(e);
|
||||
|
||||
/// List view in the right pane
|
||||
calendarEventsListViewEx.Items.Clear();
|
||||
foreach (var e in customEvents) AddOne(e);
|
||||
foreach (var e in eventsFromComponents) if (!e.Hidden) AddOne(e);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
log.ErrorFormat("Failed to save new calendar event to the local config database");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void calendarEventsListViewEx_MouseDoubleClick(object sender, MouseEventArgs mea)
|
||||
{
|
||||
if (calendarEventsListViewEx.SelectedIndices.Count != 1) return;
|
||||
CustomEvent evnt = calendarEventsListViewEx.SelectedItems[0].Tag as CustomEvent;
|
||||
if (evnt == null || evnt.ReadOnly) return;
|
||||
EventDetailsForm dlg = new EventDetailsForm { Event = evnt };
|
||||
if (dlg.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
try
|
||||
{
|
||||
/// Re-read selected custom event from the database
|
||||
ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
var cEvents = session.QueryOver<CustomEvent>()
|
||||
.Where(x => (x.Id == evnt.Id))
|
||||
.List();
|
||||
|
||||
if (cEvents.Count == 1)
|
||||
{
|
||||
cEvents[0].Date = dlg.NewEvent.Date;
|
||||
cEvents[0].Frequency = dlg.NewEvent.Frequency;
|
||||
cEvents[0].AllDay = dlg.NewEvent.AllDay;
|
||||
cEvents[0].TriggerOnExactDayOnly = dlg.NewEvent.TriggerOnExactDayOnly;
|
||||
cEvents[0].Source = dlg.NewEvent.Source;
|
||||
cEvents[0].Title = dlg.NewEvent.Title;
|
||||
cEvents[0].AutoAction = dlg.NewEvent.AutoAction;
|
||||
cEvents[0].Parameters = dlg.NewEvent.Parameters;
|
||||
cEvents[0].Rank = dlg.NewEvent.Rank;
|
||||
cEvents[0].Hidden = dlg.NewEvent.Hidden;
|
||||
cEvents[0].ReadOnly = dlg.NewEvent.ReadOnly;
|
||||
cEvents[0].BackColor = dlg.NewEvent.BackColor;
|
||||
cEvents[0].TextColor = dlg.NewEvent.TextColor;
|
||||
cEvents[0].TooltipEnabled = dlg.NewEvent.TooltipEnabled;
|
||||
cEvents[0].CustomRecurringFunction = null;
|
||||
session.SaveOrUpdate(cEvents[0]);
|
||||
session.Flush();
|
||||
|
||||
customEvents = session.QueryOver<CustomEvent>().List();
|
||||
TripplicateShiftCustomEvents(customEvents);
|
||||
|
||||
/// Calendar
|
||||
calendarCtrl1.ClearEvents();
|
||||
foreach (var e in eventsFromComponents) calendarCtrl1.AddEvent(e);
|
||||
foreach (var e in customEvents) calendarCtrl1.AddEvent(e);
|
||||
|
||||
/// List view in the right pane
|
||||
calendarEventsListViewEx.Items.Clear();
|
||||
foreach (var e in customEvents) AddOne(e);
|
||||
foreach (var e in eventsFromComponents) if (!e.Hidden) AddOne(e);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Cannot save change to the database", Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
partial class CalendarTabPageCtrl
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CalendarTabPageCtrl));
|
||||
this.logTextBox = new System.Windows.Forms.TextBox();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calendarCtrl1 = new TBF.UI.Calendar.CalendarCtrl();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.newEventButton = new System.Windows.Forms.Button();
|
||||
this.calendarEventsListViewEx = new Common.UIControls.ListViewEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// logTextBox
|
||||
//
|
||||
resources.ApplyResources(this.logTextBox, "logTextBox");
|
||||
this.logTextBox.Name = "logTextBox";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1, "splitContainer1");
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calendarCtrl1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
//
|
||||
// calendarCtrl1
|
||||
//
|
||||
this.calendarCtrl1.AllowEditingEvents = true;
|
||||
this.calendarCtrl1.CalendarDate = new System.DateTime(2020, 3, 23, 22, 33, 35, 216);
|
||||
this.calendarCtrl1.CalendarView = TBF.UI.Calendar.CalendarViews.Month;
|
||||
this.calendarCtrl1.DateHeaderFont = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
|
||||
this.calendarCtrl1.DayOfWeekFont = new System.Drawing.Font("Arial", 10F);
|
||||
this.calendarCtrl1.DaysFont = new System.Drawing.Font("Arial", 10F);
|
||||
this.calendarCtrl1.DayViewTimeFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.calendarCtrl1.DimDisabledEvents = true;
|
||||
resources.ApplyResources(this.calendarCtrl1, "calendarCtrl1");
|
||||
this.calendarCtrl1.HighlightCurrentDay = true;
|
||||
this.calendarCtrl1.LoadPresetHolidays = false;
|
||||
this.calendarCtrl1.Name = "calendarCtrl1";
|
||||
this.calendarCtrl1.ShowArrowControls = true;
|
||||
this.calendarCtrl1.ShowDashedBorderOnDisabledEvents = true;
|
||||
this.calendarCtrl1.ShowDateInHeader = true;
|
||||
this.calendarCtrl1.ShowDisabledEvents = false;
|
||||
this.calendarCtrl1.ShowEventTooltips = true;
|
||||
this.calendarCtrl1.ShowTodayButton = true;
|
||||
this.calendarCtrl1.TodayFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer2, "splitContainer2");
|
||||
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.newEventButton);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.calendarEventsListViewEx);
|
||||
//
|
||||
// newEventButton
|
||||
//
|
||||
resources.ApplyResources(this.newEventButton, "newEventButton");
|
||||
this.newEventButton.Name = "newEventButton";
|
||||
this.newEventButton.UseVisualStyleBackColor = true;
|
||||
this.newEventButton.Click += new System.EventHandler(this.newEventButton_Click);
|
||||
//
|
||||
// calendarEventsListViewEx
|
||||
//
|
||||
this.calendarEventsListViewEx.AllowColumnReorder = true;
|
||||
resources.ApplyResources(this.calendarEventsListViewEx, "calendarEventsListViewEx");
|
||||
this.calendarEventsListViewEx.DoubleClickActivation = false;
|
||||
this.calendarEventsListViewEx.FullRowSelect = true;
|
||||
this.calendarEventsListViewEx.GridLines = true;
|
||||
this.calendarEventsListViewEx.Name = "calendarEventsListViewEx";
|
||||
this.calendarEventsListViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.calendarEventsListViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.calendarEventsListViewEx.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.calendarEventsListViewEx_MouseDoubleClick);
|
||||
//
|
||||
// CalendarTabPageCtrl
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Silver;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.logTextBox);
|
||||
this.Name = "CalendarTabPageCtrl";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox logTextBox;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private CalendarCtrl calendarCtrl1;
|
||||
private System.Windows.Forms.Button newEventButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private Common.UIControls.ListViewEx calendarEventsListViewEx;
|
||||
}
|
||||
}
|
||||
@@ -150,124 +150,187 @@
|
||||
<data name=">>logTextBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="clearButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt</value>
|
||||
</data>
|
||||
<data name="clearButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="clearButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 10</value>
|
||||
</data>
|
||||
<data name="clearButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>2, 2, 2, 2</value>
|
||||
</data>
|
||||
<data name="clearButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 30</value>
|
||||
</data>
|
||||
<data name="clearButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="clearButton.Text" xml:space="preserve">
|
||||
<value>&Clear</value>
|
||||
</data>
|
||||
<data name=">>clearButton.Name" xml:space="preserve">
|
||||
<value>clearButton</value>
|
||||
</data>
|
||||
<data name=">>clearButton.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=">>clearButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>clearButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="splitContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="splitContainer.IsSplitterFixed" type="System.Boolean, mscorlib">
|
||||
<data name="splitContainer1.IsSplitterFixed" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="splitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="splitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
|
||||
<data name="calendarCtrl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="calendarCtrl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="calendarCtrl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>600, 689</value>
|
||||
</data>
|
||||
<data name="calendarCtrl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>calendarCtrl1.Name" xml:space="preserve">
|
||||
<value>calendarCtrl1</value>
|
||||
</data>
|
||||
<data name=">>calendarCtrl1.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Calendar.CalendarCtrl, TBF, Version=2.26.1446.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>calendarCtrl1.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name=">>calendarCtrl1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="splitContainer2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="splitContainer2.IsSplitterFixed" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="splitContainer2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="splitContainer2.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
|
||||
<value>Horizontal</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer.Panel1</value>
|
||||
<data name="newEventButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>19, 15</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="newEventButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>134, 39</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.ZOrder" xml:space="preserve">
|
||||
<data name="newEventButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="logsTextBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<data name="newEventButton.Text" xml:space="preserve">
|
||||
<value>New custom event</value>
|
||||
</data>
|
||||
<data name=">>newEventButton.Name" xml:space="preserve">
|
||||
<value>newEventButton</value>
|
||||
</data>
|
||||
<data name=">>newEventButton.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=">>newEventButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer2.Panel1</value>
|
||||
</data>
|
||||
<data name=">>newEventButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer2.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer2.Panel1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer2.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer2.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer2.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="calendarEventsListViewEx.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="logsTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="calendarEventsListViewEx.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="logsTextBox.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
<data name="calendarEventsListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>361, 615</value>
|
||||
</data>
|
||||
<data name="logsTextBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
|
||||
<value>Vertical</value>
|
||||
</data>
|
||||
<data name="logsTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>965, 643</value>
|
||||
</data>
|
||||
<data name="logsTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="calendarEventsListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>logsTextBox.Name" xml:space="preserve">
|
||||
<value>logsTextBox</value>
|
||||
<data name=">>calendarEventsListViewEx.Name" xml:space="preserve">
|
||||
<value>calendarEventsListViewEx</value>
|
||||
</data>
|
||||
<data name=">>logsTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>calendarEventsListViewEx.Type" xml:space="preserve">
|
||||
<value>Common.UIControls.ListViewEx, Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>logsTextBox.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel2</value>
|
||||
<data name=">>calendarEventsListViewEx.Parent" xml:space="preserve">
|
||||
<value>splitContainer2.Panel2</value>
|
||||
</data>
|
||||
<data name=">>logsTextBox.ZOrder" xml:space="preserve">
|
||||
<data name=">>calendarEventsListViewEx.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer.Panel2</value>
|
||||
<data name=">>splitContainer2.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer2.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Type" xml:space="preserve">
|
||||
<data name=">>splitContainer2.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
<data name=">>splitContainer2.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.ZOrder" xml:space="preserve">
|
||||
<data name=">>splitContainer2.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>965, 689</value>
|
||||
<data name="splitContainer2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>361, 689</value>
|
||||
</data>
|
||||
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>42</value>
|
||||
<data name="splitContainer2.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>70</value>
|
||||
</data>
|
||||
<data name="splitContainer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<data name="splitContainer2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Name" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
<data name=">>splitContainer2.Name" xml:space="preserve">
|
||||
<value>splitContainer2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Type" xml:space="preserve">
|
||||
<data name=">>splitContainer2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Parent" xml:space="preserve">
|
||||
<data name=">>splitContainer2.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>965, 689</value>
|
||||
</data>
|
||||
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>600</value>
|
||||
</data>
|
||||
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Name" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.ZOrder" xml:space="preserve">
|
||||
<data name=">>splitContainer1.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">
|
||||
@@ -283,7 +346,7 @@
|
||||
<value>965, 689</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LogsTabPageCtrl</value>
|
||||
<value>CalendarTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Config.CalendarEvent;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// An event that defines a calibration due date
|
||||
/// </summary>
|
||||
public class CalibrationDueDateEvent : ICalendarEvent
|
||||
{
|
||||
public DateTime Date { get; set; } /// The Date that the event occurs
|
||||
public Frequency Frequency { get; set; } /// A value indicating how often the event occurs
|
||||
public bool AllDay { get; set; } /// True if the time component of the date can be ignored
|
||||
public bool TriggerOnExactDayOnly { get; set; } /// If this is a recurring event, set this to true to make the event show up only from the day specified forward
|
||||
public string Source { get; set; } /// Source of this calendar event (becomes the source of the triggered event)
|
||||
public string Title { get; set; } /// The name of the event (becomes the text of the triggered event)
|
||||
public AutoAction AutoAction { get; set; } /// Automated action to be done or event to be triggered (becomes Severity)
|
||||
public string Parameters { get; set; } /// Automated action parameters (e.g. name of a procedure to start)
|
||||
public int Rank { get; set; } /// The ranking of the event that determines the order in which it is displayed on a particular day
|
||||
public bool Hidden { get; set; } /// True if the event is enabled, otherwise false
|
||||
public bool ReadOnly { get; set; } /// True if the event details cannot be modified
|
||||
public int BackColor { get; set; } /// The color that the event show up in on the calendar: (MSB)AARRGGBB(LSB)
|
||||
public int TextColor { get; set; } /// The text color of the event: (MSB)AARRGGBB(LSB)
|
||||
public bool TooltipEnabled { get; set; } /// True if a tooltip should be displayed when hovering over the event
|
||||
|
||||
public Config.CalendarEvent.CustomRecurringFrequenciesHandler CustomRecurringFunction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CalibrationDueEvent Constructor
|
||||
/// </summary>
|
||||
public CalibrationDueDateEvent()
|
||||
{
|
||||
/// Date
|
||||
Frequency = Frequency.Once;
|
||||
AllDay = true;
|
||||
TriggerOnExactDayOnly = false;
|
||||
/// Source
|
||||
/// Text
|
||||
AutoAction = AutoAction.Error;
|
||||
Parameters = string.Empty;
|
||||
Rank = 1;
|
||||
Hidden = false;
|
||||
ReadOnly = true;
|
||||
BackColor = unchecked((int)0xFFA00000);
|
||||
TextColor = unchecked((int)0xFFFFFFFF);
|
||||
TooltipEnabled = true;
|
||||
}
|
||||
|
||||
public CalibrationDueDateEvent(DateTime date, string source, string text)
|
||||
: this()
|
||||
{
|
||||
Date = date;
|
||||
Source = source;
|
||||
Title = text;
|
||||
}
|
||||
|
||||
public ICalendarEvent Clone()
|
||||
{
|
||||
return new CalibrationDueDateEvent
|
||||
{
|
||||
Date = this.Date,
|
||||
Frequency = this.Frequency,
|
||||
AllDay = this.AllDay,
|
||||
TriggerOnExactDayOnly = this.TriggerOnExactDayOnly,
|
||||
Source = this.Source,
|
||||
Title = this.Title,
|
||||
AutoAction = this.AutoAction,
|
||||
Parameters = this.Parameters,
|
||||
Rank = this.Rank,
|
||||
Hidden = this.Hidden,
|
||||
ReadOnly = this.ReadOnly,
|
||||
BackColor = this.BackColor,
|
||||
TextColor = this.TextColor,
|
||||
TooltipEnabled = this.TooltipEnabled,
|
||||
CustomRecurringFunction = this.CustomRecurringFunction,
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Source))
|
||||
{
|
||||
return Title;
|
||||
}
|
||||
return string.Format("{0}: {1}", Source, Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Config.CalendarEvent;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// An event that defines a calibration reminder
|
||||
/// </summary>
|
||||
public class CalibrationReminderEvent : ICalendarEvent
|
||||
{
|
||||
public DateTime Date { get; set; } /// The Date that the event occurs
|
||||
public Frequency Frequency { get; set; } /// A value indicating how often the event occurs
|
||||
public bool AllDay { get; set; } /// True if the time component of the date can be ignored
|
||||
public bool TriggerOnExactDayOnly { get; set; } /// If this is a recurring event, set this to true to make the event show up only from the day specified forward
|
||||
public string Source { get; set; } /// Source of this calendar event (becomes the source of the triggered event)
|
||||
public string Title { get; set; } /// The name of the event (becomes the text of the triggered event)
|
||||
public AutoAction AutoAction { get; set; } /// Automated action to be done or event to be triggered (triggered event Severity)
|
||||
public string Parameters { get; set; } /// Automated action parameters (e.g. name of a procedure to start)
|
||||
public int Rank { get; set; } /// The ranking of the event that determines the order in which it is displayed on a particular day
|
||||
public bool Hidden { get; set; } /// True if the event is enabled, otherwise false
|
||||
public bool ReadOnly { get; set; } /// True if the event details cannot be modified
|
||||
public int BackColor { get; set; } /// The color that the event show up in on the calendar: (MSB)AARRGGBB(LSB)
|
||||
public int TextColor { get; set; } /// The text color of the event: (MSB)AARRGGBB(LSB)
|
||||
public bool TooltipEnabled { get; set; } /// True if a tooltip should be displayed when hovering over the event
|
||||
|
||||
public Config.CalendarEvent.CustomRecurringFrequenciesHandler CustomRecurringFunction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CalibrationReminderEvent Constructor
|
||||
/// </summary>
|
||||
public CalibrationReminderEvent(bool daily = false)
|
||||
{
|
||||
/// Date
|
||||
Frequency = daily ? Frequency.Daily : Frequency.Weekly;
|
||||
AllDay = true;
|
||||
TriggerOnExactDayOnly = false;
|
||||
/// Source
|
||||
/// Text
|
||||
AutoAction = daily ? AutoAction.Warning : AutoAction.Notification;
|
||||
Parameters = string.Empty;
|
||||
Rank = 1;
|
||||
Hidden = true;
|
||||
ReadOnly = true;
|
||||
BackColor = unchecked((int)0xFFA00000);
|
||||
TextColor = unchecked((int)0xFFFFFFFF);
|
||||
TooltipEnabled = true;
|
||||
}
|
||||
|
||||
public CalibrationReminderEvent(DateTime date, string source, string text, bool daily = false)
|
||||
: this(daily)
|
||||
{
|
||||
Date = date;
|
||||
Source = source;
|
||||
Title = text;
|
||||
}
|
||||
|
||||
public ICalendarEvent Clone()
|
||||
{
|
||||
return new CalibrationReminderEvent
|
||||
{
|
||||
Date = this.Date,
|
||||
Frequency = this.Frequency,
|
||||
AllDay = this.AllDay,
|
||||
TriggerOnExactDayOnly = this.TriggerOnExactDayOnly,
|
||||
Source = this.Source,
|
||||
Title = this.Title,
|
||||
AutoAction = this.AutoAction,
|
||||
Parameters = this.Parameters,
|
||||
Rank = this.Rank,
|
||||
Hidden = this.Hidden,
|
||||
ReadOnly = this.ReadOnly,
|
||||
BackColor = this.BackColor,
|
||||
TextColor = this.TextColor,
|
||||
TooltipEnabled = this.TooltipEnabled,
|
||||
CustomRecurringFunction = this.CustomRecurringFunction,
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Source))
|
||||
{
|
||||
return Title;
|
||||
}
|
||||
return string.Format("{0}: {1}", Source, Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// An attribute to mark Custom Recurring Functions
|
||||
/// </summary>
|
||||
public class CustomRecurringFunction : Attribute
|
||||
{
|
||||
private readonly string _name;
|
||||
private readonly string _description;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the custom recurring function
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a description of the custom recurring function
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get { return _description; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CustomRecurringFunction Constructor
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the function</param>
|
||||
/// <param name="description">A description of the function</param>
|
||||
public CustomRecurringFunction(string name, string description)
|
||||
{
|
||||
_name = name;
|
||||
_description = description;
|
||||
}
|
||||
/// <summary>
|
||||
/// CustomRecurringFunction Constructor
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the function</param>
|
||||
public CustomRecurringFunction(string name)
|
||||
{
|
||||
_name = name;
|
||||
_description = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using Config.CalendarEvent;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal class EventComparer : IComparer<ICalendarEvent>
|
||||
{
|
||||
public int Compare(ICalendarEvent x, ICalendarEvent y)
|
||||
{
|
||||
int rslt;
|
||||
if ((rslt = x.Rank.CompareTo(y.Rank)) != 0) return rslt;
|
||||
if ((rslt = x.Date.Day.CompareTo(y.Date.Day)) != 0) return rslt;
|
||||
if ((rslt = x.Date.Month.CompareTo(y.Date.Month)) != 0) return rslt;
|
||||
if ((rslt = x.Date.Year.CompareTo(y.Date.Year)) != 0) return rslt;
|
||||
if ((rslt = x.Date.Hour.CompareTo(y.Date.Hour)) != 0) return rslt;
|
||||
if ((rslt = x.Date.Minute.CompareTo(y.Date.Minute)) != 0) return rslt;
|
||||
return x.Rank.CompareTo(y.Rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
+373
@@ -0,0 +1,373 @@
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
partial class EventDetailsForm
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.txtEventTitle = new System.Windows.Forms.TextBox();
|
||||
this.dateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.basicsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.timeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtEventSource = new System.Windows.Forms.TextBox();
|
||||
this.chkHidden = new System.Windows.Forms.CheckBox();
|
||||
this.recurringOptionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.chkTriggerOnExactDayOnly = new System.Windows.Forms.CheckBox();
|
||||
this.cbRecurringFrequency = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.appearanceGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.chkEnableTooltip = new System.Windows.Forms.CheckBox();
|
||||
this.pnlTextColor = new System.Windows.Forms.Panel();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.pnlEventColor = new System.Windows.Forms.Panel();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.fontDialog1 = new System.Windows.Forms.FontDialog();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.parametersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.autoActionComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.parametersTextBox = new System.Windows.Forms.TextBox();
|
||||
this.basicsGroupBox.SuspendLayout();
|
||||
this.recurringOptionsGroupBox.SuspendLayout();
|
||||
this.appearanceGroupBox.SuspendLayout();
|
||||
this.parametersGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(10, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(67, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Event name:";
|
||||
//
|
||||
// txtEventName
|
||||
//
|
||||
this.txtEventTitle.Location = new System.Drawing.Point(120, 19);
|
||||
this.txtEventTitle.Name = "txtEventName";
|
||||
this.txtEventTitle.Size = new System.Drawing.Size(215, 20);
|
||||
this.txtEventTitle.TabIndex = 1;
|
||||
//
|
||||
// dateTimePicker
|
||||
//
|
||||
this.dateTimePicker.CustomFormat = "dd.MM.yyyy dddd";
|
||||
this.dateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dateTimePicker.Location = new System.Drawing.Point(120, 20);
|
||||
this.dateTimePicker.Name = "dateTimePicker";
|
||||
this.dateTimePicker.Size = new System.Drawing.Size(135, 20);
|
||||
this.dateTimePicker.TabIndex = 2;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 23);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(76, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Date and time:";
|
||||
//
|
||||
// basicsGroupBox
|
||||
//
|
||||
this.basicsGroupBox.Controls.Add(this.label4);
|
||||
this.basicsGroupBox.Controls.Add(this.txtEventSource);
|
||||
this.basicsGroupBox.Controls.Add(this.label1);
|
||||
this.basicsGroupBox.Controls.Add(this.txtEventTitle);
|
||||
this.basicsGroupBox.Location = new System.Drawing.Point(12, 11);
|
||||
this.basicsGroupBox.Name = "basicsGroupBox";
|
||||
this.basicsGroupBox.Size = new System.Drawing.Size(349, 76);
|
||||
this.basicsGroupBox.TabIndex = 4;
|
||||
this.basicsGroupBox.TabStop = false;
|
||||
this.basicsGroupBox.Text = "Basics";
|
||||
//
|
||||
// timeComboBox
|
||||
//
|
||||
this.timeComboBox.FormattingEnabled = true;
|
||||
this.timeComboBox.Location = new System.Drawing.Point(261, 19);
|
||||
this.timeComboBox.Name = "timeComboBox";
|
||||
this.timeComboBox.Size = new System.Drawing.Size(74, 21);
|
||||
this.timeComboBox.TabIndex = 8;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(10, 49);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(73, 13);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Event source:";
|
||||
//
|
||||
// txtEventSource
|
||||
//
|
||||
this.txtEventSource.Location = new System.Drawing.Point(120, 46);
|
||||
this.txtEventSource.Name = "txtEventSource";
|
||||
this.txtEventSource.Size = new System.Drawing.Size(215, 20);
|
||||
this.txtEventSource.TabIndex = 7;
|
||||
//
|
||||
// chkHidden
|
||||
//
|
||||
this.chkHidden.AutoSize = true;
|
||||
this.chkHidden.Location = new System.Drawing.Point(29, 24);
|
||||
this.chkHidden.Name = "chkHidden";
|
||||
this.chkHidden.Size = new System.Drawing.Size(60, 17);
|
||||
this.chkHidden.TabIndex = 4;
|
||||
this.chkHidden.Text = "Hidden";
|
||||
this.chkHidden.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// recurringOptionsGroupBox
|
||||
//
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.timeComboBox);
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.chkTriggerOnExactDayOnly);
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.cbRecurringFrequency);
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.label3);
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.label2);
|
||||
this.recurringOptionsGroupBox.Controls.Add(this.dateTimePicker);
|
||||
this.recurringOptionsGroupBox.Location = new System.Drawing.Point(12, 93);
|
||||
this.recurringOptionsGroupBox.Name = "recurringOptionsGroupBox";
|
||||
this.recurringOptionsGroupBox.Size = new System.Drawing.Size(349, 100);
|
||||
this.recurringOptionsGroupBox.TabIndex = 5;
|
||||
this.recurringOptionsGroupBox.TabStop = false;
|
||||
this.recurringOptionsGroupBox.Text = "Time and Recurring Frequency";
|
||||
//
|
||||
// chkTriggerOnExactDayOnly
|
||||
//
|
||||
this.chkTriggerOnExactDayOnly.AutoSize = true;
|
||||
this.chkTriggerOnExactDayOnly.Location = new System.Drawing.Point(29, 77);
|
||||
this.chkTriggerOnExactDayOnly.Name = "chkTriggerOnExactDayOnly";
|
||||
this.chkTriggerOnExactDayOnly.Size = new System.Drawing.Size(145, 17);
|
||||
this.chkTriggerOnExactDayOnly.TabIndex = 2;
|
||||
this.chkTriggerOnExactDayOnly.Text = "Trigger on exact day only";
|
||||
this.chkTriggerOnExactDayOnly.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbRecurringFrequency
|
||||
//
|
||||
this.cbRecurringFrequency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbRecurringFrequency.FormattingEnabled = true;
|
||||
this.cbRecurringFrequency.Location = new System.Drawing.Point(120, 47);
|
||||
this.cbRecurringFrequency.Name = "cbRecurringFrequency";
|
||||
this.cbRecurringFrequency.Size = new System.Drawing.Size(215, 21);
|
||||
this.cbRecurringFrequency.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(10, 50);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(106, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Recurring frequency:";
|
||||
//
|
||||
// appearanceGroupBox
|
||||
//
|
||||
this.appearanceGroupBox.Controls.Add(this.chkEnableTooltip);
|
||||
this.appearanceGroupBox.Controls.Add(this.pnlTextColor);
|
||||
this.appearanceGroupBox.Controls.Add(this.label6);
|
||||
this.appearanceGroupBox.Controls.Add(this.pnlEventColor);
|
||||
this.appearanceGroupBox.Controls.Add(this.chkHidden);
|
||||
this.appearanceGroupBox.Controls.Add(this.label5);
|
||||
this.appearanceGroupBox.Location = new System.Drawing.Point(12, 199);
|
||||
this.appearanceGroupBox.Name = "appearanceGroupBox";
|
||||
this.appearanceGroupBox.Size = new System.Drawing.Size(349, 75);
|
||||
this.appearanceGroupBox.TabIndex = 6;
|
||||
this.appearanceGroupBox.TabStop = false;
|
||||
this.appearanceGroupBox.Text = "Appearance Settings";
|
||||
//
|
||||
// chkEnableTooltip
|
||||
//
|
||||
this.chkEnableTooltip.AutoSize = true;
|
||||
this.chkEnableTooltip.Location = new System.Drawing.Point(29, 45);
|
||||
this.chkEnableTooltip.Name = "chkEnableTooltip";
|
||||
this.chkEnableTooltip.Size = new System.Drawing.Size(90, 17);
|
||||
this.chkEnableTooltip.TabIndex = 7;
|
||||
this.chkEnableTooltip.Text = "Enable tooltip";
|
||||
this.chkEnableTooltip.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pnlTextColor
|
||||
//
|
||||
this.pnlTextColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlTextColor.Location = new System.Drawing.Point(266, 46);
|
||||
this.pnlTextColor.Name = "pnlTextColor";
|
||||
this.pnlTextColor.Size = new System.Drawing.Size(30, 15);
|
||||
this.pnlTextColor.TabIndex = 6;
|
||||
this.pnlTextColor.DoubleClick += new System.EventHandler(this.PnlTextColorDoubleClick);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(171, 46);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(89, 13);
|
||||
this.label6.TabIndex = 5;
|
||||
this.label6.Text = "Event Text Color:";
|
||||
//
|
||||
// pnlEventColor
|
||||
//
|
||||
this.pnlEventColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlEventColor.Location = new System.Drawing.Point(266, 22);
|
||||
this.pnlEventColor.Name = "pnlEventColor";
|
||||
this.pnlEventColor.Size = new System.Drawing.Size(30, 15);
|
||||
this.pnlEventColor.TabIndex = 4;
|
||||
this.pnlEventColor.DoubleClick += new System.EventHandler(this.PnlEventColorDoubleClick);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(171, 22);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(65, 13);
|
||||
this.label5.TabIndex = 3;
|
||||
this.label5.Text = "Event Color:";
|
||||
//
|
||||
// fontDialog1
|
||||
//
|
||||
this.fontDialog1.ScriptsOnly = true;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(182, 379);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(85, 42);
|
||||
this.okButton.TabIndex = 7;
|
||||
this.okButton.Text = "&OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(276, 379);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(85, 42);
|
||||
this.cancelButton.TabIndex = 8;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// parametersGroupBox
|
||||
//
|
||||
this.parametersGroupBox.Controls.Add(this.autoActionComboBox);
|
||||
this.parametersGroupBox.Controls.Add(this.label7);
|
||||
this.parametersGroupBox.Controls.Add(this.parametersTextBox);
|
||||
this.parametersGroupBox.Location = new System.Drawing.Point(12, 280);
|
||||
this.parametersGroupBox.Name = "parametersGroupBox";
|
||||
this.parametersGroupBox.Size = new System.Drawing.Size(349, 85);
|
||||
this.parametersGroupBox.TabIndex = 9;
|
||||
this.parametersGroupBox.TabStop = false;
|
||||
this.parametersGroupBox.Text = "Triggered action and parameters";
|
||||
//
|
||||
// autoActionComboBox
|
||||
//
|
||||
this.autoActionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.autoActionComboBox.FormattingEnabled = true;
|
||||
this.autoActionComboBox.Location = new System.Drawing.Point(120, 21);
|
||||
this.autoActionComboBox.Name = "autoActionComboBox";
|
||||
this.autoActionComboBox.Size = new System.Drawing.Size(215, 21);
|
||||
this.autoActionComboBox.TabIndex = 5;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(10, 24);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(40, 13);
|
||||
this.label7.TabIndex = 4;
|
||||
this.label7.Text = "Action:";
|
||||
//
|
||||
// parametersTextBox
|
||||
//
|
||||
this.parametersTextBox.Location = new System.Drawing.Point(13, 51);
|
||||
this.parametersTextBox.Name = "parametersTextBox";
|
||||
this.parametersTextBox.Size = new System.Drawing.Size(322, 20);
|
||||
this.parametersTextBox.TabIndex = 3;
|
||||
//
|
||||
// EventDetailsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(373, 432);
|
||||
this.Controls.Add(this.parametersGroupBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.appearanceGroupBox);
|
||||
this.Controls.Add(this.recurringOptionsGroupBox);
|
||||
this.Controls.Add(this.basicsGroupBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EventDetailsForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "EventDetails";
|
||||
this.Load += new System.EventHandler(this.EventDetailsLoad);
|
||||
this.basicsGroupBox.ResumeLayout(false);
|
||||
this.basicsGroupBox.PerformLayout();
|
||||
this.recurringOptionsGroupBox.ResumeLayout(false);
|
||||
this.recurringOptionsGroupBox.PerformLayout();
|
||||
this.appearanceGroupBox.ResumeLayout(false);
|
||||
this.appearanceGroupBox.PerformLayout();
|
||||
this.parametersGroupBox.ResumeLayout(false);
|
||||
this.parametersGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtEventTitle;
|
||||
private System.Windows.Forms.DateTimePicker dateTimePicker;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.GroupBox basicsGroupBox;
|
||||
private System.Windows.Forms.GroupBox recurringOptionsGroupBox;
|
||||
private System.Windows.Forms.ComboBox cbRecurringFrequency;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox chkTriggerOnExactDayOnly;
|
||||
private System.Windows.Forms.CheckBox chkHidden;
|
||||
private System.Windows.Forms.GroupBox appearanceGroupBox;
|
||||
private System.Windows.Forms.FontDialog fontDialog1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.ColorDialog colorDialog1;
|
||||
private System.Windows.Forms.Panel pnlEventColor;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Panel pnlTextColor;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.CheckBox chkEnableTooltip;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.GroupBox parametersGroupBox;
|
||||
private System.Windows.Forms.TextBox parametersTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtEventSource;
|
||||
private System.Windows.Forms.ComboBox autoActionComboBox;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.ComboBox timeComboBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using Config.CalendarEvent;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal partial class EventDetailsForm : Form
|
||||
{
|
||||
private ICalendarEvent evnt;
|
||||
private ICalendarEvent newEvnt;
|
||||
|
||||
public ICalendarEvent Event
|
||||
{
|
||||
get { return evnt; }
|
||||
set
|
||||
{
|
||||
evnt = value;
|
||||
FillValues();
|
||||
}
|
||||
}
|
||||
|
||||
public ICalendarEvent NewEvent
|
||||
{
|
||||
get { return newEvnt; }
|
||||
}
|
||||
|
||||
|
||||
public EventDetailsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = Strings.Event_details;
|
||||
for (Frequency f = Frequency.Once; f < Frequency.Count; f++)
|
||||
{
|
||||
cbRecurringFrequency.Items.Add(Config.CalendarEvent.Utils.Freq2String(f));
|
||||
}
|
||||
|
||||
for (AutoAction a = AutoAction.None; a < AutoAction.Count; a++)
|
||||
{
|
||||
autoActionComboBox.Items.Add(Config.CalendarEvent.Utils.Action2String(a));
|
||||
}
|
||||
|
||||
string[] times = { Strings.All_day,
|
||||
"00:00", "00:30", "01:00", "01:30", "02:00", "02:30", "03:00", "03:30", "04:00", "04:30", "05:00", "05:30",
|
||||
"06:00", "06:30", "07:00", "07:30", "08:00", "08:30", "09:00", "09:30", "10:00", "10:30", "11:00", "11:30",
|
||||
"12:00", "12:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30", "17:00", "17:30",
|
||||
"18:00", "18:30", "19:00", "19:30", "20:00", "20:30", "21:00", "21:30", "22:00", "22:30", "23:00", "23:30" };
|
||||
|
||||
foreach (var s in times) timeComboBox.Items.Add(s);
|
||||
}
|
||||
|
||||
private void EventDetailsLoad(object sender, EventArgs e)
|
||||
{
|
||||
if (evnt == null)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
Event = newEvnt = new Config.Entities.CustomEvent(new DateTime(now.Year, now.Month, now.Day, now.Hour, 30 * (now.Minute / 30), 0), Strings.New_event);
|
||||
}
|
||||
else
|
||||
{
|
||||
newEvnt = (CustomEvent)evnt.Clone();
|
||||
}
|
||||
}
|
||||
|
||||
private void FillValues()
|
||||
{
|
||||
txtEventTitle.Text = evnt.Title;
|
||||
txtEventSource.Text = evnt.Source;
|
||||
dateTimePicker.Value = evnt.Date;
|
||||
timeComboBox.Text = evnt.AllDay ? Strings.All_day : evnt.Date.ToString("HH:mm");
|
||||
cbRecurringFrequency.SelectedItem = Config.CalendarEvent.Utils.Freq2String(evnt.Frequency);
|
||||
chkTriggerOnExactDayOnly.Checked = evnt.TriggerOnExactDayOnly;
|
||||
chkHidden.Checked = evnt.Hidden;
|
||||
autoActionComboBox.SelectedItem = Config.CalendarEvent.Utils.Action2String(evnt.AutoAction);
|
||||
parametersTextBox.Text = evnt.Parameters;
|
||||
pnlEventColor.BackColor = System.Drawing.Color.FromArgb(evnt.BackColor);
|
||||
pnlTextColor.BackColor = System.Drawing.Color.FromArgb(evnt.TextColor);
|
||||
chkEnableTooltip.Checked = evnt.TooltipEnabled;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
newEvnt.Title = txtEventTitle.Text;
|
||||
newEvnt.Source = txtEventSource.Text;
|
||||
newEvnt.Date = dateTimePicker.Value;
|
||||
|
||||
DateTime timeOnly;
|
||||
if (timeComboBox.Text == Strings.All_day)
|
||||
{
|
||||
newEvnt.AllDay = true;
|
||||
}
|
||||
else if (DateTime.TryParse(timeComboBox.Text, out timeOnly))
|
||||
{
|
||||
newEvnt.AllDay = false;
|
||||
newEvnt.Date = new DateTime(newEvnt.Date.Year, newEvnt.Date.Month, newEvnt.Date.Day, timeOnly.Hour, timeOnly.Minute, 0);
|
||||
}
|
||||
|
||||
newEvnt.Hidden = chkHidden.Checked;
|
||||
newEvnt.Frequency = Config.CalendarEvent.Utils.String2Freq(cbRecurringFrequency.SelectedItem.ToString());
|
||||
newEvnt.TriggerOnExactDayOnly = chkTriggerOnExactDayOnly.Checked;
|
||||
newEvnt.TooltipEnabled = chkEnableTooltip.Checked;
|
||||
newEvnt.AutoAction = Config.CalendarEvent.Utils.String2Action(autoActionComboBox.SelectedItem.ToString());
|
||||
newEvnt.Parameters = parametersTextBox.Text;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void PnlEventColorDoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog1.Color = System.Drawing.Color.FromArgb(newEvnt.BackColor);
|
||||
|
||||
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
pnlEventColor.BackColor = colorDialog1.Color;
|
||||
newEvnt.BackColor = colorDialog1.Color.ToArgb();
|
||||
}
|
||||
}
|
||||
|
||||
private void PnlTextColorDoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog1.Color = System.Drawing.Color.FromArgb(newEvnt.BackColor);
|
||||
|
||||
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
pnlTextColor.BackColor = colorDialog1.Color;
|
||||
newEvnt.TextColor = colorDialog1.Color.ToArgb();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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="fontDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>133, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
partial class EventToolTipCtrl
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// EventToolTip
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "EventToolTip";
|
||||
this.Load += new System.EventHandler(this.EventToolTipLoad);
|
||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.EventToolTipPaint);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal partial class EventToolTipCtrl : UserControl
|
||||
{
|
||||
private Color _eventToolTipColor;
|
||||
private Color _eventToolTipTextColor;
|
||||
private Color _eventToolTipBorderColor;
|
||||
private Font _eventToolTipFont;
|
||||
private bool _shouldRender;
|
||||
private string _eventToolTipText;
|
||||
private Margin _eventToolTipMargins;
|
||||
|
||||
public Margin EventToolTipMargins
|
||||
{
|
||||
get { return _eventToolTipMargins; }
|
||||
set
|
||||
{
|
||||
_eventToolTipMargins = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public string EventToolTipText
|
||||
{
|
||||
get { return _eventToolTipText; }
|
||||
set
|
||||
{
|
||||
_eventToolTipText = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShouldRender
|
||||
{
|
||||
get { return _shouldRender; }
|
||||
set
|
||||
{
|
||||
_shouldRender = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public Font EventToolTipFont
|
||||
{
|
||||
get { return _eventToolTipFont; }
|
||||
set
|
||||
{
|
||||
_eventToolTipFont = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public Color EventToolTipBorderColor
|
||||
{
|
||||
get { return _eventToolTipBorderColor; }
|
||||
set
|
||||
{
|
||||
_eventToolTipBorderColor = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public Color EventToolTipTextColor
|
||||
{
|
||||
get { return _eventToolTipTextColor; }
|
||||
set
|
||||
{
|
||||
_eventToolTipTextColor = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public Color EventToolTipColor
|
||||
{
|
||||
get { return _eventToolTipColor; }
|
||||
set
|
||||
{
|
||||
_eventToolTipColor = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public EventToolTipCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_shouldRender = false;
|
||||
_eventToolTipBorderColor = Color.Black;
|
||||
_eventToolTipColor = Color.Yellow;
|
||||
_eventToolTipFont = new Font("Arial", 10, FontStyle.Regular);
|
||||
_eventToolTipText = "";
|
||||
_eventToolTipTextColor = Color.Black;
|
||||
_eventToolTipMargins = new Margin { Top = 10, Right = 10, Bottom = 10, Left = 10 };
|
||||
}
|
||||
|
||||
private void EventToolTipLoad(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Size CalculateSize()
|
||||
{
|
||||
Graphics g = CreateGraphics();
|
||||
|
||||
SizeF textSize = g.MeasureString(_eventToolTipText, _eventToolTipFont);
|
||||
|
||||
Size = new Size((int)textSize.Width + _eventToolTipMargins.Left + _eventToolTipMargins.Right,
|
||||
(int)textSize.Height + _eventToolTipMargins.Top + _eventToolTipMargins.Bottom);
|
||||
|
||||
g.Dispose();
|
||||
return Size;
|
||||
}
|
||||
|
||||
private void EventToolTipPaint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (!_shouldRender)
|
||||
return;
|
||||
|
||||
SizeF textSize = e.Graphics.MeasureString(_eventToolTipText, _eventToolTipFont);
|
||||
|
||||
Size = new Size((int)textSize.Width + _eventToolTipMargins.Left + _eventToolTipMargins.Right,
|
||||
(int)textSize.Height + _eventToolTipMargins.Top + _eventToolTipMargins.Bottom);
|
||||
|
||||
var bmp = new Bitmap(ClientSize.Width, ClientSize.Height);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
GraphicsPath gp = Common.UIControls.RoundedRectangle.Create(0, 0, ClientSize.Width - 1, ClientSize.Height - 1, 5,
|
||||
Common.UIControls.RoundedRectangle.RectangleCorners.All);
|
||||
|
||||
BackColor = Color.Transparent;
|
||||
g.FillPath(new SolidBrush(_eventToolTipColor), gp);
|
||||
g.DrawPath(new Pen(_eventToolTipBorderColor), gp);
|
||||
|
||||
int totHorMargin = _eventToolTipMargins.Left + _eventToolTipMargins.Right;
|
||||
int totVerMargin = _eventToolTipMargins.Top + _eventToolTipMargins.Bottom;
|
||||
|
||||
g.DrawString(_eventToolTipText, _eventToolTipFont, new SolidBrush(_eventToolTipTextColor),
|
||||
(ClientSize.Width - textSize.Width + totHorMargin) / 2f - _eventToolTipMargins.Right,
|
||||
(ClientSize.Height - textSize.Height + totVerMargin) / 2f - _eventToolTipMargins.Bottom - 1);
|
||||
|
||||
|
||||
e.Graphics.DrawImage(bmp, 0, 0);
|
||||
gp.Dispose();
|
||||
g.Dispose();
|
||||
bmp.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
internal class Margin
|
||||
{
|
||||
public int Left
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int Right
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int Top
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int Bottom
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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=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>
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Config.CalendarEvent;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// An event that defines a holiday
|
||||
/// </summary>
|
||||
public class HolidayEvent : ICalendarEvent
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public Frequency Frequency { get; set; }
|
||||
public bool AllDay { get; set; }
|
||||
public bool TriggerOnExactDayOnly { get; set; }
|
||||
public string Source { get; set; }
|
||||
public string Title { get; set; }
|
||||
public AutoAction AutoAction { get; set; }
|
||||
public string Parameters { get; set; }
|
||||
public int Rank { get; set; }
|
||||
public bool Hidden { get; set; }
|
||||
public bool ReadOnly { get; set; }
|
||||
public int BackColor { get; set; }
|
||||
public int TextColor { get; set; }
|
||||
public bool TooltipEnabled { get; set; }
|
||||
public Config.CalendarEvent.CustomRecurringFrequenciesHandler CustomRecurringFunction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// HolidayEvent Constructor
|
||||
/// </summary>
|
||||
public HolidayEvent()
|
||||
{
|
||||
/// Date
|
||||
Frequency = Frequency.Once;
|
||||
AllDay = true;
|
||||
TriggerOnExactDayOnly = true;
|
||||
Source = "Calendar";
|
||||
/// Text
|
||||
AutoAction = AutoAction.None;
|
||||
Parameters = string.Empty;
|
||||
Rank = 1;
|
||||
Hidden = false;
|
||||
ReadOnly = true;
|
||||
BackColor = unchecked((int)0xFF50AAFF);
|
||||
TextColor = unchecked((int)0xFFFFFFFF);
|
||||
TooltipEnabled = true;
|
||||
}
|
||||
|
||||
public ICalendarEvent Clone()
|
||||
{
|
||||
return new HolidayEvent
|
||||
{
|
||||
Date = this.Date,
|
||||
Frequency = this.Frequency,
|
||||
AllDay = this.AllDay,
|
||||
TriggerOnExactDayOnly = this.TriggerOnExactDayOnly,
|
||||
Source = this.Source,
|
||||
Title = this.Title,
|
||||
AutoAction = this.AutoAction,
|
||||
Parameters = this.Parameters,
|
||||
Rank = this.Rank,
|
||||
Hidden = this.Hidden,
|
||||
ReadOnly = this.ReadOnly,
|
||||
BackColor = this.BackColor,
|
||||
TextColor = this.TextColor,
|
||||
TooltipEnabled = this.TooltipEnabled,
|
||||
CustomRecurringFunction = this.CustomRecurringFunction,
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal class NavigateLeftButtonCtrl : Common.UIControls.CoolButtonCtrl
|
||||
{
|
||||
public NavigateLeftButtonCtrl()
|
||||
{
|
||||
Size = new System.Drawing.Size(42, 29);
|
||||
ButtonText = "<";
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// NavigateLeftButton
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "NavigateLeftButton";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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=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>
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal class NavigateRightButtonCtrl : Common.UIControls.CoolButtonCtrl
|
||||
{
|
||||
public NavigateRightButtonCtrl()
|
||||
{
|
||||
Size = new System.Drawing.Size(42, 29);
|
||||
ButtonText = ">";
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// NavigateRightButton
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "NavigateRightButton";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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=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>
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
public class RectangleComparer : IComparer<Rectangle>
|
||||
{
|
||||
public int Compare(Rectangle x, Rectangle y)
|
||||
{
|
||||
return x.Y.CompareTo(y.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
partial class ScrollPanelCtrl
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// ScrollPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "ScrollPanel";
|
||||
this.Size = new System.Drawing.Size(280, 242);
|
||||
this.Load += new System.EventHandler(this.ScrollPanel_Load);
|
||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.ScrollPanel_Paint);
|
||||
this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ScrollPanel_MouseClick);
|
||||
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ScrollPanel_MouseDown);
|
||||
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ScrollPanel_MouseMove);
|
||||
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ScrollPanel_MouseUp);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal partial class ScrollPanelCtrl : UserControl
|
||||
{
|
||||
private int _scrollOffset;
|
||||
private bool _mouseDown;
|
||||
private Point _oldMouseCoords;
|
||||
private int _bmpSize;
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
static extern short GetKeyState(int nVirtKey);
|
||||
|
||||
public event MouseEventHandler RightButtonClicked;
|
||||
|
||||
public ScrollPanelCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_scrollOffset = 0;
|
||||
_mouseDown = false;
|
||||
_oldMouseCoords = new Point(0, 0);
|
||||
}
|
||||
|
||||
public int ScrollOffset
|
||||
{
|
||||
get { return _scrollOffset; }
|
||||
}
|
||||
|
||||
private void ScrollPanel_Load(object sender, EventArgs e)
|
||||
{
|
||||
//BackColor = Color.Blue;
|
||||
}
|
||||
|
||||
private void ScrollPanel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
var c = (CalendarCtrl)Parent;
|
||||
|
||||
Bitmap bmp = c.RequestImage();
|
||||
if (bmp == null)
|
||||
return;
|
||||
|
||||
e.Graphics.DrawImage(bmp, new Rectangle(0, 0, ClientSize.Width, ClientSize.Height),
|
||||
new Rectangle(0, _scrollOffset, ClientSize.Width, ClientSize.Height),
|
||||
GraphicsUnit.Pixel);
|
||||
_bmpSize = bmp.Height;
|
||||
//e.Graphics.Dispose();
|
||||
bmp.Dispose();
|
||||
}
|
||||
|
||||
private void ScrollPanel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
_mouseDown = true;
|
||||
_oldMouseCoords = e.Location;
|
||||
}
|
||||
}
|
||||
|
||||
private void ScrollPanel_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
_mouseDown = false;
|
||||
}
|
||||
|
||||
private void ScrollPanel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (_mouseDown && e.Location.Y < _oldMouseCoords.Y && _scrollOffset < _bmpSize - _scrollOffset - ClientSize.Height)
|
||||
{
|
||||
int offset = _oldMouseCoords.Y - e.Location.Y;
|
||||
_scrollOffset += offset;
|
||||
Refresh();
|
||||
}
|
||||
if (_mouseDown && e.Location.Y > _oldMouseCoords.Y && _scrollOffset > 0)
|
||||
{
|
||||
int offset = e.Location.Y - _oldMouseCoords.Y;
|
||||
_scrollOffset -= offset;
|
||||
Refresh();
|
||||
}
|
||||
_oldMouseCoords = e.Location;
|
||||
}
|
||||
|
||||
private void ScrollPanel_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (RightButtonClicked != null)
|
||||
RightButtonClicked(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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=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>
|
||||
@@ -0,0 +1,26 @@
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.Calendar
|
||||
{
|
||||
internal class TodayButtonCtrl : Common.UIControls.CoolButtonCtrl
|
||||
{
|
||||
public TodayButtonCtrl()
|
||||
{
|
||||
Size = new System.Drawing.Size(72, 29);
|
||||
ButtonText = Strings.Today;
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TodayButton
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "TodayButton";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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=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>
|
||||
@@ -4,5 +4,7 @@ namespace TBF.UI
|
||||
public static class Constants
|
||||
{
|
||||
public const int Dpi100pct = 96;
|
||||
public const string DateFormat = "dd.MM.yyyy";
|
||||
public const string DateTimeFormat = "dd.MM.yyyy HH:mm";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
using NHibernate;
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Common.UIControls;
|
||||
using Events.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.UI.EventLogs
|
||||
{
|
||||
public partial class EventLogsTabPageCtrl : UserControl
|
||||
{
|
||||
/// <summary> eventsListView columns </summary>
|
||||
enum Column
|
||||
{
|
||||
DateTime,
|
||||
Source,
|
||||
Class,
|
||||
Severity,
|
||||
Message,
|
||||
Count
|
||||
}
|
||||
|
||||
SortOrder sortOrder = SortOrder.Ascending;
|
||||
int sortColumn = -1; /// 0-based index of column to be used for sorting
|
||||
|
||||
|
||||
public EventLogsTabPageCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
int currentDpi = (int)this.CreateGraphics().DpiX;
|
||||
eventsListView.Columns.Add(Strings.Date_time, 100 * currentDpi / Constants.Dpi100pct);
|
||||
eventsListView.Columns.Add(Strings.Source, 100 * currentDpi / Constants.Dpi100pct);
|
||||
eventsListView.Columns.Add(Strings.Class, 85 * currentDpi / Constants.Dpi100pct);
|
||||
eventsListView.Columns.Add(Strings.Severity, 70 * currentDpi / Constants.Dpi100pct);
|
||||
eventsListView.Columns.Add(Strings.Message, 500 * currentDpi / Constants.Dpi100pct);
|
||||
|
||||
if (global::Events.DB.RecentEvents != null)
|
||||
{
|
||||
foreach (var e in global::Events.DB.RecentEvents)
|
||||
{
|
||||
DrawOneEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
Bridge.EventHandler += delegate(object sender, EventEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<EventEventArgs>(OnEvent), sender, args); }
|
||||
else { OnEvent(sender, args); }
|
||||
};
|
||||
}
|
||||
|
||||
void OnEvent(object sender, EventEventArgs args)
|
||||
{
|
||||
DrawOneEvent(args.Evnt);
|
||||
}
|
||||
|
||||
void DrawOneEvent(Events.Entities.Event evnt)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(evnt.TimeStamp.ToString("dd.MM.yyyy HH:mm"));
|
||||
lvi.Tag = evnt;
|
||||
lvi.SubItems.Add(evnt.Source);
|
||||
lvi.SubItems.Add(evnt.EventClass.ToString());
|
||||
{
|
||||
lvi.UseItemStyleForSubItems = false;
|
||||
lvi.SubItems.Add(evnt.Severity.ToString());
|
||||
lvi.SubItems[lvi.SubItems.Count - 1].BackColor = global::Events.Utils.GetSeverityColor(evnt.Severity);
|
||||
lvi.SubItems[lvi.SubItems.Count - 1].ForeColor = global::Events.Utils.GetSeverityColor(evnt.Severity, true);
|
||||
}
|
||||
lvi.SubItems.Add(evnt.Message);
|
||||
eventsListView.Items.Add(lvi);
|
||||
}
|
||||
|
||||
private void eventsListView_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column == sortColumn)
|
||||
{
|
||||
sortOrder = (sortOrder == SortOrder.Ascending) ? SortOrder.Descending : SortOrder.Ascending;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Clicked on another column header => set sortOrder to SortOrder.Ascending
|
||||
sortColumn = e.Column;
|
||||
sortOrder = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
switch ((Column)sortColumn)
|
||||
{
|
||||
default:
|
||||
case Column.DateTime:
|
||||
eventsListView.ListViewItemSorter = new LviDateTimeColumnComparer(sortColumn, sortOrder);
|
||||
break;
|
||||
case Column.Source:
|
||||
case Column.Class:
|
||||
case Column.Severity:
|
||||
case Column.Message:
|
||||
eventsListView.ListViewItemSorter = new LviTextColumnComparer(sortColumn, sortOrder);
|
||||
break;
|
||||
}
|
||||
|
||||
eventsListView.SetSortIcon(sortColumn, sortOrder);
|
||||
eventsListView.Sort();
|
||||
}
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.EventLogs
|
||||
{
|
||||
partial class EventLogsTabPageCtrl
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EventLogsTabPageCtrl));
|
||||
this.eventsListView = new Common.UIControls.ListViewEx();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// eventsListView
|
||||
//
|
||||
this.eventsListView.AllowColumnReorder = true;
|
||||
resources.ApplyResources(this.eventsListView, "eventsListView");
|
||||
this.eventsListView.DoubleClickActivation = false;
|
||||
this.eventsListView.FullRowSelect = true;
|
||||
this.eventsListView.GridLines = true;
|
||||
this.eventsListView.Name = "eventsListView";
|
||||
this.eventsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.eventsListView.View = System.Windows.Forms.View.Details;
|
||||
this.eventsListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.eventsListView_ColumnClick);
|
||||
//
|
||||
// EventLogsTabPageCtrl
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Silver;
|
||||
this.Controls.Add(this.eventsListView);
|
||||
this.Name = "EventLogsTabPageCtrl";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Common.UIControls.ListViewEx eventsListView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="eventsListView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="eventsListView.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="eventsListView.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>965, 689</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="eventsListView.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>eventsListView.Name" xml:space="preserve">
|
||||
<value>eventsListView</value>
|
||||
</data>
|
||||
<data name=">>eventsListView.Type" xml:space="preserve">
|
||||
<value>Common.UIControls.ListViewEx, Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>eventsListView.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>eventsListView.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">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>965, 689</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>EventLogsTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
-103
@@ -1,103 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Logs
|
||||
{
|
||||
partial class LogsTabPageCtrl
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LogsTabPageCtrl));
|
||||
this.logTextBox = new System.Windows.Forms.TextBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.logsTextBox = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// logTextBox
|
||||
//
|
||||
resources.ApplyResources(this.logTextBox, "logTextBox");
|
||||
this.logTextBox.Name = "logTextBox";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer, "splitContainer");
|
||||
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.splitContainer.Panel1.Controls.Add(this.clearButton);
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.logsTextBox);
|
||||
//
|
||||
// logsTextBox
|
||||
//
|
||||
this.logsTextBox.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.logsTextBox, "logsTextBox");
|
||||
this.logsTextBox.Name = "logsTextBox";
|
||||
//
|
||||
// LogsTabPageCtrl
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Silver;
|
||||
this.Controls.Add(this.splitContainer);
|
||||
this.Controls.Add(this.logTextBox);
|
||||
this.Name = "LogsTabPageCtrl";
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox logTextBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainer;
|
||||
private System.Windows.Forms.TextBox logsTextBox;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.UI.Logs
|
||||
{
|
||||
public partial class LogsTabPageCtrl : UserControl
|
||||
{
|
||||
public LogsTabPageCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
|
||||
Bridge.LogHandler += delegate(object sender, LogEventArgs args)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new EventHandler<LogEventArgs>(OnLog), sender, args);
|
||||
}
|
||||
else OnLog(sender, args);
|
||||
};
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
logsTextBox.Clear();
|
||||
}
|
||||
|
||||
void OnLog(object sender, LogEventArgs args)
|
||||
{
|
||||
logsTextBox.AppendText(args.LogMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+59
-30
@@ -62,8 +62,10 @@ namespace TBF.UI
|
||||
this.resultsTabPageCtrl = new TBF.UI.ResultsMI.ResultsTabPageCtrl();
|
||||
this.graphsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.graphsTabPageCtrl = new TBF.UI.Graphs.GraphsTabPageCtrl();
|
||||
this.logsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.logsTabPageCtrl = new TBF.UI.Logs.LogsTabPageCtrl();
|
||||
this.eventLogsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.eventLogsTabPageCtrl = new TBF.UI.EventLogs.EventLogsTabPageCtrl();
|
||||
this.calendarTabPage = new System.Windows.Forms.TabPage();
|
||||
this.calendarTabPageCtrl = new TBF.UI.Calendar.CalendarTabPageCtrl();
|
||||
this.picturesTabPage = new System.Windows.Forms.TabPage();
|
||||
this.picturesTabPageCtrl = new TBF.UI.Camera.PicturesTabPageCtrl();
|
||||
this.rightHorizSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
@@ -85,8 +87,8 @@ namespace TBF.UI
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.homeTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resultsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.logsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.eventLogsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.settingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.usersTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.languageTSMItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.databaseSettingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -104,6 +106,7 @@ namespace TBF.UI
|
||||
this.processToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.graphsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.calendarTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.topVerticalSplitContainer)).BeginInit();
|
||||
this.topVerticalSplitContainer.Panel1.SuspendLayout();
|
||||
this.topVerticalSplitContainer.Panel2.SuspendLayout();
|
||||
@@ -133,7 +136,8 @@ namespace TBF.UI
|
||||
this.processTabPage.SuspendLayout();
|
||||
this.resultsTabPage.SuspendLayout();
|
||||
this.graphsTabPage.SuspendLayout();
|
||||
this.logsTabPage.SuspendLayout();
|
||||
this.eventLogsTabPage.SuspendLayout();
|
||||
this.calendarTabPage.SuspendLayout();
|
||||
this.picturesTabPage.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightHorizSplitContainer)).BeginInit();
|
||||
this.rightHorizSplitContainer.Panel1.SuspendLayout();
|
||||
@@ -277,7 +281,8 @@ namespace TBF.UI
|
||||
this.mainTabControl.Controls.Add(this.insertTabPage);
|
||||
this.mainTabControl.Controls.Add(this.resultsTabPage);
|
||||
this.mainTabControl.Controls.Add(this.graphsTabPage);
|
||||
this.mainTabControl.Controls.Add(this.logsTabPage);
|
||||
this.mainTabControl.Controls.Add(this.eventLogsTabPage);
|
||||
this.mainTabControl.Controls.Add(this.calendarTabPage);
|
||||
this.mainTabControl.Controls.Add(this.picturesTabPage);
|
||||
resources.ApplyResources(this.mainTabControl, "mainTabControl");
|
||||
this.mainTabControl.Name = "mainTabControl";
|
||||
@@ -342,18 +347,31 @@ namespace TBF.UI
|
||||
resources.ApplyResources(this.graphsTabPageCtrl, "graphsTabPageCtrl");
|
||||
this.graphsTabPageCtrl.Name = "graphsTabPageCtrl";
|
||||
//
|
||||
// logsTabPage
|
||||
// eventLogsTabPage
|
||||
//
|
||||
this.logsTabPage.Controls.Add(this.logsTabPageCtrl);
|
||||
resources.ApplyResources(this.logsTabPage, "logsTabPage");
|
||||
this.logsTabPage.Name = "logsTabPage";
|
||||
this.logsTabPage.UseVisualStyleBackColor = true;
|
||||
this.eventLogsTabPage.Controls.Add(this.eventLogsTabPageCtrl);
|
||||
resources.ApplyResources(this.eventLogsTabPage, "eventLogsTabPage");
|
||||
this.eventLogsTabPage.Name = "eventLogsTabPage";
|
||||
this.eventLogsTabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// logsTabPageCtrl
|
||||
// eventLogsTabPageCtrl
|
||||
//
|
||||
this.logsTabPageCtrl.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.logsTabPageCtrl, "logsTabPageCtrl");
|
||||
this.logsTabPageCtrl.Name = "logsTabPageCtrl";
|
||||
this.eventLogsTabPageCtrl.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.eventLogsTabPageCtrl, "eventLogsTabPageCtrl");
|
||||
this.eventLogsTabPageCtrl.Name = "eventLogsTabPageCtrl";
|
||||
//
|
||||
// calendarTabPage
|
||||
//
|
||||
this.calendarTabPage.Controls.Add(this.calendarTabPageCtrl);
|
||||
resources.ApplyResources(this.calendarTabPage, "calendarTabPage");
|
||||
this.calendarTabPage.Name = "calendarTabPage";
|
||||
this.calendarTabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// calendarTabPageCtrl
|
||||
//
|
||||
this.calendarTabPageCtrl.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.calendarTabPageCtrl, "calendarTabPageCtrl");
|
||||
this.calendarTabPageCtrl.Name = "calendarTabPageCtrl";
|
||||
//
|
||||
// picturesTabPage
|
||||
//
|
||||
@@ -492,15 +510,15 @@ namespace TBF.UI
|
||||
this.resultsTSMenuItem.Name = "resultsTSMenuItem";
|
||||
resources.ApplyResources(this.resultsTSMenuItem, "resultsTSMenuItem");
|
||||
//
|
||||
// logsTSMenuItem
|
||||
// eventLogsTSMenuItem
|
||||
//
|
||||
this.logsTSMenuItem.Name = "logsTSMenuItem";
|
||||
resources.ApplyResources(this.logsTSMenuItem, "logsTSMenuItem");
|
||||
this.logsTSMenuItem.Click += new System.EventHandler(this.logsTSMenuItem_Click);
|
||||
this.eventLogsTSMenuItem.Name = "eventLogsTSMenuItem";
|
||||
resources.ApplyResources(this.eventLogsTSMenuItem, "eventLogsTSMenuItem");
|
||||
this.eventLogsTSMenuItem.Click += new System.EventHandler(this.eventsTSMenuItem_Click);
|
||||
//
|
||||
// editTSMenuItem
|
||||
// settingsTSMenuItem
|
||||
//
|
||||
this.editTSMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.settingsTSMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.usersTSMenuItem,
|
||||
this.languageTSMItem,
|
||||
this.databaseSettingsTSMenuItem,
|
||||
@@ -509,8 +527,8 @@ namespace TBF.UI
|
||||
this.upgradeTSMenuItem,
|
||||
this.iPerlHeadsToolStripMenuItem,
|
||||
this.clearCountersToolStripMenuItem});
|
||||
this.editTSMenuItem.Name = "editTSMenuItem";
|
||||
resources.ApplyResources(this.editTSMenuItem, "editTSMenuItem");
|
||||
this.settingsTSMenuItem.Name = "settingsTSMenuItem";
|
||||
resources.ApplyResources(this.settingsTSMenuItem, "settingsTSMenuItem");
|
||||
//
|
||||
// usersTSMenuItem
|
||||
//
|
||||
@@ -596,8 +614,9 @@ namespace TBF.UI
|
||||
this.processToolStripMenuItem,
|
||||
this.resultsToolStripMenuItem,
|
||||
this.graphsToolStripMenuItem,
|
||||
this.logsTSMenuItem,
|
||||
this.editTSMenuItem,
|
||||
this.eventLogsTSMenuItem,
|
||||
this.calendarTSMenuItem,
|
||||
this.settingsTSMenuItem,
|
||||
this.helpTSMenuItem});
|
||||
resources.ApplyResources(this.mainMenuStrip, "mainMenuStrip");
|
||||
this.mainMenuStrip.Name = "mainMenuStrip";
|
||||
@@ -626,6 +645,12 @@ namespace TBF.UI
|
||||
resources.ApplyResources(this.graphsToolStripMenuItem, "graphsToolStripMenuItem");
|
||||
this.graphsToolStripMenuItem.Click += new System.EventHandler(this.graphsToolStripMenuItem_Click);
|
||||
//
|
||||
// calendarTSMenuItem
|
||||
//
|
||||
this.calendarTSMenuItem.Name = "calendarTSMenuItem";
|
||||
resources.ApplyResources(this.calendarTSMenuItem, "calendarTSMenuItem");
|
||||
this.calendarTSMenuItem.Click += new System.EventHandler(this.calendarTSMenuItem_Click);
|
||||
//
|
||||
// MainWnd
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -671,7 +696,8 @@ namespace TBF.UI
|
||||
this.processTabPage.ResumeLayout(false);
|
||||
this.resultsTabPage.ResumeLayout(false);
|
||||
this.graphsTabPage.ResumeLayout(false);
|
||||
this.logsTabPage.ResumeLayout(false);
|
||||
this.eventLogsTabPage.ResumeLayout(false);
|
||||
this.calendarTabPage.ResumeLayout(false);
|
||||
this.picturesTabPage.ResumeLayout(false);
|
||||
this.rightHorizSplitContainer.Panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightHorizSplitContainer)).EndInit();
|
||||
@@ -692,14 +718,15 @@ namespace TBF.UI
|
||||
private System.Windows.Forms.TabPage measurementTabPage;
|
||||
private System.Windows.Forms.TabPage insertTabPage;
|
||||
private System.Windows.Forms.TabPage resultsTabPage;
|
||||
private System.Windows.Forms.TabPage logsTabPage;
|
||||
private System.Windows.Forms.TabPage eventLogsTabPage;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel userInfoStatusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel statusPStatusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel routeStatusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel activityStatusLabel;
|
||||
private TBF.UI.ResultsMI.ResultsTabPageCtrl resultsTabPageCtrl;
|
||||
private Logs.LogsTabPageCtrl logsTabPageCtrl;
|
||||
private EventLogs.EventLogsTabPageCtrl eventLogsTabPageCtrl;
|
||||
private Calendar.CalendarTabPageCtrl calendarTabPageCtrl;
|
||||
|
||||
#if DN100
|
||||
private ControlCom2VB.ControlCom2panel ctrlBrdComponent;
|
||||
@@ -730,8 +757,8 @@ namespace TBF.UI
|
||||
private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem homeTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem resultsTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem logsTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem editTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem eventLogsTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem usersTSMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem languageTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem databaseSettingsTSMenuItem;
|
||||
@@ -778,6 +805,8 @@ namespace TBF.UI
|
||||
private System.Windows.Forms.ToolStripMenuItem backUpResultsTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem benchTestProfilesTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem benchUncertaintyTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem calendarTSMenuItem;
|
||||
private System.Windows.Forms.TabPage calendarTabPage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-12
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -64,8 +64,9 @@ namespace TBF.UI
|
||||
Insert,
|
||||
Results,
|
||||
Graphs,
|
||||
Logs,
|
||||
Camera,
|
||||
Events,
|
||||
Calendar,
|
||||
Camera,
|
||||
TabPagesCount
|
||||
}
|
||||
|
||||
@@ -76,7 +77,8 @@ namespace TBF.UI
|
||||
private void processTSMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Process); }
|
||||
private void resultsTSMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Results); }
|
||||
private void graphsToolStripMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Graphs); }
|
||||
private void logsTSMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Logs); }
|
||||
private void eventsTSMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Events); }
|
||||
private void calendarTSMenuItem_Click(object sender, EventArgs e) { mainTabControl.SelectTab((int)MainTabPageId.Calendar); }
|
||||
|
||||
#if CAMERA
|
||||
private System.Windows.Forms.ToolStripMenuItem cameraTSMItem;
|
||||
@@ -97,6 +99,11 @@ namespace TBF.UI
|
||||
///
|
||||
/// Customize menu items
|
||||
///
|
||||
graphsToolStripMenuItem.Text = Strings.Graphs;
|
||||
eventLogsTSMenuItem.Text = Strings.Event_logs;
|
||||
calendarTSMenuItem.Text = Strings.Calendar;
|
||||
settingsTSMenuItem.Text = Strings.Settings;
|
||||
helpTSMenuItem.Text = Strings.Help;
|
||||
#if CAMERA
|
||||
/// Add 'Camera' menu item
|
||||
cameraTSMItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -107,13 +114,6 @@ namespace TBF.UI
|
||||
|
||||
mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.cameraTSMItem});
|
||||
#endif
|
||||
|
||||
#if NO_GRAPHS
|
||||
graphsToolStripMenuItem.Visible = false;
|
||||
#else
|
||||
graphsToolStripMenuItem.Text = Strings.Graphs;
|
||||
#endif
|
||||
|
||||
UpdateMenuItemsVisibility();
|
||||
|
||||
#if IPERL
|
||||
@@ -309,11 +309,26 @@ namespace TBF.UI
|
||||
|
||||
/// Select the initial tab page
|
||||
mainTabControl.SelectTab((int)MainTabPageId.Process); /// This is to load the 'Process screen'
|
||||
UpdateUser();
|
||||
mainTabControl.SelectTab((int)MainTabPageId.Calendar); /// This is to load the 'Calendar screen'
|
||||
UpdateUser();
|
||||
mainTabControl.SelectTab((int)MainTabPageId.Hydraulics);
|
||||
|
||||
if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.StartingUp)
|
||||
{
|
||||
///
|
||||
/// Populate calendar with calendar events from components
|
||||
///
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
foreach (var cmpnt in TBF.BenchControl.StateMachine.Components)
|
||||
{
|
||||
TBF.BenchControl.GenericDevices.IHasCalendarEvents cmpntWithCalEvents = cmpnt as TBF.BenchControl.GenericDevices.IHasCalendarEvents;
|
||||
if (cmpntWithCalEvents != null)
|
||||
{
|
||||
foreach (var evnt in cmpntWithCalEvents.GetCalendarEvents()) calendarEvents.Add(evnt);
|
||||
}
|
||||
}
|
||||
calendarTabPageCtrl.StartCalendar(calendarEvents);
|
||||
|
||||
BenchControl.StateMachine.Start();
|
||||
log.Info("Test bench started");
|
||||
}
|
||||
|
||||
+110
-47
@@ -652,7 +652,7 @@
|
||||
<value>processTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>processTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Process.ProcessTabPageCtrl6, TBF, Version=2.24.1320.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Process.ProcessTabPageCtrl6, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>processTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>processTabPage</value>
|
||||
@@ -730,7 +730,7 @@
|
||||
<value>resultsTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>resultsTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=2.24.1320.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>resultsTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>resultsTabPage</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>graphsTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>graphsTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=2.24.1320.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>graphsTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>graphsTabPage</value>
|
||||
@@ -813,60 +813,111 @@
|
||||
<data name=">>graphsTabPage.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<data name="eventLogsTabPageCtrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<data name="eventLogsTabPageCtrl.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="eventLogsTabPageCtrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<data name="eventLogsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="eventLogsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1012, 523</value>
|
||||
</data>
|
||||
<data name="logsTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="eventLogsTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>logsTabPageCtrl.Name" xml:space="preserve">
|
||||
<value>logsTabPageCtrl</value>
|
||||
<data name=">>eventLogsTabPageCtrl.Name" xml:space="preserve">
|
||||
<value>eventLogsTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>logsTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Logs.LogsTabPageCtrl, TBF, Version=2.24.1320.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<data name=">>eventLogsTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>logsTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>logsTabPage</value>
|
||||
<data name=">>eventLogsTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>eventLogsTabPage</value>
|
||||
</data>
|
||||
<data name=">>logsTabPageCtrl.ZOrder" xml:space="preserve">
|
||||
<data name=">>eventLogsTabPageCtrl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="logsTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="eventLogsTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 5</value>
|
||||
</data>
|
||||
<data name="logsTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="eventLogsTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1012, 523</value>
|
||||
</data>
|
||||
<data name="logsTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="eventLogsTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="logsTabPage.Text" xml:space="preserve">
|
||||
<data name="eventLogsTabPage.Text" xml:space="preserve">
|
||||
<value>Logs</value>
|
||||
</data>
|
||||
<data name=">>logsTabPage.Name" xml:space="preserve">
|
||||
<value>logsTabPage</value>
|
||||
<data name=">>eventLogsTabPage.Name" xml:space="preserve">
|
||||
<value>eventLogsTabPage</value>
|
||||
</data>
|
||||
<data name=">>logsTabPage.Type" xml:space="preserve">
|
||||
<data name=">>eventLogsTabPage.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>logsTabPage.Parent" xml:space="preserve">
|
||||
<data name=">>eventLogsTabPage.Parent" xml:space="preserve">
|
||||
<value>mainTabControl</value>
|
||||
</data>
|
||||
<data name=">>logsTabPage.ZOrder" xml:space="preserve">
|
||||
<data name=">>eventLogsTabPage.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="calendarTabPageCtrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="calendarTabPageCtrl.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt</value>
|
||||
</data>
|
||||
<data name="calendarTabPageCtrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="calendarTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1012, 523</value>
|
||||
</data>
|
||||
<data name="calendarTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPageCtrl.Name" xml:space="preserve">
|
||||
<value>calendarTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>calendarTabPage</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPageCtrl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="calendarTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 5</value>
|
||||
</data>
|
||||
<data name="calendarTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1012, 523</value>
|
||||
</data>
|
||||
<data name="calendarTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="calendarTabPage.Text" xml:space="preserve">
|
||||
<value>tabPage1</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPage.Name" xml:space="preserve">
|
||||
<value>calendarTabPage</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPage.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPage.Parent" xml:space="preserve">
|
||||
<value>mainTabControl</value>
|
||||
</data>
|
||||
<data name=">>calendarTabPage.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="picturesTabPageCtrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
@@ -886,7 +937,7 @@
|
||||
<value>picturesTabPageCtrl</value>
|
||||
</data>
|
||||
<data name=">>picturesTabPageCtrl.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=2.24.1320.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>picturesTabPageCtrl.Parent" xml:space="preserve">
|
||||
<value>picturesTabPage</value>
|
||||
@@ -916,7 +967,7 @@
|
||||
<value>mainTabControl</value>
|
||||
</data>
|
||||
<data name=">>picturesTabPage.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="mainTabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
@@ -1165,46 +1216,46 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="benchComponentsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchComponentsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Components</value>
|
||||
</data>
|
||||
<data name="benchPathsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchPathsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Paths</value>
|
||||
</data>
|
||||
<data name="benchTransitionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchTransitionsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Transitions</value>
|
||||
</data>
|
||||
<data name="benchMetrologyTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchMetrologyTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Metrology</value>
|
||||
</data>
|
||||
<data name="benchUncertaintyTSMItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchUncertaintyTSMItem.Text" xml:space="preserve">
|
||||
<value>Uncertainty</value>
|
||||
</data>
|
||||
<data name="benchTestProfilesTSMItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="benchTestProfilesTSMItem.Text" xml:space="preserve">
|
||||
<value>Test profiles</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>149, 6</value>
|
||||
<value>140, 6</value>
|
||||
</data>
|
||||
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>143, 22</value>
|
||||
</data>
|
||||
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Exit</value>
|
||||
@@ -1227,11 +1278,11 @@
|
||||
<data name="resultsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Results</value>
|
||||
</data>
|
||||
<data name="logsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 20</value>
|
||||
<data name="eventLogsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 20</value>
|
||||
</data>
|
||||
<data name="logsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Logs</value>
|
||||
<data name="eventLogsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Event logs</value>
|
||||
</data>
|
||||
<data name="usersTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
@@ -1293,10 +1344,10 @@
|
||||
<data name="clearCountersToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Clear Counters</value>
|
||||
</data>
|
||||
<data name="editTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="settingsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 20</value>
|
||||
</data>
|
||||
<data name="editTSMenuItem.Text" xml:space="preserve">
|
||||
<data name="settingsTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="aboutTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
@@ -1338,6 +1389,12 @@
|
||||
<data name="graphsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Graphs</value>
|
||||
</data>
|
||||
<data name="calendarTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 20</value>
|
||||
</data>
|
||||
<data name="calendarTSMenuItem.Text" xml:space="preserve">
|
||||
<value>Calendar</value>
|
||||
</data>
|
||||
<data name="mainMenuStrip.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
@@ -1467,16 +1524,16 @@
|
||||
<data name=">>resultsTSMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>logsTSMenuItem.Name" xml:space="preserve">
|
||||
<value>logsTSMenuItem</value>
|
||||
<data name=">>eventLogsTSMenuItem.Name" xml:space="preserve">
|
||||
<value>eventLogsTSMenuItem</value>
|
||||
</data>
|
||||
<data name=">>logsTSMenuItem.Type" xml:space="preserve">
|
||||
<data name=">>eventLogsTSMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>editTSMenuItem.Name" xml:space="preserve">
|
||||
<value>editTSMenuItem</value>
|
||||
<data name=">>settingsTSMenuItem.Name" xml:space="preserve">
|
||||
<value>settingsTSMenuItem</value>
|
||||
</data>
|
||||
<data name=">>editTSMenuItem.Type" xml:space="preserve">
|
||||
<data name=">>settingsTSMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>usersTSMenuItem.Name" xml:space="preserve">
|
||||
@@ -1575,6 +1632,12 @@
|
||||
<data name=">>graphsToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>calendarTSMenuItem.Name" xml:space="preserve">
|
||||
<value>calendarTSMenuItem</value>
|
||||
</data>
|
||||
<data name=">>calendarTSMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainWnd</value>
|
||||
</data>
|
||||
|
||||
+55
-20
@@ -35,6 +35,8 @@ namespace TBF.UI.Procedures
|
||||
this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.tabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTabPage = new System.Windows.Forms.TabPage();
|
||||
this.testProfileTextBox = new System.Windows.Forms.TextBox();
|
||||
this.testProfileLabel = new System.Windows.Forms.Label();
|
||||
this.altProcPeriodTextBox = new System.Windows.Forms.TextBox();
|
||||
this.altProcPeriodLabel = new System.Windows.Forms.Label();
|
||||
this.altProcNameTextBox = new System.Windows.Forms.TextBox();
|
||||
@@ -56,8 +58,8 @@ namespace TBF.UI.Procedures
|
||||
this.fileWriter1ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.printer1ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.dataEntryComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.resultsWriterLabel = new System.Windows.Forms.Label();
|
||||
this.resultsPrinterLabel = new System.Windows.Forms.Label();
|
||||
this.fileWritersLabel = new System.Windows.Forms.Label();
|
||||
this.printersLabel = new System.Windows.Forms.Label();
|
||||
this.dataEntryLabel = new System.Windows.Forms.Label();
|
||||
this.notesTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
@@ -86,8 +88,10 @@ namespace TBF.UI.Procedures
|
||||
this.parametersTabPage = new System.Windows.Forms.TabPage();
|
||||
this.parametersListViewEx = new Results.Forms.ListViewEx();
|
||||
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
|
||||
this.testProfileLabel = new System.Windows.Forms.Label();
|
||||
this.testProfileTextBox = new System.Windows.Forms.TextBox();
|
||||
this.eventTrigger2ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.eventTrigger1ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.eventTriggersLabel = new System.Windows.Forms.Label();
|
||||
this.eventTrigger3ComboBox = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
|
||||
this.mainSplitContainer.Panel1.SuspendLayout();
|
||||
this.mainSplitContainer.Panel2.SuspendLayout();
|
||||
@@ -130,6 +134,10 @@ namespace TBF.UI.Procedures
|
||||
//
|
||||
// generalTabPage
|
||||
//
|
||||
this.generalTabPage.Controls.Add(this.eventTrigger3ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.eventTrigger2ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.eventTrigger1ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.eventTriggersLabel);
|
||||
this.generalTabPage.Controls.Add(this.testProfileTextBox);
|
||||
this.generalTabPage.Controls.Add(this.testProfileLabel);
|
||||
this.generalTabPage.Controls.Add(this.altProcPeriodTextBox);
|
||||
@@ -153,8 +161,8 @@ namespace TBF.UI.Procedures
|
||||
this.generalTabPage.Controls.Add(this.fileWriter1ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.printer1ComboBox);
|
||||
this.generalTabPage.Controls.Add(this.dataEntryComboBox);
|
||||
this.generalTabPage.Controls.Add(this.resultsWriterLabel);
|
||||
this.generalTabPage.Controls.Add(this.resultsPrinterLabel);
|
||||
this.generalTabPage.Controls.Add(this.fileWritersLabel);
|
||||
this.generalTabPage.Controls.Add(this.printersLabel);
|
||||
this.generalTabPage.Controls.Add(this.dataEntryLabel);
|
||||
this.generalTabPage.Controls.Add(this.notesTextBox);
|
||||
this.generalTabPage.Controls.Add(this.label18);
|
||||
@@ -176,6 +184,16 @@ namespace TBF.UI.Procedures
|
||||
this.generalTabPage.Name = "generalTabPage";
|
||||
this.generalTabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// testProfileTextBox
|
||||
//
|
||||
resources.ApplyResources(this.testProfileTextBox, "testProfileTextBox");
|
||||
this.testProfileTextBox.Name = "testProfileTextBox";
|
||||
//
|
||||
// testProfileLabel
|
||||
//
|
||||
resources.ApplyResources(this.testProfileLabel, "testProfileLabel");
|
||||
this.testProfileLabel.Name = "testProfileLabel";
|
||||
//
|
||||
// altProcPeriodTextBox
|
||||
//
|
||||
resources.ApplyResources(this.altProcPeriodTextBox, "altProcPeriodTextBox");
|
||||
@@ -299,15 +317,15 @@ namespace TBF.UI.Procedures
|
||||
resources.ApplyResources(this.dataEntryComboBox, "dataEntryComboBox");
|
||||
this.dataEntryComboBox.Name = "dataEntryComboBox";
|
||||
//
|
||||
// resultsWriterLabel
|
||||
// fileWritersLabel
|
||||
//
|
||||
resources.ApplyResources(this.resultsWriterLabel, "resultsWriterLabel");
|
||||
this.resultsWriterLabel.Name = "resultsWriterLabel";
|
||||
resources.ApplyResources(this.fileWritersLabel, "fileWritersLabel");
|
||||
this.fileWritersLabel.Name = "fileWritersLabel";
|
||||
//
|
||||
// resultsPrinterLabel
|
||||
// printersLabel
|
||||
//
|
||||
resources.ApplyResources(this.resultsPrinterLabel, "resultsPrinterLabel");
|
||||
this.resultsPrinterLabel.Name = "resultsPrinterLabel";
|
||||
resources.ApplyResources(this.printersLabel, "printersLabel");
|
||||
this.printersLabel.Name = "printersLabel";
|
||||
//
|
||||
// dataEntryLabel
|
||||
//
|
||||
@@ -493,15 +511,28 @@ namespace TBF.UI.Procedures
|
||||
resources.ApplyResources(this.sharedButtons, "sharedButtons");
|
||||
this.sharedButtons.Name = "sharedButtons";
|
||||
//
|
||||
// testProfileLabel
|
||||
// eventTrigger2ComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testProfileLabel, "testProfileLabel");
|
||||
this.testProfileLabel.Name = "testProfileLabel";
|
||||
this.eventTrigger2ComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.eventTrigger2ComboBox, "eventTrigger2ComboBox");
|
||||
this.eventTrigger2ComboBox.Name = "eventTrigger2ComboBox";
|
||||
//
|
||||
// testProfileTextBox
|
||||
// eventTrigger1ComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testProfileTextBox, "testProfileTextBox");
|
||||
this.testProfileTextBox.Name = "testProfileTextBox";
|
||||
this.eventTrigger1ComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.eventTrigger1ComboBox, "eventTrigger1ComboBox");
|
||||
this.eventTrigger1ComboBox.Name = "eventTrigger1ComboBox";
|
||||
//
|
||||
// eventTriggersLabel
|
||||
//
|
||||
resources.ApplyResources(this.eventTriggersLabel, "eventTriggersLabel");
|
||||
this.eventTriggersLabel.Name = "eventTriggersLabel";
|
||||
//
|
||||
// eventTrigger3ComboBox
|
||||
//
|
||||
this.eventTrigger3ComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.eventTrigger3ComboBox, "eventTrigger3ComboBox");
|
||||
this.eventTrigger3ComboBox.Name = "eventTrigger3ComboBox";
|
||||
//
|
||||
// ProcedureDlg
|
||||
//
|
||||
@@ -543,8 +574,8 @@ namespace TBF.UI.Procedures
|
||||
private System.Windows.Forms.ComboBox fileWriter1ComboBox;
|
||||
private System.Windows.Forms.ComboBox printer1ComboBox;
|
||||
private System.Windows.Forms.ComboBox dataEntryComboBox;
|
||||
private System.Windows.Forms.Label resultsWriterLabel;
|
||||
private System.Windows.Forms.Label resultsPrinterLabel;
|
||||
private System.Windows.Forms.Label fileWritersLabel;
|
||||
private System.Windows.Forms.Label printersLabel;
|
||||
private System.Windows.Forms.Label dataEntryLabel;
|
||||
private System.Windows.Forms.TextBox notesTextBox;
|
||||
private System.Windows.Forms.Label label18;
|
||||
@@ -584,5 +615,9 @@ namespace TBF.UI.Procedures
|
||||
private System.Windows.Forms.Label altProcPeriodLabel;
|
||||
private System.Windows.Forms.Label testProfileLabel;
|
||||
private System.Windows.Forms.TextBox testProfileTextBox;
|
||||
private System.Windows.Forms.ComboBox eventTrigger2ComboBox;
|
||||
private System.Windows.Forms.ComboBox eventTrigger1ComboBox;
|
||||
private System.Windows.Forms.Label eventTriggersLabel;
|
||||
private System.Windows.Forms.ComboBox eventTrigger3ComboBox;
|
||||
}
|
||||
}
|
||||
@@ -141,6 +141,9 @@ namespace TBF.UI.Procedures
|
||||
fileWriter2ComboBox.Items.Add("---");
|
||||
fileWriter3ComboBox.Items.Add("---");
|
||||
fileWriter4ComboBox.Items.Add("---");
|
||||
eventTrigger1ComboBox.Items.Add("---");
|
||||
eventTrigger2ComboBox.Items.Add("---");
|
||||
eventTrigger3ComboBox.Items.Add("---");
|
||||
|
||||
foreach (var cmpnt in TbfComponents)
|
||||
{
|
||||
@@ -159,7 +162,13 @@ namespace TBF.UI.Procedures
|
||||
fileWriter3ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
fileWriter4ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
}
|
||||
}
|
||||
if (cmpnt is IEventTrigger)
|
||||
{
|
||||
eventTrigger1ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
eventTrigger2ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
eventTrigger3ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Loads paths, this must be done before PrepareMetrology12AndProcessTabs() call
|
||||
@@ -351,6 +360,9 @@ namespace TBF.UI.Procedures
|
||||
fileWriter2ComboBox.Enabled = false;
|
||||
fileWriter3ComboBox.Enabled = false;
|
||||
fileWriter4ComboBox.Enabled = false;
|
||||
eventTrigger1ComboBox.Enabled = false;
|
||||
eventTrigger2ComboBox.Enabled = false;
|
||||
eventTrigger3ComboBox.Enabled = false;
|
||||
metersKindRadioButton1.Enabled = false;
|
||||
metersKindRadioButton2.Enabled = false;
|
||||
metersKindRadioButton3.Enabled = false;
|
||||
@@ -424,8 +436,9 @@ namespace TBF.UI.Procedures
|
||||
dataEntryLabel.Text = Strings.Data_entry;
|
||||
transitionStartLabel.Text = Strings.Purge_Begin;
|
||||
transitionEndLabel.Text = Strings.Purge_End;
|
||||
resultsPrinterLabel.Text = Strings.Printing;
|
||||
resultsWriterLabel.Text = Strings.Saving_results;
|
||||
printersLabel.Text = Strings.Printing;
|
||||
fileWritersLabel.Text = Strings.Saving_results;
|
||||
eventTriggersLabel.Text = Strings.Event_triggers;
|
||||
|
||||
metersKindRadioButton1.Text = Strings.SingleBtnText;
|
||||
metersKindRadioButton2.Text = Strings.Compound;
|
||||
@@ -487,6 +500,20 @@ namespace TBF.UI.Procedures
|
||||
fileWriter4ComboBox.Text = (fields.Length >= 4) ? fields[3] : "---";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(LoadedProcedure.EventTriggers))
|
||||
{
|
||||
eventTrigger1ComboBox.Text = "---";
|
||||
eventTrigger2ComboBox.Text = "---";
|
||||
eventTrigger3ComboBox.Text = "---";
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] fields = LoadedProcedure.EventTriggers.Split(new char[] { '~' });
|
||||
eventTrigger1ComboBox.Text = fields[0];
|
||||
eventTrigger2ComboBox.Text = (fields.Length >= 2) ? fields[1] : "---";
|
||||
eventTrigger3ComboBox.Text = (fields.Length >= 3) ? fields[2] : "---";
|
||||
}
|
||||
|
||||
metersKindRadioButton1.Checked = (LoadedProcedure.MetersKind == MetersKind.Single
|
||||
|| (LoadedProcedure.MetersKind != MetersKind.Combined && LoadedProcedure.MetersKind != MetersKind.HeatMeter));
|
||||
metersKindRadioButton2.Checked = (LoadedProcedure.MetersKind == MetersKind.Combined);
|
||||
@@ -524,6 +551,9 @@ namespace TBF.UI.Procedures
|
||||
LoadedProcedure.DataEntry = dataEntryComboBox.Text.Equals("---") ? string.Empty : dataEntryComboBox.Text;
|
||||
}
|
||||
|
||||
///
|
||||
/// Printers
|
||||
///
|
||||
if (printer1ComboBox.Items.Contains(printer1ComboBox.Text) && printer2ComboBox.Items.Contains(printer2ComboBox.Text))
|
||||
{
|
||||
bool pr = !printer1ComboBox.Text.Equals("---");
|
||||
@@ -535,39 +565,73 @@ namespace TBF.UI.Procedures
|
||||
else LoadedProcedure.ResultsPrinter = printer1ComboBox.Text + '~' + printer2ComboBox.Text;
|
||||
}
|
||||
|
||||
if (fileWriter1ComboBox.Items.Contains(fileWriter1ComboBox.Text) &&
|
||||
fileWriter2ComboBox.Items.Contains(fileWriter2ComboBox.Text) &&
|
||||
fileWriter3ComboBox.Items.Contains(fileWriter3ComboBox.Text) &&
|
||||
fileWriter4ComboBox.Items.Contains(fileWriter4ComboBox.Text))
|
||||
///
|
||||
/// File writers
|
||||
///
|
||||
if (fileWriter1ComboBox.Items.Contains(fileWriter1ComboBox.Text) &&
|
||||
fileWriter2ComboBox.Items.Contains(fileWriter2ComboBox.Text) &&
|
||||
fileWriter3ComboBox.Items.Contains(fileWriter3ComboBox.Text) &&
|
||||
fileWriter4ComboBox.Items.Contains(fileWriter4ComboBox.Text))
|
||||
{
|
||||
bool first = true;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!fileWriter1ComboBox.Text.Equals("---"))
|
||||
{
|
||||
sb.Append(fileWriter1ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter2ComboBox.Text.Equals("---") && !fileWriter2ComboBox.Text.Equals(fileWriter1ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(fileWriter2ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter3ComboBox.Text.Equals("---") && !fileWriter3ComboBox.Text.Equals(fileWriter1ComboBox.Text)
|
||||
&& !fileWriter3ComboBox.Text.Equals(fileWriter2ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(fileWriter3ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter4ComboBox.Text.Equals("---") && !fileWriter4ComboBox.Text.Equals(fileWriter1ComboBox.Text)
|
||||
&& !fileWriter4ComboBox.Text.Equals(fileWriter2ComboBox.Text)
|
||||
&& !fileWriter4ComboBox.Text.Equals(fileWriter3ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(fileWriter4ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
LoadedProcedure.ResultsWriter = sb.ToString();
|
||||
}
|
||||
|
||||
///
|
||||
/// Event triggers
|
||||
///
|
||||
if (eventTrigger1ComboBox.Items.Contains(eventTrigger1ComboBox.Text) &&
|
||||
eventTrigger2ComboBox.Items.Contains(eventTrigger2ComboBox.Text) &&
|
||||
eventTrigger3ComboBox.Items.Contains(eventTrigger3ComboBox.Text))
|
||||
{
|
||||
bool first = true;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!fileWriter1ComboBox.Text.Equals("---"))
|
||||
if (!eventTrigger1ComboBox.Text.Equals("---"))
|
||||
{
|
||||
sb.Append(fileWriter1ComboBox.Text);
|
||||
sb.Append(eventTrigger1ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter2ComboBox.Text.Equals("---") && !fileWriter2ComboBox.Text.Equals(fileWriter1ComboBox.Text))
|
||||
if (!eventTrigger2ComboBox.Text.Equals("---") && !eventTrigger2ComboBox.Text.Equals(eventTrigger1ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(fileWriter2ComboBox.Text);
|
||||
sb.Append(eventTrigger2ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter3ComboBox.Text.Equals("---") && !fileWriter3ComboBox.Text.Equals(fileWriter1ComboBox.Text)
|
||||
&& !fileWriter3ComboBox.Text.Equals(fileWriter2ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~"); first = false;
|
||||
sb.Append(fileWriter3ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
if (!fileWriter4ComboBox.Text.Equals("---") && !fileWriter4ComboBox.Text.Equals(fileWriter1ComboBox.Text)
|
||||
&& !fileWriter4ComboBox.Text.Equals(fileWriter2ComboBox.Text)
|
||||
&& !fileWriter4ComboBox.Text.Equals(fileWriter3ComboBox.Text))
|
||||
if (!eventTrigger3ComboBox.Text.Equals("---") && !eventTrigger3ComboBox.Text.Equals(eventTrigger1ComboBox.Text)
|
||||
&& !eventTrigger3ComboBox.Text.Equals(eventTrigger2ComboBox.Text))
|
||||
{
|
||||
if (!first) sb.Append("~");
|
||||
sb.Append(fileWriter4ComboBox.Text);
|
||||
sb.Append(eventTrigger3ComboBox.Text);
|
||||
first = false;
|
||||
}
|
||||
LoadedProcedure.ResultsWriter = sb.ToString();
|
||||
LoadedProcedure.EventTriggers = sb.ToString();
|
||||
}
|
||||
|
||||
LoadedProcedure.MetersKind = (metersKindRadioButton1.Checked ? MetersKind.Single
|
||||
@@ -1846,6 +1910,9 @@ namespace TBF.UI.Procedures
|
||||
fileWriter2ComboBox.Enabled = true;
|
||||
fileWriter3ComboBox.Enabled = true;
|
||||
fileWriter4ComboBox.Enabled = true;
|
||||
eventTrigger1ComboBox.Enabled = true;
|
||||
eventTrigger2ComboBox.Enabled = true;
|
||||
eventTrigger3ComboBox.Enabled = true;
|
||||
transitionStartComboBox.Enabled = true;
|
||||
transitionEndComboBox.Enabled = true;
|
||||
notesTextBox.Enabled = true;
|
||||
|
||||
+222
-129
@@ -129,14 +129,107 @@
|
||||
<data name="mainSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="eventTrigger3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 381</value>
|
||||
</data>
|
||||
<data name="eventTrigger3ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="eventTrigger3ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger3ComboBox.Name" xml:space="preserve">
|
||||
<value>eventTrigger3ComboBox</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger3ComboBox.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=">>eventTrigger3ComboBox.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="eventTrigger2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 358</value>
|
||||
</data>
|
||||
<data name="eventTrigger2ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="eventTrigger2ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger2ComboBox.Name" xml:space="preserve">
|
||||
<value>eventTrigger2ComboBox</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger2ComboBox.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=">>eventTrigger2ComboBox.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="eventTrigger1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 335</value>
|
||||
</data>
|
||||
<data name="eventTrigger1ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="eventTrigger1ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger1ComboBox.Name" xml:space="preserve">
|
||||
<value>eventTrigger1ComboBox</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger1ComboBox.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=">>eventTrigger1ComboBox.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTrigger1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 341</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 13</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name="eventTriggersLabel.Text" xml:space="preserve">
|
||||
<value>Event triggers</value>
|
||||
</data>
|
||||
<data name=">>eventTriggersLabel.Name" xml:space="preserve">
|
||||
<value>eventTriggersLabel</value>
|
||||
</data>
|
||||
<data name=">>eventTriggersLabel.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=">>eventTriggersLabel.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>eventTriggersLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 128</value>
|
||||
<value>550, 13</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>522, 20</value>
|
||||
<value>217, 20</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
@@ -151,7 +244,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -160,7 +253,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 131</value>
|
||||
<value>438, 16</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>64, 13</value>
|
||||
@@ -181,10 +274,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 361</value>
|
||||
<value>733, 382</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>34, 20</value>
|
||||
@@ -205,7 +298,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodTextBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -214,7 +307,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>542, 364</value>
|
||||
<value>450, 385</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 13</value>
|
||||
@@ -238,10 +331,10 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 361</value>
|
||||
<value>550, 358</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 20</value>
|
||||
@@ -262,7 +355,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -271,16 +364,16 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 364</value>
|
||||
<value>450, 360</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 13</value>
|
||||
<value>84, 13</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Text" xml:space="preserve">
|
||||
<value>Alternative proc. name</value>
|
||||
<value>Alternative proc.</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -295,7 +388,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -304,7 +397,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>545, 197</value>
|
||||
<value>593, 181</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>138, 17</value>
|
||||
@@ -325,7 +418,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>manualControlDisabledCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -334,7 +427,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>545, 176</value>
|
||||
<value>593, 160</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 17</value>
|
||||
@@ -355,7 +448,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>mustBeCompleteCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -364,7 +457,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>545, 155</value>
|
||||
<value>593, 139</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>123, 17</value>
|
||||
@@ -385,7 +478,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>protectedCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -394,7 +487,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 196</value>
|
||||
<value>444, 180</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 17</value>
|
||||
@@ -415,13 +508,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton3.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 336</value>
|
||||
<value>188, 312</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>29</value>
|
||||
@@ -436,13 +529,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter4ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 312</value>
|
||||
<value>188, 289</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>28</value>
|
||||
@@ -457,13 +550,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 243</value>
|
||||
<value>188, 220</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
@@ -478,13 +571,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 289</value>
|
||||
<value>188, 266</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>27</value>
|
||||
@@ -499,7 +592,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -508,7 +601,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 175</value>
|
||||
<value>444, 159</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 17</value>
|
||||
@@ -529,7 +622,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton2.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -538,7 +631,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 154</value>
|
||||
<value>444, 138</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>54, 17</value>
|
||||
@@ -559,13 +652,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton1.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 197</value>
|
||||
<value>188, 174</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
@@ -580,7 +673,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndComboBox.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -589,7 +682,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 202</value>
|
||||
<value>20, 179</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>63, 13</value>
|
||||
@@ -610,13 +703,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndLabel.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 174</value>
|
||||
<value>188, 151</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
@@ -631,7 +724,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartComboBox.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -640,7 +733,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 177</value>
|
||||
<value>20, 154</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 13</value>
|
||||
@@ -661,13 +754,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartLabel.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 266</value>
|
||||
<value>188, 243</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
@@ -682,13 +775,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 220</value>
|
||||
<value>188, 197</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
@@ -703,13 +796,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 151</value>
|
||||
<value>188, 128</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
<value>182, 21</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
@@ -724,67 +817,67 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryComboBox.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="fileWritersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<data name="fileWritersLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 271</value>
|
||||
<data name="fileWritersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 248</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>70, 13</value>
|
||||
<data name="fileWritersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>56, 13</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="fileWritersLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.Text" xml:space="preserve">
|
||||
<value>Results writer</value>
|
||||
<data name="fileWritersLabel.Text" xml:space="preserve">
|
||||
<value>File writers</value>
|
||||
</data>
|
||||
<data name=">>resultsWriterLabel.Name" xml:space="preserve">
|
||||
<value>resultsWriterLabel</value>
|
||||
<data name=">>fileWritersLabel.Name" xml:space="preserve">
|
||||
<value>fileWritersLabel</value>
|
||||
</data>
|
||||
<data name=">>resultsWriterLabel.Type" xml:space="preserve">
|
||||
<data name=">>fileWritersLabel.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=">>resultsWriterLabel.Parent" xml:space="preserve">
|
||||
<data name=">>fileWritersLabel.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>resultsWriterLabel.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<data name=">>fileWritersLabel.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="printersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<data name="printersLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 225</value>
|
||||
<data name="printersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 202</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="printersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>42, 13</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="printersLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.Text" xml:space="preserve">
|
||||
<data name="printersLabel.Text" xml:space="preserve">
|
||||
<value>Printers</value>
|
||||
</data>
|
||||
<data name=">>resultsPrinterLabel.Name" xml:space="preserve">
|
||||
<value>resultsPrinterLabel</value>
|
||||
<data name=">>printersLabel.Name" xml:space="preserve">
|
||||
<value>printersLabel</value>
|
||||
</data>
|
||||
<data name=">>resultsPrinterLabel.Type" xml:space="preserve">
|
||||
<data name=">>printersLabel.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=">>resultsPrinterLabel.Parent" xml:space="preserve">
|
||||
<data name=">>printersLabel.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>resultsPrinterLabel.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<data name=">>printersLabel.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -793,7 +886,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>21, 154</value>
|
||||
<value>21, 131</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 13</value>
|
||||
@@ -814,16 +907,16 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryLabel.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="notesTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>393, 243</value>
|
||||
<value>402, 220</value>
|
||||
</data>
|
||||
<data name="notesTextBox.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="notesTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>317, 113</value>
|
||||
<value>365, 132</value>
|
||||
</data>
|
||||
<data name="notesTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>37</value>
|
||||
@@ -838,7 +931,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>notesTextBox.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -847,7 +940,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label18.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>331, 243</value>
|
||||
<value>399, 202</value>
|
||||
</data>
|
||||
<data name="label18.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>35, 13</value>
|
||||
@@ -868,13 +961,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label18.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="watermetersTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 105</value>
|
||||
</data>
|
||||
<data name="watermetersTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>522, 20</value>
|
||||
<value>579, 20</value>
|
||||
</data>
|
||||
<data name="watermetersTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
@@ -889,7 +982,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>watermetersTextBox.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="watermetersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -919,7 +1012,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>watermetersLabel.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="lastChangedOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 82</value>
|
||||
@@ -940,7 +1033,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -970,7 +1063,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label15.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="lastChangedByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 82</value>
|
||||
@@ -991,7 +1084,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>32</value>
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1021,7 +1114,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label16.ZOrder" xml:space="preserve">
|
||||
<value>33</value>
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name="createdOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 59</value>
|
||||
@@ -1042,7 +1135,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>34</value>
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1072,7 +1165,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label14.ZOrder" xml:space="preserve">
|
||||
<value>35</value>
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="createdByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 59</value>
|
||||
@@ -1093,7 +1186,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>36</value>
|
||||
<value>40</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1123,13 +1216,13 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>37</value>
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="descriptionTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 36</value>
|
||||
</data>
|
||||
<data name="descriptionTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>522, 20</value>
|
||||
<value>579, 20</value>
|
||||
</data>
|
||||
<data name="descriptionTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -1144,7 +1237,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>descriptionTextBox.ZOrder" xml:space="preserve">
|
||||
<value>38</value>
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1174,7 +1267,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label12.ZOrder" xml:space="preserve">
|
||||
<value>39</value>
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name="procNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 13</value>
|
||||
@@ -1195,7 +1288,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>procNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>40</value>
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1225,7 +1318,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>41</value>
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 34</value>
|
||||
@@ -1234,7 +1327,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 391</value>
|
||||
<value>923, 423</value>
|
||||
</data>
|
||||
<data name="generalTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1261,7 +1354,7 @@
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="historyListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>917, 360</value>
|
||||
<value>917, 417</value>
|
||||
</data>
|
||||
<data name="historyListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1270,7 +1363,7 @@
|
||||
<value>historyListViewEx</value>
|
||||
</data>
|
||||
<data name=">>historyListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>historyListViewEx.Parent" xml:space="preserve">
|
||||
<value>historyTabPage</value>
|
||||
@@ -1285,7 +1378,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="historyTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 423</value>
|
||||
</data>
|
||||
<data name="historyTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@@ -1312,7 +1405,7 @@
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="metrology1ListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>917, 360</value>
|
||||
<value>917, 385</value>
|
||||
</data>
|
||||
<data name="metrology1ListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1321,7 +1414,7 @@
|
||||
<value>metrology1ListViewEx</value>
|
||||
</data>
|
||||
<data name=">>metrology1ListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>metrology1ListViewEx.Parent" xml:space="preserve">
|
||||
<value>metrology1TabPage</value>
|
||||
@@ -1336,7 +1429,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="metrology1TabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="metrology1TabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@@ -1363,7 +1456,7 @@
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="metrology2ListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>917, 360</value>
|
||||
<value>917, 385</value>
|
||||
</data>
|
||||
<data name="metrology2ListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1372,7 +1465,7 @@
|
||||
<value>metrology2ListViewEx</value>
|
||||
</data>
|
||||
<data name=">>metrology2ListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>metrology2ListViewEx.Parent" xml:space="preserve">
|
||||
<value>metrology2TabPage</value>
|
||||
@@ -1387,7 +1480,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="metrology2TabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="metrology2TabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -1414,7 +1507,7 @@
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="processListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>917, 360</value>
|
||||
<value>917, 385</value>
|
||||
</data>
|
||||
<data name="processListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1423,7 +1516,7 @@
|
||||
<value>processListViewEx</value>
|
||||
</data>
|
||||
<data name=">>processListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>processListViewEx.Parent" xml:space="preserve">
|
||||
<value>processTabPage</value>
|
||||
@@ -1438,7 +1531,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="processTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="processTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
@@ -1465,7 +1558,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="parametersListViewEx.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="parametersListViewEx.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1474,7 +1567,7 @@
|
||||
<value>parametersListViewEx</value>
|
||||
</data>
|
||||
<data name=">>parametersListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>parametersListViewEx.Parent" xml:space="preserve">
|
||||
<value>parametersTabPage</value>
|
||||
@@ -1486,7 +1579,7 @@
|
||||
<value>4, 34</value>
|
||||
</data>
|
||||
<data name="parametersTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="parametersTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
@@ -1516,7 +1609,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>931, 429</value>
|
||||
<value>931, 461</value>
|
||||
</data>
|
||||
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1558,7 +1651,7 @@
|
||||
<value>sharedButtons</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
@@ -1579,7 +1672,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 429</value>
|
||||
<value>1034, 461</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>931</value>
|
||||
@@ -1606,7 +1699,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 429</value>
|
||||
<value>1034, 461</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace TBF.UI.Settings
|
||||
{
|
||||
Config.DatabaseSettings bench = new Config.DatabaseSettings();
|
||||
DatabaseSettingsDlg dlg = new DatabaseSettingsDlg(bench, Config.Data.CurrentBench.ProceduresDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString);
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.EventsDBSettings.ConnectionString);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
CurrentDBChanged |= dlg.CurrentDBChanged;
|
||||
if (dr == DialogResult.OK)
|
||||
@@ -105,7 +106,8 @@ namespace TBF.UI.Settings
|
||||
Config.DatabaseSettings bench = (Config.DatabaseSettings)ori.Clone();
|
||||
|
||||
DatabaseSettingsDlg dlg = new DatabaseSettingsDlg(bench, Config.Data.CurrentBench.ProceduresDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString);
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.EventsDBSettings.ConnectionString);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
CurrentDBChanged |= dlg.CurrentDBChanged;
|
||||
if (dr == DialogResult.OK)
|
||||
@@ -135,7 +137,8 @@ namespace TBF.UI.Settings
|
||||
{
|
||||
DatabaseSettingsDlg dlg = new DatabaseSettingsDlg(localSettings.TestBenches[testBenchesListBox.SelectedIndex],
|
||||
Config.Data.CurrentBench.ProceduresDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString);
|
||||
Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString,
|
||||
Config.Data.CurrentBench.EventsDBSettings.ConnectionString);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
CurrentDBChanged |= dlg.CurrentDBChanged;
|
||||
if (dr == DialogResult.OK)
|
||||
|
||||
+55
@@ -55,6 +55,12 @@ namespace TBF.UI.Settings
|
||||
this.usersDbConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.importResultsDbBtn = new System.Windows.Forms.Button();
|
||||
this.importConfigDbBtn = new System.Windows.Forms.Button();
|
||||
this.importEventsDbBtn = new System.Windows.Forms.Button();
|
||||
this.createEventsDbBtn = new System.Windows.Forms.Button();
|
||||
this.testConnEventsDbBtn = new System.Windows.Forms.Button();
|
||||
this.eventsDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.eventsLabel = new System.Windows.Forms.Label();
|
||||
this.eventsDbConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
@@ -196,10 +202,53 @@ namespace TBF.UI.Settings
|
||||
this.importConfigDbBtn.UseVisualStyleBackColor = true;
|
||||
this.importConfigDbBtn.Click += new System.EventHandler(this.importConfigDbBtn_Click);
|
||||
//
|
||||
// importEventsDbBtn
|
||||
//
|
||||
resources.ApplyResources(this.importEventsDbBtn, "importEventsDbBtn");
|
||||
this.importEventsDbBtn.Name = "importEventsDbBtn";
|
||||
this.importEventsDbBtn.UseVisualStyleBackColor = true;
|
||||
this.importEventsDbBtn.Click += new System.EventHandler(this.importEventsDbBtn_Click);
|
||||
//
|
||||
// createEventsDbBtn
|
||||
//
|
||||
resources.ApplyResources(this.createEventsDbBtn, "createEventsDbBtn");
|
||||
this.createEventsDbBtn.Name = "createEventsDbBtn";
|
||||
this.createEventsDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createEventsDbBtn.Click += new System.EventHandler(this.createEventsDbBtn_Click);
|
||||
//
|
||||
// testConnEventsDbBtn
|
||||
//
|
||||
resources.ApplyResources(this.testConnEventsDbBtn, "testConnEventsDbBtn");
|
||||
this.testConnEventsDbBtn.Name = "testConnEventsDbBtn";
|
||||
this.testConnEventsDbBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnEventsDbBtn.Click += new System.EventHandler(this.testConnEventsDbBtn_Click);
|
||||
//
|
||||
// eventsDbTypeComboBox
|
||||
//
|
||||
this.eventsDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.eventsDbTypeComboBox, "eventsDbTypeComboBox");
|
||||
this.eventsDbTypeComboBox.Name = "eventsDbTypeComboBox";
|
||||
//
|
||||
// eventsLabel
|
||||
//
|
||||
resources.ApplyResources(this.eventsLabel, "eventsLabel");
|
||||
this.eventsLabel.Name = "eventsLabel";
|
||||
//
|
||||
// eventsDbConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.eventsDbConnectionStringTextBox, "eventsDbConnectionStringTextBox");
|
||||
this.eventsDbConnectionStringTextBox.Name = "eventsDbConnectionStringTextBox";
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.importEventsDbBtn);
|
||||
this.Controls.Add(this.createEventsDbBtn);
|
||||
this.Controls.Add(this.testConnEventsDbBtn);
|
||||
this.Controls.Add(this.eventsDbTypeComboBox);
|
||||
this.Controls.Add(this.eventsLabel);
|
||||
this.Controls.Add(this.eventsDbConnectionStringTextBox);
|
||||
this.Controls.Add(this.importResultsDbBtn);
|
||||
this.Controls.Add(this.importConfigDbBtn);
|
||||
this.Controls.Add(this.testConnUsersDbBtn);
|
||||
@@ -258,5 +307,11 @@ namespace TBF.UI.Settings
|
||||
private System.Windows.Forms.TextBox usersDbConnectionStringTextBox;
|
||||
private System.Windows.Forms.Button importResultsDbBtn;
|
||||
private System.Windows.Forms.Button importConfigDbBtn;
|
||||
private System.Windows.Forms.Button importEventsDbBtn;
|
||||
private System.Windows.Forms.Button createEventsDbBtn;
|
||||
private System.Windows.Forms.Button testConnEventsDbBtn;
|
||||
private System.Windows.Forms.ComboBox eventsDbTypeComboBox;
|
||||
private System.Windows.Forms.Label eventsLabel;
|
||||
private System.Windows.Forms.TextBox eventsDbConnectionStringTextBox;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Results;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.Settings
|
||||
@@ -25,6 +24,7 @@ namespace TBF.UI.Settings
|
||||
|
||||
string currentConfigDBConnStr; /// Initialized in constructor by the parent
|
||||
string currentResultsDBConnStr; /// Initialized in constructor by the parent
|
||||
string currentEventsDBConnStr; /// Initialized in constructor by the parent
|
||||
public bool CurrentDBChanged; /// Set when a current database is modified (erased or imported)
|
||||
|
||||
|
||||
@@ -32,11 +32,12 @@ namespace TBF.UI.Settings
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="bench">Test bench database settings</param>
|
||||
public DatabaseSettingsDlg(Config.DatabaseSettings bench, string currentConfigDBConnStr, string currentResultsDBConnStr)
|
||||
public DatabaseSettingsDlg(Config.DatabaseSettings bench, string currentConfigDBConnStr, string currentResultsDBConnStr, string currentEventsDBConnStr)
|
||||
{
|
||||
this.bench = bench;
|
||||
this.currentConfigDBConnStr = currentConfigDBConnStr;
|
||||
this.currentResultsDBConnStr = currentResultsDBConnStr;
|
||||
this.currentEventsDBConnStr = currentEventsDBConnStr;
|
||||
CurrentDBChanged = false;
|
||||
|
||||
InitializeComponent();
|
||||
@@ -56,10 +57,16 @@ namespace TBF.UI.Settings
|
||||
|
||||
testConnConfigDbBtn.Text = Strings.Test_connection;
|
||||
testConnResultsDbBtn.Text = Strings.Test_connection;
|
||||
testConnEventsDbBtn.Text = Strings.Test_connection;
|
||||
testConnUsersDbBtn.Text = Strings.Test_connection;
|
||||
|
||||
createConfigDbBtn.Text = Strings.Create_DB;
|
||||
createResultsDbBtn.Text = Strings.Create_DB;
|
||||
createEventsDbBtn.Text = Strings.Create_DB;
|
||||
|
||||
importConfigDbBtn.Text = Strings.Import_DB;
|
||||
importResultsDbBtn.Text = Strings.Import_DB;
|
||||
importEventsDbBtn.Text = Strings.Import_DB;
|
||||
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
@@ -78,15 +85,18 @@ namespace TBF.UI.Settings
|
||||
Users.Entities.DBType dbType = (Users.Entities.DBType)i;
|
||||
configDbTypeComboBox.Items.Add(dbType);
|
||||
resultsDbTypeComboBox.Items.Add(dbType);
|
||||
eventsDbTypeComboBox.Items.Add(dbType);
|
||||
usersDbTypeComboBox.Items.Add(dbType);
|
||||
}
|
||||
configDbTypeComboBox.SelectedIndex = (int)bench.ProceduresDBSettings.DbType;
|
||||
resultsDbTypeComboBox.SelectedIndex = (int)bench.WaterMetersDBSettings.DbType;
|
||||
eventsDbTypeComboBox.SelectedIndex = (int)bench.EventsDBSettings.DbType;
|
||||
usersDbTypeComboBox.SelectedIndex = (int)bench.UsersDBSettings.DbType;
|
||||
|
||||
/// Initialize connection strings
|
||||
configDbConnectionStringTextBox.Text = bench.ProceduresDBSettings.ConnectionString;
|
||||
resultsDbConnectionStringTextBox.Text = bench.WaterMetersDBSettings.ConnectionString;
|
||||
eventsDbConnectionStringTextBox.Text = bench.EventsDBSettings.ConnectionString;
|
||||
usersDbConnectionStringTextBox.Text = bench.UsersDBSettings.ConnectionString;
|
||||
}
|
||||
|
||||
@@ -108,10 +118,12 @@ namespace TBF.UI.Settings
|
||||
|
||||
bench.ProceduresDBSettings.ConnectionString = configDbConnectionStringTextBox.Text;
|
||||
bench.WaterMetersDBSettings.ConnectionString = resultsDbConnectionStringTextBox.Text;
|
||||
bench.EventsDBSettings.ConnectionString = eventsDbConnectionStringTextBox.Text;
|
||||
bench.UsersDBSettings.ConnectionString = usersDbConnectionStringTextBox.Text;
|
||||
|
||||
bench.ProceduresDBSettings.DbType = (Users.Entities.DBType)configDbTypeComboBox.SelectedIndex;
|
||||
bench.WaterMetersDBSettings.DbType = (Users.Entities.DBType)resultsDbTypeComboBox.SelectedIndex;
|
||||
bench.EventsDBSettings.DbType = (Users.Entities.DBType)eventsDbTypeComboBox.SelectedIndex;
|
||||
bench.UsersDBSettings.DbType = (Users.Entities.DBType)usersDbTypeComboBox.SelectedIndex;
|
||||
|
||||
return true;
|
||||
@@ -146,18 +158,10 @@ namespace TBF.UI.Settings
|
||||
}
|
||||
|
||||
|
||||
private void testConnConfigDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnResultsDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnUsersDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private void testConnConfigDbBtn_Click(object sender, EventArgs e) { }
|
||||
private void testConnResultsDbBtn_Click(object sender, EventArgs e) { }
|
||||
private void testConnEventsDbBtn_Click(object sender, EventArgs e) { }
|
||||
private void testConnUsersDbBtn_Click(object sender, EventArgs e) { }
|
||||
|
||||
|
||||
private void createConfigDbBtn_Click(object sender, EventArgs e)
|
||||
@@ -176,7 +180,7 @@ namespace TBF.UI.Settings
|
||||
string userName = Config.Utils.GetDBUser(connectionString);
|
||||
string password = Config.Utils.GetDBPassword(connectionString); /// TODO: Use password
|
||||
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr)
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr || connectionString == currentEventsDBConnStr)
|
||||
{
|
||||
CurrentDBChanged = true;
|
||||
}
|
||||
@@ -223,7 +227,7 @@ namespace TBF.UI.Settings
|
||||
string userName = Config.Utils.GetDBUser(connectionString);
|
||||
string password = Config.Utils.GetDBPassword(connectionString); /// TODO: Use password
|
||||
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr)
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr || connectionString == currentEventsDBConnStr)
|
||||
{
|
||||
CurrentDBChanged = true;
|
||||
}
|
||||
@@ -233,9 +237,9 @@ namespace TBF.UI.Settings
|
||||
log.ErrorFormat("Going to create an empty results database '{0}'", databaseName);
|
||||
ExecuteMySqlCmd(string.Format("DROP DATABASE `{0}`;", databaseName), userName, password);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", databaseName), userName, password);
|
||||
DB.DbType = bench.WaterMetersDBSettings.DbType;
|
||||
DB.ConnectionString = connectionString;
|
||||
DB.CreateEmptyDB();
|
||||
global::Results.DB.DbType = bench.WaterMetersDBSettings.DbType;
|
||||
global::Results.DB.ConnectionString = connectionString;
|
||||
global::Results.DB.CreateEmptyDB();
|
||||
log.ErrorFormat("An empty results database '{0}' was created", databaseName);
|
||||
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
@@ -256,6 +260,55 @@ namespace TBF.UI.Settings
|
||||
}
|
||||
}
|
||||
|
||||
private void createEventsDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Update database connection strings
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
{
|
||||
try
|
||||
{
|
||||
string connectionString = bench.EventsDBSettings.ConnectionString;
|
||||
string databaseName = Config.Utils.GetDBName(connectionString);
|
||||
string userName = Config.Utils.GetDBUser(connectionString);
|
||||
string password = Config.Utils.GetDBPassword(connectionString); /// TODO: Use password
|
||||
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr || connectionString == currentEventsDBConnStr)
|
||||
{
|
||||
CurrentDBChanged = true;
|
||||
}
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
|
||||
log.ErrorFormat("Going to create an empty events database '{0}'", databaseName);
|
||||
ExecuteMySqlCmd(string.Format("DROP DATABASE `{0}`;", databaseName), userName, password);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", databaseName), userName, password);
|
||||
global::Events.DB.DbType = (Events.Entities.DBType)bench.EventsDBSettings.DbType;
|
||||
global::Events.DB.ConnectionString = connectionString;
|
||||
global::Events.DB.CreateEmptyDB();
|
||||
log.ErrorFormat("An empty events database '{0}' was created", databaseName);
|
||||
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
if (File.Exists(CredFileName)) File.Delete(CredFileName);
|
||||
Cursor.Current = Cursors.Default;
|
||||
string msg = string.Format("{0}{1}{2}", Strings.Error_while_creating_DB_Reason, Environment.NewLine, exception.Message);
|
||||
if (exception.InnerException != null)
|
||||
{
|
||||
msg += Environment.NewLine + exception.InnerException.Message;
|
||||
}
|
||||
MessageBox.Show(msg, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configuration database import (UI)
|
||||
/// </summary>
|
||||
@@ -315,7 +368,37 @@ namespace TBF.UI.Settings
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
DBImportMessageStart("Importing database with results");
|
||||
DBImportMessageStart("Importing DB with Results");
|
||||
ImportDatabase(connectionString, dlg.FileName);
|
||||
DBImportMessageEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void importEventsDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Update database connection strings from UI
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
string connectionString = bench.EventsDBSettings.ConnectionString;
|
||||
|
||||
string server = Config.Utils.GetDBServer(connectionString);
|
||||
if ((server != "localhost") && (server != "127.0.0.1"))
|
||||
{
|
||||
MessageBox.Show(Strings.Remote_database_cannot_be_imported, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.InitialDirectory = string.Format(@"C:\TBF\DbBackups\");
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (MessageBox.Show(string.Format(Strings.Do_you_want_to_restore_events_DB_from_file_0_qm, dlg.FileName),
|
||||
string.Empty,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
DBImportMessageStart("Importing DB with Events");
|
||||
ImportDatabase(connectionString, dlg.FileName);
|
||||
DBImportMessageEnd();
|
||||
}
|
||||
@@ -367,7 +450,7 @@ namespace TBF.UI.Settings
|
||||
|
||||
try
|
||||
{
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr)
|
||||
if (connectionString == currentConfigDBConnStr || connectionString == currentResultsDBConnStr || connectionString == currentEventsDBConnStr)
|
||||
{
|
||||
CurrentDBChanged = true;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
@@ -145,7 +145,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -157,7 +157,7 @@
|
||||
<value>312, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -184,7 +184,7 @@
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Bench Name</value>
|
||||
@@ -199,7 +199,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 15</value>
|
||||
@@ -208,7 +208,7 @@
|
||||
<value>315, 20</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Name" xml:space="preserve">
|
||||
<value>benchNameTextBox</value>
|
||||
@@ -220,7 +220,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -232,7 +232,7 @@
|
||||
<value>89, 13</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Text" xml:space="preserve">
|
||||
<value>Connection string</value>
|
||||
@@ -247,7 +247,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="configDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 107</value>
|
||||
@@ -256,7 +256,7 @@
|
||||
<value>589, 20</value>
|
||||
</data>
|
||||
<data name="configDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>configDbConnectionStringTextBox</value>
|
||||
@@ -268,7 +268,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="resultsDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 137</value>
|
||||
@@ -277,7 +277,7 @@
|
||||
<value>589, 20</value>
|
||||
</data>
|
||||
<data name="resultsDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>resultsDbConnectionStringTextBox</value>
|
||||
@@ -289,7 +289,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="configLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -301,7 +301,7 @@
|
||||
<value>69, 13</value>
|
||||
</data>
|
||||
<data name="configLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>49</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="configLabel.Text" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
@@ -316,7 +316,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>configLabel.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="resultsLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -328,7 +328,7 @@
|
||||
<value>42, 13</value>
|
||||
</data>
|
||||
<data name="resultsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>51</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="resultsLabel.Text" xml:space="preserve">
|
||||
<value>Results</value>
|
||||
@@ -343,7 +343,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>resultsLabel.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -355,7 +355,7 @@
|
||||
<value>219, 17</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>54</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Text" xml:space="preserve">
|
||||
<value>Test bench is controlled by this computer</value>
|
||||
@@ -370,7 +370,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -382,7 +382,7 @@
|
||||
<value>76, 13</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>55</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Text" xml:space="preserve">
|
||||
<value>Database type</value>
|
||||
@@ -397,7 +397,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="configDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 107</value>
|
||||
@@ -406,7 +406,7 @@
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="configDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>58</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>configDbTypeComboBox</value>
|
||||
@@ -418,7 +418,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="resultsDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 137</value>
|
||||
@@ -427,7 +427,7 @@
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="resultsDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>60</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>resultsDbTypeComboBox</value>
|
||||
@@ -439,7 +439,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -454,7 +454,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>62</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
@@ -469,7 +469,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnConfigDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -484,7 +484,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>64</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
@@ -499,7 +499,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnResultsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -514,7 +514,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>66</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.Text" xml:space="preserve">
|
||||
<value>Create new DB</value>
|
||||
@@ -529,7 +529,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createConfigDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -544,7 +544,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>68</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.Text" xml:space="preserve">
|
||||
<value>Create new DB</value>
|
||||
@@ -559,7 +559,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createResultsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="testConnUsersDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -568,13 +568,13 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnUsersDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>801, 165</value>
|
||||
<value>801, 195</value>
|
||||
</data>
|
||||
<data name="testConnUsersDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="testConnUsersDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>72</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="testConnUsersDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
@@ -589,16 +589,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 167</value>
|
||||
<value>116, 197</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>71</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>usersDbTypeComboBox</value>
|
||||
@@ -610,7 +610,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="usersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -619,13 +619,13 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="usersLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 170</value>
|
||||
<value>12, 200</value>
|
||||
</data>
|
||||
<data name="usersLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>34, 13</value>
|
||||
</data>
|
||||
<data name="usersLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>70</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="usersLabel.Text" xml:space="preserve">
|
||||
<value>Users</value>
|
||||
@@ -640,16 +640,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="usersDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 167</value>
|
||||
<value>202, 197</value>
|
||||
</data>
|
||||
<data name="usersDbConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>589, 20</value>
|
||||
</data>
|
||||
<data name="usersDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>69</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name=">>usersDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>usersDbConnectionStringTextBox</value>
|
||||
@@ -661,7 +661,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="importResultsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -676,7 +676,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="importResultsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>75</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="importResultsDbBtn.Text" xml:space="preserve">
|
||||
<value>Import DB</value>
|
||||
@@ -691,7 +691,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>importResultsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="importConfigDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -706,7 +706,7 @@
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="importConfigDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>74</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="importConfigDbBtn.Text" xml:space="preserve">
|
||||
<value>Import DB</value>
|
||||
@@ -721,8 +721,170 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>importConfigDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>1013, 164</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="importEventsDbBtn.Text" xml:space="preserve">
|
||||
<value>Import DB</value>
|
||||
</data>
|
||||
<data name=">>importEventsDbBtn.Name" xml:space="preserve">
|
||||
<value>importEventsDbBtn</value>
|
||||
</data>
|
||||
<data name=">>importEventsDbBtn.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=">>importEventsDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>importEventsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>907, 164</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="createEventsDbBtn.Text" xml:space="preserve">
|
||||
<value>Create new DB</value>
|
||||
</data>
|
||||
<data name=">>createEventsDbBtn.Name" xml:space="preserve">
|
||||
<value>createEventsDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createEventsDbBtn.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=">>createEventsDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createEventsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>801, 165</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 23</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="testConnEventsDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnEventsDbBtn.Name" xml:space="preserve">
|
||||
<value>testConnEventsDbBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnEventsDbBtn.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=">>testConnEventsDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnEventsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="eventsDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 167</value>
|
||||
</data>
|
||||
<data name="eventsDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="eventsDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name=">>eventsDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>eventsDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>eventsDbTypeComboBox.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=">>eventsDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>eventsDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="eventsLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="eventsLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="eventsLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 170</value>
|
||||
</data>
|
||||
<data name="eventsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>40, 13</value>
|
||||
</data>
|
||||
<data name="eventsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="eventsLabel.Text" xml:space="preserve">
|
||||
<value>Events</value>
|
||||
</data>
|
||||
<data name=">>eventsLabel.Name" xml:space="preserve">
|
||||
<value>eventsLabel</value>
|
||||
</data>
|
||||
<data name=">>eventsLabel.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=">>eventsLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>eventsLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="eventsDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 167</value>
|
||||
</data>
|
||||
<data name="eventsDbConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>589, 20</value>
|
||||
</data>
|
||||
<data name="eventsDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name=">>eventsDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>eventsDbConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>eventsDbConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>eventsDbConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>eventsDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -730,7 +892,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 202</value>
|
||||
<value>1125, 231</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
|
||||
+25
-13
@@ -3,8 +3,10 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Config.Entities;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
@@ -151,18 +153,6 @@ namespace TBF.UiBridge
|
||||
public static event EventHandler<ProcedureCompletedEventArgs> ProcedureCompletedHandler;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called from the state machine when there is and information to be logged.
|
||||
/// </summary>
|
||||
public static void OnLog(object sender, string message)
|
||||
{
|
||||
if (LogHandler == null) return;
|
||||
try { LogHandler(sender, new LogEventArgs(message)); }
|
||||
catch (Exception e) { log.Error("LogHandler(...) failed", e); }
|
||||
}
|
||||
public static event EventHandler<LogEventArgs> LogHandler;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called from the state machine when 'Activity' information changes.
|
||||
/// </summary>
|
||||
@@ -266,5 +256,27 @@ namespace TBF.UiBridge
|
||||
catch (Exception e) { log.Error("SaveSettingsHandler(...) failed", e); }
|
||||
}
|
||||
public static event EventHandler<SaveSettingsEventArgs> SaveSettingsHandler;
|
||||
|
||||
|
||||
public static void TriggerEvent(ISession session, string source, EventClass clss, Severity severity, string message, string moreInfo, SubscriberGroup groups)
|
||||
{
|
||||
Events.Entities.Event evnt = new Event(null, source, clss, severity, message, moreInfo, null);
|
||||
Events.DB.SaveEvent(session, evnt, groups);
|
||||
if (EventHandler != null)
|
||||
{
|
||||
try { EventHandler(null, new EventEventArgs(evnt)); }
|
||||
catch (Exception e) { log.Error("EventHandler(...) failed", e); }
|
||||
}
|
||||
}
|
||||
public static void TriggerEvent(ISession session, Events.Entities.Event evnt)
|
||||
{
|
||||
Events.DB.SaveEvent(session, evnt, evnt.SubscriberGroups);
|
||||
if (EventHandler != null)
|
||||
{
|
||||
try { EventHandler(null, new EventEventArgs(evnt)); }
|
||||
catch (Exception e) { log.Error("EventHandler(...) failed", e); }
|
||||
}
|
||||
}
|
||||
public static event EventHandler<EventEventArgs> EventHandler;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using Events.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
public class EventEventArgs : EventArgs
|
||||
{
|
||||
public Event Evnt;
|
||||
|
||||
public EventEventArgs(Event evnt)
|
||||
{
|
||||
this.Evnt = evnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
public class LogEventArgs : EventArgs
|
||||
{
|
||||
public string LogMessage;
|
||||
|
||||
public LogEventArgs(string logMessage)
|
||||
{
|
||||
this.LogMessage = logMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user