aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-05-20 14:18:17 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-05-20 14:18:17 +0300
commit84094ce335d9b51307b44729a5e43fe97f1d5f6a (patch)
treed4f4573ed8f25ddd2f02df5b55b750ea892d83c2 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent672dbf2bd4c1a2348d7c8e0ca79dce946078c569 (diff)
parent4130d9b00f5500fef2f9f1637dbe473942929958 (diff)
downloadTango-84094ce335d9b51307b44729a5e43fe97f1d5f6a.tar.gz
Tango-84094ce335d9b51307b44729a5e43fe97f1d5f6a.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml7
4 files changed, 37 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
index 3cf0dce1a..13e2af128 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
@@ -4,5 +4,5 @@ using System.Runtime.InteropServices;
[assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyTitle("Tango - Machine Studio")]
-[assembly: AssemblyVersion("4.0.20.0")]
+[assembly: AssemblyVersion("4.0.21.0")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
index ce49d805e..d1f3cc69e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
@@ -36,7 +36,7 @@ namespace Tango.MachineStudio.UI.ViewModels
public IExternalBridgeClient SelectedMachine
{
get { return _selectedMachine; }
- set { _selectedMachine = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ set { _selectedMachine = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(RequiresAuthentication)); InvalidateRelayCommands(); }
}
/// <summary>
@@ -57,6 +57,7 @@ namespace Tango.MachineStudio.UI.ViewModels
EnableDiagnostics = true;
UploadHardwareConfiguration = true;
+ EnableKeepAlive = true;
ConnectCommand = new RelayCommand(Connect, (x) => SelectedMachine != null);
}
@@ -130,6 +131,17 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _uploadHardwareConfiguration = value; RaisePropertyChangedAuto(); }
}
+ private bool _enableApplicationLogs;
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable application logs.
+ /// </summary>
+ public bool EnableApplicationLogs
+ {
+ get { return _enableApplicationLogs; }
+ set { _enableApplicationLogs = value; RaisePropertyChangedAuto(); }
+ }
+
+
private bool _enableKeepAlive;
/// <summary>
/// Gets or sets a value indicating whether to use the keep alive mechanism.
@@ -140,5 +152,13 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _enableKeepAlive = value; RaisePropertyChangedAuto(); }
}
+ public bool RequiresAuthentication
+ {
+ get
+ {
+ return SelectedMachine != null && SelectedMachine is IExternalBridgeSecureClient;
+ }
+ }
+
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index 3f69ff771..b2faf346e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -447,6 +447,11 @@ namespace Tango.MachineStudio.UI.ViewModels
x.SelectedMachine.EnableEventsNotification = x.EnableDiagnostics;
x.SelectedMachine.UseKeepAlive = x.EnableKeepAlive;
+ if (x.SelectedMachine is ExternalBridgeTcpClient)
+ {
+ x.SelectedMachine.As<ExternalBridgeTcpClient>().EnableApplicationLogs = x.EnableApplicationLogs;
+ }
+
if (x.SelectedMachine.RequiresAuthentication)
{
//Check machine exist on my database first
@@ -483,10 +488,10 @@ namespace Tango.MachineStudio.UI.ViewModels
PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine });
_eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", x.SelectedMachine.SerialNumber));
- if (x.UploadHardwareConfiguration)
- {
- UploadHardwareConfiguration(false);
- }
+ //if (x.UploadHardwareConfiguration)
+ //{
+ // UploadHardwareConfiguration(false);
+ //}
}
catch (ResponseErrorException ex)
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
index 7c4e960ec..d39b1226c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
@@ -118,11 +118,16 @@
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Diagnostics, Debug &amp; Events</TextBlock>
</StackPanel>
- <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
+ <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding RequiresAuthentication,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<ToggleButton IsChecked="{Binding UploadHardwareConfiguration}" VerticalAlignment="Center" ToolTip="Upload hardware configuration after connection is successful"></ToggleButton>
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Upload HW Configuration</TextBlock>
</StackPanel>
+ <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding RequiresAuthentication,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ToggleButton IsChecked="{Binding EnableApplicationLogs}" VerticalAlignment="Center" ToolTip="Allow incoming application logs from the remote host"></ToggleButton>
+ <TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Enable Application Logs</TextBlock>
+ </StackPanel>
+
<StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
<ToggleButton IsChecked="{Binding EnableKeepAlive}" VerticalAlignment="Center" ToolTip="Allow a keep alive mechanism to improve lost connection detection"></ToggleButton>
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Keep Alive</TextBlock>