protected override void OnStart() { if (File.Exists(this.BrainFile)) { _model = Model.Load(this.BrainFile); } else { _model = new Model(); } }
public void Clear() { _model = null; _model = new Model(); }
public static Model Load(string fileName) { Model m = new Model(); using (FileStream fs = File.OpenRead(fileName)) { BinaryReader br = new BinaryReader(fs); m._dict.Load(br); m._forward->Read(br); m._backward->Read(br); br.Close(); fs.Close(); return m; } }