diff --git a/VECTO3GUI/Helper/Converter/JobEntrySelectedConverter.cs b/VECTO3GUI/Helper/Converter/JobEntrySelectedConverter.cs deleted file mode 100644 index 8e80432b9d017e47fd0b9c0637ff6132f6d146d6..0000000000000000000000000000000000000000 --- a/VECTO3GUI/Helper/Converter/JobEntrySelectedConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Controls; -using System.Windows.Data; - -namespace VECTO3GUI.Helper.Converter -{ - public class JobEntrySelectedConverter : IValueConverter - { - #region Implementation of IValueConverter - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - //var jobEntry = (ViewModel.Impl.JobEntry)((ListViewItem)value)?.Content; - //return jobEntry != null && jobEntry.Selected; - return value; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/VECTO3GUI/MainWindow.xaml b/VECTO3GUI/MainWindow.xaml index c4b7cf477a0290517f31e0382f425afc2c112b45..30f34b34e9533dfb50a89f7618bff91a7e6ff90d 100644 --- a/VECTO3GUI/MainWindow.xaml +++ b/VECTO3GUI/MainWindow.xaml @@ -57,7 +57,8 @@ <MenuItem Header="Help" VerticalAlignment="Center"> - <MenuItem Header="About Vecto"/> + <MenuItem Header="About Vecto" + Command="{Binding CurrentViewModel.AboutViewCommand}"/> </MenuItem> </Menu> diff --git a/VECTO3GUI/Resources/JRC-About.png b/VECTO3GUI/Resources/JRC-About.png new file mode 100644 index 0000000000000000000000000000000000000000..7ccda103840925863e14e959ef1371dedc797ba6 Binary files /dev/null and b/VECTO3GUI/Resources/JRC-About.png differ diff --git a/VECTO3GUI/Resources/VECTO-About.png b/VECTO3GUI/Resources/VECTO-About.png new file mode 100644 index 0000000000000000000000000000000000000000..4755b511626afcd157f27b0cf70e1c21b6ee067e Binary files /dev/null and b/VECTO3GUI/Resources/VECTO-About.png differ diff --git a/VECTO3GUI/Resources/ViewModelMappings.xaml b/VECTO3GUI/Resources/ViewModelMappings.xaml index a3321d13f7f2a1b1ee6ee1044fa9968d1af80cf8..423255c0f842adc695e116917834b263d1d3c3e4 100644 --- a/VECTO3GUI/Resources/ViewModelMappings.xaml +++ b/VECTO3GUI/Resources/ViewModelMappings.xaml @@ -41,6 +41,11 @@ <views:JobEditView/> </DataTemplate> + <DataTemplate DataType="{x:Type impl:AboutViewModel}"> + <views:AboutView/> + </DataTemplate> + + <!--<DataTemplate DataType="{x:Type impl:CompleteVehicleBusJobViewModel}"> <views:JobEditView/> </DataTemplate>--> diff --git a/VECTO3GUI/VECTO3GUI.csproj b/VECTO3GUI/VECTO3GUI.csproj index 067d4903355d864c945e1f39799c93a453205eff..22bdc6c3d529df10cab4c417e4429111fb7ed927 100644 --- a/VECTO3GUI/VECTO3GUI.csproj +++ b/VECTO3GUI/VECTO3GUI.csproj @@ -147,6 +147,7 @@ <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Configuration" /> <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> <Reference Include="System.IO.Compression" /> <Reference Include="System.Runtime.Serialization" /> <Reference Include="System.ServiceModel" /> @@ -227,6 +228,7 @@ <Compile Include="ViewModel\Adapter\Declaration\TyreDeclarationAdapter.cs" /> <Compile Include="ViewModel\Adapter\Declaration\VehicleDeclarationAdapter.cs" /> <Compile Include="ViewModel\Adapter\IAdapterFactory.cs" /> + <Compile Include="ViewModel\Impl\AboutViewModel.cs" /> <Compile Include="ViewModel\Impl\AbstractBusJobViewModel.cs" /> <Compile Include="ViewModel\Impl\AbstractComponentViewModel.cs" /> <Compile Include="ViewModel\Impl\AbstractJobViewModel.cs" /> @@ -296,6 +298,9 @@ <Compile Include="ViewModel\Interfaces\SteeringPumpEntry.cs" /> <Compile Include="ViewModel\Interfaces\TorqueConverterCharacteristics.cs" /> <Compile Include="ViewModel\Interfaces\TorqueEntry.cs" /> + <Compile Include="Views\AboutView.xaml.cs"> + <DependentUpon>AboutView.xaml</DependentUpon> + </Compile> <Compile Include="Views\BusJobView.xaml.cs"> <DependentUpon>BusJobView.xaml</DependentUpon> </Compile> @@ -435,7 +440,6 @@ </Compile> <Compile Include="Helper\Converter\BaseConverter.cs" /> <Compile Include="Helper\DataContextBaseExtension.cs" /> - <Compile Include="Helper\Converter\JobEntrySelectedConverter.cs" /> <Compile Include="Helper\SIUnit.cs" /> <Compile Include="Helper\Converter\SIValueConverter.cs" /> <Compile Include="Helper\Converter\VehicleClassConverter.cs" /> @@ -455,6 +459,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Views\AboutView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\BusJobView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -674,6 +682,12 @@ <ItemGroup> <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> </ItemGroup> + <ItemGroup> + <Resource Include="Resources\VECTO-About.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Resources\JRC-About.png" /> + </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/AboutViewModel.cs b/VECTO3GUI/ViewModel/Impl/AboutViewModel.cs new file mode 100644 index 0000000000000000000000000000000000000000..696d26a5565444b3dece72b75d34d09f85b517d4 --- /dev/null +++ b/VECTO3GUI/ViewModel/Impl/AboutViewModel.cs @@ -0,0 +1,77 @@ + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using VECTO3GUI.Util; + +namespace VECTO3GUI.ViewModel.Impl +{ + public class AboutViewModel : ObservableObject + { + #region Members + + private ICommand _euplLinkClickedCommand; + private ICommand _mailClickedCommand; + private ICommand _jrcPicClickedCommand; + + #endregion + + #region Properties + + public string EUPLLink { get; set; } + public string JRCMail { get; set; } + public string JRCPic { get; set; } + + #endregion + + public AboutViewModel() + { + EUPLLink = "https://joinup.ec.europa.eu/community/eupl/og_page/eupl"; + JRCMail = "mailto:jrc-vecto@ec.europa.eu"; + JRCPic = "http://ec.europa.eu/dgs/jrc/index.cfm"; + } + + #region Commands + + public ICommand EUPLLinkClickedCommand + { + get + { + return _euplLinkClickedCommand ?? (_euplLinkClickedCommand = new RelayCommand(DoLinkClickedCommand)); + } + } + + private void DoLinkClickedCommand() + { + Process.Start(EUPLLink); + } + + public ICommand MailClickedCommand + { + get { return _mailClickedCommand ?? (_mailClickedCommand = new RelayCommand(DoMailClickedCommand)); } + } + + private void DoMailClickedCommand() + { + Process.Start(JRCMail); + } + + public ICommand JrcPicClickedCommand + { + get { return _jrcPicClickedCommand ?? (_jrcPicClickedCommand = new RelayCommand(DoJrcPicClickedCommand)); } + } + + private void DoJrcPicClickedCommand() + { + Process.Start(JRCPic); + } + + #endregion + + + } +} diff --git a/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs b/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs index 7ff301c9b793492efcd3dffbacfd485d1cefa5b3..93fa7030efd641caf57f58f8ca81e5ef2c06b3a0 100644 --- a/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/AbstractBusJobViewModel.cs @@ -228,8 +228,8 @@ namespace VECTO3GUI.ViewModel.Impl Header = new JobHeader { JobType = JobType, FileVersion = JobType.GetJobTypeNumberByJobType(), - AppVersion = "unknown", - CreatedBy = "unknown", + AppVersion = JobEntry.APP_VERSION, + CreatedBy = Environment.UserName, Date = DateTime.UtcNow } }; diff --git a/VECTO3GUI/ViewModel/Impl/JobEntry.cs b/VECTO3GUI/ViewModel/Impl/JobEntry.cs index 1f01b768597cdd9b1db155ae745fd4229e09cb93..d1c437cf9b28b313e693604ce2d7d104b426c325 100644 --- a/VECTO3GUI/ViewModel/Impl/JobEntry.cs +++ b/VECTO3GUI/ViewModel/Impl/JobEntry.cs @@ -67,6 +67,8 @@ namespace VECTO3GUI.ViewModel.Impl public class JobEntry : ObservableObject { + public const string APP_VERSION = "VECTO3GUI"; + private JobHeader _header; private JobBody _body; private bool _selected; diff --git a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs index e417cd2e511cd4ef7c23c4ef20f8cf1aa7aef4c3..79951ff5f6f9f519399fe0aa945a0be797898ce3 100644 --- a/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/JoblistViewModel.cs @@ -6,11 +6,9 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.IO; -using System.IO.Pipes; using System.Linq; using System.Threading; using System.Windows; -using System.Windows.Forms; using System.Windows.Input; using System.Xml; using System.Xml.Linq; @@ -70,7 +68,6 @@ namespace VECTO3GUI.ViewModel.Impl private ICommand _editCompletedFileCommand; private ICommand _moveJobUpCommand; private ICommand _moveJobDownCommand; - private ICommand _startSimulationCommand; private ICommand _openInFolderCommand; private ICommand _doubleClickCommand; private ICommand _runSimulationCommand; @@ -87,6 +84,7 @@ namespace VECTO3GUI.ViewModel.Impl private string _outputDirectory; private ICommand _browseOutputDirectory; private bool _writeModelData; + private ICommand _aboutViewCommand; #endregion @@ -327,7 +325,7 @@ namespace VECTO3GUI.ViewModel.Impl get { return _writeModelData; } set { SetProperty(ref _writeModelData, value); } } - + private void DoBrowseOutputDirectory() { var filePath = FileDialogHelper.ShowSelectFilesDialog(false, FileDialogHelper.JobFilter); @@ -409,10 +407,10 @@ namespace VECTO3GUI.ViewModel.Impl { return _editCompletedFileCommand ?? (_editCompletedFileCommand = - new RelayCommand<JobEntry>(DoEditCompletedFile, CanEditCompletdFile)); + new RelayCommand<JobEntry>(DoEditCompletedFile, CanEditCompletedFile)); } } - private bool CanEditCompletdFile(JobEntry jobEntry) + private bool CanEditCompletedFile(JobEntry jobEntry) { return jobEntry != null && (IsJobEntry(jobEntry) || jobEntry.Header.JobType == JobType.CompletedXml); @@ -468,9 +466,10 @@ namespace VECTO3GUI.ViewModel.Impl { xmlViewModel = new XMLViewModel(SelectedJobEntry.JobEntryFilePath); } - else if (IsJobFile(_selectedJobEntry.JobEntryFilePath)) - xmlViewModel = new XMLViewModel( - SelectedJobEntry.GetAbsoluteFilePath(SelectedJobEntry.Body.PrimaryVehicle)); + else if (IsJobFile(_selectedJobEntry.JobEntryFilePath)) { + var filePath = SelectedJobEntry.Body.PrimaryVehicle ?? SelectedJobEntry.Body.PrimaryVehicleResults; + xmlViewModel = new XMLViewModel(SelectedJobEntry.GetAbsoluteFilePath(filePath)); + } break; case JobFileType.CompletedBusFile: xmlViewModel = new XMLViewModel( @@ -613,17 +612,6 @@ namespace VECTO3GUI.ViewModel.Impl _jobs.Move(index, index + 1); } - - public ICommand StartSimulation - { - get { return _startSimulationCommand ?? (_startSimulationCommand = new RelayCommand(DoStartSimulationCommand)); } - } - private void DoStartSimulationCommand() - { - - } - - public ICommand OpenInFolder { get { return _openInFolderCommand ?? (_openInFolderCommand = new RelayCommand<JobEntry>(DoOpenInFolderCommand)); } @@ -640,6 +628,19 @@ namespace VECTO3GUI.ViewModel.Impl } } + public ICommand AboutViewCommand + { + get { return _aboutViewCommand ?? (_aboutViewCommand = new RelayCommand(DoAboutViewCommand)); } + } + private void DoAboutViewCommand() + { + + var viewModel = new AboutViewModel(); + + var window = OutputWindowHelper.CreateOutputWindow(Kernel, viewModel, "About VECTO", 507, 395, ResizeMode.NoResize); + window.Show(); + } + #endregion private object GetBusJobViewModel(JobType jobType, JobEntry jobEntry = null) diff --git a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs index 76a0e46b471f6da00499de14ff4672a067a71785..c90bbf61573f5736c95e1dafd6e2cc99cbd22489 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IJoblistViewModel.cs @@ -16,7 +16,6 @@ namespace VECTO3GUI.ViewModel.Interfaces ICommand RemoveAllJobs { get; } ICommand MoveJobUp { get; } ICommand MoveJobDown { get; } - ICommand StartSimulation { get; } ICommand EditJob { get; } ICommand EditCompletedFile { get; } ICommand CreateNewJob { get; } @@ -36,5 +35,6 @@ namespace VECTO3GUI.ViewModel.Interfaces string OutputDirectory { get; set; } ICommand BrowseOutputDirectory { get; } bool WriteModelData { get; set; } + ICommand AboutViewCommand { get; } } } diff --git a/VECTO3GUI/Views/AboutView.xaml b/VECTO3GUI/Views/AboutView.xaml new file mode 100644 index 0000000000000000000000000000000000000000..352fd64e5964a866f14b4dcb00d124bcd160f7f6 --- /dev/null +++ b/VECTO3GUI/Views/AboutView.xaml @@ -0,0 +1,87 @@ +<UserControl x:Class="VECTO3GUI.Views.AboutView" + 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:local="clr-namespace:VECTO3GUI.Views" + mc:Ignorable="d" + d:DesignHeight="395" d:DesignWidth="507"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="5"/> + <ColumnDefinition/> + <ColumnDefinition Width="5"/> + </Grid.ColumnDefinitions> + + <Grid Grid.Column ="1"> + <Grid.RowDefinitions> + <RowDefinition Height="10"/> + <RowDefinition/> + <RowDefinition Height="35"/> + <RowDefinition Height="115"/> + <RowDefinition Height="30"/> + </Grid.RowDefinitions> + + <Grid Grid.Row="1"> + <Image HorizontalAlignment="Center" VerticalAlignment="Center"> + <Image.Source> + <BitmapImage UriSource="../Resources/VECTO-About.png"/> + </Image.Source> + </Image> + </Grid> + + <Grid Grid.Row="2" Margin="0,5,0,0"> + <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Margin="5,0,0,0"> + <TextBlock> + <Hyperlink NavigateUri="{Binding EUPLLink}" Command="{Binding EUPLLinkClickedCommand}"> + <TextBlock Text="VECTO is licensed under EUPL 1.1+"/> + </Hyperlink> + </TextBlock> + <TextBlock Text="Copyright © 2012-2019 European Union"/> + </StackPanel> + </Grid> + + <Grid Grid.Row="3"> + + <Grid.ColumnDefinitions> + <ColumnDefinition/> + <ColumnDefinition/> + </Grid.ColumnDefinitions> + + <Grid Grid.Column="0" Margin="10,30,0,0" > + <StackPanel Orientation="Vertical" HorizontalAlignment="Left"> + <TextBlock Text="Developed on behalf of the"/> + <TextBlock Text="European Commission DG CLIMA" Margin="20,0,0,0"/> + </StackPanel> + </Grid> + + <Grid Grid.Column="1"> + <Button Command="{Binding JrcPicClickedCommand}"> + <Button.Template> + <ControlTemplate> + <Image HorizontalAlignment="Center" VerticalAlignment="Center"> + <Image.Source> + <BitmapImage UriSource="../Resources/JRC-About.png"/> + </Image.Source> + </Image> + </ControlTemplate> + </Button.Template> + </Button> + </Grid> + </Grid> + + <Grid Grid.Row="4"> + <StackPanel Orientation="Horizontal" Margin="10,0,0,0"> + <TextBlock Text="Support Contact:"/> + <TextBlock Margin="5,0,0,0"> + <Hyperlink NavigateUri="{Binding JRCMail}" Command="{Binding MailClickedCommand}" > + <TextBlock Text="jrc-vecto@ec.europa.eu"/> + </Hyperlink> + </TextBlock> + </StackPanel> + </Grid> + + </Grid> + + </Grid> +</UserControl> diff --git a/VECTO3GUI/Views/AboutView.xaml.cs b/VECTO3GUI/Views/AboutView.xaml.cs new file mode 100644 index 0000000000000000000000000000000000000000..2dcbe576a4720861e8ee3651cd9d59c09cda47ad --- /dev/null +++ b/VECTO3GUI/Views/AboutView.xaml.cs @@ -0,0 +1,28 @@ +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; + +namespace VECTO3GUI.Views +{ + /// <summary> + /// Interaction logic for AboutView.xaml + /// </summary> + public partial class AboutView : UserControl + { + public AboutView() + { + InitializeComponent(); + } + } +} diff --git a/VECTO3GUI/Views/JoblistView.xaml b/VECTO3GUI/Views/JoblistView.xaml index ab57a6c936fa576c98203194c5dd6700b74dd671..8b0238b8e41ec5ae77ca53c6f3de3f6cf330cb41 100644 --- a/VECTO3GUI/Views/JoblistView.xaml +++ b/VECTO3GUI/Views/JoblistView.xaml @@ -92,36 +92,36 @@ <DataGrid.Resources> <ContextMenu x:Key="RowMenu"> <MenuItem Header="{Binding DataContext.FirstContextMenu, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - Command="{Binding DataContext.OpenJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding Source={x:Static impl:JobFileType.PrimaryBusFile}}" - Visibility="{Binding DataContext.VisibilityFirstView, Converter={converter:BoolVisibilityConverter}, - RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.OpenJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding Source={x:Static impl:JobFileType.PrimaryBusFile}}" + Visibility="{Binding DataContext.VisibilityFirstView, Converter={converter:BoolVisibilityConverter}, + RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> <MenuItem Header="View Completed Bus File" - Command="{Binding DataContext.OpenJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding Source={x:Static impl:JobFileType.CompletedBusFile}}" - Visibility="{Binding DataContext.VisibilitySecView, Converter={converter:BoolVisibilityConverter}, - RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.OpenJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding Source={x:Static impl:JobFileType.CompletedBusFile}}" + Visibility="{Binding DataContext.VisibilitySecView, Converter={converter:BoolVisibilityConverter}, + RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> <MenuItem Header="Edit Job" - Command="{Binding DataContext.EditJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.EditJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> <MenuItem Header="Edit Completed File" - Command="{Binding DataContext.EditCompletedFile, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.EditCompletedFile, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> <MenuItem Header="Show In Folder" - Command="{Binding DataContext.OpenInFolder, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.OpenInFolder, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> <MenuItem Header="Remove Job" - Command="{Binding DataContext.RemoveJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" - CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> + Command="{Binding DataContext.RemoveJob, RelativeSource={RelativeSource AncestorType=views:JoblistView}}" + CommandParameter="{Binding DataContext.SelectedJobEntry, RelativeSource={RelativeSource AncestorType=views:JoblistView}}"/> </ContextMenu> </DataGrid.Resources> @@ -130,11 +130,11 @@ <MenuItem Header="Add Job" Command="{Binding AddJob}"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> <MenuItem Header="Create Single Bus Job" - Command="{Binding AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.SingleBusJob}}"/> + Command="{Binding AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.SingleBusJob}}"/> <MenuItem Header="Create Completed Bus Job" - Command="{Binding AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.CompletedBusJob}}"/> + Command="{Binding AddBusJob}" CommandParameter="{Binding Source={x:Static impl:JobType.CompletedBusJob}}"/> <MenuItem Header="Create Completed XML" - Command="{Binding CreateNewJob}"/> + Command="{Binding CreateNewJob}"/> <Separator HorizontalAlignment="Stretch" Background="Gray"/> <MenuItem Header="Remove All" Command="{Binding RemoveAllJobs}"/> </ContextMenu>