diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-05-08 17:11:38 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-05-08 17:11:38 +0300 |
| commit | f1d5de87c0335b5c954eceef94c8c7f72278d7df (patch) | |
| tree | 4565b01453a00711c3c1136ba6a2302e9257f66e /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | 32ff3d6cc46e121a221232c67515e2f58e737bf2 (diff) | |
| download | Tango-f1d5de87c0335b5c954eceef94c8c7f72278d7df.tar.gz Tango-f1d5de87c0335b5c954eceef94c8c7f72278d7df.zip | |
Added Machine Type to TFS Lib & MS.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
3 files changed, 12 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index 78230b8a0..2efe4c719 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -402,6 +402,7 @@ namespace Tango.MachineStudio.UI.StudioApplication ConnectedMachine = connectedMachine; var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); ConnectedMachine.JobUploadStrategy = settings.JobUploadStrategy; + settings.LastConnectedMachineType = Machine.MachineType; } else { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs index b716ed1fb..7a0a9414c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs @@ -152,6 +152,8 @@ namespace Tango.MachineStudio.UI.TFS throw LogManager.Default.Log(new AuthenticationException($"User '{user_email}' is not part of the Tango VSTS team. Please contact your administrator.")); } + var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); + item.CreatedBy = currentUser; item.ChangedBy = currentUser; item.AuthorizedAs = currentUser; @@ -161,7 +163,8 @@ namespace Tango.MachineStudio.UI.TFS item.Severity = Severity.Medium; item.State = State.New; item.Type = WorkItemType.Bug; - item.Environment = SettingsManager.Default.GetOrCreate<MachineStudioSettings>().DeploymentSlot.ToDescription(); + item.Environment = settings.DeploymentSlot.ToDescription(); + item.MachineType = (MachineType)settings.LastConnectedMachineType; foreach (var window in Application.Current.Windows.OfType<Window>().Where(x => !String.IsNullOrWhiteSpace(x.Title))) { 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 aac712f59..3eeb5f901 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml @@ -12,7 +12,7 @@ xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS" xmlns:tfss="clr-namespace:Tango.MachineStudio.UI.TFS" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" - mc:Ignorable="d" Width="530" Height="660" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ReportIssueViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> + mc:Ignorable="d" Width="530" Height="700" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ReportIssueViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> <UserControl.Resources> <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" /> @@ -44,6 +44,11 @@ </DockPanel> <DockPanel Margin="0 10 0 0"> + <materialDesign:PackIcon Kind="Settings" Width="24" Height="24" VerticalAlignment="Center" Margin="0 0 10 0" /> + <ComboBox materialDesign:HintAssist.Hint="Machine Type" materialDesign:HintAssist.IsFloating="True" ItemsSource="{Binding Source={x:Type tfs:MachineType},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding WorkItem.MachineType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + </DockPanel> + + <DockPanel Margin="0 10 0 0"> <materialDesign:PackIcon Kind="Account" Width="24" Height="24" VerticalAlignment="Center" Margin="0 0 10 0" /> <autoComplete:AutoCompleteTextBox Provider="{StaticResource TeamMembersProvider}" SelectedItem="{Binding WorkItem.AssignedTo,Mode=TwoWay}" DisplayMember="DisplayName" materialDesign:HintAssist.Hint="Assigned To" materialDesign:HintAssist.IsFloating="True"></autoComplete:AutoCompleteTextBox> </DockPanel> @@ -83,7 +88,7 @@ <materialDesign:PackIcon Kind="Tag" Width="24" Height="24" VerticalAlignment="Center" Margin="0 0 10 0" /> <TextBlock VerticalAlignment="Center"><Run>Tags</Run> <Run FontSize="10" Foreground="Gray">(highlight selected tags)</Run></TextBlock> </DockPanel> - <ScrollViewer Margin="30 0 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Height="120"> + <ScrollViewer Margin="30 0 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Height="100"> <ItemsControl ItemsSource="{Binding SelectedTags}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> |
