public void DrawInventory(SpriteBatch spriteBatch, Vector2 position) { Position = position; Draw(spriteBatch); if (NumberOfItems > 1) { spriteBatch.DrawString(TextureManager.SpriteFont15, NumberOfItems.ToString(), new Vector2(Position.X - 32, Position.Y + 8), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.01f); } if (RecentlyAcquired) { if (recentlyAcquiredOpacity > 0.95f || recentlyAcquiredOpacity < 0.05f) { recentlyAcquiredflip = !recentlyAcquiredflip; } if (recentlyAcquiredflip == false) { recentlyAcquiredOpacity = MathHelper.Lerp(recentlyAcquiredOpacity, 1, 0.05f); } else { recentlyAcquiredOpacity = MathHelper.Lerp(recentlyAcquiredOpacity, 0, 0.05f); } spriteBatch.DrawString(TextureManager.SpriteFont15, "NEW", new Vector2(Position.X - Texture.Width / 2, Position.Y - Texture.Height / 2), Color.White * recentlyAcquiredOpacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.01f); } if (HoverOver()) { Text.TextDifferentColor(spriteBatch, Description, new Vector2(0, 0), 1f, TextureManager.SpriteFont15, false); } }
/// <summary> /// Gets the Number of Items on the Test /// </summary> /// <returns></returns> public string GetNumberOfItemsOnTest() { NumberOfItems.Wait(2); if (Driver.WrappedDriver.GetType() == typeof(DummyDriver)) { NumberOfItems.Text = FakeText; } return(NumberOfItems.Text.Trim()); }
public NumberOfItems GetDataInProgressWithHighPriority(string listTitle) { ItemsInProgress item = new ItemsInProgress(); var numberWithProrityHigh = item.GetNumberOfTicketInProgressPriorityHigh(listTitle); var totalNumberOfTickets = item.GetNumberOfTicketInProgress(listTitle); var numberOfTickets = new NumberOfItems() { TotalNumber = totalNumberOfTickets, NumberWithSpecificProperty = numberWithProrityHigh }; return(numberOfTickets); }
public ListStatisticsStatus GetDataStatus(string listTitle, int?month = null) { NumberOfItems itemsInProgress = GetItemCount(listTitle, month, "In Progress"); NumberOfItems itemsSolved = GetItemCount(listTitle, month, "Solved"); NumberOfItems itemsNew = GetItemCount(listTitle, month, "New"); ListStatisticsStatus result; if (month != null) { result = new ListStatisticsStatus() { InProgress = itemsInProgress.NumberWithSpecificProperty, New = itemsNew.NumberWithSpecificProperty, Solved = itemsSolved.NumberWithSpecificProperty }; } else { result = new ListStatisticsStatus() { InProgress = itemsInProgress.TotalNumber, New = itemsNew.TotalNumber, Solved = itemsSolved.TotalNumber }; } return(result); }
private NumberOfItems CountListItems(ListItemCollection listItems, int?month) { int itemsCount = 0; int monthItemsCount = 0; for (var i = 0; i < listItems.Count; i++) { if (month != null) { DateTime validfrom = (DateTime)listItems[i]["Created"]; if (validfrom.Month == month.Value) { monthItemsCount++; } } itemsCount++; } var result = new NumberOfItems() { NumberWithSpecificProperty = monthItemsCount, TotalNumber = itemsCount }; return(result); }
public override WebRequestHeaders GetUrlContent() { UrlData.Add(new WebRequestHeader("num-items", NumberOfItems.ToString())); UrlData.Add(new WebRequestHeader("tabs", Tabs.ToString())); return(base.GetUrlContent()); }