aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-05 15:26:01 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-05 15:26:01 +0300
commitb1b9ec165cc318caed1fc9b5919a03029b6cb29e (patch)
treef1acb7c17b4ac0f21a6572c837105a9fd581b0ae /Software/Visual_Studio/MachineStudio
parentac0a8a7715360263973fda940f9138cf7d5141d7 (diff)
downloadTango-b1b9ec165cc318caed1fc9b5919a03029b6cb29e.tar.gz
Tango-b1b9ec165cc318caed1fc9b5919a03029b6cb29e.zip
Completed Remote Debugger VSIX !!!
Added 2 dancer parameters. Refactored Tech Board to reset configuration when connected machine changes.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs7
3 files changed, 19 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
index d8369ea7b..381101c7e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
@@ -224,7 +224,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
UploadHardwareConfigurationCommand = new RelayCommand(UploadHardwareConfiguration);
SyncHardwareConfigurationCommand = new RelayCommand(SyncHardwareConfiguration);
- ResetHardwareConfigurationCommand = new RelayCommand(ResetHardwareConfiguration);
+ ResetHardwareConfigurationCommand = new RelayCommand(() => ResetHardwareConfiguration());
}
#endregion
@@ -239,6 +239,11 @@ namespace Tango.MachineStudio.Technician.ViewModels
private void ApplicationManager_ConnectedMachineChanged(object sender, IExternalBridgeClient machine)
{
MachineOperator = machine;
+
+ if (MachineOperator != null)
+ {
+ ResetHardwareConfiguration(false);
+ }
}
/// <summary>
@@ -1430,7 +1435,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
}
- private void ResetHardwareConfiguration()
+ private void ResetHardwareConfiguration(bool showMessage = true)
{
if (MachineOperator != null)
{
@@ -1486,7 +1491,10 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
}
- _notification.ShowInfo("Visual elements synced to hardware version " + hw.Name + ", " + hw.Version + ".");
+ if (showMessage)
+ {
+ _notification.ShowInfo("Visual elements synced to hardware version " + hw.Name + ", " + hw.Version + ".");
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 72d8da7ce..9843162de 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -161,7 +161,7 @@
<TextBlock VerticalAlignment="Center">RESET</TextBlock>
</StackPanel>
</Button>
- <Button Height="Auto" Margin="0 0 10 0" FontSize="12" Command="{Binding SyncHardwareConfigurationCommand}" IsEnabled="{Binding ApplicationManager.IsMachineConnected}" ToolTip="Sync all visual elements to the current hardware configuration">
+ <Button Height="Auto" Margin="0 0 10 0" FontSize="12" Command="{Binding SyncHardwareConfigurationCommand}" IsEnabled="{Binding ApplicationManager.IsMachineConnected}" ToolTip="Sync all visual elements to the current hardware configuration stored on the machine (last uploaded)">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Margin="0 0 0 0" Width="24" Height="24" Kind="ArrowDownBold"/>
<TextBlock VerticalAlignment="Center">SYNC HW CONFIG</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
index 847503e42..622d3b0d0 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
@@ -184,7 +184,9 @@ namespace Tango.MachineStudio.Publisher
Token = response.Token,
});
+ Progress = 0;
UpdateVersions();
+ ShowInfo("Version published successfully!");
}
catch (Exception ex)
{
@@ -203,6 +205,11 @@ namespace Tango.MachineStudio.Publisher
MessageBox.Show(error, "Machine Studio Publisher", MessageBoxButton.OK, MessageBoxImage.Error);
}
+ private void ShowInfo(String message)
+ {
+ MessageBox.Show(message, "Machine Studio Publisher", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+
protected override void RaisePropertyChangedAuto([CallerMemberName] string caller = null)
{
base.RaisePropertyChangedAuto(caller);