aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-04-25 09:44:13 +0300
committerAvi Levkovich <avi@twine-s.com>2018-04-25 09:44:13 +0300
commitd352d3b3bd785d9eb8a93347333de0b357f7ce0e (patch)
tree2488173ea7e4f9d5ddb6ef53de57998815732847 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
parentc82908b6d5314bc2602ea10c373267b79fbdd810 (diff)
parenta89077bae848d010ae70da6be572dee3b824a895 (diff)
downloadTango-d352d3b3bd785d9eb8a93347333de0b357f7ce0e.tar.gz
Tango-d352d3b3bd785d9eb8a93347333de0b357f7ce0e.zip
Start SPI ADS1220
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml16
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml92
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs28
5 files changed, 142 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
index 7f54263b7..08e1006c1 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
@@ -5,6 +5,7 @@
xmlns:rules="clr-namespace:Tango.MachineStudio.Common.ValidationRules;assembly=Tango.MachineStudio.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
xmlns:helpers="clr-namespace:Tango.SharedUI.Helpers;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
@@ -35,7 +36,7 @@
<PasswordBox x:Name="txtPass" helpers:PasswordHelper.Attach="True" helpers:PasswordHelper.Password="{Binding Password,Mode=TwoWay}" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Password" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" AutomationProperties.IsRequiredForForm="True" />
</DockPanel>
<CheckBox Margin="25 20 0 0" IsChecked="{Binding RememberMe}">Remember me</CheckBox>
- <Button Margin="25 20 0 0" Height="50" Command="{Binding LoginCommand}" Content="LOGIN">
+ <Button AutomationProperties.AutomationId="{x:Static automation:UI.LoginButton}" Margin="25 20 0 0" Height="50" Command="{Binding LoginCommand}" Content="LOGIN">
</Button>
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
index dd3d122b6..86723479b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -316,6 +316,22 @@
</Image.Style>
</Image>
</Button>
+
+ <Button Cursor="Hand" Command="{Binding ReportIssueCommand}" IsEnabled="{Binding TFSClient.IsInitialized}">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource emptyButton}">
+ <Setter Property="ToolTip" Value="Report and issue"></Setter>
+ <Setter Property="Opacity" Value="1"></Setter>
+ <Style.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="ToolTip" Value="The team foundation service is not available."></Setter>
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ <Image Margin="10 0 0 0" Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant" />
+ </Button>
</StackPanel>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
index df1f97f23..1e894f3f2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -27,6 +26,7 @@ using Tango.Core.Helpers;
using Tango.SharedUI.Helpers;
using Tango.Logging;
using static Tango.SharedUI.Controls.NavigationControl;
+using Tango.Core.DI;
namespace Tango.MachineStudio.UI.Views
{
@@ -41,7 +41,7 @@ namespace Tango.MachineStudio.UI.Views
{
InitializeComponent();
- _loader = ServiceLocator.Current.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader;
+ _loader = TangoIOC.Default.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader;
_loader.ModulesLoaded += Loader_ModulesLoaded;
}
@@ -51,7 +51,7 @@ namespace Tango.MachineStudio.UI.Views
{
LogManager.Default.Log("Loading modules views...");
- var item = ServiceLocator.Current.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
+ var item = TangoIOC.Default.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
var modules = _loader.UserModules.ToList();
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
new file mode 100644
index 000000000..f2e3038b9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
@@ -0,0 +1,92 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.ReportIssueView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
+ xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
+ 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="650" Background="White" d:DataContext="{d:DesignInstance Type=vm:ReportIssueViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ <tfss:TeamMembersProvider x:Key="TeamMembersProvider" />
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="90"/>
+ <RowDefinition Height="377*"/>
+ <RowDefinition Height="70"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <StackPanel Orientation="Horizontal">
+ <Image Source="/Images/bug.png" Width="48" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20">Report Issue</TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="1">
+ <StackPanel>
+ <TextBox materialDesign:HintAssist.Hint="Title" materialDesign:HintAssist.IsFloating="True" FontSize="16" Text="{Binding WorkItem.Title}"></TextBox>
+
+ <autoComplete:AutoCompleteTextBox Provider="{StaticResource TeamMembersProvider}" SelectedItem="{Binding WorkItem.AssignedTo,Mode=TwoWay}" DisplayMember="DisplayName" Margin="0 10 0 0" materialDesign:HintAssist.Hint="Assigned To" materialDesign:HintAssist.IsFloating="True"></autoComplete:AutoCompleteTextBox>
+ <ComboBox Margin="0 10 0 0" materialDesign:HintAssist.Hint="Area" materialDesign:HintAssist.IsFloating="True" ItemsSource="{Binding Project.Areas}" SelectedItem="{Binding WorkItem.Area}" DisplayMemberPath="Name"></ComboBox>
+ <ComboBox Margin="0 10 0 0" materialDesign:HintAssist.Hint="Severity" materialDesign:HintAssist.IsFloating="True" ItemsSource="{Binding Source={x:Type tfs:Severity},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding WorkItem.Severity}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+
+ <TextBlock Margin="0 10 0 0">Tags</TextBlock>
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Height="120">
+ <ItemsControl ItemsSource="{Binding SelectedTags}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel IsItemsHost="True" Orientation="Horizontal" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <ToggleButton Style="{StaticResource emptyToggleButton}" IsChecked="{Binding IsSelected}" Cursor="Hand">
+ <Border CornerRadius="5" Margin="0 5 5 5" Padding="5" BorderThickness="1" BorderBrush="DimGray">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="Silver"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="White"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <TextBlock Text="{Binding Data.Name}" FontSize="11"></TextBlock>
+ </Border>
+ </ToggleButton>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="2">
+ <Button HorizontalAlignment="Right" Width="140" Command="{Binding OKCommand}">SUBMIT</Button>
+
+ <ItemsControl ItemsSource="{Binding ValidationErrors}" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" Visibility="Visible">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Foreground="#FF4C4C" Margin="0 2 0 0"><Run>*</Run> <Run Text="{Binding}"></Run></TextBlock>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
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
new file mode 100644
index 000000000..91a288d3e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for ReportIssueView.xaml
+ /// </summary>
+ public partial class ReportIssueView : UserControl
+ {
+ public ReportIssueView()
+ {
+ InitializeComponent();
+ }
+ }
+}