diff --git a/VECTO3GUI/MainWindow.xaml b/VECTO3GUI/MainWindow.xaml index fd649b6f28a1e602fc3e2138ffaead90962d5ddd..4f057ec99d45e6a6c0d4b589fa78058aa696f076 100644 --- a/VECTO3GUI/MainWindow.xaml +++ b/VECTO3GUI/MainWindow.xaml @@ -31,7 +31,8 @@ <MenuItem Header="Open" Command="{Binding CurrentViewModel.AddJob}"/> <MenuItem Header="Open Folder"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> - <MenuItem Header="Exit"/> + <MenuItem Header="Exit" Command="{Binding CurrentViewModel.ExitMainCommand}" + CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/> </MenuItem> <MenuItem Header="Settings"> @@ -53,13 +54,12 @@ </Grid> <Grid Grid.Row="1"> - <ContentControl x:Name="bu" Content="{Binding CurrentViewModel}" /> + <ContentControl Content="{Binding CurrentViewModel}" /> </Grid> <Grid Grid.Row="2"> <StatusBar/> - </Grid> diff --git a/VECTO3GUI/Model/TempDataObject/AuxiliariesBusComponentData.cs b/VECTO3GUI/Model/TempDataObject/AuxiliariesBusComponentData.cs index 4cb9cb2555d0fca3e91e5eb00d208aad98f07e59..01324dfaf3e70631bcaae6e589539aa857c8d305 100644 --- a/VECTO3GUI/Model/TempDataObject/AuxiliariesBusComponentData.cs +++ b/VECTO3GUI/Model/TempDataObject/AuxiliariesBusComponentData.cs @@ -20,7 +20,6 @@ namespace VECTO3GUI.Model.TempDataObject public bool PositionlightsLED { get; set; } public bool BrakelightsLED { get; set; } public bool InteriorLightsLED { get; set; } - public ConsumerTechnology DoorDriveTechnology { get; set; } public BusHVACSystemConfiguration SystemConfiguration { get; set; } public ACCompressorType CompressorTypeDriver { get; set; } public ACCompressorType CompressorTypePassenger { get; set; } @@ -56,7 +55,6 @@ namespace VECTO3GUI.Model.TempDataObject viewModel.PositionlightsLED = PositionlightsLED; viewModel.BrakelightsLED = BrakelightsLED; viewModel.InteriorLightsLED = InteriorLightsLED; - viewModel.DoorDriveTechnology = DoorDriveTechnology; viewModel.SystemConfiguration = SystemConfiguration; viewModel.CompressorTypeDriver = CompressorTypeDriver; viewModel.CompressorTypePassenger = CompressorTypePassenger; @@ -75,7 +73,6 @@ namespace VECTO3GUI.Model.TempDataObject viewModel.PositionlightsLED = default(bool); viewModel.BrakelightsLED = default(bool); viewModel.InteriorLightsLED = default(bool); - viewModel.DoorDriveTechnology = default(ConsumerTechnology); viewModel.SystemConfiguration = default(BusHVACSystemConfiguration); viewModel.CompressorTypeDriver = default(ACCompressorType); viewModel.CompressorTypePassenger = default(ACCompressorType); @@ -94,7 +91,6 @@ namespace VECTO3GUI.Model.TempDataObject PositionlightsLED = auxiliaries.PositionlightsLED; BrakelightsLED = auxiliaries.BrakelightsLED; InteriorLightsLED = auxiliaries.InteriorLightsLED; - DoorDriveTechnology = auxiliaries.DoorDriveTechnology; SystemConfiguration = auxiliaries.SystemConfiguration; CompressorTypeDriver = auxiliaries.CompressorTypeDriver; CompressorTypePassenger = auxiliaries.CompressorTypePassenger; diff --git a/VECTO3GUI/Resources/GlobalStyles.xaml b/VECTO3GUI/Resources/GlobalStyles.xaml index c35ea8b669d82c61941262cf936ce95e72f44e64..d939fb960d9662d4c6906b3d21603304c9cd746e 100644 --- a/VECTO3GUI/Resources/GlobalStyles.xaml +++ b/VECTO3GUI/Resources/GlobalStyles.xaml @@ -3,6 +3,23 @@ xmlns:local="clr-namespace:VECTO3GUI.Resources" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"> + <Style TargetType="{x:Type DataGridColumnHeadersPresenter}" > + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="DataGridColumnHeadersPresenter"> + <Grid> + <Border IsHitTestVisible="False" + BorderThickness="0 0 0 3" + Background="Transparent" + BorderBrush="{DynamicResource GrayBrush5}" /> + <ItemsPresenter /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MetroDataGridColumnHeader}"> <Setter Property="mah:ControlsHelper.ContentCharacterCasing" Value="Normal"/> </Style> diff --git a/VECTO3GUI/ViewModel/Impl/AuxiliariesViewModel.cs b/VECTO3GUI/ViewModel/Impl/AuxiliariesViewModel.cs index e4b74920ab1b97e2712d107f157bbad7867b7b2c..e6b09c1825d18a81bef4d0eb291e0844d11a06b1 100644 --- a/VECTO3GUI/ViewModel/Impl/AuxiliariesViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/AuxiliariesViewModel.cs @@ -4,6 +4,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Windows.Documents; +using System.Windows.Input; using Castle.Core.Internal; using Ninject; using TUGraz.VectoCommon.BusAuxiliaries; @@ -38,7 +39,6 @@ namespace VECTO3GUI.ViewModel.Impl private bool _positionlightsLED; private bool _breaklightsLED; private bool _interiorLightsLED; - private ConsumerTechnology _doorDriveTechnology; private BusHVACSystemConfiguration _systemConfiguration; private ACCompressorType _compressorTypeDriver; private ACCompressorType _compressorTypePassenger; @@ -49,11 +49,15 @@ namespace VECTO3GUI.ViewModel.Impl private bool _separateAirDistributionDucts; private AuxiliariesBusComponentData _componentData; + private ICommand _removeAlternatorCommand; + private ICommand _removeAllAlternatorCommand; + private ICommand _addAlternatorCommand; + #endregion #region Implementation of IAuxiliariesViewModel - + public IAuxiliariesDeclarationInputData ModelData { get { return AdapterFactory.AuxiliariesDeclarationAdapter(this); } } public string PneumaticSystemTechnology @@ -122,6 +126,8 @@ namespace VECTO3GUI.ViewModel.Impl } } + + #endregion @@ -184,16 +190,7 @@ namespace VECTO3GUI.ViewModel.Impl IsDataChanged(_interiorLightsLED, _componentData); } } - public ConsumerTechnology DoorDriveTechnology - { - get { return _doorDriveTechnology; } - set - { - if (!SetProperty(ref _doorDriveTechnology, value)) - return; - IsDataChanged(_doorDriveTechnology, _componentData); - } - } + public BusHVACSystemConfiguration SystemConfiguration { get { return _systemConfiguration; } @@ -276,6 +273,7 @@ namespace VECTO3GUI.ViewModel.Impl } } + public AllowedEntry<BusHVACSystemConfiguration>[] AllowedSystemConfigurations { get; private set; } public AllowedEntry<ACCompressorType>[] AllowedDriverACCompressorTypes { get; private set; } public AllowedEntry<ACCompressorType>[] AllowedPassengerACCompressorTypes { get; private set; } @@ -299,7 +297,7 @@ namespace VECTO3GUI.ViewModel.Impl _busAuxiliaries = inputData?.JobInputData.Vehicle.Components.BusAuxiliaries; SetBusAuxiliaryValues(_busAuxiliaries); SetAllowedValues(); - + //ConnectAxleViewModel(); } @@ -320,6 +318,9 @@ namespace VECTO3GUI.ViewModel.Impl { AlternatorTechnologies.Add(busAux.ElectricSupply.Alternators[i].Technology); } + + AlternatorTechnologies.Add("blu"); + AlternatorTechnologies.Add("bla"); } DayrunninglightsLED = busAux.ElectricConsumers.DayrunninglightsLED; @@ -327,7 +328,6 @@ namespace VECTO3GUI.ViewModel.Impl PositionlightsLED = busAux.ElectricConsumers.PositionlightsLED; BrakelightsLED = busAux.ElectricConsumers.BrakelightsLED; InteriorLightsLED = busAux.ElectricConsumers.InteriorLightsLED; - DoorDriveTechnology = busAux.PneumaticConsumers.DoorDriveTechnology; SystemConfiguration = busAux.HVACAux.SystemConfiguration; CompressorTypeDriver = busAux.HVACAux.CompressorTypeDriver; CompressorTypePassenger = busAux.HVACAux.CompressorTypePassenger; @@ -367,6 +367,60 @@ namespace VECTO3GUI.ViewModel.Impl return _componentData; } + #region Commands + + public ICommand RemoveAlternatorCommand + { + get + { + return _removeAlternatorCommand ?? + (_removeAlternatorCommand = new RelayCommand<int>(DoRemoveAlternator)); + } + } + private void DoRemoveAlternator(int index) + { + AlternatorTechnologies?.RemoveAt(index); + } + + + public ICommand RemoveAllAlternatorCommand + { + get + { + return _removeAllAlternatorCommand ?? + (_removeAllAlternatorCommand = new RelayCommand(DoRemoveAllAlternators)); + } + } + + private void DoRemoveAllAlternators() + { + AlternatorTechnologies?.Clear(); + OnPropertyChanged(nameof(AlternatorTechnologies)); + } + + public ICommand AddAlternatorCommand + { + get + { + return _addAlternatorCommand ?? + (_addAlternatorCommand = new RelayCommand(DoAddAlternator, CanAddAlternator)); + } + } + + private bool CanAddAlternator() + { + return false; + } + + private void DoAddAlternator() + { + AlternatorTechnologies?.Add(string.Empty); + OnPropertyChanged(nameof(AlternatorTechnologies)); + + } + + #endregion + #region Legacy diff --git a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs index 88b74148bcade0f9026d0e4b90e60b7a1eeabb6d..132f68b069fd38d00f7a5114fee105f5684f82fa 100644 --- a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.ObjectModel; using System.IO; using System.Linq; -using System.Reflection; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; @@ -52,7 +51,8 @@ namespace VECTO3GUI.ViewModel.Impl private ICommand _addJobCommand; private ICommand _openJobCommand; private ICommand _openSettingsCommand; - + private ICommand _exitCommand; + private ICommand _exitMainCommand; #endregion @@ -86,7 +86,6 @@ namespace VECTO3GUI.ViewModel.Impl } } - private void AddJobEntry(string jobFile) { _jobs.Add(new JobEntry() @@ -108,13 +107,16 @@ namespace VECTO3GUI.ViewModel.Impl (_removeJobCommand = new RelayCommand(DoRemoveJob, CanRemoveJob)); } } - - private void DoRemoveJob() { _jobs.Remove(SelectedJobEntry); SelectedJobEntry = null; } + private bool CanRemoveJob() + { + return SelectedJobEntry != null; + } + public ICommand RemoveAllJobs { @@ -124,18 +126,12 @@ namespace VECTO3GUI.ViewModel.Impl (_removeAllJobCommand = new RelayCommand(DoRemoveAllJobs)); } } - private void DoRemoveAllJobs() { _jobs.Clear(); SelectedJobEntry = null; } - - - private bool CanRemoveJob() - { - return SelectedJobEntry != null; - } + public ICommand EditJob { @@ -145,7 +141,6 @@ namespace VECTO3GUI.ViewModel.Impl (_editJobCommand = new RelayCommand(DoEditJob, CanEditJob)); } } - private void DoEditJob() { var entry = SelectedJobEntry; @@ -165,12 +160,12 @@ namespace VECTO3GUI.ViewModel.Impl MessageBoxButton.OK); } } - private bool CanEditJob() { return SelectedJobEntry != null; } + public ICommand CreateNewJob { get @@ -179,7 +174,6 @@ namespace VECTO3GUI.ViewModel.Impl (_newJobCommand = new RelayCommand(DoNewJobCommand)); } } - private void DoNewJobCommand() { var jobEditView = new CompleteVehicleBusJobViewModel(Kernel, null); @@ -196,7 +190,6 @@ namespace VECTO3GUI.ViewModel.Impl (_openJobCommand = new RelayCommand(DoOpenJobCommand)); } } - private void DoOpenJobCommand() { if (SelectedJobEntry == null) @@ -205,7 +198,6 @@ namespace VECTO3GUI.ViewModel.Impl var xmlViewModel = new XMLViewModel(SelectedJobEntry.Filename); var window = OutputWindowHelper.CreateOutputWindow(Kernel, xmlViewModel, xmlViewModel.FileName); window.Show(); - } @@ -217,7 +209,6 @@ namespace VECTO3GUI.ViewModel.Impl (_addJobCommand = new RelayCommand(DoAddJob)); } } - private void DoAddJob() { var filePath = FileDialogHelper.ShowSelectFilesDialog(false, _settings.XmlFilePathFolder); @@ -232,6 +223,7 @@ namespace VECTO3GUI.ViewModel.Impl } } + public ICommand OpenSettings { get @@ -240,7 +232,6 @@ namespace VECTO3GUI.ViewModel.Impl (_openSettingsCommand = new RelayCommand(DoOpenSettingsCommand)); } } - private void DoOpenSettingsCommand() { var viewModel = new SettingsViewModel(); @@ -249,6 +240,19 @@ namespace VECTO3GUI.ViewModel.Impl window.ShowDialog(); } + public ICommand ExitMainCommand + { + get + { + return _exitMainCommand ?? + (_exitMainCommand = new RelayCommand<Window>(DoCloseMainCommand)); + } + } + private void DoCloseMainCommand(Window window) + { + window?.Close(); + } + public ICommand MoveJobUp { get { return new RelayCommand(() => { }, () => false); } } public ICommand MoveJobDown { get { return new RelayCommand(() => { }, () => false); } } diff --git a/VECTO3GUI/ViewModel/Impl/SettingsViewModel.cs b/VECTO3GUI/ViewModel/Impl/SettingsViewModel.cs index 5f9b18a94825ed6976a361e0c65799a39a9b53bf..da2346ad992b004bdb8df7c10cdfc257cdfb96e1 100644 --- a/VECTO3GUI/ViewModel/Impl/SettingsViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/SettingsViewModel.cs @@ -79,15 +79,14 @@ namespace VECTO3GUI.ViewModel.Impl get { return _cancelCommand ?? - (_cancelCommand = new RelayCommand<object>(DoCancelCommand)); + (_cancelCommand = new RelayCommand<Window>(DoCancelCommand)); } } - private void DoCancelCommand(object obj) + private void DoCancelCommand(Window window) { - var convert = obj as Window; - convert?.Close(); + window?.Close(); } public ICommand ResetCommand diff --git a/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesBus.cs b/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesBus.cs index f85d01d9b4a3582c5b96ea694b65ba7cdcb09ed7..1c93496d55442429ec9315eac469b8ae9f4f0b1d 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesBus.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesBus.cs @@ -22,8 +22,6 @@ namespace VECTO3GUI.ViewModel.Interfaces #endregion - ConsumerTechnology DoorDriveTechnology { get; set; } - #region Havac BusHVACSystemConfiguration SystemConfiguration { get; set; } diff --git a/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesViewModel.cs index f38709977695249542e700f375bd116a939c7f87..74a5851b89cc302329ff208d22816904568a32ad 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IAuxiliariesViewModel.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Windows.Input; using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Utils; @@ -25,8 +26,18 @@ namespace VECTO3GUI.ViewModel.Interfaces { string HVACTechnology { get; set; } AllowedEntry<string>[] AllowedHVACTechnologies { get; } + #region Commands + + ICommand RemoveAlternatorCommand { get; } + ICommand RemoveAllAlternatorCommand { get; } + ICommand AddAlternatorCommand { get; } + + + #endregion + + #region Bus Auxiliaries - + AllowedEntry<BusHVACSystemConfiguration>[] AllowedSystemConfigurations { get; } AllowedEntry<ACCompressorType>[] AllowedDriverACCompressorTypes { get; } AllowedEntry<ACCompressorType>[] AllowedPassengerACCompressorTypes { get; } diff --git a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs index 544a35cd74cb56047df31059b29e7769dc1e41d6..3b16cff796cab12fa982090b87bf8ed3ac159511 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs @@ -18,6 +18,6 @@ namespace VECTO3GUI.ViewModel.Interfaces ICommand CreateNewJob { get; } ICommand OpenJob { get; } ICommand OpenSettings { get; } - + ICommand ExitMainCommand { get; } } } diff --git a/VECTO3GUI/Views/ComponentViews/Declaration/AuxiliariesDeclarationView.xaml b/VECTO3GUI/Views/ComponentViews/Declaration/AuxiliariesDeclarationView.xaml index 42270d3adbe221ebafa46731e634708aa361257b..165e49e416a963645998963965855a388abe0ef6 100644 --- a/VECTO3GUI/Views/ComponentViews/Declaration/AuxiliariesDeclarationView.xaml +++ b/VECTO3GUI/Views/ComponentViews/Declaration/AuxiliariesDeclarationView.xaml @@ -7,66 +7,116 @@ xmlns:customControls="clr-namespace:VECTO3GUI.Views.CustomControls" xmlns:helper="clr-namespace:VECTO3GUI.Helper" xmlns:converter="clr-namespace:VECTO3GUI.Helper.Converter" + xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" + xmlns:views="clr-namespace:VECTO3GUI.Views" + xmlns:local="clr-namespace:VECTO3GUI.Views.ComponentViews.Declaration" mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="800"> + <d:EditCyclesView.DataContext> <x:Type Type="interfaces:IAuxiliariesViewModel"/> </d:EditCyclesView.DataContext> <Grid> - <StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True"> - - <GroupBox Header="Electric Systems"> - <StackPanel Orientation="Vertical"> - - <DataGrid AutoGenerateColumns="False" ColumnWidth="*" IsReadOnly="False" CanUserAddRows="False" VerticalAlignment="Top" - HeadersVisibility="All" RowHeaderWidth="30" ItemsSource="{Binding AlternatorTechnologies}"> - - <DataGrid.Columns> - <DataGridTextColumn Header="Technology" Binding="{Binding }" /> - </DataGrid.Columns> - - </DataGrid> - - <customControls:CheckboxParameter + <Grid.ColumnDefinitions> + <ColumnDefinition Width="10"/> + <ColumnDefinition Width="450"/> + </Grid.ColumnDefinitions> + + <Grid.RowDefinitions> + <RowDefinition Height="10"/> + <RowDefinition Height="200"/> + <RowDefinition Height="200"/> + <RowDefinition Height="320"/> + <RowDefinition/> + </Grid.RowDefinitions> + + + <GroupBox Header="Alternators Technology" Grid.Row="1" Grid.Column="1" Width="450" HorizontalAlignment="Left"> + <StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Center" Grid.IsSharedSizeScope="True"> + + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition/> + <ColumnDefinition/> + </Grid.ColumnDefinitions> + + <Button Content="Add" HorizontalAlignment="Left" Grid.Column="0" Width="100" Margin="0,5,0,0" + Command="{Binding AddAlternatorCommand}"/> + <Button Content="Remove All" HorizontalAlignment="Right" Grid.Column="1" Width="100" Margin="0,5,0,0" + Command="{Binding RemoveAllAlternatorCommand}"/> + </Grid> + + + <DataGrid x:Name="AlternatorDataGrid" AutoGenerateColumns="False" ColumnWidth="*" IsReadOnly="False" CanUserAddRows="False" VerticalAlignment="Top" + HeadersVisibility="All" RowHeaderWidth="10" Height="150" Margin="0,10,0,0" + ItemsSource="{Binding AlternatorTechnologies}"> + + <DataGrid.Resources> + <DataTemplate x:Key="EntryDeleteControl"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center"> + <Button Width="100" Content="Remove" + Command="{Binding DataContext.RemoveAlternatorCommand, + RelativeSource={RelativeSource AncestorType=local:AuxiliariesDeclarationView}}" + CommandParameter="{Binding ElementName=AlternatorDataGrid, Path=SelectedIndex}"> + </Button> + </StackPanel> + </DataTemplate> + + <DataTemplate x:Key="AtlernatorText"> + <TextBox Text="{Binding}" /> + + </DataTemplate> + + </DataGrid.Resources> + + <DataGrid.Columns> + <!--<DataGridTemplateColumn Header="Technology" CellTemplate="{StaticResource AtlernatorText}" Width="110" />--> + <DataGridTextColumn Header="Alternator Technology" Binding="{Binding }" /> + <DataGridTemplateColumn CellTemplate="{StaticResource EntryDeleteControl}" Width="110" /> + </DataGrid.Columns> + + </DataGrid> + + </StackPanel> + </GroupBox> + + <GroupBox Header="Electric Systems" Grid.Row="2" Grid.Column="1" Margin="0,10,0,0" Width="450" HorizontalAlignment="Left"> + + <StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True" VerticalAlignment="Center" > + + <customControls:CheckboxParameter Caption="Dayrunniglights LED" CaptionWidthGroup="lblWidth" Unit="" UnitWidthGroup="unitWidth" Value="{Binding DayrunninglightsLED}"/> - <customControls:CheckboxParameter + <customControls:CheckboxParameter Caption="Headlights LED" CaptionWidthGroup="lblWidth" Unit="" UnitWidthGroup="unitWidth" Value="{Binding HeadlightsLED}"/> - <customControls:CheckboxParameter + <customControls:CheckboxParameter Caption="Positionlights LED" CaptionWidthGroup="lblWidth" Unit="" UnitWidthGroup="unitWidth" Value="{Binding PositionlightsLED}"/> - <customControls:CheckboxParameter + <customControls:CheckboxParameter Caption="Brakelights LED" CaptionWidthGroup="lblWidth" Unit="" UnitWidthGroup="unitWidth" Value="{Binding BrakelightsLED}"/> - <customControls:CheckboxParameter + <customControls:CheckboxParameter Caption="Interiorlights LED" CaptionWidthGroup="lblWidth" Unit="" UnitWidthGroup="unitWidth" Value="{Binding InteriorLightsLED}"/> - </StackPanel> - </GroupBox> + </StackPanel> + </GroupBox> - <GroupBox Header="Pneumatic System"> - <customControls:ComboParameter - Caption="DoorDriveTechnology" CaptionWidthGroup="lblWidth" - UnitWidthGroup="unitWidth" - Value="{Binding DoorDriveTechnology}" - AllowedValues="{Binding AllowedConsumerTechnologies}" /> - </GroupBox> - <GroupBox Header="HVAC"> - <StackPanel> + <GroupBox Header="HVAC" Grid.Row="3" Grid.Column="1" Margin="0,10,0,0" Width="450" HorizontalAlignment="Left"> + <StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True" VerticalAlignment="Center" > <customControls:ComboParameter Caption="System Configuration" CaptionWidthGroup="lblWidth" UnitWidthGroup="unitWidth" @@ -111,41 +161,5 @@ </StackPanel> </GroupBox> - - - <!--<customControls:ComboParameter - Caption="Fan Technology" CaptionWidthGroup="lblWidth" - Value="{Binding FanTechnology}" - AllowedValues="{Binding AllowedFanTechnologies}" /> - <DockPanel Margin="0,5"> - <TextBlock Margin="10,0" DockPanel.Dock="Top">Steering Pump Technologies</TextBlock> - <ItemsControl DockPanel.Dock="Bottom" ItemsSource="{Binding SteeringPumpTechnologies}" Name="SteeringPumps"> - <ItemsControl.ItemTemplate> - <DataTemplate DataType="interfaces:SteeringPumpEntry"> - <StackPanel> - <customControls:ComboParameter - Caption="{Binding SteeredAxle, StringFormat='{}{0}. Axle' }" CaptionWidthGroup="lblWidth" - Value="{Binding SteeringPumpTechnology}" - AllowedValues="{Binding Path=DataContext.AllowedSteeringPumpTechnologies, ElementName=SteeringPumps}"/> - - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </DockPanel> - <customControls:ComboParameter - Caption="Electric System Technology" CaptionWidthGroup="lblWidth" - Value="{Binding ElectricSystemTechnology}" - AllowedValues="{Binding AllowedElectricSystemTechnologies}" /> - <customControls:ComboParameter - Caption="Pneumatic System Technology" CaptionWidthGroup="lblWidth" - Value="{Binding PneumaticSystemTechnology}" - AllowedValues="{Binding AllowedPneumaticSystemTechnologies}" /> - <customControls:ComboParameter - Caption="HVAC Technology" CaptionWidthGroup="lblWidth" - Value="{Binding HVACTechnology}" - AllowedValues="{Binding AllowedHVACTechnologies}" />--> - - </StackPanel> </Grid> </UserControl> diff --git a/VECTO3GUI/Views/JoblistView.xaml b/VECTO3GUI/Views/JoblistView.xaml index a5e952aff53aac73e688c32ac5f33a5608aa412b..990e7fbb5f4778db4ec5b5ee610d4bd12615981e 100644 --- a/VECTO3GUI/Views/JoblistView.xaml +++ b/VECTO3GUI/Views/JoblistView.xaml @@ -29,12 +29,14 @@ <RowDefinition Height="30"/> </Grid.RowDefinitions> + + <Grid Grid.Row="1" Grid.Column="1" Margin="10"> + <DataGrid ItemsSource="{Binding Jobs}" SelectedValue="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" Style="{DynamicResource AzureDataGrid}" BorderThickness="1" CanUserAddRows="False" AutoGenerateColumns="False" SelectionUnit="FullRow" - IsReadOnly="True" HeadersVisibility="All" RowHeaderWidth="5" ColumnWidth="*" > - + IsReadOnly="True" HeadersVisibility="All" RowHeaderWidth="5" > <DataGrid.Resources> <ContextMenu x:Key="RowMenu"> @@ -54,18 +56,19 @@ </ContextMenu> </DataGrid.ContextMenu> - <DataGrid.Columns> - <DataGridTextColumn Header="File Path" Binding="{Binding Filename}"> + <DataGridTextColumn Header="File Path" Binding="{Binding Filename}" > <DataGridTextColumn.CellStyle> <Style TargetType= "{x:Type DataGridCell}" BasedOn="{StaticResource MetroDataGridCell}" > <Setter Property="ContextMenu" Value="{StaticResource RowMenu}"/> + <Setter Property="HorizontalAlignment" Value="Stretch"></Setter> </Style> </DataGridTextColumn.CellStyle> </DataGridTextColumn> </DataGrid.Columns> </DataGrid> + </Grid> <Grid Grid.Row="1" Grid.Column="2" Margin="0,0,10,0">