aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-29 18:59:41 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-29 18:59:41 +0200
commitdd724f118f584eea84a11af90292a88c62ecd022 (patch)
tree714e7c0dfb12887ed20d85b0aa5c2b6c24743b44 /Software/Visual_Studio/MachineStudio/Modules
parent1e2ae1c1973fd5661815f18c93ee1171a5c08da5 (diff)
downloadTango-dd724f118f584eea84a11af90292a88c62ecd022.tar.gz
Tango-dd724f118f584eea84a11af90292a88c62ecd022.zip
Working on Firmware upgrade !
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj1
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/app.config51
4 files changed, 66 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj
index 991e9fa2e..bceaf7158 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj
@@ -93,6 +93,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs
index 12bb8242a..a9cfed937 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs
@@ -12,6 +12,7 @@ using Tango.Core.IO;
using Tango.Integration.ExternalBridge;
using Tango.Integration.Storage;
using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.FirmwareUpgrade;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.MachineStudio.Storage.Models;
@@ -24,6 +25,7 @@ namespace Tango.MachineStudio.Storage.ViewModels
private IStudioApplicationManager _applicationManager;
private INotificationProvider _notification;
+ private IFirmwareUpgrader _firmwareUpgrader;
private bool _machine_operator_changed = true;
private StorageManager _storageManager;
@@ -71,10 +73,13 @@ namespace Tango.MachineStudio.Storage.ViewModels
public RelayCommand UploadFileCommand { get; set; }
- public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider)
+ public RelayCommand UploadVersionCommand { get; set; }
+
+ public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IFirmwareUpgrader firmwareUpgrader)
{
_applicationManager = applicationManager;
_notification = notificationProvider;
+ _firmwareUpgrader = firmwareUpgrader;
_applicationManager.ConnectedMachineChanged += _applicationManager_ConnectedMachineChanged;
FileHandlers = new ObservableCollection<StorageFileHandlerModel>();
@@ -90,6 +95,7 @@ namespace Tango.MachineStudio.Storage.ViewModels
CreateFolderCommand = new RelayCommand(CreateFolder, () => StorageManager != null && StorageManager.CurrentFolder != null);
DeleteFolderCommand = new RelayCommand(DeleteFolder, () => StorageManager != null && SelectedStorageItem != null && SelectedStorageItem is StorageFolder);
UploadFileCommand = new RelayCommand(UploadFile, () => StorageManager != null && StorageManager.CurrentFolder != null);
+ UploadVersionCommand = new RelayCommand(UploadVersion, () => StorageManager != null && StorageManager.CurrentFolder != null);
}
private void UploadFile()
@@ -351,5 +357,10 @@ namespace Tango.MachineStudio.Storage.ViewModels
FileHandlers.Remove(handler);
}
}
+
+ private void UploadVersion()
+ {
+ _firmwareUpgrader.InvokeUpgradeUI();
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml
index 311d18f54..1f435b696 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml
@@ -62,10 +62,10 @@
</DockPanel>
</Button>
<Separator/>
- <Button Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left">
+ <Button Command="{Binding UploadVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left">
<DockPanel>
<materialDesign:PackIcon Kind="BriefcaseUpload" Foreground="#833CEC" Width="32" Height="32" />
- <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">UPLOAD VERSION</TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">UPGRADE VERSION</TextBlock>
</DockPanel>
</Button>
<Button Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/app.config
new file mode 100644
index 000000000..5d794b958
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/app.config
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file