private void Edit_Clicked(object sender, EventArgs e) { m_EditScreen = new PersonalEditPage(); //pass profilerecord list //for(int _index=0; _index<m_ProfileEventList.Count; _index++) //reversing, so that early events are on top for (int _index = m_ProfileEventList.Count - 1; _index >= 0; _index--) { string _profile = ""; if (m_ProfileEventList[_index].EmployeeID == m_ActiveEmployee.Misc) { if (m_ProfileEventList[_index].Badge1 == "[BREAK]" || m_ProfileEventList[_index].Badge1 == "[LUNCH]") { if (m_ProfileEventList[_index].Badge1 == "[BREAK]") { _profile = "Break Event"; } else { _profile = "Lunch Event"; } } else { for (int Count = 1; Count <= 12; Count++) { if (m_ProfileEventList[_index].GetBadgeAt(Count) != "") { BadgeType bt = m_BadgeList.Where(b => b.BadgeID == m_ProfileEventList[_index].GetBadgeAt(Count)).First(); if (bt.Description != "") { _profile += bt.Description + ", "; } } } //end profile loop } m_EditScreen.m_RecordList.Add(new ProfileRecordFormatted() { IndexID = _index, Profile = _profile, StartView = DataTrack.GetLongDisplayTime(m_ProfileEventList[_index].StartTime), EndView = DataTrack.GetLongDisplayTime(m_ProfileEventList[_index].EndTime) }); } } Navigation.PushAsync(m_EditScreen); }
private void ContentPage_Appearing(object sender, EventArgs e) { if (m_EditScreen != null) { //load from record list UpdateProfileEventFromEdits(); m_EditScreen = null; } else { LoadProfileEventList(); } SetScreen(); }