aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-12-14 14:43:25 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-12-14 14:43:25 +0200
commite352c4e5f742585e4feeb2ca3183bd4d0282a567 (patch)
treee93b09e5fc5ed12e0e4ae9b6d2e268e3bc0c5d1e /Software/Visual_Studio/MachineStudio/Modules
parentb6615cec573616c9b6469c010982dda689ee3844 (diff)
downloadTango-e352c4e5f742585e4feeb2ca3183bd4d0282a567.tar.gz
Tango-e352c4e5f742585e4feeb2ca3183bd4d0282a567.zip
Implemented new MDI Container Control !
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml4
2 files changed, 10 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs
index 00c7d341a..fc9051edb 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs
@@ -1,21 +1,25 @@
-using System;
+using MaterialDesignThemes.Wpf;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core.Commands;
+using Tango.MachineStudio.Common.Controls;
namespace Tango.MachineStudio.DB.Managers
{
- public class RegisteredView
+ public class RegisteredView : MdiChild
{
- public String Header { get; set; }
- public FrameworkElement View { get; set; }
+ private static Random rnd = new Random();
+
public RelayCommand AddCommand { get; set; }
public RegisteredView(String header, FrameworkElement view, Action action)
{
+ Location = new Point(rnd.Next(30, 200), rnd.Next(30, 200));
+ Icon = PackIconKind.Table;
Header = header;
View = view;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml
index 5ba51fea8..c7c636d53 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml
@@ -9,6 +9,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:managers="clr-namespace:Tango.MachineStudio.DB.Managers"
+ xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}">
@@ -44,9 +45,8 @@
<Grid.Background>
<ImageBrush ImageSource="../Images/seamless-grid.jpg" Stretch="None" TileMode="Tile" ViewportUnits="Absolute" Viewport="0,0,32,32"></ImageBrush>
</Grid.Background>
- <dockablz:Layout ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" FloatingItemsSource="{x:Static managers:ViewsManager.DisplayedViews}" FloatingItemDisplayMemberPath="View" FloatingItemHeaderMemberPath="Header">
- </dockablz:Layout>
+ <commonControls:MdiContainerControl ItemsSource="{x:Static managers:ViewsManager.DisplayedViews}"></commonControls:MdiContainerControl>
</Grid>
</Grid>
</Grid>