private static bool DrawInMenuPrefix(Flooring __instance, SpriteBatch spriteBatch, Vector2 positionOnScreen, Vector2 tileLocation, float scale, float layerDepth) { if (__instance.modData.ContainsKey("AlternativeTextureName") && !PatchTemplate.IsDGAObject(__instance)) { var textureModel = AlternativeTextures.textureManager.GetSpecificTextureModel(__instance.modData["AlternativeTextureName"]); if (textureModel is null) { return(true); } var textureVariation = Int32.Parse(__instance.modData["AlternativeTextureVariation"]); if (textureVariation == -1 || AlternativeTextures.modConfig.IsTextureVariationDisabled(textureModel.GetId(), textureVariation)) { return(true); } var textureOffset = textureModel.GetTextureOffset(textureVariation); int sourceRectPosition = 1; byte drawSum = 0; Vector2 surroundingLocations = tileLocation; surroundingLocations.X += 1f; GameLocation farm = Game1.getLocationFromName("Farm"); if (farm.terrainFeatures.ContainsKey(surroundingLocations) && farm.terrainFeatures[surroundingLocations] is Flooring) { drawSum = (byte)(drawSum + 2); } surroundingLocations.X -= 2f; if (farm.terrainFeatures.ContainsKey(surroundingLocations) && Game1.currentLocation.terrainFeatures[surroundingLocations] is Flooring) { drawSum = (byte)(drawSum + 8); } surroundingLocations.X += 1f; surroundingLocations.Y += 1f; if (Game1.currentLocation.terrainFeatures.ContainsKey(surroundingLocations) && farm.terrainFeatures[surroundingLocations] is Flooring) { drawSum = (byte)(drawSum + 4); } surroundingLocations.Y -= 2f; if (farm.terrainFeatures.ContainsKey(surroundingLocations) && farm.terrainFeatures[surroundingLocations] is Flooring) { drawSum = (byte)(drawSum + 1); } sourceRectPosition = Flooring.drawGuide[drawSum]; spriteBatch.Draw(textureModel.GetTexture(textureVariation), positionOnScreen, new Rectangle(sourceRectPosition % 16 * 16, sourceRectPosition / 16 * 16 + textureOffset, 16, 16), Color.White, 0f, Vector2.Zero, scale * 4f, SpriteEffects.None, layerDepth + positionOnScreen.Y / 20000f); return(false); } return(true); }
internal static string GetFlooringName(Flooring floor) { switch (floor.whichFloor.Value) { case 0: return("Wood Floor"); case 1: return("Stone Floor"); case 2: return("Weathered Floor"); case 3: return("Crystal Floor"); case 4: return("Straw Floor"); case 5: return("Gravel Path"); case 6: return("Wood Path"); case 7: return("Crystal Path"); case 8: return("Cobblestone Path"); case 9: return("Stepping Stone Path"); case 10: return("Brick Floor"); case 11: return("Rustic Plank Floor"); case 12: return("Stone Walkway Floor"); default: return(String.Empty); } }
public override void Handle(BaseFeatureSaveData featureSaveData, GameLocation location) { Flooring f = location.terrainFeatures[featureSaveData.featurePosition] as Flooring; for (int i = 0; i < location.debris.Count; i++) { Debris debris = location.debris[i]; if (debris.item != null && debris.item.parentSheetIndex == GetParentSheetIndexForFlooring(f.whichFloor)) { if (!WithinRange(debris.Chunks[0].position / Game1.tileSize, featureSaveData.featurePosition, 2)) { continue; } monitor.Log($"Removed flooring with parentSheetIndex {debris.item.parentSheetIndex }.", LogLevel.Trace); location.debris.RemoveAt(i); return; } } }
private static bool Flooring_performToolAction_Prefix(Flooring __instance, Tool t, int damage, Vector2 tileLocation, GameLocation location, ref bool __result) { if (!Config.EnableMod || __instance.whichFloor.Value != -42 || !__instance.modData.ContainsKey(trackKey)) { return(true); } if (location == null) { location = Game1.currentLocation; } if ((t != null || damage > 0) && (damage > 0 || t is Pickaxe || t is Axe)) { Game1.createRadialDebris(location, 14, (int)tileLocation.X, (int)tileLocation.Y, 4, false, -1, false, -1); location.playSound(Config.RemoveSound); __result = true; } else { __result = false; } return(false); }
private static bool GetChessBoardsBoardTileAt(Vector2 tile, out Point ChessBoardsTile) { ChessBoardsTile = new Point(); if (!Game1.currentLocation.terrainFeatures.TryGetValue(tile, out var t) || t is not Flooring) { return(false); } int left = 0; int right = 0; int up = 0; int down = 0; Flooring f1 = t as Flooring; Flooring f2 = null; for (int i = 1; i < 8; i++) { if (!Game1.currentLocation.terrainFeatures.TryGetValue(tile - new Vector2(i, 0), out var t2) || t2 is not Flooring) { break; } if (f2 is null) { f2 = t as Flooring; } else if (i % 2 == 0 && f1.whichFloor != (t as Flooring).whichFloor) { break; } else if (i % 2 == 1 && f2.whichFloor != (t as Flooring).whichFloor) { break; } left = i; } if (left < 7) { for (int i = 1; i < 8 - left; i++) { if (!Game1.currentLocation.terrainFeatures.TryGetValue(tile + new Vector2(i, 0), out var t2) || t2 is not Flooring) { break; } if (f2 is null) { f2 = t as Flooring; } else if (right % 2 == 0 && f2.whichFloor != (t as Flooring).whichFloor) { break; } else if (right % 2 == 1 && f1.whichFloor != (t as Flooring).whichFloor) { break; } right = i; } } if (left + right != 7) { SMonitor.Log($"Not on board! left {left}, right {right}", StardewModdingAPI.LogLevel.Warn); return(false); } for (int i = 1; i < 8; i++) { if (!Game1.currentLocation.terrainFeatures.TryGetValue(tile - new Vector2(0, i), out var t2) || t2 is not Flooring) { break; } if (f2 is null) { f2 = t as Flooring; } else if (i % 2 == 0 && f1.whichFloor != (t as Flooring).whichFloor) { break; } else if (i % 2 == 1 && f2.whichFloor != (t as Flooring).whichFloor) { break; } up = i; } if (up < 7) { for (int i = 1; i < 8 - up; i++) { if (!Game1.currentLocation.terrainFeatures.TryGetValue(tile + new Vector2(0, i), out var t2) || t2 is not Flooring) { break; } if (f2 is null) { f2 = t as Flooring; } else if (down % 2 == 0 && f2.whichFloor != (t as Flooring).whichFloor) { break; } else if (down % 2 == 1 && f1.whichFloor != (t as Flooring).whichFloor) { break; } down = i; } } if (down + up != 7) { //Monitor.Log($"up {up}, down {down}"); return(false); } ChessBoardsTile = new Point(left + 1, down + 1); //Monitor.Log($"ChessBoards tile {ChessBoardsTile}"); return(true); }
private static void Postfix(Flooring __instance) { isPathway.Value = originalIsPathway; }
public void Seed() { //con.ExecuteStoryQuery("DELETE User"); State s1 = null, s2 = null, s3 = null, s4 = null, s5 = null; City c1 = null, c2 = null, c3 = null, c4 = null, c5 = null, c6 = null, c7 = null, c8 = null, c9 = null, c10 = null; User u1 = null, u2 = null, u3 = null, u4 = null, u5 = null, u6 = null, u7 = null; Employee e1 = null, e2 = null, e3 = null, e4 = null, e5 = null, e6 = null, e7 = null; Client cli1 = null, cli2 = null, cli3 = null, cli4 = null, cli5 = null, cli6 = null, cli7 = null; Block b1 = null, b2 = null, b3 = null, b4 = null; Flooring f1 = null, f2 = null, f3 = null, f4 = null; Equipament eq1 = null, eq2 = null, eq3 = null; Survey survey = null; if (!con.Equipament.Any()) { eq1 = new Equipament(1, "Luminárias", ETypeEquipament.Iluminação, EquipamentStatus.Burnt);; eq2 = new Equipament(2, "Tomadas", ETypeEquipament.Potência, EquipamentStatus.Broken); eq3 = new Equipament(3, "Chaves", ETypeEquipament.Potência, EquipamentStatus.Burnt); con.Equipament.AddRange(eq1, eq2, eq3); con.SaveChanges(); } if (!con.Flooring.Any()) { f1 = new Flooring(1, "Pavimento 001"); f2 = new Flooring(1, "Pavimento 002"); f3 = new Flooring(1, "Pavimento 003"); f4 = new Flooring(1, "Pavimento 004"); con.Flooring.AddRange(f1, f2, f3, f4); con.SaveChanges(); } if (!con.Block.Any()) { b1 = new Block(1, "Bloco 001"); b2 = new Block(1, "Bloco 002"); b3 = new Block(3, "Bloco 003"); b4 = new Block(4, "Bloco A"); con.AddRange(b1, b2, b3, b4); con.SaveChanges(); } if (!con.State.Any()) { s1 = new State(1, "Rio Grande do Sul", "RS"); s2 = new State(2, "Santa Catarina", "SC"); s3 = new State(3, "Parána", "PR"); s4 = new State(4, "São Paulo", "SP"); s5 = new State(5, "Rio de Janeiro", "RJ"); con.State.AddRange(s1, s2, s3, s4, s5); con.SaveChanges(); } if (!con.City.Any()) { c1 = new City(1, "Santa Rosa", con.State.FirstOrDefault(c => c.Id == 1)); c2 = new City(2, "Tuparendi", con.State.FirstOrDefault(c => c.Id == 1)); c3 = new City(3, "Tucunduva", con.State.FirstOrDefault(c => c.Id == 1)); c4 = new City(4, "Porto Alegre", con.State.FirstOrDefault(c => c.Id == 1)); c5 = new City(5, "Itapema", con.State.FirstOrDefault(c => c.Id == 2)); c6 = new City(6, "Florianópolis", con.State.FirstOrDefault(c => c.Id == 2)); c7 = new City(7, "Canoinhas", con.State.FirstOrDefault(c => c.Id == 2)); c8 = new City(8, "São Paulo", con.State.FirstOrDefault(c => c.Id == 4)); c9 = new City(9, "Toledo", con.State.FirstOrDefault(c => c.Id == 3)); c10 = new City(10, "Rio de Janeiro", con.State.FirstOrDefault(c => c.Id == 5)); con.City.AddRange(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10); con.SaveChanges(); } if (!con.Client.Any()) { cli1 = new Client(1, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "João Acolumbre", con.City.FirstOrDefault(c => c.Id == 6)); cli2 = new Client(2, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "Marcelo Vinagre", con.City.FirstOrDefault(c => c.Id == 2)); cli3 = new Client(3, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "João De souza", con.City.FirstOrDefault(c => c.Id == 3)); cli4 = new Client(4, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "Joaquim barbosa", con.City.FirstOrDefault(c => c.Id == 3)); cli5 = new Client(5, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "Ricardo toledo", con.City.FirstOrDefault(c => c.Id == 4)); cli6 = new Client(6, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "Almir Satter", con.City.FirstOrDefault(c => c.Id == 1)); cli7 = new Client(7, "Ed. Dona Rosinha", "*****@*****.**", "Rua 701", "(48) 9856-9966", "José Mascarennas", con.City.FirstOrDefault(c => c.Id == 1)); con.AddRange(cli1, cli2, cli3, cli4, cli5, cli6, cli7); con.SaveChanges(); } if (!con.User.Any()) { u1 = new User(1, "Administrador", "*****@*****.**", "admin", "adminadmin"); u2 = new User(2, "Convidado 1", "*****@*****.**", "conv1", "conv1234567"); u3 = new User(3, "Paulo Nogueira", "*****@*****.**", "pnogueira", "123456789"); u4 = new User(4, "Roberta Soares", "*****@*****.**", "rosoares", "987654321"); u5 = new User(5, "Julio de Catilhos", "*****@*****.**", "jucastilho", "jucas12345"); u6 = new User(6, "Geovana Tavares", "*****@*****.**", "geotava", "12345678"); u7 = new User(7, "Tamiris Rodrigues", "*****@*****.**", "tamirod", "123123123"); con.AddRange(u1, u2, u3, u4, u5, u6, u7); con.SaveChanges(); } if (!con.Employee.Any()) { e1 = new Employee(1, "João Almeida", "*****@*****.**", "Rua 503,212", con.User.FirstOrDefault(c => c.Id == 1), con.City.FirstOrDefault(c => c.Id == 1)); e2 = new Employee(2, "Joaquim Barbosa", "*****@*****.**", "Rua 504,5412", con.User.FirstOrDefault(c => c.Id == 2), con.City.FirstOrDefault(c => c.Id == 2)); e3 = new Employee(3, "Paulo Nogueira", "*****@*****.**", "Rua 503,212", con.User.FirstOrDefault(c => c.Id == 3), con.City.FirstOrDefault(c => c.Id == 4)); e4 = new Employee(4, "Roberta Soares", "*****@*****.**", "Rua Otacilio Costa,212", con.User.FirstOrDefault(c => c.Id == 4), con.City.FirstOrDefault(c => c.Id == 2)); e5 = new Employee(5, "Julio de Catilhos", "*****@*****.**", "Rua 1001,22", con.User.FirstOrDefault(c => c.Id == 5), con.City.FirstOrDefault(c => c.Id == 6)); e6 = new Employee(6, "Geovana Tavares", "*****@*****.**", "Rua 503,212", con.User.FirstOrDefault(c => c.Id == 6), con.City.FirstOrDefault(c => c.Id == 4)); e7 = new Employee(7, "Tamiris Rodrigues", "*****@*****.**", "Rua Porto Rico,212", con.User.FirstOrDefault(c => c.Id == 7), con.City.FirstOrDefault(c => c.Id == 5)); con.AddRange(e1, e2, e3, e4, e5, e6, e7); con.SaveChanges(); } if (!con.Survey.Any()) { survey = new Survey(1, "First levantamento", cli1, u1); SurveyResources sres = new SurveyResources(1, survey, b1, f1, eq1); con.Add(survey); con.SaveChanges(); con.Add(sres); con.SaveChanges(); } }
internal static int GetFloorSheetId(Flooring floor) { var matchedFloor = Game1.objectInformation.Where(p => p.Value.Split('/')[0] == GetFlooringName(floor)); return(matchedFloor.Count() == 0 ? -1 : matchedFloor.First().Key); }
private static bool DrawPrefix(Flooring __instance, byte ___neighborMask, SpriteBatch spriteBatch, Vector2 tileLocation) { if (__instance.modData.ContainsKey("AlternativeTextureName")) { var textureModel = AlternativeTextures.textureManager.GetSpecificTextureModel(__instance.modData["AlternativeTextureName"]); if (textureModel is null) { return(true); } var textureVariation = Int32.Parse(__instance.modData["AlternativeTextureVariation"]); if (textureVariation == -1 || AlternativeTextures.modConfig.IsTextureVariationDisabled(textureModel.GetId(), textureVariation)) { return(true); } var textureOffset = textureModel.GetTextureOffset(textureVariation); if (__instance.cornerDecoratedBorders.Value) { int border_size = 6; if ((___neighborMask & 9) == 9 && (___neighborMask & 0x20) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f)), new Rectangle(64 - border_size, (48 - border_size) + textureOffset, border_size, border_size), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 3) == 3 && (___neighborMask & 0x10) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f + 64f - (float)(border_size * 4), tileLocation.Y * 64f)), new Rectangle(16, (48 - border_size) + textureOffset, border_size, border_size), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 6) == 6 && (___neighborMask & 0x40) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f + 64f - (float)(border_size * 4), tileLocation.Y * 64f + 64f - (float)(border_size * 4))), new Rectangle(16, textureOffset, border_size, border_size), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 0xC) == 12 && (___neighborMask & 0x80) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f + 64f - (float)(border_size * 4))), new Rectangle(64 - border_size, textureOffset, border_size, border_size), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } } else if (!__instance.isPathway) { if ((___neighborMask & 9) == 9 && (___neighborMask & 0x20) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f)), new Rectangle(60, 44 + textureOffset, 4, 4), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 3) == 3 && (___neighborMask & 0x10) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f + 48f, tileLocation.Y * 64f)), new Rectangle(16, 44 + textureOffset, 4, 4), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 6) == 6 && (___neighborMask & 0x40) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f + 48f, tileLocation.Y * 64f + 48f)), new Rectangle(16, textureOffset, 4, 4), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if ((___neighborMask & 0xC) == 12 && (___neighborMask & 0x80) == 0) { spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f + 48f)), new Rectangle(60, textureOffset, 4, 4), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, (tileLocation.Y * 64f + 2f + tileLocation.X / 10000f) / 20000f); } if (!__instance.drawContouredShadow.Value) { spriteBatch.Draw(Game1.staminaRect, new Rectangle((int)(tileLocation.X * 64f) - 4 - Game1.viewport.X, (int)(tileLocation.Y * 64f) + 4 - Game1.viewport.Y, 64, 64), Color.Black * 0.33f); } } byte drawSum = (byte)(___neighborMask & 0xFu); int sourceRectPosition = Flooring.drawGuide[drawSum]; if ((bool)__instance.isSteppingStone) { sourceRectPosition = Flooring.drawGuideList[__instance.whichView.Value]; } if ((bool)__instance.drawContouredShadow) { Color shadow_color = Color.Black; shadow_color.A = (byte)((float)(int)shadow_color.A * 0.33f); spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f)) + new Vector2(-4f, 4f), new Rectangle(sourceRectPosition * 16 % 256, (sourceRectPosition / 16 * 16) + textureOffset, 16, 16), shadow_color, 0f, Vector2.Zero, 4f, SpriteEffects.None, 1E-10f); } spriteBatch.Draw(textureModel.GetTexture(textureVariation), Game1.GlobalToLocal(Game1.viewport, new Vector2(tileLocation.X * 64f, tileLocation.Y * 64f)), new Rectangle(sourceRectPosition * 16 % 256, (sourceRectPosition / 16 * 16) + textureOffset, 16, 16), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, 1E-09f); return(false); } return(true); }
static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .WriteTo.Console(theme: AnsiConsoleTheme.Code) .CreateLogger(); Log.Information("Welcome - Press any key to start tests"); Console.ReadKey(); IJustCarpetClient client = new JustCarpetClient(Log.Logger, clientType: JustCarpet.Api.Enums.ClientTypeEnum.Live); var customerAccount = client.Register("testMacAddress001").Result; Log.Information("Found Customer Account id {@id}", customerAccount.Id); Log.Information("Update Customer account ? Press any key"); Console.ReadKey(); customerAccount.Name = "Steve Heasman"; customerAccount.Address = "20 Arbroath Grove , Hartlepool , TS25 5EW"; customerAccount.EmailAddress = "*****@*****.**"; var complete = client.UpdateCustomer(customerAccount).Result; if (complete) { Log.Information("Account has been sucesfully updated"); } else { Log.Information("Account not updates error"); } Log.Information("Customer methods tested."); Log.Information("Press any key to search for flooring without search"); Console.ReadKey(); List <Flooring> flooringb = client.Search(new Search() { SkipSearchParameters = true }).Result; Log.Information("flooring returned {@Count}. Press any key to continue with parameters Pet Friendly", flooringb.Count); Console.ReadKey(); //List<Flooring> flooringb = client.Search(new Search() { SkipSearchParameters = false, Pets = true}).Result; //Log.Information("flooring returned " + flooringb.Count + " Press any key to continue Find installers"); try { Log.Information("Geting flooring details"); Flooring floor = client.GetFlooringDetails(flooringb.First().Id).Result; if (floor != null) { Log.Information("Details "); Log.Information("Name : {@Name}", floor.Name); Log.Information("Desc : {@Desc}", floor.Description); foreach (var prop in floor.Properties) { Log.Information(prop); } } else { Log.Information("No details returned"); } } catch (Exception ex) { Log.Error("An Error has occured getting floor details '{@Error}'", ex.Message); } Log.Information("Press any key to continue testing."); Console.ReadKey(); Console.ReadKey(); List <Installer> installers = client.GetInstallers().Result; Log.Information("Installers returned {@Count}. Press any button to get available appointments for next seven days.", installers.Count); Console.ReadKey(); Log.Information("Getting Appointments for installer id " + installers.First().LocationId); var appointments = client.GetInstallerAppontments(installers.First().LocationId).Result; Log.Information("Appointmests are as follows"); if (appointments.Count == 0) { Log.Information("That installer has no appointments "); } foreach (var date in appointments) { string text = "Installer has an apponmtment "; if (date.AM) { text += "on the morning of " + date.Date; } else { text += "on the afternoon of " + date.Date; } Log.Information(text); } Log.Information("All appointments have been retured"); Log.Information("Press any key to continue testing ordering"); Console.ReadKey(); Log.Information("We are now going to send an order to the API"); Log.Information("Order is for 7 days from today in the morning, with installer {@Installer}", installers.First().Name); CreateOrderDto order = new CreateOrderDto() { CustomerId = customerAccount.Id, InstallerId = installers.First().LocationId, InstallDate = DateTime.Now.AddDays(14), AM = true }; Flooring flooring = client.GetFlooringDetails(flooringb.First().Id).Result; order.OrderLines.Add(new OrderLine() { Qty = 10, CarpetId = flooring.Id, CarpetSizeOptionId = flooring.Sizes.First().Id }); var response = client.Neworder(order).Result; if (response.OrderSucess) { Log.Information("Order Sucessfull - Installer {@InstallerName} will be at your property on {@InstallationDate}", response.InstallerName, response.InstallDate); } else { Log.Information("Order failed "); } Log.Information("Press any key to get your current orders - my account page"); Console.ReadKey(); var customer = client.Register("testMacAddress001").Result; Log.Information("Customer has {@Count}", customer.Orders.Count); foreach (var o in customer.Orders) { Log.Information("Order {@Id} with installer {@Installer} on {@Date}", o.OrderId, o.InstallerName, o.InstallerShortDateString); } Log.Information("Semd Review to system for first order. press any key to continue "); var reviewResponse = client.AddOrderReview(new Review() { CustomerOrderId = customer.Orders.First().OrderId, QualityFactor = 5, CleanupFactor = 2, TimeKeepingFactor = 10, Comments = "This is the first tes review on the system" }).Result; if (reviewResponse) { Log.Information("Review has been accepted"); } else { Log.Information("Review Failed to upload"); } Log.Information("Press any key to finish testing"); Console.ReadKey(); }