Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9edb82e4 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

Added xmldocumenttype as string to IDocumentViewModel

parent 73806e56
No related branches found
No related tags found
No related merge requests found
Showing with 31 additions and 4 deletions
......@@ -16,7 +16,9 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Document
public XmlDocumentType? DocumentType { get; }
public DataSource DataSource => _jobEditViewModel.DataSource;
public string DocumentTypeName => DocumentType?.GetName();
public DataSource DataSource => _jobEditViewModel.DataSource;
private IJobEditViewModel _jobEditViewModel;
......
......@@ -15,7 +15,9 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Document
public XmlDocumentType? DocumentType { get; }
public DataSource DataSource => throw new System.NotImplementedException();
public string DocumentTypeName => DocumentType?.GetName();
public DataSource DataSource => throw new System.NotImplementedException();
public string SourceFile { get; }
......
......@@ -23,6 +23,8 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Document
get => _documentType;
}
public string DocumentTypeName => _documentType?.GetName();
public DataSource DataSource
{
get => _dataSource;
......
......@@ -9,6 +9,8 @@ namespace VECTO3GUI2020.ViewModel.Interfaces.Document
{
string DocumentName { get; }
XmlDocumentType? DocumentType { get; }
string DocumentTypeName { get; }
DataSource DataSource { get; }
IEditViewModel EditViewModel { get; }
bool Selected { get; set; }
......
......@@ -460,6 +460,8 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
//Remove this from
public XmlDocumentType? DocumentType => null;
public string DocumentTypeName => "New VIF";
public DataSource DataSource
{
get => _dataSource;
......
......@@ -293,6 +293,8 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
public XmlDocumentType? DocumentType => XmlDocumentType.MultistageOutputData;
public string DocumentTypeName => DocumentType?.GetName();
public DataSource DataSource => _dataSource;
public IEditViewModel EditViewModel => this;
......
......@@ -106,6 +106,8 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
public XmlDocumentType? DocumentType => _documentType;
public string DocumentTypeName => "Step input";
public DataSource DataSource
{
get => _dataSource;
......
......@@ -111,7 +111,7 @@
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn IsReadOnly="True" Header="Name" Binding="{Binding DocumentName}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly ="True" Header="Type" Binding="{Binding DocumentType}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly ="True" Header="Type" Binding="{Binding DocumentTypeName}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly ="True" Header="File" Binding="{Binding DataSource.SourceFile}"></DataGridTextColumn>
</DataGrid.Columns>
......
......@@ -50,12 +50,25 @@ namespace TUGraz.VectoCore.Utils
MultistageOutputData = 1 << 10
}
public static class XmlDocumentTypeExtensions
{
public static string GetName(this XmlDocumentType docType)
{
switch (docType) {
case XmlDocumentType.MultistageOutputData:
return "Multistep output data";
default:
return docType.ToString();
}
}
}
public static class XMLDefinitions
{
//public const string SchemaBaseURL = "file:///E:/QUAM/Workspace/VECTO_quam/VectoCore/VectoCore/Resources/XSD/";
public const string SCHEMA_BASE_LOCATION = "https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/";
public const string DEV = ":DEV";
public const string ENGINEERING_NAMESPACE = "urn:tugraz:ivt:VectoAPI:EngineeringDefinitions";
......
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