diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-17 16:36:40 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-17 16:36:40 +0200 |
| commit | 631e31df4c7d0474207e11b54885c1de6f9e80c7 (patch) | |
| tree | fef15683884aa826bffd630e538131a105c0af44 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage | |
| parent | aae0250d800c6643b1c7c2864baa3488f4d94230 (diff) | |
| download | Tango-631e31df4c7d0474207e11b54885c1de6f9e80c7.tar.gz Tango-631e31df4c7d0474207e11b54885c1de6f9e80c7.zip | |
Added firmware package generator in machine studio.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage')
3 files changed, 28 insertions, 0 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 a1bb0055e..15958f019 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 @@ -132,6 +132,10 @@ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> <Name>Tango.Transport</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Utilities\Tango.FirmwarePackageGenerator\Tango.FirmwarePackageGenerator.csproj"> + <Project>{43135fb9-41db-4f87-9771-cf2c762027c0}</Project> + <Name>Tango.FirmwarePackageGenerator</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj"> <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> <Name>Tango.MachineStudio.Common</Name> 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 3df46ba6f..90644cf1a 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 @@ -8,6 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; +using Tango.Core.DI; using Tango.Core.IO; using Tango.Integration.ExternalBridge; using Tango.Integration.Storage; @@ -79,6 +80,14 @@ namespace Tango.MachineStudio.Storage.ViewModels public RelayCommand ActivateVersionCommand { get; set; } + public RelayCommand GenerateTfpCommand { get; set; } + + public MainViewVM() + { + + } + + [TangoInject] public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IFirmwareUpgrader firmwareUpgrader) { _applicationManager = applicationManager; @@ -102,6 +111,7 @@ namespace Tango.MachineStudio.Storage.ViewModels UploadVersionCommand = new RelayCommand(UploadVersion, () => StorageManager != null && StorageManager.CurrentFolder != null); ValidateVersionCommand = new RelayCommand(ValidateVersion, () => StorageManager != null && StorageManager.CurrentFolder != null); ActivateVersionCommand = new RelayCommand(ActivateVersion, () => StorageManager != null && StorageManager.CurrentFolder != null); + GenerateTfpCommand = new RelayCommand(GenerateTFP); } private void UploadFile() @@ -398,5 +408,13 @@ namespace Tango.MachineStudio.Storage.ViewModels } } } + + private void GenerateTFP() + { + Tango.FirmwarePackageGenerator.MainWindow fWindow = new FirmwarePackageGenerator.MainWindow(); + fWindow.Topmost = true; + fWindow.Show(); + _applicationManager.RegisterOpenedWindow(fWindow); + } } } 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 e59837d49..840e18523 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 @@ -80,6 +80,12 @@ <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">ACTIVATE VERSION</TextBlock> </DockPanel> </Button> + <Button Command="{Binding GenerateTfpCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <DockPanel> + <materialDesign:PackIcon Kind="Chip" Foreground="#532990" Width="32" Height="32" /> + <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">GENERATE TFP FILE</TextBlock> + </DockPanel> + </Button> <Separator/> <Button Command="{Binding RefreshCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> <DockPanel> |
