add view resource
This commit is contained in:
parent
1e340f2621
commit
4b960489c8
@ -49,7 +49,7 @@
|
||||
public enum ViewAttributeScreenUnit
|
||||
{
|
||||
PIXEL,
|
||||
PERCENTAGE
|
||||
PERCENT
|
||||
}
|
||||
|
||||
/* Types for the "MODEL RESOURCE_LIST" */
|
||||
|
@ -201,8 +201,8 @@ namespace IDTF.Net
|
||||
public void WriteOutput(StreamWriter toStream)
|
||||
{
|
||||
toStream.WriteLine("\tVIEW_DATA {");
|
||||
toStream.WriteLine("\t\tVIEW_TYPE \"{0}\"", this.ViewType.ToString());
|
||||
toStream.WriteLine("\t\tVIEW_ATTRIBUTE_SCREEN_UNIT \"{0}\"", this.ViewAttributeScreenUnit.ToString());
|
||||
toStream.WriteLine("\t\tVIEW_TYPE \"{0}\"", this.ViewType.ToString());
|
||||
toStream.WriteLine("\t\tVIEW_PROJECTION {0}", this.Projection.ToString(Format.SixDecPlFormat));
|
||||
|
||||
//TODO - More View settings
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace IDTF.Net
|
||||
{
|
||||
@ -229,14 +230,18 @@ namespace IDTF.Net
|
||||
}
|
||||
}
|
||||
|
||||
/* NOT IMPLEMENTED */
|
||||
public class ViewResource : Resource
|
||||
{
|
||||
|
||||
|
||||
//NOT IMPLEMENTED
|
||||
public override void Export(StreamWriter toStream)
|
||||
{
|
||||
|
||||
toStream.WriteLine(String.Format("\t\tRESOURCE_NAME \"{0}\"", this.Name));
|
||||
toStream.WriteLine("\t\tVIEW_PASS_COUNT 1");
|
||||
toStream.WriteLine("\t\tVIEW_ROOT_NODE_LIST {");
|
||||
toStream.WriteLine("\t\t\tROOT_NODE 0 {");
|
||||
toStream.WriteLine("\t\t\t\tROOT_NODE_NAME \"<NULL>\"");
|
||||
toStream.WriteLine("\t\t\t}");
|
||||
toStream.WriteLine("\t\t}");
|
||||
}
|
||||
|
||||
public override ResourceListType ResourceType
|
||||
|
@ -201,6 +201,21 @@ namespace IDTF.Net
|
||||
m.WriteOutput(output);
|
||||
}
|
||||
|
||||
//<RESOURCE_LISTS> - View
|
||||
if (this.ViewResources.Any())
|
||||
{
|
||||
output.WriteLine("RESOURCE_LIST \"VIEW\" {");
|
||||
output.WriteLine("\tRESOURCE_COUNT {0}", this.ViewResources.Count().ToString());
|
||||
|
||||
for (int i = 0; i < this.ViewResources.Count(); i++)
|
||||
{
|
||||
output.WriteLine("\tRESOURCE {0} {{", i.ToString());
|
||||
this.ViewResources.ElementAt(i).Value.Export(output);
|
||||
output.WriteLine("\t}");
|
||||
}
|
||||
output.WriteLine("}");
|
||||
output.WriteLine();
|
||||
}
|
||||
|
||||
//<RESOURCE_LISTS> - Light
|
||||
if (this.LightResources.Count() > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user