public SubTrackersView(Reading reading, TrackerEnum parameter) { InitializeComponent(); pageParamether = parameter; _reading = reading; TitleLogNew.Text = $"Log New {reading.ReadingName}"; InitPage(); }
private void ReturnFromEditMode(SubTrackersView view, TrackerEnum pageType) { if (pageType == TrackerEnum.Biometrics) { DownloadBiometricsData(null); } if (pageType == TrackerEnum.Program) { DownloadProgramData(null); } }
private static async Task <string> Convert(List <Tracker> trackers, TrackerEnum key) { var val = ""; if (trackers == null || trackers.Count == 0) { return(val); } var userTracker = new UserTracker(); await Task.Run(() => { var tracker = trackers.FirstOrDefault(u => u.AttributeName.ToLower().Contains(key.ToString())); if (tracker != null) { val = tracker.AttributeValue; } }); return(val); }
public static async Task <string> GetAsync(this List <Tracker> tracker, TrackerEnum key) { return(await Task.Factory.StartNew(() => tracker.FirstOrDefault(u => u.AttributeName.ToLower().Contains(key.ToString()))?.AttributeValue ?? "")); }
public static string Get(this List <Tracker> tracker, TrackerEnum key) { return(tracker.FirstOrDefault(u => u.AttributeName.ToLower().Contains(key.ToString()))?.AttributeValue ?? ""); }