aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2017-12-28 15:16:27 +0200
committerAvi Levkovich <avi@twine-s.com>2017-12-28 15:16:27 +0200
commitc056f991c0168f6449fac16c3b0cb165518c5e01 (patch)
treee5c69bb1f3e03029991efe15e930af80ff6712db /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
parent15799210aab388996f86808e000940093306ca41 (diff)
parent2d3f4bfd4b265888933ad8a7e21e4dd80aa1eda2 (diff)
downloadTango-c056f991c0168f6449fac16c3b0cb165518c5e01.tar.gz
Tango-c056f991c0168f6449fac16c3b0cb165518c5e01.zip
MERGE.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml73
1 files changed, 52 insertions, 21 deletions
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 cb7378666..14858c049 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -26,7 +26,7 @@
</Style.Triggers>
</Style>
</Grid.Style>
-
+
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
<materialDesign:DrawerHost.LeftDrawerContent>
<StackPanel MinWidth="300">
@@ -84,17 +84,48 @@
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" />
+ <Button Content="Machine Connection" Command="{Binding ConnectCommand}" />
+ <Button Content="Disconnect Machine" Command="{Binding DisconnectCommand}" />
<Separator/>
- <Button Content="Goodbye"/>
+ <Button Content="Exit" />
</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>
+ <Grid>
+ <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>
+
+ <Grid HorizontalAlignment="Right">
+ <StackPanel Orientation="Horizontal">
+ <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" FontSize="12" ToolTip="Connect to machine on the local network" BorderThickness="0" Command="{Binding ConnectCommand}">
+ <!--<Button.Background>
+ <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
+ <GradientStop Color="White" Offset="0.4" />
+ <GradientStop Color="#75E0FA" Offset="1"/>
+ </LinearGradientBrush>
+ </Button.Background>-->
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Machine Connection" VerticalAlignment="Center" Foreground="White"></TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" Width="16" Height="16">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Foreground" Value="#FF6767"></Setter>
+ <Setter Property="Kind" Value="LanDisconnect"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True">
+ <Setter Property="Foreground" Value="#03FF8E"></Setter>
+ <Setter Property="Kind" Value="LanConnect"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ </Grid>
+ </Grid>
</DockPanel>
</materialDesign:ColorZone>
@@ -166,22 +197,22 @@
<Setter Property="Opacity" Value="0"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding CurrentModule}" Value="{x:Null}">
+ <DataTrigger Binding="{Binding IsModuleLoaded}" Value="False">
<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>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.5"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.5"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.5"></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>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.5"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.5"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.5"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
@@ -189,7 +220,7 @@
</Style.Triggers>
</Style>
</Grid.Style>
- <ContentPresenter Content="{Binding CurrentModule.MainView}"></ContentPresenter>
+ <ContentPresenter Content="{Binding CurrentModule.MainView}"/>
</Grid>
</Grid>
@@ -204,16 +235,16 @@
<Style.Triggers>
<DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
<DataTrigger.EnterActions>
- <BeginStoryboard>
+ <BeginStoryboard HandoffBehavior="Compose">
<Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" FillBehavior="HoldEnd" To="1" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
- <BeginStoryboard>
+ <BeginStoryboard HandoffBehavior="Compose">
<Storyboard>
- <DoubleAnimation BeginTime="00:00:01" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" From="1" Duration="00:00:0.5"></DoubleAnimation>
+ <DoubleAnimation BeginTime="00:00:02" FillBehavior="HoldEnd" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" From="1" Duration="00:00:0.5"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>