public Model(Control parent) { m_parent = parent; Dispatcher = Dispatcher.CurrentDispatcher; Settings = new Settings(Settings.DefaultLocalFilepath) { AutoSaveOnChanges = true }; FInfoMap = new FileInfoMap(); Duplicates = new BindingListEx <FileInfo>(); Errors = new List <string>(); }
public static void ReadOrCreateEmptyMap() { if (File.Exists("filemap.bin")) { using (var fs = File.Open("filemap.bin", FileMode.Open)) { Map = Serializer.Deserialize <FileInfoMap>(fs); } } else { File.Create("filemap.bin"); Map = new FileInfoMap(); } }
// Start is called before the first frame update void Start() { DontDestroyOnLoad(gameObject); FileInfoMap.ReadOrCreateEmptyMap(); }