diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-24 01:37:08 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-24 01:37:08 +0200 |
| commit | 1d7dbc075ecf63d583702d9fab2096164bdc4dea (patch) | |
| tree | 5354e65b99b2261fc710991559e2335a0531f243 | |
| parent | 41fb02ff132d3adc9083981fd64e3f82de979ca0 (diff) | |
| download | Tango-1d7dbc075ecf63d583702d9fab2096164bdc4dea.tar.gz Tango-1d7dbc075ecf63d583702d9fab2096164bdc4dea.zip | |
FSE menu..
19 files changed, 316 insertions, 12 deletions
diff --git a/Software/Graphics/FSE/Modules/account.png b/Software/Graphics/FSE/Modules/account.png Binary files differnew file mode 100644 index 000000000..0f0dae3cb --- /dev/null +++ b/Software/Graphics/FSE/Modules/account.png diff --git a/Software/Graphics/FSE/Modules/diagnostics.png b/Software/Graphics/FSE/Modules/diagnostics.png Binary files differnew file mode 100644 index 000000000..33fbdd923 --- /dev/null +++ b/Software/Graphics/FSE/Modules/diagnostics.png diff --git a/Software/Graphics/FSE/Modules/settings.png b/Software/Graphics/FSE/Modules/settings.png Binary files differnew file mode 100644 index 000000000..a9d0314d1 --- /dev/null +++ b/Software/Graphics/FSE/Modules/settings.png diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/DiagnosticsModule.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/DiagnosticsModule.cs index cfa1b81ca..3a09962f5 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/DiagnosticsModule.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/DiagnosticsModule.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media.Imaging; +using Tango.BL.Enumerations; using Tango.FSE.Common; using Tango.FSE.Diagnostics.Views; @@ -16,7 +17,7 @@ namespace Tango.FSE.Diagnostics public override string Description { get; } = "Diagnostics module"; public override BitmapSource Image { get; } public override Type MainViewType { get; } = typeof(MainView); - public override Tango.BL.Enumerations.Permissions Permission { get; } = BL.Enumerations.Permissions.RunPPC; + public override Tango.BL.Enumerations.Permissions Permission { get; } = Permissions.RunPPC; public override void Dispose() { diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Images/diagnostics.png b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Images/diagnostics.png Binary files differnew file mode 100644 index 000000000..33fbdd923 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Images/diagnostics.png diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Tango.FSE.Diagnostics.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Tango.FSE.Diagnostics.csproj index 5fea87812..db2ea7ce5 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Tango.FSE.Diagnostics.csproj +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Tango.FSE.Diagnostics.csproj @@ -13,6 +13,8 @@ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> <Deterministic>true</Deterministic> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -32,6 +34,9 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath> + </Reference> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> </Reference> @@ -41,9 +46,24 @@ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> </Reference> + <Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="MaterialDesignColors, Version=1.2.2.920, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll</HintPath> + </Reference> + <Reference Include="MaterialDesignThemes.Wpf, Version=3.0.1.920, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MaterialDesignThemes.3.0.1\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Data" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> <Reference Include="System.Xml" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Core" /> @@ -91,6 +111,10 @@ </None> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> + <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> + <Name>Tango.AutoComplete</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj"> <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> @@ -99,10 +123,18 @@ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> <Name>Tango.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj"> + <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> + <Name>Tango.Integration</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj"> <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> <Name>Tango.Logging</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj"> <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> <Name>Tango.Settings</Name> @@ -111,6 +143,14 @@ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> <Name>Tango.SharedUI</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.FSE.BL\Tango.FSE.BL.csproj"> + <Project>{834c81c3-09b5-45d7-be12-e7d1e6655a7c}</Project> + <Name>Tango.FSE.BL</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.FSE.Common\Tango.FSE.Common.csproj"> <Project>{bc37cccb-7392-4f78-8d1c-e9629e6e046e}</Project> <Name>Tango.FSE.Common</Name> @@ -122,5 +162,15 @@ <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> + <ItemGroup> + <Resource Include="Images\diagnostics.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets'))" /> + </Target> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/ViewModels/MainViewVM.cs index 6e2e888a0..da3d79b67 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/ViewModels/MainViewVM.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.FSE.Common; +using Tango.FSE.Common.Navigation; +using Tango.SharedUI.Helpers; namespace Tango.FSE.Diagnostics.ViewModels { @@ -11,7 +14,19 @@ namespace Tango.FSE.Diagnostics.ViewModels { public override void OnApplicationStarted() { - + InvokeUI(() => + { + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { + Debug.WriteLine("Pressed"); + }) + { + Name = "Diagnostics", + Index = 1, + Description = "Examine the machine", + Image = ResourceHelper.GetImageFromResources("Images/diagnostics.png"), + }); + }); } } } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/packages.config b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/packages.config index 08b9dd27c..dd8c723e4 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/packages.config +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/packages.config @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <packages> + <package id="ControlzEx" version="3.0.2.4" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="MahApps.Metro" version="1.6.5" targetFramework="net461" /> + <package id="MaterialDesignColors" version="1.2.2" targetFramework="net461" /> + <package id="MaterialDesignThemes" version="3.0.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> </packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/INavigationManager.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/INavigationManager.cs index 0939516d6..f22a2f931 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/INavigationManager.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/INavigationManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -13,6 +14,11 @@ namespace Tango.FSE.Common.Navigation public interface INavigationManager { /// <summary> + /// Gets the menu items. + /// </summary> + ObservableCollection<NavigationMenuItem> MenuItems { get; } + + /// <summary> /// Gets the current module. /// </summary> IFSEModule CurrentModule { get; } diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/NavigationMenuItem.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/NavigationMenuItem.cs new file mode 100644 index 000000000..2f72f8771 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Navigation/NavigationMenuItem.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; +using Tango.Core; +using Tango.Core.Commands; + +namespace Tango.FSE.Common.Navigation +{ + public class NavigationMenuItem : ExtendedObject + { + private Action _pressAction; + + public String Name { get; set; } + + public String Description { get; set; } + + public BitmapSource Image { get; set; } + + public bool IsVisible { get; set; } + + public bool IsEnabled { get; set; } + + public RelayCommand PressCommand { get; set; } + + public int Index { get; set; } + + public NavigationMenuItem(Action pressAction) + { + IsVisible = true; + IsEnabled = true; + + _pressAction = pressAction; + + PressCommand = new RelayCommand(() => + { + _pressAction?.Invoke(); + }); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj index a1f3e3678..c08685a46 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj @@ -99,6 +99,7 @@ <Compile Include="Gateway\IGatewayService.cs" /> <Compile Include="Helpers\DesignModeHelper.cs" /> <Compile Include="Modules\IFSEModuleLoader.cs" /> + <Compile Include="Navigation\NavigationMenuItem.cs" /> <Compile Include="Notifications\AppBarItem.cs" /> <Compile Include="Notifications\AppButton.cs" /> <Compile Include="Notifications\INotificationProvider.cs" /> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/account.png b/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/account.png Binary files differnew file mode 100644 index 000000000..0f0dae3cb --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/account.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/settings.png b/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/settings.png Binary files differnew file mode 100644 index 000000000..a9d0314d1 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Images/Menu/settings.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Navigation/DefaultNavigationManager.cs index dab12fdb7..845049f54 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Navigation/DefaultNavigationManager.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Navigation/DefaultNavigationManager.cs @@ -1,11 +1,14 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using System.Windows; +using System.Windows.Data; using System.Windows.Media; using Tango.Core; using Tango.Core.Commands; @@ -46,6 +49,11 @@ namespace Tango.FSE.UI.Navigation private Stack<String> _navigationHistory; /// <summary> + /// Gets the menu items. + /// </summary> + public ObservableCollection<NavigationMenuItem> MenuItems { get; private set; } + + /// <summary> /// Gets the current view model. /// </summary> public FSEViewModel CurrentVM @@ -80,6 +88,12 @@ namespace Tango.FSE.UI.Navigation public DefaultNavigationManager(IFSEModuleLoader moduleLoader, IDispatcherProvider dispatcherProvider, INotificationProvider notificationProvider) { IsBackEnabled = true; + + MenuItems = new ObservableCollection<NavigationMenuItem>(); + MenuItems.EnableCrossThreadOperations(); + ICollectionView collection = CollectionViewSource.GetDefaultView(MenuItems); + collection.SortDescriptions.Add(new SortDescription("Index", ListSortDirection.Ascending)); + _awaitingVMResults = new List<AwaitingVMResult>(); _navigationHistory = new Stack<String>(); _moduleLoader = moduleLoader; diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj index fc27d51e6..31205b520 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj @@ -358,6 +358,10 @@ <ItemGroup> <Resource Include="Images\Abstracts\abstract2.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\Menu\account.png" /> + <Resource Include="Images\Menu\settings.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs index feeaabaa6..98710e23a 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs @@ -6,9 +6,11 @@ using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; using Tango.FSE.Common; +using Tango.FSE.Common.Navigation; using Tango.FSE.Common.Notifications; using Tango.FSE.UI.Panes; using Tango.Integration.ExternalBridge; +using Tango.SharedUI.Helpers; namespace Tango.FSE.UI.ViewModels { @@ -93,6 +95,28 @@ namespace Tango.FSE.UI.ViewModels public override void OnApplicationStarted() { DiagnosticsProvider.FrameReceived += DiagnosticsProvider_FrameReceived; + + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { + Debug.WriteLine("Pressed"); + }) + { + Name = "Account", + Index = -1, + Description = "Examine the machine", + Image = ResourceHelper.GetImageFromResources("Images/Menu/account.png"), + }); + + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { + Debug.WriteLine("Pressed"); + }) + { + Name = "Settings", + Index = 2, + Description = "Examine the machine", + Image = ResourceHelper.GetImageFromResources("Images/Menu/settings.png"), + }); } private void DiagnosticsProvider_FrameReceived(object sender, Common.Diagnostics.DiagnosticsFrameReceivedEventArgs e) diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/MainViewVM.cs index 4d88a8967..5c333ac81 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/MainViewVM.cs @@ -9,8 +9,6 @@ namespace Tango.FSE.UI.ViewModels { public class MainViewVM : FSEViewModel { - public String Text { get; set; } = "This is a simple text binding"; - public override void OnApplicationStarted() { diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml index f35505519..3d78479e3 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml @@ -108,7 +108,7 @@ <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> - <ThicknessAnimation Storyboard.TargetProperty="Margin" To="60 0 0 0" Duration="00:00:0.2"></ThicknessAnimation> + <ThicknessAnimation Storyboard.TargetProperty="Margin" To="160 0 0 0" Duration="00:00:0.2"></ThicknessAnimation> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> @@ -284,7 +284,7 @@ <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="Width" To="200" Duration="00:00:0.2" /> + <DoubleAnimation Storyboard.TargetProperty="Width" To="300" Duration="00:00:0.2" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> @@ -304,7 +304,35 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> - <Image x:Name="imgBack" Source="/Images/abstracts/abstract1.png" Grid.RowSpan="2" VerticalAlignment="Top" Stretch="UniformToFill" Opacity="0.6" Height="{Binding ElementName=gridMain,Path=ActualHeight}"></Image> + <Image x:Name="imgBack" Source="/Images/abstracts/abstract1.png" Grid.RowSpan="2" VerticalAlignment="Top" Stretch="UniformToFill" Opacity="0.6" Height="{Binding ElementName=gridMain,Path=ActualHeight}"> + <Image.Style> + <Style TargetType="Image"> + <Setter Property="Effect"> + <Setter.Value> + <BlurEffect Radius="0"></BlurEffect> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsMenuOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Effect.Radius" To="20" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Effect.Radius" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> <Path Grid.RowSpan="2" VerticalAlignment="Top" Height="500" Fill="{StaticResource FSE_PrimaryBackgroundLightBrush}"> <Path.Data> @@ -318,8 +346,124 @@ </Path.Data> </Path> - <Grid> - <Image Source="{StaticResource FSE_Machine_Full}" Stretch="Uniform" RenderOptions.BitmapScalingMode="Fant" Margin="10" /> + <Grid Panel.ZIndex="100"> + <Image Source="{StaticResource FSE_Machine_Full}" Stretch="Uniform" HorizontalAlignment="Left" RenderOptions.BitmapScalingMode="Fant" Margin="10" /> + </Grid> + + <Grid Grid.Row="1"> + <ItemsControl ItemsSource="{Binding NavigationManager.MenuItems}" Margin="0 50 0 0"> + <ItemsControl.Style> + <Style TargetType="ItemsControl"> + <Setter Property="RenderTransform"> + <Setter.Value> + <TranslateTransform X="0" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsMenuOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.X" To="-200" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.X" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </ItemsControl.Style> + <ItemsControl.ItemTemplate> + <DataTemplate> + <DockPanel> + <Grid Width="55" Height="55" Margin="0 10"> + <Ellipse Stroke="{StaticResource FSE_PrimaryForegroundBrush}" StrokeThickness="1"></Ellipse> + <Image Source="{Binding Image}" RenderOptions.BitmapScalingMode="Fant" Width="35" Stretch="Uniform" /> + </Grid> + </DockPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + + <Border Margin="0 -90 0 0"> + <Border.Background> + <SolidColorBrush Color="Black" Opacity="0.8" /> + </Border.Background> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Opacity" Value="0"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsMenuOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.3" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.3" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + + <Grid> + <ItemsControl ItemsSource="{Binding NavigationManager.MenuItems}" Margin="0 140 0 0"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Border material:RippleAssist.Feedback="White" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" Cursor="Hand"> + <i:Interaction.Triggers> + <i:EventTrigger EventName="PreviewMouseUp"> + <i:InvokeCommandAction Command="{Binding PressCommand}" /> + </i:EventTrigger> + </i:Interaction.Triggers> + <Border.Effect> + <DropShadowEffect Direction="-90" ShadowDepth="0" Color="DimGray" BlurRadius="10" /> + </Border.Effect> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Opacity" Value="0"></Setter> + <Style.Triggers> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Opacity" Value="1"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </Border.Style> + <Grid> + <Canvas HorizontalAlignment="Right"> + <Polygon Fill="#545454" Points="0,0 20,20 20,55 0,75"> + + </Polygon> + </Canvas> + <material:Ripple /> + </Grid> + </Border> + <DockPanel IsHitTestVisible="False"> + <Grid Width="55" Height="55" Margin="10 10" HorizontalAlignment="Left"> + <Image Source="{Binding Image}" RenderOptions.BitmapScalingMode="Fant" Width="35" Stretch="Uniform" /> + </Grid> + <TextBlock Margin="10 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock> + </DockPanel> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Grid> + </Border> </Grid> <Rectangle HorizontalAlignment="Right" Grid.RowSpan="2" StrokeThickness="1" Stroke="{StaticResource FSE_BorderBrush}" StrokeDashArray="5" Margin="0 90 0 0" /> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml.cs index 2ec734c71..f25e85e0c 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml.cs @@ -50,9 +50,8 @@ namespace Tango.FSE.UI.Views private void GridMenu_MouseEnter(object sender, MouseEventArgs e) { _vm.IsMenuOpened = true; - - StartPointAnimation(polyTopRight, new Point(200, 0)); - StartPointAnimation(polyBottomRight, new Point(200, 400)); + StartPointAnimation(polyTopRight, new Point(300, 0)); + StartPointAnimation(polyBottomRight, new Point(300, 400)); } private void StartPointAnimation(LineSegment segment, Point to) |
