diff --git a/VECTO3GUI/Helper/XmlComponentReaderHelper.cs b/VECTO3GUI/Helper/XmlComponentReaderHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f614614186835409f6370616863ebf9a468af85 --- /dev/null +++ b/VECTO3GUI/Helper/XmlComponentReaderHelper.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.InputData.FileIO.XML.Common; +using VECTO3GUI.Model.TempDataObject; + +namespace VECTO3GUI.Helper +{ + public class XmlComponentReaderHelper : AbstractXMLType + { + public XmlComponentReaderHelper(XmlNode node) : base(node) { } + + public AirdragComponentData GetAirdragComponentData() + { + if (!ElementExists(XMLNames.Component_AirDrag)) + return null; + + return new AirdragComponentData { + Manufacturer = GetString(XMLNames.Component_Manufacturer), + Model = GetString(XMLNames.Component_Model), + CertificationNumber = GetString(XMLNames.Component_CertificationNumber), + Date = DateTime.Parse(GetString(XMLNames.Component_Date)).ToUniversalTime(), + AppVersion = GetString(XMLNames.Component_AppVersion), + CdxA_0 = GetDouble("CdxA_0").SI<SquareMeter>(), + TransferredCdxA = GetDouble("TransferredCdxA").SI<SquareMeter>(), + DeclaredCdxA = GetDouble(XMLNames.AirDrag_DeclaredCdxA).SI<SquareMeter>(), + DigestValue = new DigestData(GetNode(XMLNames.DI_Signature)) + }; + } + } +} diff --git a/VECTO3GUI/Helper/XmlReaderHelper.cs b/VECTO3GUI/Helper/XmlReaderHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..960d6ffb0e8efaf395d33e245b5d3882586713c8 --- /dev/null +++ b/VECTO3GUI/Helper/XmlReaderHelper.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using Castle.Core.Internal; +using Microsoft.WindowsAPICodePack.Shell.PropertySystem; +using TUGraz.VectoCommon.Resources; + +namespace VECTO3GUI.Helper +{ + public static class XmlReaderHelper + { + public static XmlDocument ReadXmlDocument(string filePath) + { + if (filePath.IsNullOrEmpty()) + return null; + + var xmlDocument = new XmlDocument(); + + using (var reader = new XmlTextReader(filePath)) { + xmlDocument.Load(reader); + } + + return xmlDocument; + } + + + public static XmlNodeList GetComponentNodes(XmlDocument xmlDocument, string parentNode, string nodeName) + { + if (xmlDocument == null || parentNode.IsNullOrEmpty() || nodeName.IsNullOrEmpty()) + return null; + + return xmlDocument.SelectNodes($"//*[local-name()='{parentNode}']//*[local-name()='{nodeName}']"); + } + + + + } +} diff --git a/VECTO3GUI/MainWindow.xaml b/VECTO3GUI/MainWindow.xaml index 90013c836100e464bb9df4f27df78126d93f065f..3ce384cae5cea55c41f966e35f78a7e5a56ddac1 100644 --- a/VECTO3GUI/MainWindow.xaml +++ b/VECTO3GUI/MainWindow.xaml @@ -7,6 +7,7 @@ xmlns:interfaces="clr-namespace:VECTO3GUI.ViewModel.Interfaces" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" xmlns:impl="clr-namespace:VECTO3GUI.ViewModel.Impl" + xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" mc:Ignorable="d" Title="{Binding Version}" Height="515.36" Width="972.48" WindowStartupLocation="CenterScreen" d:DataContext="{d:DesignInstance Type=impl:MainWindowViewModel, IsDesignTimeCreatable=False}"> @@ -22,7 +23,7 @@ <StackPanel Orientation="Vertical"> <Menu IsMainMenu="True" Style="{DynamicResource MetroMenu}"> - <MenuItem Header="File"> + <MenuItem Header="File" VerticalAlignment="Center"> <MenuItem Header="New" Style="{DynamicResource MetroMenuItem}" Margin="0" Command="{Binding CurrentViewModel.CreateNewJob}"/> <MenuItem Header="Edit" Style="{DynamicResource MetroMenuItem}" Margin="0" @@ -37,7 +38,10 @@ - <MenuItem Header="Tools"> + <MenuItem Header="Tools" VerticalAlignment="Center"> + <!--<MenuItem.Icon> + <iconPacks:PackIconModern Width="15" Height="15" Kind="Tools" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Green" /> + </MenuItem.Icon>--> <MenuItem Header="Single Bus Job" Command="{Binding CurrentViewModel.AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.SingleBusJob}}"/> <MenuItem Header="Completed Bus Job" @@ -49,7 +53,7 @@ </MenuItem> - <MenuItem Header="Help"> + <MenuItem Header="Help" VerticalAlignment="Center"> <MenuItem Header="User Manual"/> <MenuItem Header="About Vecto"/> <MenuItem Header="Relase Notes"/> diff --git a/VECTO3GUI/Model/TempDataObject/AirdragComponentData.cs b/VECTO3GUI/Model/TempDataObject/AirdragComponentData.cs index dc8b32e9caa64f99742b060b892077200f2532ec..ef0153e65d736811236018d35c77065a795e9680 100644 --- a/VECTO3GUI/Model/TempDataObject/AirdragComponentData.cs +++ b/VECTO3GUI/Model/TempDataObject/AirdragComponentData.cs @@ -27,6 +27,7 @@ namespace VECTO3GUI.Model.TempDataObject #endregion + public AirdragComponentData(){} public AirdragComponentData(IAirdragViewModel viewModel , bool defaultValues) { diff --git a/VECTO3GUI/Resources/AirdragLoadTestFile.xml b/VECTO3GUI/Resources/AirdragLoadTestFile.xml new file mode 100644 index 0000000000000000000000000000000000000000..3baab2fa609ec00fcb3b5095be0d7a63a5211f9d --- /dev/null +++ b/VECTO3GUI/Resources/AirdragLoadTestFile.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0 https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/VectoComponent.xsd"> + <tns:AirDrag> + <Data id="TestAirDrag1234" xsi:type="AirDragDataDeclarationType"> + <Manufacturer>Test AirDrag Manufacturer</Manufacturer> + <Model>Test AirDrag Model</Model> + <CertificationNumber>e12*0815/8051*2020/05E0000*66</CertificationNumber> + <Date>2020-04-28T09:16:15.1270795Z</Date> + <AppVersion>Vecto AirDrag Test Load</AppVersion> + <CdxA_0>6.12</CdxA_0> + <TransferredCdxA>7.12</TransferredCdxA> + <DeclaredCdxA>8.12</DeclaredCdxA> + </Data> + <Signature> + <di:Reference URI="#TestAirDrag1234"> + <di:Transforms> + <di:Transform Algorithm="urn:vecto:xml:2017:canonicalization" /> + <di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> + </di:Transforms> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /> + <di:DigestValue>Yd3UDJ/zKPhsmPadJeC4Ez/q7o3G82Zbq3mX3tSqLDw=</di:DigestValue> + </di:Reference> + </Signature> + </tns:AirDrag> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VECTO3GUI/VECTO3GUI.csproj b/VECTO3GUI/VECTO3GUI.csproj index 085ca6576d3f1ce60b05273d13eebc9075a5e753..15f1eec02dcb556145034482a3c12ca7e9f91142 100644 --- a/VECTO3GUI/VECTO3GUI.csproj +++ b/VECTO3GUI/VECTO3GUI.csproj @@ -171,6 +171,8 @@ <Compile Include="Helper\Converter\SaveButtonLabelConverter.cs" /> <Compile Include="Helper\SerializeHelper.cs" /> <Compile Include="Helper\ViewModelBase.cs" /> + <Compile Include="Helper\XmlComponentReaderHelper.cs" /> + <Compile Include="Helper\XmlReaderHelper.cs" /> <Compile Include="Model\InterfacesImpl.cs" /> <Compile Include="Model\JobListModel.cs" /> <Compile Include="Model\SettingsModel.cs" /> @@ -623,7 +625,9 @@ <Name>VectoCore</Name> </ProjectReference> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <Resource Include="Resources\AirdragLoadTestFile.xml" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs b/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs index 46899ef52cb49d8c861321e9d01c6cbd8d95aa64..4f02db72d09f02b9f80fe0f52a82e6c682fef106 100644 --- a/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs @@ -148,7 +148,7 @@ namespace VECTO3GUI.ViewModel.Impl private void SetJobEntryData(JobEntry jobEntry) { FirstFilePath = jobEntry.FirstFilePath; - SecondFilePath = jobEntry.FirstFilePath; + SecondFilePath = jobEntry.SecondFilePath; } protected abstract void SetFirstFileLabel(); diff --git a/VECTO3GUI/ViewModel/Impl/AirdragViewModel.cs b/VECTO3GUI/ViewModel/Impl/AirdragViewModel.cs index 20504eda8d0ebf7d265941d45132d91e65425101..f56514918a0f76315eca3ea1d14e9d56259de71c 100644 --- a/VECTO3GUI/ViewModel/Impl/AirdragViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/AirdragViewModel.cs @@ -1,15 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Windows.Forms; using System.Windows.Input; -using System.Xml; +using Castle.Core.Internal; using Ninject; +using TUGraz.VectoCommon.Hashing; using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.InputData.FileIO.XML; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader; -using TUGraz.VectoCore.Utils; using VECTO3GUI.Helper; using VECTO3GUI.Model.TempDataObject; using VECTO3GUI.Util; @@ -65,7 +63,10 @@ namespace VECTO3GUI.ViewModel.Impl private IAirdragDeclarationInputData _airdragData; private AirdragComponentData _componentData; private bool _isEditable; - + private bool _useMeasurementData; + private bool _noAirdragData; + + private ICommand _airdragConfig; private ICommand _loadFileCommand; @@ -126,7 +127,6 @@ namespace VECTO3GUI.ViewModel.Impl { if (!SetProperty(ref _date, value)) return; - IsDataChanged(_date, _componentData); } } @@ -138,9 +138,7 @@ namespace VECTO3GUI.ViewModel.Impl { if (!SetProperty(ref _declaredCdxA, value)) return; - IsDataChanged(_declaredCdxA, _componentData); - SetAirdragArea(_airdragData); } } @@ -165,13 +163,27 @@ namespace VECTO3GUI.ViewModel.Impl set { SetProperty(ref _isEditable, value); } } + public bool UseMeasurementData + { + get { return _useMeasurementData; } + set { SetProperty(ref _useMeasurementData, value); } + } + + public bool NoAirdragData + { + get { return _noAirdragData; } + set { SetProperty(ref _noAirdragData, value); } + } + protected override void InputDataChanged() { var inputData = JobViewModel.InputDataProvider as IDeclarationInputDataProvider; _airdragData = inputData?.JobInputData.Vehicle.Components.AirdragInputData; SetAirdragValues(_airdragData); - IsEditable = true; + UseMeasurementData = _airdragData != null; + NoAirdragData = !UseMeasurementData; + IsEditable = false; } private void SetAirdragValues(IAirdragDeclarationInputData airdrag) @@ -188,7 +200,9 @@ namespace VECTO3GUI.ViewModel.Impl CertificationNumber = airdrag.CertificationNumber; Date = airdrag.Date; AppVersion = airdrag.AppVersion; - SetAirdragArea(airdrag); + DeclaredCdxA = airdrag.AirDragArea; + CdxA_0 = DeclaredCdxA; + TransferredCdxA = DeclaredCdxA; DigestValue = airdrag.DigestValue; _componentData = new AirdragComponentData(this); @@ -207,7 +221,7 @@ namespace VECTO3GUI.ViewModel.Impl private void DoAirdragConfig(AirdragConfig config) { - IsEditable = config == AirdragConfig.UseMeasurementData; + } @@ -221,25 +235,17 @@ namespace VECTO3GUI.ViewModel.Impl private bool CanLoadFile() { - return IsEditable; + return UseMeasurementData; } private void DoLoadFile() { var filePath = FileDialogHelper.ShowSelectFilesDialog(false)?.FirstOrDefault(); - ReadSelectedXml(null); + ReadSelectedXml(filePath); } #endregion - - private void SetAirdragArea(IAirdragDeclarationInputData airdrag) - { - DeclaredCdxA = airdrag.AirDragArea; - CdxA_0 = DeclaredCdxA; - TransferredCdxA = DeclaredCdxA; - } - public override void ResetComponentData() { _componentData.ResetToComponentValues(this); @@ -254,8 +260,34 @@ namespace VECTO3GUI.ViewModel.Impl private void ReadSelectedXml(string filePath) { - if (filePath == null) + if (filePath.IsNullOrEmpty()) return; + + var xmlDocument = XmlReaderHelper.ReadXmlDocument(filePath); + var nodes = XmlReaderHelper.GetComponentNodes(xmlDocument, + XMLNames.VectoInputDeclaration, VectoComponents.Airdrag.XMLElementName()); + + if(nodes.IsNullOrEmpty()) + return; + + var compReader = new XmlComponentReaderHelper(nodes[0].ParentNode); + SetLoadedAirdragData(compReader.GetAirdragComponentData()); + } + + private void SetLoadedAirdragData(AirdragComponentData airdrag) + { + if (airdrag == null) + return; + + Model = airdrag.Model; + Manufacturer = airdrag.Manufacturer; + CertificationNumber = airdrag.CertificationNumber; + Date = airdrag.Date; + AppVersion = airdrag.AppVersion; + DeclaredCdxA = airdrag.DeclaredCdxA; + CdxA_0 = airdrag.CdxA_0; + TransferredCdxA = airdrag.TransferredCdxA; + DigestValue = airdrag.DigestValue; } } } diff --git a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs index 2af40f7d064ce8c633c13946c8e25de34adbf844..603d7aeea16f029ff0b3d95d0b2af71c912c2e68 100644 --- a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs @@ -7,7 +7,10 @@ using System.IO; using System.Linq; using System.Windows; using System.Windows.Input; +using System.Xml; using Ninject; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCore.InputData.FileIO.XML; using VECTO3GUI.Util; using VECTO3GUI.ViewModel.Interfaces; using VECTO3GUI.Helper; @@ -43,6 +46,7 @@ namespace VECTO3GUI.ViewModel.Impl private ICommand _exitCommand; private ICommand _exitMainCommand; private ICommand _addBusJobCommand; + private ICommand _editCompletedFileCommand; #endregion @@ -143,6 +147,31 @@ namespace VECTO3GUI.ViewModel.Impl } } + public ICommand EditCompletedFile + { + get + { + return _editCompletedFileCommand ?? + (_editCompletedFileCommand = + new RelayCommand<JobEntry>(DoEditCompletedFile, CanEditCompletdFile)); + } + } + + private bool CanEditCompletdFile(JobEntry jobEntry) + { + return jobEntry != null; + } + + private void DoEditCompletedFile(JobEntry jobEntry) + { + var viewModel = ReadCompletedXmlFile(jobEntry); + if (viewModel == null) + return; + + var window = OutputWindowHelper.CreateOutputWindow(Kernel, viewModel); + window.Show(); + } + private bool CanEditJob(JobEntry jobEntry) { return jobEntry != null; @@ -231,7 +260,6 @@ namespace VECTO3GUI.ViewModel.Impl var window = OutputWindowHelper.CreateOutputWindow(Kernel, viewModel, "Settings", 440, 200, ResizeMode.NoResize); window.ShowDialog(); - } public ICommand ExitMainCommand @@ -271,10 +299,7 @@ namespace VECTO3GUI.ViewModel.Impl #endregion - - - - + private object GetBusJobViewModel(JobType jobType, JobEntry jobEntry = null) { var currentJobType = jobEntry?.JobType ?? jobType; @@ -320,6 +345,25 @@ namespace VECTO3GUI.ViewModel.Impl { SerializeHelper.SerializeToFile(jobEntry.JobEntryFilePath, jobEntry); } + + private IJobEditViewModel ReadCompletedXmlFile(JobEntry jobEntry) + { + var xmlInputReader = Kernel.Get<IXMLInputDataReader>(); + using (var reader = XmlReader.Create(jobEntry.SecondFilePath)) { + var readerResult = xmlInputReader.Create(reader) as IDeclarationInputDataProvider; + return CreateCompleteBusVehicleViewModel(readerResult); + } + } + + private IJobEditViewModel CreateCompleteBusVehicleViewModel(IDeclarationInputDataProvider dataProvider) + { + _messages.Add(new MessageEntry + { + Message = "Edit File" + }); + return dataProvider == null ? null : new CompleteVehicleBusJobViewModel(Kernel, dataProvider); + } + //private IJobEditViewModel ReadJob(string jobFile) //{ // if (jobFile == null) diff --git a/VECTO3GUI/ViewModel/Interfaces/IAirdragViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IAirdragViewModel.cs index c018b15fb8859a4e261629e4199e339420a317be..f85fd276dd766072df66eafa7d583ee6da975e85 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IAirdragViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IAirdragViewModel.cs @@ -8,6 +8,10 @@ namespace VECTO3GUI.ViewModel.Interfaces { IAirdragDeclarationInputData ModelData { get; } bool IsEditable { get; } + + bool NoAirdragData { get; } + bool UseMeasurementData { get; } + ICommand LoadFileCommand { get; } ICommand AirdragConfigCommand { get; } diff --git a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs index 7b1707d00babdf0ade928995dfd4c38644e8b0df..076af7ee9f824ea837fced026d7f27731df7a898 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs @@ -17,6 +17,7 @@ namespace VECTO3GUI.ViewModel.Interfaces ICommand MoveJobDown { get; } ICommand StartSimulation { get; } ICommand EditJob { get; } + ICommand EditCompletedFile { get; } ICommand JobEntrySetActive { get; } ICommand CreateNewJob { get; } ICommand OpenJob { get; } diff --git a/VECTO3GUI/Views/ComponentViews/Declaration/AirdragDeclarationView.xaml b/VECTO3GUI/Views/ComponentViews/Declaration/AirdragDeclarationView.xaml index 009760e99dc82a370a1c12929dfc0ec1f3eafdb7..9998c574ad2fdf28f5b8ba84faccb2c6eb601ff4 100644 --- a/VECTO3GUI/Views/ComponentViews/Declaration/AirdragDeclarationView.xaml +++ b/VECTO3GUI/Views/ComponentViews/Declaration/AirdragDeclarationView.xaml @@ -32,12 +32,13 @@ <StackPanel Orientation="Vertical"> <RadioButton GroupName="AirdragConfig" Margin="5" Content="{Binding Source={x:Static impl:AirdragConfig.WithoutAirdrag}, Converter={converter:EnumConverter}}" - Command="{Binding AirdragConfigCommand}" CommandParameter="{Binding Source={x:Static impl:AirdragConfig.WithoutAirdrag}}"/> + Command="{Binding AirdragConfigCommand}" CommandParameter="{Binding Source={x:Static impl:AirdragConfig.WithoutAirdrag}}" + IsChecked="{Binding NoAirdragData}"/> <RadioButton GroupName="AirdragConfig" Margin="5" Content="{Binding Source={x:Static impl:AirdragConfig.UseMeasurementData}, Converter={converter:EnumConverter}}" Command="{Binding AirdragConfigCommand}" CommandParameter="{ Binding Source={x:Static impl:AirdragConfig.UseMeasurementData}}" - IsChecked="{Binding IsEditable}"/> + IsChecked="{Binding UseMeasurementData}"/> <StackPanel Orientation="Horizontal" Margin="30,10,10,10"> <Label Content="Load Component File:"/> @@ -51,18 +52,18 @@ </GroupBox> <GroupBox Header="Aridrag Data" Width="500" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1" Height="250" VerticalAlignment="Top" - Visibility="{Binding IsEditable, Converter={converter:BoolVisibilityConverter}}"> + Visibility="{Binding UseMeasurementData, Converter={converter:BoolVisibilityConverter}}"> <StackPanel Orientation="Vertical" Width="450" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True"> <customControls:VectoParameterControl Caption="Manufacturer" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" - Value="{Binding Manufacturer}" IsEnabled="{Binding IsEditable}" /> + Value="{Binding Manufacturer}" IsEnabled="{Binding IsEditable, UpdateSourceTrigger=PropertyChanged}" /> <customControls:VectoParameterControl Caption="Model" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" - Value="{Binding Model}" IsEnabled="{Binding IsEditable}" /> + Value="{Binding Model}" IsEnabled="{Binding IsEditable, UpdateSourceTrigger=PropertyChanged}" /> <!-- <mah:DateTimePicker --> <!-- SelectedDate="{Binding Date}" --> diff --git a/VECTO3GUI/Views/ComponentViews/Declaration/CompleteVehicleBusView.xaml b/VECTO3GUI/Views/ComponentViews/Declaration/CompleteVehicleBusView.xaml index 2c4a6804415048e0d56de2a35e583a1f3e6a93be..4ea7973e75f8d75873626a4b5afe4e835fffbb5f 100644 --- a/VECTO3GUI/Views/ComponentViews/Declaration/CompleteVehicleBusView.xaml +++ b/VECTO3GUI/Views/ComponentViews/Declaration/CompleteVehicleBusView.xaml @@ -40,9 +40,10 @@ <customControls:VectoParameterControl Caption="VIN" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Value="{Binding VIN}" /> - <customControls:VectoParameterControl + + <!--<customControls:VectoParameterControl Caption="Date" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" - Value="{Binding Date}" /> + Value="{Binding Date}" />--> <customControls:ComboParameter Caption="Legislative Class" diff --git a/VECTO3GUI/Views/JoblistView.xaml b/VECTO3GUI/Views/JoblistView.xaml index c5a0f7b54c0c2c954907c9bd608c9b866588fb95..6822016183b028b636ecf6721c183a779e877b51 100644 --- a/VECTO3GUI/Views/JoblistView.xaml +++ b/VECTO3GUI/Views/JoblistView.xaml @@ -22,7 +22,7 @@ <Grid.ColumnDefinitions> <ColumnDefinition Width="80"/> <ColumnDefinition/> - <ColumnDefinition Width="80"/> + <ColumnDefinition Width="150"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="30"/> @@ -84,10 +84,14 @@ <Grid Grid.Row="1" Grid.Column="2" Margin="0,0,10,0"> <StackPanel Orientation="Vertical" Margin="0,30,0,0"> - <Button Margin="0,5,0,0" Content="Edit Job" + <Button Margin="0,5,0,0" Content="Edit Job" Width="110" Command="{Binding EditJob}" CommandParameter="{Binding ElementName=JobList, Path=SelectedItem}"/> + <Button Margin="0,5,0,0" Content="Edit Completed File" Width="110" + Command="{Binding EditCompletedFile}" + CommandParameter="{Binding ElementName=JobList, Path=SelectedItem}" /> + <!--<Button Margin="0,5,0,0" Command="{Binding AddBusJob}" Content="Add Bus Job"/> <Button Margin="0,5,0,0" Command="{Binding EditJob}" Content="Edit File" />