FM2014: - prepared for multiple FM2014s - 1.Step
This commit is contained in:
parent
f40a6b2bae
commit
f613a9cdb4
File diff suppressed because it is too large
Load Diff
@ -66,11 +66,12 @@ namespace Sensus.MiniPrf.Ui
|
||||
/// <summary>
|
||||
/// The single FM2014 for this program
|
||||
/// </summary>
|
||||
private FM2014 Fm2014
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private FM2014 Fm2014 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The single FM2014 for this program
|
||||
/// </summary>
|
||||
private FM2014 Fm2014_TEST { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The start time is going to be used for time measurements of processes. It has to be set to
|
||||
@ -444,6 +445,12 @@ namespace Sensus.MiniPrf.Ui
|
||||
|
||||
//assign new meter
|
||||
Fm2014 = new FM2014();
|
||||
|
||||
//TODO THW TEST FM2014 multiple objects
|
||||
Fm2014_TEST = new FM2014();
|
||||
Fm2014_TEST.Address = 2;
|
||||
Fm2014_TEST.OnRawRecordReceived += DataReceived_Handler;
|
||||
|
||||
Fm2014.OnRawRecordReceived += DataReceived_Handler;
|
||||
ResetCancellationToken();
|
||||
FM2014.SharedCancellationToken = _cancellationToken;
|
||||
@ -470,10 +477,16 @@ namespace Sensus.MiniPrf.Ui
|
||||
lblActualProcess.Text = Resources.StrMsgConnecting;
|
||||
Fm2014.Connect(cbxFM2014ComPort.SelectedItem.ToString());
|
||||
|
||||
//TODO THW TEST FM2014 multiple objects
|
||||
Fm2014_TEST.Connect(cbxFM2014ComPort.SelectedItem.ToString());
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
Fm2014.Login();
|
||||
|
||||
//TODO THW TEST FM2014 multiple objects
|
||||
Fm2014_TEST.Login();
|
||||
|
||||
if (!Fm2014.IsLoggedOn)
|
||||
{
|
||||
LogErrorText(Resources.StrErrorMsgFM2014AccessDenied);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user