Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 63078a3a authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added edit component File, added to load airdrag data from xml file

parent c02614c7
Branches
Tags
No related merge requests found
Showing
with 241 additions and 42 deletions
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))
};
}
}
}
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}']");
}
}
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
xmlns:interfaces="clr-namespace:VECTO3GUI.ViewModel.Interfaces" xmlns:interfaces="clr-namespace:VECTO3GUI.ViewModel.Interfaces"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:impl="clr-namespace:VECTO3GUI.ViewModel.Impl" xmlns:impl="clr-namespace:VECTO3GUI.ViewModel.Impl"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" mc:Ignorable="d"
Title="{Binding Version}" Height="515.36" Width="972.48" WindowStartupLocation="CenterScreen" Title="{Binding Version}" Height="515.36" Width="972.48" WindowStartupLocation="CenterScreen"
d:DataContext="{d:DesignInstance Type=impl:MainWindowViewModel, IsDesignTimeCreatable=False}"> d:DataContext="{d:DesignInstance Type=impl:MainWindowViewModel, IsDesignTimeCreatable=False}">
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<Menu IsMainMenu="True" Style="{DynamicResource MetroMenu}"> <Menu IsMainMenu="True" Style="{DynamicResource MetroMenu}">
<MenuItem Header="File"> <MenuItem Header="File" VerticalAlignment="Center">
<MenuItem Header="New" Style="{DynamicResource MetroMenuItem}" Margin="0" <MenuItem Header="New" Style="{DynamicResource MetroMenuItem}" Margin="0"
Command="{Binding CurrentViewModel.CreateNewJob}"/> Command="{Binding CurrentViewModel.CreateNewJob}"/>
<MenuItem Header="Edit" Style="{DynamicResource MetroMenuItem}" Margin="0" <MenuItem Header="Edit" Style="{DynamicResource MetroMenuItem}" Margin="0"
...@@ -37,7 +38,10 @@ ...@@ -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" <MenuItem Header="Single Bus Job"
Command="{Binding CurrentViewModel.AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.SingleBusJob}}"/> Command="{Binding CurrentViewModel.AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.SingleBusJob}}"/>
<MenuItem Header="Completed Bus Job" <MenuItem Header="Completed Bus Job"
...@@ -49,7 +53,7 @@ ...@@ -49,7 +53,7 @@
</MenuItem> </MenuItem>
<MenuItem Header="Help"> <MenuItem Header="Help" VerticalAlignment="Center">
<MenuItem Header="User Manual"/> <MenuItem Header="User Manual"/>
<MenuItem Header="About Vecto"/> <MenuItem Header="About Vecto"/>
<MenuItem Header="Relase Notes"/> <MenuItem Header="Relase Notes"/>
......
...@@ -27,6 +27,7 @@ namespace VECTO3GUI.Model.TempDataObject ...@@ -27,6 +27,7 @@ namespace VECTO3GUI.Model.TempDataObject
#endregion #endregion
public AirdragComponentData(){}
public AirdragComponentData(IAirdragViewModel viewModel , bool defaultValues) public AirdragComponentData(IAirdragViewModel viewModel , bool defaultValues)
{ {
......
<?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
...@@ -171,6 +171,8 @@ ...@@ -171,6 +171,8 @@
<Compile Include="Helper\Converter\SaveButtonLabelConverter.cs" /> <Compile Include="Helper\Converter\SaveButtonLabelConverter.cs" />
<Compile Include="Helper\SerializeHelper.cs" /> <Compile Include="Helper\SerializeHelper.cs" />
<Compile Include="Helper\ViewModelBase.cs" /> <Compile Include="Helper\ViewModelBase.cs" />
<Compile Include="Helper\XmlComponentReaderHelper.cs" />
<Compile Include="Helper\XmlReaderHelper.cs" />
<Compile Include="Model\InterfacesImpl.cs" /> <Compile Include="Model\InterfacesImpl.cs" />
<Compile Include="Model\JobListModel.cs" /> <Compile Include="Model\JobListModel.cs" />
<Compile Include="Model\SettingsModel.cs" /> <Compile Include="Model\SettingsModel.cs" />
...@@ -623,7 +625,9 @@ ...@@ -623,7 +625,9 @@
<Name>VectoCore</Name> <Name>VectoCore</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<Resource Include="Resources\AirdragLoadTestFile.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -148,7 +148,7 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -148,7 +148,7 @@ namespace VECTO3GUI.ViewModel.Impl
private void SetJobEntryData(JobEntry jobEntry) private void SetJobEntryData(JobEntry jobEntry)
{ {
FirstFilePath = jobEntry.FirstFilePath; FirstFilePath = jobEntry.FirstFilePath;
SecondFilePath = jobEntry.FirstFilePath; SecondFilePath = jobEntry.SecondFilePath;
} }
protected abstract void SetFirstFileLabel(); protected abstract void SetFirstFileLabel();
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Windows.Forms;
using System.Windows.Input; using System.Windows.Input;
using System.Xml; using Castle.Core.Internal;
using Ninject; using Ninject;
using TUGraz.VectoCommon.Hashing;
using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils; 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.Helper;
using VECTO3GUI.Model.TempDataObject; using VECTO3GUI.Model.TempDataObject;
using VECTO3GUI.Util; using VECTO3GUI.Util;
...@@ -65,6 +63,9 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -65,6 +63,9 @@ namespace VECTO3GUI.ViewModel.Impl
private IAirdragDeclarationInputData _airdragData; private IAirdragDeclarationInputData _airdragData;
private AirdragComponentData _componentData; private AirdragComponentData _componentData;
private bool _isEditable; private bool _isEditable;
private bool _useMeasurementData;
private bool _noAirdragData;
private ICommand _airdragConfig; private ICommand _airdragConfig;
private ICommand _loadFileCommand; private ICommand _loadFileCommand;
...@@ -126,7 +127,6 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -126,7 +127,6 @@ namespace VECTO3GUI.ViewModel.Impl
{ {
if (!SetProperty(ref _date, value)) if (!SetProperty(ref _date, value))
return; return;
IsDataChanged(_date, _componentData); IsDataChanged(_date, _componentData);
} }
} }
...@@ -138,9 +138,7 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -138,9 +138,7 @@ namespace VECTO3GUI.ViewModel.Impl
{ {
if (!SetProperty(ref _declaredCdxA, value)) if (!SetProperty(ref _declaredCdxA, value))
return; return;
IsDataChanged(_declaredCdxA, _componentData); IsDataChanged(_declaredCdxA, _componentData);
SetAirdragArea(_airdragData);
} }
} }
...@@ -165,13 +163,27 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -165,13 +163,27 @@ namespace VECTO3GUI.ViewModel.Impl
set { SetProperty(ref _isEditable, value); } 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() protected override void InputDataChanged()
{ {
var inputData = JobViewModel.InputDataProvider as IDeclarationInputDataProvider; var inputData = JobViewModel.InputDataProvider as IDeclarationInputDataProvider;
_airdragData = inputData?.JobInputData.Vehicle.Components.AirdragInputData; _airdragData = inputData?.JobInputData.Vehicle.Components.AirdragInputData;
SetAirdragValues(_airdragData); SetAirdragValues(_airdragData);
IsEditable = true; UseMeasurementData = _airdragData != null;
NoAirdragData = !UseMeasurementData;
IsEditable = false;
} }
private void SetAirdragValues(IAirdragDeclarationInputData airdrag) private void SetAirdragValues(IAirdragDeclarationInputData airdrag)
...@@ -188,7 +200,9 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -188,7 +200,9 @@ namespace VECTO3GUI.ViewModel.Impl
CertificationNumber = airdrag.CertificationNumber; CertificationNumber = airdrag.CertificationNumber;
Date = airdrag.Date; Date = airdrag.Date;
AppVersion = airdrag.AppVersion; AppVersion = airdrag.AppVersion;
SetAirdragArea(airdrag); DeclaredCdxA = airdrag.AirDragArea;
CdxA_0 = DeclaredCdxA;
TransferredCdxA = DeclaredCdxA;
DigestValue = airdrag.DigestValue; DigestValue = airdrag.DigestValue;
_componentData = new AirdragComponentData(this); _componentData = new AirdragComponentData(this);
...@@ -207,7 +221,7 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -207,7 +221,7 @@ namespace VECTO3GUI.ViewModel.Impl
private void DoAirdragConfig(AirdragConfig config) private void DoAirdragConfig(AirdragConfig config)
{ {
IsEditable = config == AirdragConfig.UseMeasurementData;
} }
...@@ -221,25 +235,17 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -221,25 +235,17 @@ namespace VECTO3GUI.ViewModel.Impl
private bool CanLoadFile() private bool CanLoadFile()
{ {
return IsEditable; return UseMeasurementData;
} }
private void DoLoadFile() private void DoLoadFile()
{ {
var filePath = FileDialogHelper.ShowSelectFilesDialog(false)?.FirstOrDefault(); var filePath = FileDialogHelper.ShowSelectFilesDialog(false)?.FirstOrDefault();
ReadSelectedXml(null); ReadSelectedXml(filePath);
} }
#endregion #endregion
private void SetAirdragArea(IAirdragDeclarationInputData airdrag)
{
DeclaredCdxA = airdrag.AirDragArea;
CdxA_0 = DeclaredCdxA;
TransferredCdxA = DeclaredCdxA;
}
public override void ResetComponentData() public override void ResetComponentData()
{ {
_componentData.ResetToComponentValues(this); _componentData.ResetToComponentValues(this);
...@@ -254,8 +260,34 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -254,8 +260,34 @@ namespace VECTO3GUI.ViewModel.Impl
private void ReadSelectedXml(string filePath) 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; 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;
} }
} }
} }
...@@ -7,7 +7,10 @@ using System.IO; ...@@ -7,7 +7,10 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using System.Xml;
using Ninject; using Ninject;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.InputData.FileIO.XML;
using VECTO3GUI.Util; using VECTO3GUI.Util;
using VECTO3GUI.ViewModel.Interfaces; using VECTO3GUI.ViewModel.Interfaces;
using VECTO3GUI.Helper; using VECTO3GUI.Helper;
...@@ -43,6 +46,7 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -43,6 +46,7 @@ namespace VECTO3GUI.ViewModel.Impl
private ICommand _exitCommand; private ICommand _exitCommand;
private ICommand _exitMainCommand; private ICommand _exitMainCommand;
private ICommand _addBusJobCommand; private ICommand _addBusJobCommand;
private ICommand _editCompletedFileCommand;
#endregion #endregion
...@@ -143,6 +147,31 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -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) private bool CanEditJob(JobEntry jobEntry)
{ {
return jobEntry != null; return jobEntry != null;
...@@ -231,7 +260,6 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -231,7 +260,6 @@ namespace VECTO3GUI.ViewModel.Impl
var window = OutputWindowHelper.CreateOutputWindow(Kernel, viewModel, "Settings", 440, 200, var window = OutputWindowHelper.CreateOutputWindow(Kernel, viewModel, "Settings", 440, 200,
ResizeMode.NoResize); ResizeMode.NoResize);
window.ShowDialog(); window.ShowDialog();
} }
public ICommand ExitMainCommand public ICommand ExitMainCommand
...@@ -272,9 +300,6 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -272,9 +300,6 @@ namespace VECTO3GUI.ViewModel.Impl
#endregion #endregion
private object GetBusJobViewModel(JobType jobType, JobEntry jobEntry = null) private object GetBusJobViewModel(JobType jobType, JobEntry jobEntry = null)
{ {
var currentJobType = jobEntry?.JobType ?? jobType; var currentJobType = jobEntry?.JobType ?? jobType;
...@@ -320,6 +345,25 @@ namespace VECTO3GUI.ViewModel.Impl ...@@ -320,6 +345,25 @@ namespace VECTO3GUI.ViewModel.Impl
{ {
SerializeHelper.SerializeToFile(jobEntry.JobEntryFilePath, jobEntry); 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) //private IJobEditViewModel ReadJob(string jobFile)
//{ //{
// if (jobFile == null) // if (jobFile == null)
......
...@@ -8,6 +8,10 @@ namespace VECTO3GUI.ViewModel.Interfaces ...@@ -8,6 +8,10 @@ namespace VECTO3GUI.ViewModel.Interfaces
{ {
IAirdragDeclarationInputData ModelData { get; } IAirdragDeclarationInputData ModelData { get; }
bool IsEditable { get; } bool IsEditable { get; }
bool NoAirdragData { get; }
bool UseMeasurementData { get; }
ICommand LoadFileCommand { get; } ICommand LoadFileCommand { get; }
ICommand AirdragConfigCommand { get; } ICommand AirdragConfigCommand { get; }
......
...@@ -17,6 +17,7 @@ namespace VECTO3GUI.ViewModel.Interfaces ...@@ -17,6 +17,7 @@ namespace VECTO3GUI.ViewModel.Interfaces
ICommand MoveJobDown { get; } ICommand MoveJobDown { get; }
ICommand StartSimulation { get; } ICommand StartSimulation { get; }
ICommand EditJob { get; } ICommand EditJob { get; }
ICommand EditCompletedFile { get; }
ICommand JobEntrySetActive { get; } ICommand JobEntrySetActive { get; }
ICommand CreateNewJob { get; } ICommand CreateNewJob { get; }
ICommand OpenJob { get; } ICommand OpenJob { get; }
......
...@@ -32,12 +32,13 @@ ...@@ -32,12 +32,13 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<RadioButton GroupName="AirdragConfig" Margin="5" <RadioButton GroupName="AirdragConfig" Margin="5"
Content="{Binding Source={x:Static impl:AirdragConfig.WithoutAirdrag}, Converter={converter:EnumConverter}}" 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" <RadioButton GroupName="AirdragConfig" Margin="5"
Content="{Binding Source={x:Static impl:AirdragConfig.UseMeasurementData}, Converter={converter:EnumConverter}}" Content="{Binding Source={x:Static impl:AirdragConfig.UseMeasurementData}, Converter={converter:EnumConverter}}"
Command="{Binding AirdragConfigCommand}" CommandParameter="{ Binding Source={x:Static impl:AirdragConfig.UseMeasurementData}}" 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"> <StackPanel Orientation="Horizontal" Margin="30,10,10,10">
<Label Content="Load Component File:"/> <Label Content="Load Component File:"/>
...@@ -51,18 +52,18 @@ ...@@ -51,18 +52,18 @@
</GroupBox> </GroupBox>
<GroupBox Header="Aridrag Data" Width="500" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1" Height="250" VerticalAlignment="Top" <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"> <StackPanel Orientation="Vertical" Width="450" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True">
<customControls:VectoParameterControl <customControls:VectoParameterControl
Caption="Manufacturer" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Caption="Manufacturer" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding Manufacturer}" IsEnabled="{Binding IsEditable}" /> Value="{Binding Manufacturer}" IsEnabled="{Binding IsEditable, UpdateSourceTrigger=PropertyChanged}" />
<customControls:VectoParameterControl <customControls:VectoParameterControl
Caption="Model" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Caption="Model" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding Model}" IsEnabled="{Binding IsEditable}" /> Value="{Binding Model}" IsEnabled="{Binding IsEditable, UpdateSourceTrigger=PropertyChanged}" />
<!-- <mah:DateTimePicker --> <!-- <mah:DateTimePicker -->
<!-- SelectedDate="{Binding Date}" --> <!-- SelectedDate="{Binding Date}" -->
......
...@@ -40,9 +40,10 @@ ...@@ -40,9 +40,10 @@
<customControls:VectoParameterControl <customControls:VectoParameterControl
Caption="VIN" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Caption="VIN" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding VIN}" /> Value="{Binding VIN}" />
<customControls:VectoParameterControl
<!--<customControls:VectoParameterControl
Caption="Date" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Caption="Date" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding Date}" /> Value="{Binding Date}" />-->
<customControls:ComboParameter <customControls:ComboParameter
Caption="Legislative Class" Caption="Legislative Class"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="80"/>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="150"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="30"/> <RowDefinition Height="30"/>
...@@ -84,10 +84,14 @@ ...@@ -84,10 +84,14 @@
<Grid Grid.Row="1" Grid.Column="2" Margin="0,0,10,0"> <Grid Grid.Row="1" Grid.Column="2" Margin="0,0,10,0">
<StackPanel Orientation="Vertical" Margin="0,30,0,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}" Command="{Binding EditJob}"
CommandParameter="{Binding ElementName=JobList, Path=SelectedItem}"/> 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 AddBusJob}" Content="Add Bus Job"/>
<Button Margin="0,5,0,0" Command="{Binding EditJob}" Content="Edit File" /> <Button Margin="0,5,0,0" Command="{Binding EditJob}" Content="Edit File" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment