aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs66
1 files changed, 0 insertions, 66 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs
index 3e2dde7c6..942908f2d 100644
--- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs
@@ -7,7 +7,6 @@ using Tango.Emulations.Emulators;
using Tango.Logging;
using Tango.SharedUI;
using Tango.Core.Commands;
-using Tango.Stubs;
using Tango.Transport.Adapters;
using Tango.Transport.Servers;
using Tango.Transport.Transporters;
@@ -43,35 +42,6 @@ namespace Tango.MachineEM.UI.ViewModels
set { _log = value; RaisePropertyChanged(nameof(Log)); }
}
- /// <summary>
- /// Gets or sets the available stubs.
- /// </summary>
- public List<AvailableStub> AvailableStubs { get; set; }
-
- private AvailableStub _selectedAvailableStub;
- /// <summary>
- /// Gets or sets the selected available stub.
- /// </summary>
- public AvailableStub SelectedAvailableStub
- {
- get { return _selectedAvailableStub; }
- set
- {
- _selectedAvailableStub = value; RaisePropertyChanged(nameof(SelectedAvailableStub));
- OnStubSelected(value);
- }
- }
-
- private StubBase _selectedStub;
- /// <summary>
- /// Gets or sets the selected stub.
- /// </summary>
- public StubBase SelectedStub
- {
- get { return _selectedStub; }
- set { _selectedStub = value; RaisePropertyChanged(nameof(SelectedStub)); }
- }
-
private List<String> _ports;
/// <summary>
/// Gets or sets the ports.
@@ -96,18 +66,6 @@ namespace Tango.MachineEM.UI.ViewModels
#region Private Methods
- /// <summary>
- /// Called when available stub is selected.
- /// </summary>
- /// <param name="availableStub">The available stub.</param>
- private void OnStubSelected(AvailableStub availableStub)
- {
- if (availableStub != null)
- {
- SelectedStub = availableStub.CreateInstance(Emulator.Transporter);
- }
- }
-
#endregion
#region Commands
@@ -161,12 +119,9 @@ namespace Tango.MachineEM.UI.ViewModels
StartCommand = new RelayCommand(Start, (x) => !Emulator.IsStarted);
StopCommand = new RelayCommand(Stop, (x) => Emulator.IsStarted);
- RunCommand = new RelayCommand(RunSelectedStub, (x) => !_running);
CancelCommand = new RelayCommand(Cancel, (x) => _running);
ClearCommand = new RelayCommand(() => Log = String.Empty);
- AvailableStubs = StubBase.GetAvailableStubs(StubDirection.ToMobile);
-
Ports = new List<string>()
{
"TCP",
@@ -234,27 +189,6 @@ namespace Tango.MachineEM.UI.ViewModels
InvalidateRelayCommands();
}
- /// <summary>
- /// Runs the selected stub.
- /// </summary>
- private async void RunSelectedStub()
- {
- _running = true;
- InvalidateRelayCommands();
- var result = await SelectedStub.Run((response) =>
- {
- _running = false;
- Log += response + Environment.NewLine;
- InvalidateRelayCommands();
-
- });
-
- Log += result + Environment.NewLine;
-
- _running = false;
- InvalidateRelayCommands();
- }
-
private void Cancel()
{