/// <summary> /// This method is responsible for calculating all of the hours /// spent in theshop /// </summary> /// <returns>A decimal form of the total hours.</returns> // private decimal CalculateTotalHours() { decimal total = 0; total += decimal.Parse(TotalHoursBoxes.ToString()); total += decimal.Parse(TotalHoursCutting.ToString()); total += decimal.Parse(TotalHoursDrawers.ToString()); total += decimal.Parse(TotalHoursEdgeBanding.ToString()); return(total); }
/// <summary> /// This method is responsible for displaying the stats inside of the totals /// panel. /// </summary> private void DisplayStats() { BoxHoursLabel.Text = TotalHoursBoxes.ToString("#.##"); DrawerHoursLabel.Text = TotalHoursDrawers.ToString("#.##"); EdgeBandingHoursLabel.Text = TotalHoursEdgeBanding.ToString("#.##"); CuttingHoursLabel.Text = TotalHoursCutting.ToString("#.##"); TotalSheetsLabel.Text = NumSheetsCut.ToString("#.##"); EdgBardedLabel.Text = NumPartsEdgeBarded.ToString("#.##"); TotalDrawersLabel.Text = NumDrawersBuilt.ToString("#.##"); TotalFinishedPartsLabel.Text = NumFinishedParts.ToString("#.##"); TotalHoursLabel.Text = TotalHours.ToString("#.##"); if (Return > 0) { ReturnLabel.ForeColor = Color.LightGreen; } else { ReturnLabel.ForeColor = Color.Red; } ReturnLabel.Text = "$" + Return.ToString("#.##"); }