diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-02-11 21:46:22 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-02-11 21:46:22 +0200 |
| commit | a84ca3e4bee123600c08f8897eca5be83b3ffcf8 (patch) | |
| tree | cccdce1734f55c0647b5c19c1fcc733be92ddbf6 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views | |
| parent | a801f688bde7b6c75f47ca4ebd2991271c521d34 (diff) | |
| download | Tango-a84ca3e4bee123600c08f8897eca5be83b3ffcf8.tar.gz Tango-a84ca3e4bee123600c08f8897eca5be83b3ffcf8.zip | |
Added TechView for Developer..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
3 files changed, 3 insertions, 128 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 4cbae2941..cd5cdb8a2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -7,6 +7,7 @@ xmlns:global="clr-namespace:Tango.MachineStudio.Developer" xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:techViews="clr-namespace:Tango.MachineStudio.Technician.Views;assembly=Tango.MachineStudio.Technician" xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views.DBViews;assembly=Tango.MachineStudio.DB" @@ -1988,7 +1989,7 @@ </Style> </Grid.Style> - <local:MonitoringView Margin="50 0 0 0" /> + <techViews:MachineTechView DataContext="{Binding MachineTechViewVM}" /> </Grid> </Grid> </Grid> @@ -2147,7 +2148,7 @@ <Rectangle HorizontalAlignment="Right" Stroke="#CECECE" StrokeThickness="1"></Rectangle> </Grid> - <Button Background="Transparent" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 0 -50 0"> + <Button Background="Transparent" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 300 -50 0"> <Border Background="#F6F6F6" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="#C6C0C0"> <Grid> <TextBlock Foreground="#FF7272" Text="CONFIGURATION" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml deleted file mode 100644 index bd78ef13e..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml +++ /dev/null @@ -1,76 +0,0 @@ -<UserControl x:Class="Tango.MachineStudio.Developer.Views.MonitoringView" - 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:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" - xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels" - xmlns:controls="clr-namespace:Tango.MachineStudio.Developer.Controls" - xmlns:global="clr-namespace:Tango.MachineStudio.Developer" - xmlns:observables="clr-namespace:Tango.Integration.Observables;assembly=Tango.Integration" - xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" - mc:Ignorable="d" - d:DesignHeight="600" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=vm:MonitoringViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MonitoringViewVM}"> - <Grid> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="1*"/> - <ColumnDefinition Width="230"/> - </Grid.ColumnDefinitions> - - <Grid dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}" dragAndDrop:DragAndDropService.Drop="OnDropAvailableIO"> - <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> - <ItemsControl ItemsSource="{Binding Controllers}"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <WrapPanel IsItemsHost="True" Orientation="Horizontal" /> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - - <ItemsControl.ItemTemplate> - <DataTemplate DataType="{x:Type vm:IOVM}"> - <Grid Margin="10" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"> - <StackPanel> - <TextBlock Text="{Binding IO.Description}" Width="180" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="10" HorizontalAlignment="Center"></TextBlock> - <Viewbox Stretch="Fill" Width="180" Height="100"> - <controls:IOMonitorControl Foreground="Gainsboro" FontFamily="{StaticResource digital-7}" Value="{Binding Value,Mode=OneWay}" /> - </Viewbox> - </StackPanel> - </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </ScrollViewer> - </Grid> - - <Grid Grid.Column="1"> - <DockPanel> - <StackPanel Orientation="Horizontal" DockPanel.Dock="Top"> - <Image Source="../Images/graphs.png" Width="42"></Image> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">AVAILABLE IO'S</TextBlock> - </StackPanel> - - <Grid> - <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> - <ItemsControl ItemsSource="{Binding AvailableControllers}"> - <ItemsControl.ItemTemplate> - <DataTemplate DataType="{x:Type vm:IOVM}"> - <Grid IsHitTestVisible="True" Background="Transparent" Margin="10" Opacity="0.4" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"> - <StackPanel IsHitTestVisible="False"> - <TextBlock Text="{Binding IO.Description}" Width="180" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="10" HorizontalAlignment="Center"></TextBlock> - <Viewbox Stretch="Fill" Width="180" Height="100" IsHitTestVisible="False"> - <controls:IOMonitorControl Foreground="Gainsboro" FontFamily="{StaticResource digital-7}" IsHitTestVisible="False" /> - </Viewbox> - </StackPanel> - </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </ScrollViewer> - </Grid> - </DockPanel> - </Grid> - </Grid> - <dragAndDrop:DraggingSurface x:Name="draggingSurface" IsHitTestVisible="False" /> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml.cs deleted file mode 100644 index 0d649237e..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MonitoringView.xaml.cs +++ /dev/null @@ -1,50 +0,0 @@ -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.DragAndDrop; -using Tango.MachineStudio.Developer.ViewModels; - -namespace Tango.MachineStudio.Developer.Views -{ - /// <summary> - /// Interaction logic for MonitoringView.xaml - /// </summary> - public partial class MonitoringView : UserControl - { - private MonitoringViewVM _vm; - - public DraggingSurface DraggingSurface - { - get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); } - set { SetValue(DraggingSurfaceProperty, value); } - } - public static readonly DependencyProperty DraggingSurfaceProperty = - DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MonitoringView), new PropertyMetadata(null)); - - public MonitoringView() - { - InitializeComponent(); - DraggingSurface = draggingSurface; - this.Loaded += (x, y) => - { - _vm = this.DataContext as MonitoringViewVM; - }; - } - - private void OnDropAvailableIO(object sender, DropEventArgs e) - { - _vm.OnDropAvailableIO(e.Draggable.DataContext as IOVM); - } - } -} |
