/// <summary> /// Opens the specified file for reading. /// </summary> /// <param name="filename">The specified file's name.</param> private void OpenFile(string filename) { object[] LoadedInfo = null; try { Filename = filename; using (var source = File.OpenRead(filename)) { //if (OperationMode == 0) LoadedInfo = ObjectInfoFormatter.Read(source); //if (OperationMode == 1) LoadedInfo = EffectInfoFormatter.Read(source); } } catch { Filename = null; } finally { UpdateResource(LoadedInfo); SelectionChanged(); } }
object DeserializeObjectInfo(string name) { using (var source = File.OpenRead(@"res-dev\objectinfo\" + name)) return(ObjectInfoFormatter.Read(source)); }