aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2017-12-19 12:28:20 +0200
committerAvi Levkovich <avi@twine-s.com>2017-12-19 12:28:20 +0200
commit76aa983631df4fa5b16b170e2f6dd845c5ac9531 (patch)
tree6b2b4d0776c54536ec07aabc6be94857dcee91fc /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
parent6bf71c81050b824398dc82ce4b69cdf71fb4a2f7 (diff)
parentb421701fd5cf000a16cab9b1fe9eda812ccce8c3 (diff)
downloadTango-76aa983631df4fa5b16b170e2f6dd845c5ac9531.tar.gz
Tango-76aa983631df4fa5b16b170e2f6dd845c5ac9531.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml42
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs61
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml240
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs28
8 files changed, 476 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
new file mode 100644
index 000000000..459c8fde8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.LoadingView"
+ 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:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="White">
+ <Grid>
+ <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+ <StackPanel>
+ <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant" Width="100"></Image>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="70" Foreground="{StaticResource AccentColorBrush}">Machine Studio</TextBlock>
+ </StackPanel>
+ <TextBlock HorizontalAlignment="Right" FontSize="18" Margin="0 0 -50 0" Foreground="{StaticResource AccentColorBrush}">Twine Solutions</TextBlock>
+ <mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80"></mahapps:ProgressRing>
+ <TextBlock HorizontalAlignment="Center" FontSize="18" FontStyle="Italic">Loading, please wait...</TextBlock>
+ </StackPanel>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml.cs
new file mode 100644
index 000000000..15eba3cf8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.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 LoadingView.xaml
+ /// </summary>
+ public partial class LoadingView : UserControl
+ {
+ public LoadingView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
new file mode 100644
index 000000000..1531370af
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
@@ -0,0 +1,42 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.LoginView"
+ 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: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:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" DataContext="{Binding LoginViewVM, Source={StaticResource Locator}}" Background="White">
+
+ <UserControl.Resources>
+ <rules:Required x:Key="Required"></rules:Required>
+ </UserControl.Resources>
+
+
+ <UserControl.InputBindings>
+ <KeyBinding Key="Return" Command="{Binding LoginCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Password}"></KeyBinding>
+ </UserControl.InputBindings>
+ <Grid>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="40">
+ <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant" Width="100"></Image>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="70" Foreground="{StaticResource AccentColorBrush}">Machine Studio</TextBlock>
+ </StackPanel>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="320" Margin="0 120 0 0">
+ <TextBlock HorizontalAlignment="Center" FontSize="24">Login to your account</TextBlock>
+ <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" Width="100" Margin="0 20 0 0"></Image>
+ <DockPanel Margin="0 20 0 0">
+ <materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=txtEmail, Path=BorderBrush}" Kind="EmailOutline" />
+ <TextBox x:Name="txtEmail" IsTabStop="True" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Email" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Text="{Binding Email,UpdateSourceTrigger=PropertyChanged,ValidatesOnNotifyDataErrors=True}" AutomationProperties.IsRequiredForForm="True" />
+ </DockPanel>
+ <DockPanel Margin="0 20 0 0">
+ <materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=txtPass, Path=BorderBrush}" Kind="Key" />
+ <PasswordBox x:Name="txtPass" PasswordChanged="txtPass_PasswordChanged" 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}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Password}" Content="LOGIN">
+
+ </Button>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs
new file mode 100644
index 000000000..027e37682
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs
@@ -0,0 +1,61 @@
+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;
+using static Tango.SharedUI.Controls.MultiTransitionControl;
+using SimpleValidator.Extensions;
+using Tango.Settings;
+using Tango.Core.Cryptography;
+
+namespace Tango.MachineStudio.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for LoginView.xaml
+ /// </summary>
+ public partial class LoginView : UserControl, ITransitionView
+ {
+ private Rfc2898Cryptographer cryptographer;
+
+ public LoginView()
+ {
+ InitializeComponent();
+
+ cryptographer = new Rfc2898Cryptographer();
+ }
+
+ public String Password
+ {
+ get { return (String)GetValue(PasswordProperty); }
+ set { SetValue(PasswordProperty, value); }
+ }
+ public static readonly DependencyProperty PasswordProperty =
+ DependencyProperty.Register("Password", typeof(String), typeof(LoginView), new PropertyMetadata(null));
+
+ public void OnTransitionCompleted()
+ {
+ txtEmail.Focus();
+
+ if (txtEmail.Text.IsNotNullOrWhiteSpace())
+ {
+ txtPass.Focus();
+ }
+
+ txtPass.Password = cryptographer.Decrypt(SettingsManager.Default.MachineStudio.LastLoginPassword);
+ }
+
+ private void txtPass_PasswordChanged(object sender, RoutedEventArgs e)
+ {
+ Password = txtPass.Password;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
new file mode 100644
index 000000000..cb7378666
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -0,0 +1,240 @@
+<controls:View x:Class="Tango.MachineStudio.UI.Views.MainView"
+ 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:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
+ xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views;assembly=Tango.MachineStudio.DB"
+ xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}">
+ <Grid>
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
+ <Setter Property="Cursor" Value="AppStarting"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="False">
+ <Setter Property="Cursor" Value="Arrow"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
+ <materialDesign:DrawerHost.LeftDrawerContent>
+ <StackPanel MinWidth="300">
+ <Grid>
+ <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
+ HorizontalAlignment="Right" Margin="16"
+ IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />
+
+ <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
+ <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image>
+ <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock>
+ </StackPanel>
+ </Grid>
+ <StackPanel Margin="0 16 0 0">
+ <ListBoxItem>
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="PreviewMouseUp">
+ <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon VerticalAlignment="Center" Kind="Home" Width="32" Height="32"></materialDesign:PackIcon>
+ <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock>
+ </StackPanel>
+ </ListBoxItem>
+ </StackPanel>
+ <ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch">
+ <ListBox.ItemContainerStyle>
+ <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter>
+ </Style>
+ </ListBox.ItemContainerStyle>
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Grid Background="Transparent">
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="PreviewMouseUp">
+ <i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}"></i:InvokeCommandAction>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+
+ <TextBlock Text="{Binding Name}" ToolTip="{Binding Description}"></TextBlock>
+ </Grid>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ </StackPanel>
+ </materialDesign:DrawerHost.LeftDrawerContent>
+ <DockPanel>
+ <materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
+ Mode="PrimaryMid" DockPanel.Dock="Top">
+ <DockPanel>
+ <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}"
+ x:Name="MenuToggleButton"/>
+ <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
+ <StackPanel>
+ <Button Content="Home"/>
+ <Button Content="Nice Popup"/>
+ <Button Content="Can't Touch This" IsEnabled="False" />
+ <Separator/>
+ <Button Content="Goodbye"/>
+ </StackPanel>
+ </materialDesign:PopupBox>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center">
+ <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <TextBlock Text="Machine Studio" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36"/>
+ </StackPanel>
+ </DockPanel>
+ </materialDesign:ColorZone>
+
+ <Grid>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Row="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="150"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+ <Grid>
+ <StackPanel Margin="30 20" HorizontalAlignment="Left">
+ <TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}">Welcome to Machine Studio</TextBlock>
+ <TextBlock HorizontalAlignment="Right" Margin="0 5 -130 0" FontStyle="Italic" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Foreground="{StaticResource AccentColorBrush}">Select Your Studio Module...</TextBlock>
+ </StackPanel>
+ </Grid>
+ <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Grid.Row="2" Margin="10">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel IsItemsHost="True"></WrapPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <materialDesign:Card Width="300" Margin="10" Height="400">
+ <Grid >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="180" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
+ <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module">
+ <materialDesign:PackIcon Kind="Play" Width="30" Height="30" />
+ </Button>
+ <StackPanel Grid.Row="1" Margin="8,24,8,0">
+ <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock>
+ </StackPanel>
+ <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
+ <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}">
+ <StackPanel>
+ <Button Content="More" />
+ <Button Content="Options" />
+ </StackPanel>
+ </materialDesign:PopupBox>
+ </StackPanel>
+ </Grid>
+ </materialDesign:Card>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Grid>
+
+ <Grid Grid.Row="1" RenderTransformOrigin="0.5,0.5">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="0" ScaleY="0"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Opacity" Value="0"></Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding CurrentModule}" Value="{x:Null}">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.2"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ <ContentPresenter Content="{Binding CurrentModule.MainView}"></ContentPresenter>
+ </Grid>
+ </Grid>
+
+ <Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="40" Padding="5" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation BeginTime="00:00:01" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" From="1" Duration="00:00:0.5"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Border.Background>
+ <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
+ <GradientStop Color="#03A9F4"/>
+ <GradientStop Color="#0081BB" Offset="1"/>
+ </LinearGradientBrush>
+ </Border.Background>
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0">
+ <mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing>
+ <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0"></TextBlock>
+ </StackPanel>
+ </Border>
+ </Grid>
+ </DockPanel>
+ </materialDesign:DrawerHost>
+ </Grid>
+</controls:View>
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
new file mode 100644
index 000000000..520b69741
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
@@ -0,0 +1,31 @@
+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;
+using Tango.MachineStudio.UI.SupervisingController;
+using Tango.SharedUI;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : View, IMainView
+ {
+ public MainView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml
new file mode 100644
index 000000000..487dfe1f8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.ShutdownView"
+ 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:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" Background="White" DataContext="{Binding ShutdownViewVM, Source={StaticResource Locator}}">
+ <Grid>
+ <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+ <StackPanel>
+ <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant" Width="100"></Image>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="70" Foreground="Gray">Machine Studio</TextBlock>
+ </StackPanel>
+ <TextBlock HorizontalAlignment="Right" FontSize="18" Margin="0 0 -50 0" Foreground="Gray">Twine Solutions</TextBlock>
+ <mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80" Foreground="Gray"></mahapps:ProgressRing>
+ <TextBlock HorizontalAlignment="Center" FontSize="18" FontStyle="Italic" Foreground="Gray">Shutting Down, please wait...</TextBlock>
+ </StackPanel>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs
new file mode 100644
index 000000000..e1d49aec0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.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 ShutdownView.xaml
+ /// </summary>
+ public partial class ShutdownView : UserControl
+ {
+ public ShutdownView()
+ {
+ InitializeComponent();
+ }
+ }
+}