示例#1
0
        public void TodayOnly()
        {
            CurrentVM = AssessmentAndlFallsVM.Instance;
            BlackPushpins.Clear();
            BluePushpins.Clear();
            RedPushpins.Clear();

            /*      foreach (Locations gPS in CurrentVM.Locations)
             *    {
             *        if (gPS.Status == Locations.FallStatus.REAL)
             *            foreach (Fall fall in gPS.TheObject)
             *                if (fall.time.Date.Year == DateTime.Today.Date.Year &&
             *                    fall.time.Date.Month == DateTime.Today.Date.Month &&
             *                    fall.time.Date.Day == DateTime.Today.Date.Day)
             *                    BlackPushpins.Add(fall);
             *
             *        if (gPS.Status == Locations.FallStatus.PREDICTION)
             *            foreach (FallPrediction fallPrediction in gPS.TheObject)
             *                if (fallPrediction.FallPredictionTime.Date.Year == DateTime.Today.Date.Year &&
             *                    fallPrediction.FallPredictionTime.Date.Month == DateTime.Today.Date.Month &&
             *                    fallPrediction.FallPredictionTime.Date.Day == DateTime.Today.Date.Day)
             *                    BluePushpins.Add(fallPrediction);
             *        if (gPS.Status == Locations.FallStatus.REPORT)
             *            foreach (FallReport fallReport in gPS.TheObject)
             *                if (fallReport.ReportTime.Date.Year == DateTime.Today.Date.Year &&
             *                    fallReport.ReportTime.Date.Month == DateTime.Today.Date.Month &&
             *                    fallReport.ReportTime.Date.Day == DateTime.Today.Date.Day)
             *                    RedPushpins.Add(fallReport);
             *    }
             */
            RedPushpins.Add(new Location_("israel"));
            AddPushpins();
        }
示例#2
0
        public void TodayOnly()
        {
            CurrentVM = PredictionAndRealFallsVM.Instance;
            BlackPushpins.Clear();
            BluePushpins.Clear();
            RedPushpins.Clear();

            foreach (Locations gPS in CurrentVM.Locations)
            {
                if (gPS.Status == Locations.FallStatus.REAL)
                {
                    foreach (Fall fall in gPS.TheObject)
                    {
                        if (fall.FallTime.Date.Year == DateTime.Today.Date.Year &&
                            fall.FallTime.Date.Month == DateTime.Today.Date.Month &&
                            fall.FallTime.Date.Day == DateTime.Today.Date.Day)
                        {
                            BlackPushpins.Add(fall);
                        }
                    }
                }

                if (gPS.Status == Locations.FallStatus.PREDICTION)
                {
                    foreach (FallPrediction fallPrediction in gPS.TheObject)
                    {
                        if (fallPrediction.FallPredictionTime.Date.Year == DateTime.Today.Date.Year &&
                            fallPrediction.FallPredictionTime.Date.Month == DateTime.Today.Date.Month &&
                            fallPrediction.FallPredictionTime.Date.Day == DateTime.Today.Date.Day)
                        {
                            BluePushpins.Add(fallPrediction);
                        }
                    }
                }
                if (gPS.Status == Locations.FallStatus.REPORT)
                {
                    foreach (FallReport fallReport in gPS.TheObject)
                    {
                        if (fallReport.ReportTime.Date.Year == DateTime.Today.Date.Year &&
                            fallReport.ReportTime.Date.Month == DateTime.Today.Date.Month &&
                            fallReport.ReportTime.Date.Day == DateTime.Today.Date.Day)
                        {
                            RedPushpins.Add(fallReport);
                        }
                    }
                }
            }
            AddPushpins();
        }
示例#3
0
        private void InitValueCtorLists(int fallId)
        {
            foreach (Locations lacation in CurrentVM.Locations)
            {
                if (lacation.Status == Locations.FallStatus.REAL)
                {
                    BlackPushpins = lacation.TheObject;
                }
                if (lacation.Status == Locations.FallStatus.PREDICTION)
                {
                    BluePushpins = lacation.TheObject;
                }
                if (lacation.Status == Locations.FallStatus.REPORT)
                {
                    RedPushpins = lacation.TheObject;
                }
            }
            foreach (Fall item in BlackPushpins)
            {
                if (item.FallId != fallId)
                {
                    BlackPushpins.Remove(item);
                }
            }
            foreach (FallPrediction item in BlackPushpins)
            {
                if (item.FallPredictionFallKey != fallId)
                {
                    BluePushpins.Remove(item);
                }
            }

            int predictionCode = ((FallPrediction)BluePushpins.First()).FallPredictionId;

            foreach (FallReport item in BlackPushpins)
            {
                if (item.FallReportId != predictionCode)
                {
                    RedPushpins.Remove(item);
                }
            }
        }