Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 4387cc3f authored by Harald Martini's avatar Harald Martini
Browse files

Added GUILabels Resource File.

parent 743ba1d5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VECTO3GUI2020"
xmlns:resx="clr-namespace:VECTO3GUI2020.Properties"
xmlns:Implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" d:DataContext="{d:DesignInstance Type=Implementation:MainWindowViewModel}" x:Class="VECTO3GUI2020.MainWindow"
mc:Ignorable="d"
Title="Vecto" Height="450" Width="820"
......@@ -22,9 +23,9 @@
<Menu IsMainMenu="True">
<MenuItem Header="File" VerticalAlignment="Stretch">
<MenuItem Header="New File">
<MenuItem Header="New Primary and Interim Job" Command="{Binding JobListVm.NewVifCommand}"/>
<MenuItem Header="New Interim/Completed Job" Command="{Binding JobListVm.NewManufacturingStageFileCommand}"/>
<MenuItem Header="New Complete Job"></MenuItem>
<MenuItem Header="{x:Static resx:GUILabels.NewPrimaryAndInterimJob}" Command="{Binding JobListVm.NewVifCommand}"/>
<MenuItem Header="{x:Static resx:GUILabels.NewInterimCompletedJob}" Command="{Binding JobListVm.NewManufacturingStageFileCommand}"/>
<MenuItem Header="{x:Static resx:GUILabels.NewCompleteJob}"></MenuItem>
<Separator></Separator>
<MenuItem Header="Create interim/completeted input" Command="{Binding JobListVm.NewCompletedInputCommand}"/>
<MenuItem Header="Create extemted interim/completed input" Command="{Binding JobListVm.NewExemptedCompletedInputCommand}"/>
......
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace VECTO3GUI2020.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class GUILabels {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal GUILabels() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VECTO3GUI2020.Properties.GUILabels", typeof(GUILabels).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to VECTO.
/// </summary>
public static string DefaultTitle {
get {
return ResourceManager.GetString("DefaultTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New Complete Job.
/// </summary>
public static string NewCompleteJob {
get {
return ResourceManager.GetString("NewCompleteJob", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New Interim/Completed Job.
/// </summary>
public static string NewInterimCompletedJob {
get {
return ResourceManager.GetString("NewInterimCompletedJob", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New Primary and Interim Job.
/// </summary>
public static string NewPrimaryAndInterimJob {
get {
return ResourceManager.GetString("NewPrimaryAndInterimJob", resourceCulture);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DefaultTitle" xml:space="preserve">
<value>VECTO</value>
</data>
<data name="NewPrimaryAndInterimJob" xml:space="preserve">
<value>New Primary and Interim Job</value>
</data>
<data name="NewInterimCompletedJob" xml:space="preserve">
<value>New Interim/Completed Job</value>
</data>
<data name="NewCompleteJob" xml:space="preserve">
<value>New Complete Job</value>
</data>
</root>
\ No newline at end of file
......@@ -183,6 +183,11 @@
<Compile Include="Helper\ProcessHelper.cs" />
<Compile Include="Helper\VisualTreeHelperExtensions.cs" />
<Compile Include="Helper\TemplateSelector\MultistageParameterDataTemplateSelector.cs" />
<Compile Include="Properties\GUILabels.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>GUILabels.resx</DependentUpon>
</Compile>
<Compile Include="ViewModel\Implementation\Common\AdditionalJobInfoViewModel.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\MultistageParameterViewModel.cs" />
<Compile Include="Helper\NameResolver.cs" />
......@@ -797,6 +802,11 @@
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>BusStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\GUILabels.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>GUILabels.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Strings.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
......
......@@ -6,6 +6,7 @@ using System.Windows.Input;
using Microsoft.Toolkit.Mvvm.Input;
using Ninject;
using VECTO3GUI2020.Helper;
using VECTO3GUI2020.Properties;
using VECTO3GUI2020.ViewModel.Interfaces.Common;
namespace VECTO3GUI2020.ViewModel.Implementation.Common
......@@ -56,7 +57,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Common
protected bool AskForConfirmationOnClose { get; set; } = false;
private ICommand _closeWindowCommand;
private string _title = "No Title Set";
private string _title = GUILabels.DefaultTitle;
public ICommand CloseWindowCommand
{
......
......@@ -44,7 +44,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
IManufacturingStageViewModel ManufacturingStageViewModel { get; }
bool Exempted { get; }
ICommand LoadVehicleDataCommand { get; }
/// <summary>
/// Creates a new VIF file
......@@ -219,7 +218,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
var factory = new SimulatorFactory(ExecutionMode.Declaration, inputData, writer);
var jobContainer = new JobContainer(new NullSumWriter()); //TODO: Replace with real sumwriter
var jobContainer = new JobContainer(new NullSumWriter());
var runs = factory.SimulationRuns().ToList();
foreach (var run in runs) {
......@@ -379,10 +378,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
public bool Exempted => _exempted;
public ICommand LoadVehicleDataCommand
{
get => ManufacturingStageViewModel.LoadVehicleDataCommand;
}
#endregion
......
......@@ -62,7 +62,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
#region AddVifCommand
public ICommand AddVifFile
public ICommand AddVifFileCommand
{
get => _addVifCommand ?? new RelayCommand(AddVifFileExecute, () => true);
}
......@@ -71,18 +71,27 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
var fileName = _dialogHelper.OpenXMLFileDialog();
if (fileName == null) {
AddVifFile(fileName);
}
internal void AddVifFile(string fileName)
{
if (fileName == null)
{
return;
}
IMultistageBusInputDataProvider inputDataProvider = null;
try {
try
{
inputDataProvider = _inputDataReader.Create(fileName) as IMultistageBusInputDataProvider;
}
catch(Exception e) {
catch (Exception e)
{
_dialogHelper.ShowMessageBox(e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
if (inputDataProvider == null) {
if (inputDataProvider == null)
{
_dialogHelper.ShowMessageBox("invalid input file", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
......
......@@ -12,7 +12,7 @@
<Grid MaxWidth="900">
<DockPanel>
<Grid DockPanel.Dock="Top">
<customControls:FilePicker x:Name="NewMultistageFilePicker" Grid.Row="0" Text="{Binding VifPath}" HorizontalAlignment="Stretch" Command="{Binding AddVifFile}"/>
<customControls:FilePicker x:Name="NewMultistageFilePicker" Grid.Row="0" Text="{Binding VifPath}" HorizontalAlignment="Stretch" Command="{Binding AddVifFileCommand}"/>
</Grid>
<Button Style="{DynamicResource MultiStageButtonStyle1}"
Margin="4" DockPanel.Dock="Bottom"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment