Click or drag to resize
XDL

XConfiguration Class

NXDL에서 사용되는 Configuration을 정의하는 클래스이다. 이 클래스는 이 클래스에 값을 입력하여 Configuration 파일을 XML 파일 형태로 저장하고 또한 로딩하여 읽을수 있다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NGRXConfiguration

Namespace:  Pixoneer.NXDL.NGR
Assembly:  NXDLgr (in NXDLgr.dll) Version: 1.2.817.72
Syntax
C#
public class XConfiguration : IDisposable

The XConfiguration type exposes the following members.

Constructors
  NameDescription
Public methodXConfiguration
XConfiguration클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Properties
  NameDescription
Public propertyBlueMarble
Planet 2D 혹은 3D에서 사용하는 전지구영상인 BlueMarble파일의 경로를 설정하거나 얻는다.
Public propertyConfigFilePath
라이브러리가 설치된 곳에 존재하는 Configuration 파일의 경로를 설정하거나 얻는다.
Public propertyDefaultPBEDataset
Planet 2D 혹은 3D에서 지형 DEM를 렌더링하기 PBE의 Data Source 경로 혹은 URL.
Public propertyDefaultPBIDataset
Planet 2D 혹은 3D에서 지형 Texture를 렌더링하기 PBI의 Data Source 경로 혹은 URL.
Public propertyDefaultPBPDataset
Planet 2D 혹은 3D에서 지형 지명 이름을 렌더링하기 PBP의 Data Source 경로 혹은 URL.
Public propertyMaxTileCount
Planet 2D 혹은 3D에서Tile을 메모리에 적재하기 위한 메모리 Cache(Tile 영역의 수)를 의미.
Public propertyPBEGroups
Configuration에 존재하는 PBE(Pixoneer Base Elevation) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPBIGroups
Configuration에 존재하는 PBI(Pixoneer Base Image) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPBPGroups
Configuration에 존재하는 PBP(Pixoneer Base Placename) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyRenderType
NXDL의 각종 View컨트롤들이 Render를 수행하기 위한 타입 ( OpenGL만 가능).
Top
Methods
  NameDescription
Public methodGetMaxID
내부에 정의된 XPBTDataGroup객체의 ID중 Maximum ID를 얻는다.
Public methodLoadConfigFile
Configration파일 경로를 입력하여 Configration을 로딩한다.
Public methodStatic memberLoadCurrentConfig
현재 엔진의 기본 설정을 로딩한다.
Public methodSaveConfigFile
this객체에 존재하는 XPBTDataGroup리스트에 대하여 파일에 저장한다.
Top
Examples
This is example for each toc settings
XConfiguration config = new XConfiguration();
if (config.LoadConfigFile(strXDLConfigurationPath) == false)
{
    MessageBox.Show("XDLConfiguration.xml Load Failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

string strTocFull = string.Empty;

foreach (XPBTDataGroup group in config.PBIGroups)
{
    foreach (XPBTDataSource src in group.Sources)
    {
        if (src.URL.IndexOf(".toc") >= 0)
        {
            nRPFGroupID = group.ID;
            strTocFull = src.URL;
            break;
        }
    }
    if (strTocFull != string.Empty )
        break;
}
if (strTocFull == string.Empty)
{
    MessageBox.Show("Can`t Find RPF Source in XDLConfiguration.xml", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

int nTokenIndex = strTocFull.IndexOf(".toc");
if (nTokenIndex < 0)
{
    MessageBox.Show("Can`t Not Find *.Toc File in XDLConfiguration.xml", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}
while (nTokenIndex > 0)
{
    string strTocFile = strTocFull.Substring(0, nTokenIndex+4);
    if (strTocFile != string.Empty)
    {
        ListToc.Items.Add(strTocFile.ToLower());
    }
    if( strTocFull.Length > nTokenIndex+5 )
        strTocFull = strTocFull.Substring(nTokenIndex+5);
    else
        strTocFull = strTocFull.Substring(nTokenIndex + 4);
    nTokenIndex = strTocFull.IndexOf(".toc");
}
See Also