public static bool LoadCachedList() { string brickListCache = Path.Combine(SettingsManager.AppDataFolder, BRICK_LIST_CACHE_FILENAME); if (File.Exists(brickListCache)) { try { var cachedData = JsonConvert.DeserializeObject <BrickListInfo>( File.ReadAllText(brickListCache) ); SourcePath = cachedData.SourcePath; LastUpdate = cachedData.LastUpdate; Bricks.Clear(); Bricks.AddRange(cachedData.Bricks); return(true); } catch { } } return(false); }
public Tee() { var rotBrick = new Brick { X = 1, Y = 1 }; var b = new List <Brick> { new Brick { X = 0, Y = 1 }, new Brick { X = 2, Y = 1 }, new Brick { X = 1, Y = 0 }, rotBrick, }; Bricks.AddRange(b); RotationBrick = rotBrick; }