diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-10 18:28:41 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-10 18:28:41 +0200 |
| commit | a65868d1d77b1929b855abd0c19bdc08bc9cee9d (patch) | |
| tree | 09486bed718fb096914780f33313fb82a0207c87 /Software/Visual_Studio/MachineStudio | |
| parent | 82179e1b69b62b971a04af571979e7d10c60fd7a (diff) | |
| parent | ac9678197fc6142595089155d98442239a64e6d7 (diff) | |
| download | Tango-a65868d1d77b1929b855abd0c19bdc08bc9cee9d.tar.gz Tango-a65868d1d77b1929b855abd0c19bdc08bc9cee9d.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
13 files changed, 60 insertions, 45 deletions
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 4db48c636..3df46ba6f 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 @@ -327,13 +327,11 @@ namespace Tango.MachineStudio.Storage.ViewModels handler.Canceled += (_, __) => { fs.Dispose(); - File.Delete(path); }; handler.Failed += (_, __) => { fs.Dispose(); - File.Delete(path); }; FileHandlers.Insert(0, new StorageFileHandlerModel(handler, path, StorageFileHandlerType.Upload)); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index aef4983ce..b8d767c5e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -48,11 +48,6 @@ namespace Tango.MachineStudio.Common public String LastVirtualMachineSerialNumber { get; set; } /// <summary> - /// Gets or sets the allow beta release. - /// </summary> - public bool AcceptBetaRelease { get; set; } - - /// <summary> /// Gets or sets the logging categories. /// </summary> public List<LogCategory> LoggingCategories { get; set; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesRequest.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesRequest.cs index ce700adbf..e31a7f59e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesRequest.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesRequest.cs @@ -11,7 +11,5 @@ namespace Tango.MachineStudio.Common.Update public class CheckForUpdatesRequest : WebRequestSecureMessage { public String Version { get; set; } - - public bool AcceptBetaRelease { get; set; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesResponse.cs index ae1e958ab..450236f79 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesResponse.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/CheckForUpdatesResponse.cs @@ -12,8 +12,6 @@ namespace Tango.MachineStudio.Common.Update { public bool IsUpdateAvailable { get; set; } - public bool IsStable { get; set; } - public String Version { get; set; } public String Comments { get; set; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UploadVersionRequest.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UploadVersionRequest.cs index c55cb9a22..fedb586ba 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UploadVersionRequest.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UploadVersionRequest.cs @@ -17,9 +17,5 @@ namespace Tango.MachineStudio.Common.Update public String Version { get; set; } public String Comments { get; set; } - - public bool ForcedUpdate { get; set; } - - public bool IsStable { get; set; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml index e76d933fb..0d9d6b667 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml @@ -46,7 +46,7 @@ <ComboBox Width="200" Margin="0 10 0 0" HorizontalAlignment="Left" ItemsSource="{Binding Source={x:Type web:DeploymentSlot},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding DeploymentSlot}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> - <StackPanel Margin="0 20 0 0" Orientation="Horizontal" > + <StackPanel Margin="0 20 0 0" Orientation="Horizontal"> <TextBlock FontSize="16">Email:</TextBlock> <TextBox Margin="5 0 0 0" Width="230" BorderThickness="0 0 0 1" Text="{Binding Email,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox> </StackPanel> @@ -59,10 +59,6 @@ <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 Orientation="Horizontal" Margin="0 10 0 0"> - <CheckBox IsChecked="{Binding ForcedUpdate}">Forced Update</CheckBox> - <CheckBox Margin="10 0 0 0" IsChecked="{Binding IsStable}">Stable Release</CheckBox> - </StackPanel> </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 6cfa96a18..206a2d31b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs @@ -54,22 +54,6 @@ namespace Tango.MachineStudio.Publisher set { _comments = value; RaisePropertyChangedAuto(); } } - private bool _forcesUpdate; - - public bool ForcedUpdate - { - get { return _forcesUpdate; } - set { _forcesUpdate = value; RaisePropertyChangedAuto(); } - } - - private bool _isStable; - - public bool IsStable - { - get { return _isStable; } - set { _isStable = value; RaisePropertyChangedAuto(); } - } - private DeploymentSlot _deploymentSlot; public DeploymentSlot DeploymentSlot { @@ -176,8 +160,6 @@ namespace Tango.MachineStudio.Publisher Password = _hashGenerator.Encrypt(Password), Version = CurrentVersion.ToString(), Comments = Comments, - ForcedUpdate = ForcedUpdate, - IsStable = IsStable, }).Result; using (ZipFile zip = new ZipFile()) 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 c61e58fd8..c9bba3ad8 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.3.0")] +[assembly: AssemblyVersion("4.0.5.0")] [assembly: ComVisible(false)]
\ No newline at end of file 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 c13c7379a..573e56fff 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -362,7 +362,6 @@ namespace Tango.MachineStudio.UI.ViewModels { AccessToken = _authenticationProvider.AccessToken, Version = _applicationManager.Version.ToString(), - AcceptBetaRelease = _settings.AcceptBetaRelease, }).Result; IsUpdateAvailable = response.IsUpdateAvailable; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ReportIssueViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ReportIssueViewVM.cs index 21330a4fc..6df5fc4bc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ReportIssueViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ReportIssueViewVM.cs @@ -47,7 +47,7 @@ namespace Tango.MachineStudio.UI.ViewModels Project = project; WorkItem = workItem; - var area = project.Areas.FirstOrDefault(x => x.Name == _settings.DefaultIssueReportArea); + var area = project.GetAreaByName(_settings.DefaultIssueReportArea); if (area != null) { workItem.Area = area; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs index f671251f7..63cff2242 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs @@ -221,7 +221,6 @@ namespace Tango.MachineStudio.UI.ViewModels { AccessToken = _authentication.AccessToken, Version = _application.Version.ToString(), - AcceptBetaRelease = settings.AcceptBetaRelease, }).Result; if (response.IsUpdateAvailable) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml index 7387c4ae5..5f5e1042b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml @@ -35,7 +35,7 @@ </StackPanel> </Grid> - <Grid Grid.Row="1"> + <Grid Grid.Row="1" Focusable="True"> <DockPanel> <StackPanel DockPanel.Dock="Top"> <DockPanel> @@ -50,7 +50,28 @@ <DockPanel Margin="0 10 0 0"> <materialDesign:PackIcon Kind="Star" Width="24" Height="24" VerticalAlignment="Center" Margin="0 0 10 0" /> - <ComboBox materialDesign:HintAssist.Hint="Area" materialDesign:HintAssist.IsFloating="True" ItemsSource="{Binding Project.Areas}" SelectedItem="{Binding WorkItem.Area}" DisplayMemberPath="Name"></ComboBox> + <Grid> + <TextBox IsReadOnly="True" materialDesign:HintAssist.Hint="Area" materialDesign:HintAssist.IsFloating="True" Text="{Binding WorkItem.Area.Name}" VerticalAlignment="Bottom" Margin="0 0 0 3"></TextBox> + <ToggleButton x:Name="toggleArea"> + <ToggleButton.Template> + <ControlTemplate TargetType="ToggleButton"> + <Grid Background="Transparent"> + <Popup Height="200" AllowsTransparency="True" Width="{TemplateBinding ActualWidth}" PopupAnimation="Slide" IsOpen="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> + <Border Background="White" Margin="0 2 0 0" BorderBrush="Silver" BorderThickness="1" CornerRadius="3"> + <TreeView Loaded="TreeView_Loaded" ItemsSource="{Binding Project.Areas}" SelectedItemChanged="TreeView_SelectedItemChanged"> + <TreeView.ItemTemplate> + <HierarchicalDataTemplate ItemsSource="{Binding SubAreas}"> + <TextBlock Text="{Binding Name}" /> + </HierarchicalDataTemplate> + </TreeView.ItemTemplate> + </TreeView> + </Border> + </Popup> + </Grid> + </ControlTemplate> + </ToggleButton.Template> + </ToggleButton> + </Grid> </DockPanel> <DockPanel Margin="0 10 0 0"> @@ -101,7 +122,7 @@ <TextBox IsReadOnly="True" Text="{Binding ImageFile}"></TextBox> </DockPanel> </StackPanel> - + <Grid> <DockPanel> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs index 72bef1205..e17ed7d93 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs @@ -12,6 +12,8 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.UI.ViewModels; +using Tango.TFS; namespace Tango.MachineStudio.UI.Views { @@ -20,16 +22,47 @@ namespace Tango.MachineStudio.UI.Views /// </summary> public partial class ReportIssueView : UserControl { + private ReportIssueViewVM _vm; + public ReportIssueView() { InitializeComponent(); this.Loaded += ReportIssueView_Loaded; + this.DataContextChanged += ReportIssueView_DataContextChanged; + } + + private void ReportIssueView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) + { + _vm = this.DataContext as ReportIssueViewVM; } private void ReportIssueView_Loaded(object sender, RoutedEventArgs e) { txt_title.Focus(); } + + private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) + { + _vm.WorkItem.Area = e.NewValue as Area; + toggleArea.IsChecked = false; + } + + private TreeView tree; + + private void TreeView_Loaded(object sender, RoutedEventArgs e) + { + tree = sender as TreeView; + tree.ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged; + } + + private void ItemContainerGenerator_StatusChanged(object sender, EventArgs e) + { + if (tree.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated) + { + TreeViewItem i = tree.ItemContainerGenerator.ContainerFromIndex(0) as TreeViewItem; + i.IsExpanded = true; + } + } } } |
