diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-02-23 12:03:18 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-02-23 12:03:18 +0200 |
| commit | fadf83a50071ffba21db05eceff10c51c18f5fb3 (patch) | |
| tree | 9a568aae8d298bfbc2135afaff0b91f9de711793 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher | |
| parent | 042b4d3e7b0af729792ca20e086756c36d2f5768 (diff) | |
| download | Tango-fadf83a50071ffba21db05eceff10c51c18f5fb3.tar.gz Tango-fadf83a50071ffba21db05eceff10c51c18f5fb3.zip | |
Machine Studio Update & Publish.
Improved user roles & permissions structure.
Added permission for version publish.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml | 22 | ||||
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs | 10 |
2 files changed, 20 insertions, 12 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml index 9f592ca6d..ab7e503ff 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml @@ -26,28 +26,28 @@ <Grid Grid.Row="1" Margin="10"> <DockPanel> - <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0 20 0 0" x:Name="stackDetails"> - <TextBlock FontSize="16" HorizontalAlignment="Center"> - <Run>Latest Version:</Run> + <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Left" Margin="0 20 0 0" x:Name="stackDetails"> + <TextBlock FontSize="16"> + <Run>Remote Version:</Run> <Run Text="{Binding LatestVersion}" FontStyle="Italic" FontWeight="SemiBold"></Run> </TextBlock> - <TextBlock Margin="0 10 0 0" FontSize="16" HorizontalAlignment="Center"> - <Run>Current Version:</Run> + <TextBlock Margin="0 10 0 0" FontSize="16" > + <Run>Local Version:</Run> <Run Text="{Binding CurrentVersion}" FontStyle="Italic" FontWeight="SemiBold"></Run> </TextBlock> - <StackPanel Margin="0 10 0 0" Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Margin="0 20 0 0" Orientation="Horizontal" > <TextBlock FontSize="16">Email:</TextBlock> - <TextBox Margin="5 0 0 0" Width="200" BorderThickness="0 0 0 1" Text="{Binding Email,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBox Margin="5 0 0 0" Width="230" BorderThickness="0 0 0 1" Text="{Binding Email,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> </StackPanel> - <StackPanel Margin="0 10 0 0" Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Margin="0 10 0 0" Orientation="Horizontal"> <TextBlock FontSize="16">Password:</TextBlock> - <TextBox Margin="5 0 0 0" Width="230" BorderThickness="0 0 0 1" Text="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBox Margin="5 0 0 0" Width="200" BorderThickness="0 0 0 1" Text="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> </StackPanel> - <TextBlock FontSize="16" HorizontalAlignment="Center" Margin="0 20 0 0">Comments</TextBlock> - <TextBox Height="70" Margin="0 5 0 0" AcceptsReturn="True" TextWrapping="Wrap" Text="{Binding Comments,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBlock FontSize="16" Margin="0 20 0 0">Comments</TextBlock> + <TextBox Height="70" Margin="0 5 0 0" Width="500" AcceptsReturn="True" TextWrapping="Wrap" Text="{Binding Comments,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> </StackPanel> <Grid DockPanel.Dock="Bottom"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs index 2ceb36994..34d2f1b1f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using System.Windows; using Tango.Core.Commands; using Tango.Core.Cryptography; +using Tango.Core.Helpers; using Tango.MachineStudio.Common.Update; using Tango.Settings; using Tango.SharedUI; @@ -121,6 +122,7 @@ namespace Tango.MachineStudio.Publisher Task.Factory.StartNew(() => { IsUpdating = true; + String tempFile = String.Empty; try { @@ -132,7 +134,7 @@ namespace Tango.MachineStudio.Publisher Comments = Comments, }); - String tempFile = Path.Combine(Path.GetTempPath(), response.FileName); + tempFile = Path.Combine(Path.GetTempPath(), response.FileName); using (ZipFile zip = new ZipFile()) { @@ -174,6 +176,11 @@ namespace Tango.MachineStudio.Publisher } } + _client.NotifyUploadCompleted(new UploadCompletedRequest() + { + Token = response.Token, + }); + UpdateVersions(); } catch (Exception ex) @@ -183,6 +190,7 @@ namespace Tango.MachineStudio.Publisher finally { IsUpdating = false; + PathHelper.TryDeleteFile(tempFile); } }); } |
