private void CalcTimeSpend() { Log.System("Getting incluuded modules ID's."); List <int> ModulesIndices = new List <int>(); for (int i = 1; i < clbProjects.Items.Count; i++) { if (clbProjects.CheckedIndices.Contains(i)) { Log.System(string.Format("added module id {0} to list over included modules.", i)); ModulesIndices.Add(GetSelectedModuleAt(i)); } } Log.System("Done"); // Log.Spacer(); Log.System("ReCalculating Timespend"); TimeInfo ti = _ProjectManager.GetRecordedTime(ModulesIndices.ToArray()); double total = 0; tbTimeWork.Text = ti.GetWork(); total += ti.Work; Log.System(string.Format("Added Work to total with a value of {0}'s now total is at {1}. \r\nwith the final result of {2} to Work", ti.Work, total, ti.GetWork())); tbTimeTest.Text = ti.GetTesting(); total += ti.Testing; Log.System(string.Format("Added Work to total with a value of {0}'s now total is at {1}. \r\nwith the final result of {2} to Testing", ti.Testing, total, ti.GetTesting())); tbTimeReshaping.Text = ti.GetReshaping(); total += ti.Reshaping; Log.System(string.Format("Added Work to total with a value of {0}'s now total is at {1}. \r\nwith the final result of {2} to Reshaping", ti.Reshaping, total, ti.GetReshaping())); tbTimeReseache.Text = ti.GetResearche(); total += ti.Researche; Log.System(string.Format("Added Work to total with a value of {0}'s now total is at {1}. \r\nwith the final result of {2} to Researche", ti.Researche, total, ti.GetResearche())); tbTimeProjectPlanning.Text = ti.GetPlanning(); total += ti.Planning; Log.System(string.Format("Added Work to total with a value of {0}'s now total is at {1}. \r\nwith the final result of {2} to Planning", ti.Planning, total, ti.GetPlanning())); TimeUnit totaltime = new TimeUnit() { Time = total }; tbTimeTotal.Text = totaltime.TimeCalc(); Log.System("Done"); Log.Spacer(); }