private void AddTFSItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmRecalculateHours oRec = new frmRecalculateHours
            {
                Location = Cursor.Position
            };

            oRec.openType = frmRecalculateHours.OpenType.TFS;
            if (oRec.ShowDialog() == DialogResult.OK)
            {
                if (int.TryParse(oRec.dHours.ToString(), out int iId))
                {
                    WorkItemRegister oWi = null;
                    foreach (var oDataSource in oDataSources.Where(x => x.Type == Datasourcetype.TFS))
                    {
                        if (oWi == null)
                        {
                            oWi = WorkItemMapper.GetHistoricalWorkitemsByIDs(oDataSource.ServerUrl, oDataSource.ProjectName, oDataSource.User, new int[] { iId }).FirstOrDefault();
                            if (oWi != null)
                            {
                                lvwHistory.Items.Add(WorkItemHoursToLVWItem(lvwHistory.SelectedItems[0].Group, WorkItemToWIHours(oWi, null, oDataSource, 0)));
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Coulnd't parse the TFS ID, please try again with an integer");
                }
            }
        }
        private void RecalculateSelectedDay()
        {
            frmRecalculateHours oRec = new frmRecalculateHours
            {
                Location = Cursor.Position
            };

            oRec.openType = frmRecalculateHours.OpenType.Hours;
            if (oRec.ShowDialog() == DialogResult.OK)
            {
                ListViewGroup       oLvg      = oSelectedHour.Group;
                WorkItemsDay        oDay      = new WorkItemsDay(((WorkItemsDay)oLvg.Tag).Date);
                List <ListViewItem> lstRemove = new List <ListViewItem>();
                foreach (ListViewItem oItem in oLvg.Items)
                {
                    oDay.WorkItems.Add((WorkItemHours)oItem.Tag);
                    lstRemove.Add(oItem);
                }
                lstRemove.ForEach(x => lvwHistory.Items.Remove(x));
                oDay.CalculateHaxComHours(oRec.dHours);
                foreach (WorkItemHours oHours in oDay.WorkItems)
                {
                    lvwHistory.Items.Add(WorkItemHoursToLVWItem(oLvg, oHours));
                }
            }
        }