public CreateModel(WalkingTracker.Data.ApplicationDbContext context) { TrackingLog = new TrackingLog { Date = (DateTime.Today), }; _context = context; }
public WorkFlowInstanceList GetWorkFlowInstances() { //WindowsPrincipal principal = (WindowsPrincipal)Thread.CurrentPrincipal; //WindowsIdentity identity = (WindowsIdentity)principal.Identity; //TrackingLog.Log(identity.Name); WorkFlowInstanceList l = new WorkFlowInstanceList(); try { TrackingDataContext dataContext = new TrackingDataContext(); IQueryable <CommonResource.Tracking> trackingQuery = from tracking in dataContext.Trackings select tracking; foreach (CommonResource.Tracking t in trackingQuery) { using (TrackingWorkFlowInteraction interaction = new TrackingWorkFlowInteraction()) { WorkFlowInstance wfi = new WorkFlowInstance(); wfi.BugId = t.bugid; wfi.Id = t.wfinstanceid.ToString(); wfi.Title = t.title; wfi.WFName = t.wfname; wfi.LastModified = t.lastmodified.ToString(); wfi.QFEStatus = t.qfestatus; wfi.AssignedTo = t.assignedto; wfi.LastModified = t.lastmodified == null ? "N/A" : t.lastmodified.Value.ToString(); wfi.LastModifiedBy = t.lastmodifiedby; // //List<string> candiCmds = interaction.getCandidateCommands(t.wfname.Trim(), t.wfinstanceid.ToString()); //CandidateCommandList ccl = new CandidateCommandList(); //if (candiCmds != null) //{ // foreach (string cmd in candiCmds) // { // ccl.Add(cmd); // } //} //wfi.CandidateCommandList = ccl; l.Add(wfi); } } } catch (Exception e) { TrackingLog.Log(e.ToString() + "!!" + e.Message); } return(l); }
public void AddToTrackingLog(string line) { TrackingLog.Add(string.Format(ProgramLocalization.LogRow, DateTime.Now.ToLongTimeString(), line)); if (TrackingLog != null) { var temp = new List <string>(TrackingLog); temp.Reverse(); TrackingLogsListBox.Items.Clear(); TrackingLogsListBox.Items.AddRange(temp.Select(x => new ListViewItem(x)).ToArray()); TrackingLogsListBox.Refresh(); } }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } TrackingLog = await _context.Tracking.FirstOrDefaultAsync(m => m.ID == id); if (TrackingLog == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } TrackingLog = await _context.Tracking.FindAsync(id); if (TrackingLog != null) { _context.Tracking.Remove(TrackingLog); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } TrackingLog = await _context.TrackingLog .Include(t => t.Project) .Include(t => t.StaffMember).FirstOrDefaultAsync(m => m.TrackingLogId == id); if (TrackingLog == null) { return(NotFound()); } return(Page()); }
public void Clear() { var temp = new List <string>(); TrackingLog.Clear(); TrackingLogsListBox.Items.Clear(); TrackingLogsListBox.Items.AddRange(temp.Select(x => new ListViewItem(x)).ToArray()); GameHistoryListBox.Items.Clear(); GameHistoryListBox.Items.AddRange(temp.Select(x => new ListViewItem(x)).ToArray()); SceneDisruptionBtn.BackColor = SystemColors.ControlLight; SceneDisruptionBtn.Text = string.Empty; ImmediateBoardStatePictureBox.Image = null; TrackedBoardStatePictureBox.Image = null; GameStatePictureBox.Image = null; }