Big changes
This commit is contained in:
@@ -16,16 +16,12 @@ GOVERNMENT.
|
||||
UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
|
||||
-------------------------------------------------------------------------*/
|
||||
using NLog;
|
||||
using ProgramGui;
|
||||
using ProgramGui.Model;
|
||||
using ProgramGui.ViewModel;
|
||||
using ProgramLib;
|
||||
using ProgramLib.GUI.Model;
|
||||
using ProgramLib.GUI.View;
|
||||
using ProgramLib.GUI.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProgramLib
|
||||
{
|
||||
@@ -46,7 +42,7 @@ namespace ProgramLib
|
||||
}
|
||||
|
||||
private ILogger _logger;
|
||||
private MainWindow _mainWindow;
|
||||
private LiveDataWindow _liveDataWindow;
|
||||
private PassthroughData _passthroughData = null;
|
||||
|
||||
/// <summary>
|
||||
@@ -56,13 +52,13 @@ namespace ProgramLib
|
||||
{
|
||||
_logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
_mainWindow = (MainWindow)ProgramLib.Program.Instance().GetGuiManager()[ProgramGuiManager.WINDOWS.MAIN];
|
||||
_liveDataWindow = (LiveDataWindow)ProgramLib.Program.Instance().GetGuiManager()[ProgramGuiManager.WINDOWS.LIVE_DATA];
|
||||
|
||||
_passthroughData = new PassthroughData(_mainWindow.datagridPassthroughData.Columns.Count);
|
||||
_passthroughData = new PassthroughData(_liveDataWindow.datagridPassthroughData.Columns.Count);
|
||||
|
||||
ProgramLib.Program.Instance().GetGuiManager()[ProgramGuiManager.WINDOWS.MAIN].Dispatcher.Invoke((Action)delegate
|
||||
ProgramLib.Program.Instance().GetGuiManager()[ProgramGuiManager.WINDOWS.LIVE_DATA].Dispatcher.Invoke((Action)delegate
|
||||
{
|
||||
_mainWindow._mainWindowViewModel.AddPassthroughData(_passthroughData.GetPassthroughDataModelDict());
|
||||
_liveDataWindow.LiveDataWindowViewModel.AddPassthroughData(_passthroughData.GetPassthroughDataModelDict());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,7 +133,7 @@ namespace ProgramLib
|
||||
if (id == Events.EVENT_TIMED_OUT)
|
||||
{
|
||||
rnd = new Random();
|
||||
_mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_OFF];
|
||||
_liveDataWindow.LiveDataWindowViewModel.UutPowerLedImagePath = _liveDataWindow.LiveDataWindowViewModel.ImageToResourcePathDict[LiveDataWindowViewModel.Images.LED_OFF];
|
||||
|
||||
float num = 70.0f + GenerateRandomFraction();
|
||||
_passthroughData.SetValue(PassthroughData.Variables.VAR1, num.ToString("0.00"));
|
||||
@@ -152,7 +148,7 @@ namespace ProgramLib
|
||||
num = 50.0f + GenerateRandomFraction();
|
||||
_passthroughData.SetValue(PassthroughData.Variables.VAR4, num.ToString("0.00"));
|
||||
Thread.Sleep(100);
|
||||
_mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_ON];
|
||||
_liveDataWindow.LiveDataWindowViewModel.UutPowerLedImagePath = _liveDataWindow.LiveDataWindowViewModel.ImageToResourcePathDict[LiveDataWindowViewModel.Images.LED_ON];
|
||||
num = 60.0f + GenerateRandomFraction();
|
||||
_passthroughData.SetValue(PassthroughData.Variables.VAR5, num.ToString("0.00"));
|
||||
Thread.Sleep(200);
|
||||
|
||||
Reference in New Issue
Block a user