diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-10 19:01:05 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-10 19:01:05 +0200 |
| commit | 3fdcdac577d552bbdf6d7320c6ffb0753e810a08 (patch) | |
| tree | 55e392cea80a3539164abb1fd16c15986c92b287 /Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views | |
| parent | 3eabdee9604ad67cdbab7ee35bdfa249402f8831 (diff) | |
| download | Tango-3fdcdac577d552bbdf6d7320c6ffb0753e810a08.tar.gz Tango-3fdcdac577d552bbdf6d7320c6ffb0753e810a08.zip | |
Started working on machine designer view models.
Added NAME field to MACHINE table.
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views')
3 files changed, 34 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml index c85f03682..0bbf3a285 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml +++ b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml @@ -1,4 +1,4 @@ -<controls:View x:Class="Tango.MachineDesigner.UI.Views.MachinesView" +<UserControl x:Class="Tango.MachineDesigner.UI.Views.MachinesView" 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" @@ -6,10 +6,38 @@ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineDesigner.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White"> + d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{Binding MachinesViewVM, Source={StaticResource Locator}}"> <Grid> <Grid> - + <Grid.ColumnDefinitions> + <ColumnDefinition Width="300"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Grid Margin="10"> + <ListBox ItemsSource="{Binding Machines}" SelectedItem="{Binding SelectedMachine}"> + <ListBox.ItemTemplate> + <DataTemplate> + <TextBlock> + <Run Text="{Binding Organization.Name}"></Run> + <LineBreak/> + <Run Text="{Binding Name}"></Run> + <LineBreak/> + <Run Text="{Binding Guid}"></Run> + </TextBlock> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </Grid> + + <Grid Grid.Column="1" Margin="10"> + <StackPanel Width="400" HorizontalAlignment="Left"> + <TextBlock>Name</TextBlock> + <TextBox Text="{Binding SelectedMachine.Name}"></TextBox> + <TextBlock>Organization</TextBlock> + <ComboBox ItemsSource="{Binding Organizations}" SelectedItem="{Binding SelectedMachine.Organization}" DisplayMemberPath="Name"></ComboBox> + </StackPanel> + </Grid> </Grid> </Grid> -</controls:View> +</UserControl> diff --git a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml.cs b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml.cs index ebab90278..3b0013051 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml.cs @@ -19,7 +19,7 @@ namespace Tango.MachineDesigner.UI.Views /// <summary> /// Interaction logic for MachinesView.xaml /// </summary> - public partial class MachinesView : View + public partial class MachinesView : UserControl { public MachinesView() : base() { diff --git a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MainView.xaml b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MainView.xaml index 510ffd0c3..76048199b 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MainView.xaml @@ -63,7 +63,7 @@ <dragablz:InterTabController /> </dragablz:TabablzControl.InterTabController> <TabItem Header="MACHINES"> - <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Hello World</TextBlock> + <local:MachinesView></local:MachinesView> </TabItem> <TabItem Header="LIQUIDS"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Material Design</TextBlock> |
