Пример #1
0
 public SubTrackersView(Reading reading, TrackerEnum parameter)
 {
     InitializeComponent();
     pageParamether   = parameter;
     _reading         = reading;
     TitleLogNew.Text = $"Log New {reading.ReadingName}";
     InitPage();
 }
Пример #2
0
 private void ReturnFromEditMode(SubTrackersView view, TrackerEnum pageType)
 {
     if (pageType == TrackerEnum.Biometrics)
     {
         DownloadBiometricsData(null);
     }
     if (pageType == TrackerEnum.Program)
     {
         DownloadProgramData(null);
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
 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 ?? ""));
 }
Пример #5
0
 public static string Get(this List <Tracker> tracker, TrackerEnum key)
 {
     return(tracker.FirstOrDefault(u => u.AttributeName.ToLower().Contains(key.ToString()))?.AttributeValue ?? "");
 }