本文整理汇总了C#中Entry.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Entry.Load方法的具体用法?C# Entry.Load怎么用?C# Entry.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entry
的用法示例。
在下文中一共展示了Entry.Load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
public void Load(byte[] data, int srcOffset)
{
EntryOffset = FSHelpers.Read32(data, srcOffset);
Entry = new Entry();
Entry.Load(data, EntryOffset);
}
示例2: loadFromStream
private void loadFromStream(Stream input)
{
this.count1 = StreamHelpers.ReadValueU32(input);
for (int i = 0; i < count1; i++)
{
Entry e = new Entry(this.typeId);
e.Load(input);
this.entries.Add(e);
}
}
示例3: Load
public void Load (System.IO.Stream stream)
{
while (stream.Position < stream.Length)
{
Entry current = new Entry ();
current.Load (stream);
//System.Console.WriteLine ("read {0} - {1}", ((EntryType)current.Type).ToString (), current.Name);
try {
//System.Console.WriteLine (System.Text.Encoding.ASCII.GetString (current.Data));
} catch (System.Exception e) {
Beagle.Util.Log.Error (e, "Error loading BIM file");
}
entries.Add (current);
}
}
示例4: Load
public void Load( FileInfo _FileName )
{
XmlDocument Doc = new XmlDocument();
Doc.Load( _FileName.FullName );
XmlElement Root = Doc["TexturesDatabase"];
if ( Root == null )
throw new Exception( "Failed to retrieve the root \"TextureDatabase\" element! Not a valid database file?" );
string Location = Root.GetAttribute( "Location" );
if ( Location == "" )
throw new Exception( "Failed to retrieve the location path for the database!" );
int EntriesCount = 0;
if ( !int.TryParse( Root.GetAttribute( "EntriesCount" ), out EntriesCount ) )
throw new Exception( "Failed to parse amount of entries in the database!" );
m_Errors = "";
foreach ( Entry E in m_Entries )
E.Dispose();
m_Entries.Clear();
for ( int EntryIndex=0; EntryIndex < EntriesCount; EntryIndex++ )
{
try
{
XmlElement EntryElement = Root.ChildNodes[EntryIndex] as XmlElement;
Entry E = new Entry( this );
E.Load( this, EntryElement );
m_Entries.Add( E );
}
catch ( Exception _e )
{
m_Errors += "An error occurred while loading database entry #" + EntryIndex + ": " + _e.Message;
}
}
// Reconnect manifests found from the specified location
RootPath = new DirectoryInfo( Location );
}