Begin to support Associations defined in UEPackages (will eventually deprecate defining DataFormatFilters in DataFormatReferences)
This commit is contained in:
parent
d5bccdbbfa
commit
505a2ac7bf
49
CSharp/Libraries/UniversalEditor.Core/Association.cs
Normal file
49
CSharp/Libraries/UniversalEditor.Core/Association.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Associates <see cref="ObjectModel" />s, <see cref="DataFormat" />s, and other related Universal Editor objects.
|
||||
/// </summary>
|
||||
public class Association
|
||||
{
|
||||
public class AssociationCollection
|
||||
: System.Collections.ObjectModel.Collection<Association>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private string mvarTitle = String.Empty;
|
||||
/// <summary>
|
||||
/// The title of this <see cref="Association" />; for example, "JPEG images".
|
||||
/// </summary>
|
||||
public string Title { get { return mvarTitle; } set { mvarTitle = value; } }
|
||||
|
||||
private DataFormatFilter.DataFormatFilterCollection mvarFilters = new DataFormatFilter.DataFormatFilterCollection();
|
||||
/// <summary>
|
||||
/// The filters that are used to determine which documents can be handled by this <see cref="Association" />.
|
||||
/// </summary>
|
||||
public DataFormatFilter.DataFormatFilterCollection Filters { get { return mvarFilters; } }
|
||||
|
||||
private string mvarExternalCommandLine = String.Empty;
|
||||
/// <summary>
|
||||
/// The command line of an external application to launch when a file handled by this association is opened.
|
||||
/// </summary>
|
||||
public string ExternalCommandLine { get { return mvarExternalCommandLine; } set { mvarExternalCommandLine = value; } }
|
||||
|
||||
private ObjectModelReference.ObjectModelReferenceCollection mvarObjectModels = new ObjectModelReference.ObjectModelReferenceCollection();
|
||||
/// <summary>
|
||||
/// The <see cref="ObjectModelReference" />s which refer to <see cref="ObjectModel" />s that are included in this <see cref="Association" />.
|
||||
/// </summary>
|
||||
public ObjectModelReference.ObjectModelReferenceCollection ObjectModels { get { return mvarObjectModels; } }
|
||||
|
||||
private DataFormatReference.DataFormatReferenceCollection mvarDataFormats = new DataFormatReference.DataFormatReferenceCollection();
|
||||
/// <summary>
|
||||
/// The <see cref="DataFormatReference" />s which refer to <see cref="DataFormat" />s that are included in this <see cref="Association" />.
|
||||
/// </summary>
|
||||
public DataFormatReference.DataFormatReferenceCollection DataFormats { get { return mvarDataFormats; } }
|
||||
}
|
||||
}
|
||||
@ -46,6 +46,7 @@
|
||||
<Compile Include="Accessors\MemoryAccessor.cs" />
|
||||
<Compile Include="Accessors\StreamAccessor.cs" />
|
||||
<Compile Include="Accessors\StringAccessor.cs" />
|
||||
<Compile Include="Association.cs" />
|
||||
<Compile Include="Checksum\ChecksumModule.cs" />
|
||||
<Compile Include="Checksum\Modules\Adler32\Adler32ChecksumModule.cs" />
|
||||
<Compile Include="Checksum\Modules\CRC32\CRC32ChecksumModule.cs" />
|
||||
|
||||
@ -19,6 +19,12 @@ namespace UniversalEditor.ObjectModels.UEPackage
|
||||
return _omr;
|
||||
}
|
||||
|
||||
private Association.AssociationCollection mvarAssociations = new Association.AssociationCollection();
|
||||
/// <summary>
|
||||
/// The <see cref="Association" />s provided by this package.
|
||||
/// </summary>
|
||||
public Association.AssociationCollection Associations { get { return mvarAssociations; } }
|
||||
|
||||
private ObjectModelReference.ObjectModelReferenceCollection mvarObjectModels = new ObjectModelReference.ObjectModelReferenceCollection();
|
||||
/// <summary>
|
||||
/// The <see cref="ObjectModel" />s provided by this package.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user