AGS.Types.Script.LoadFromDisk C# (CSharp) Метод

LoadFromDisk() публичный Метод

public LoadFromDisk ( ) : void
Результат void
        public void LoadFromDisk()
        {
            // Ensure that the file gets read in 8-bit ANSI
            using (BinaryReader reader = new BinaryReader(File.Open(_fileName, FileMode.Open, FileAccess.Read)))
            {
                byte[] bytes = reader.ReadBytes((int)reader.BaseStream.Length);
                _text = Encoding.Default.GetString(bytes);
            }
            _modified = false;
        }

Usage Example

Пример #1
0
 public void LoadScript()
 {
     if (_script == null)
     {
         _script = new Script(this.ScriptFileName, string.Empty, false);
     }
     _script.LoadFromDisk();
 }
All Usage Examples Of AGS.Types.Script::LoadFromDisk