private void LoadTFSCSV() { frmLoginSendHaxCom oLogin = new frmLoginSendHaxCom { LoginURL = TimeKeeperBaseURL }; oLogin.openMode = frmLoginSendHaxCom.OpenMode.Search; oLogin.optDays.Enabled = false; oLogin.optSel.Enabled = false; if (oLogin.ShowDialog() == DialogResult.OK) { List <WorkItemsDay> oItems = new List <WorkItemsDay>(); List <CsvReg> regs = getHaxComTFSTime(oLogin.PHPSession, dtpFrom.Value, DateTime.Today, oLogin.chkAll.Checked, (oLogin.CHKBug.Checked || oLogin.chkPBI.Checked || oLogin.chkOther.Checked), oLogin.chkMeeting.Checked, oLogin.chkPrjtLess.Checked, oLogin.chkNonBillable.Checked, oLogin.chkCapitalized.Checked); var oDataSource = oDataSources.First(x => x.Type == Datasourcetype.TFS); var outlookDataSource = oDataSources.FirstOrDefault(x => x.Type == Datasourcetype.Outlook); //gets rest of TFS data using the TFS IDS var tfsItems = WorkItemMapper.GetHistoricalWorkitemsByIDs(oDataSource.ServerUrl, oDataSource.ProjectName, oDataSource.User, regs.Select(x => x.TFSId).Distinct()); //assembles the listview foreach (DateTime dDate in regs.Select(x => x.Date).Distinct()) { var oTemp = new WorkItemsDay(dDate); foreach (CsvReg oReg in regs.Where(x => x.Date == dDate)) { if (oReg.TFSId == 0) //meetings { var oWI = new WorkItemHours(); oWI.HaxComID = oReg.EntryID; oWI.ID = "meeting"; oWI.ProjectId = 0; oWI.ClientId = 166; oWI.SubClientId = 5; oWI.Function = 41; //dev meeting oWI.Description = oReg.Title; oWI.Title = oReg.Title; oWI.FromDatasource = outlookDataSource; oWI.BillingType = BillingType.Capitalized; oWI.HaxComHours = oReg.Hours; oTemp.WorkItems.Add(oWI); } else { var oTFSI = tfsItems.FirstOrDefault(x => x.ID == oReg.TFSId.ToString()); if (oTFSI != null) { string sType = oTFSI.Type.ToUpperInvariant(); if (oLogin.chkAll.Checked || (sType == "BUG" && oLogin.CHKBug.Checked) || (sType == "USER STORY" && oLogin.chkPBI.Checked) || (sType != "BUG" && sType != "PRODUCT BACKLOG ITEM" && oLogin.chkOther.Checked)) { oTemp.WorkItems.Add(WorkItemToWIHours(oTFSI, oReg.EntryID, oDataSource, oReg.Hours)); } } } } oItems.Add(oTemp); } UpdateListview(oItems, false); } }
public VMSlot InferStackValue() { var emulator = new InstructionEmulator(); var pushValue = DataSources.First(); // TODO: might need to verify multiple data sources. emulator.EmulateDependentInstructions(pushValue); emulator.EmulateInstruction(pushValue); return(emulator.Stack.Pop()); }
private void SelectDefault() { Operations.First().IsSelected = true; DataSources.First().IsSelected = true; }