public override void Load(string path) { base.Load(path); if (File.Exists(path)) { HaloMapFile mapFile = HaloMapFile.Load(path); HaloMapViewModel model = new HaloMapViewModel(mapFile); DataContext = model; } else { DataContext = new HaloMapViewModel(); } }
static void Main(string[] args) { List <HaloMapFile> cleanMaps = new List <HaloMapFile>(); HaloMapFile map = null; if (File.Exists(args[0])) { map = HaloMapFile.Load(args[0]); } HaloMapFile mapFile = new HaloMapFile(); List <List <string> > tagNameLists = new List <List <string> >(); if (Directory.Exists(@"F:\XBox\Original\Games\Halo 2\Clean Maps")) { foreach (var fileName in Directory.GetFiles(@"F:\XBox\Original\Games\Halo 2\Clean Maps")) { cleanMaps.Add(HaloMapFile.Load(fileName)); } } }