private void popupMessageRequests_MessageReceived(object sender, EventArgs e)
        {
            var messageInfo = sender as List<PopupMessage>;
            var read1 = true;
            foreach (var m in messageInfo)
            {
                if (m != null && m.RegionId == Current.Instance.Earthwatcher.PlayingRegion)
                {
                    if (!Current.Instance.RegionScores.Any(x => x.Action == ActionPoints.Action.DailyMessage.ToString() && x.Param1 == m.Id.ToString()))
                    {
                        if (read1 == true)
                        {
                            read1 = false;
                            //loguear que recibio el dailyMessage
                            Current.Instance.AddScore.Add(new Score(Current.Instance.Earthwatcher.Id, ActionPoints.Action.DailyMessage.ToString(), ActionPoints.Points(ActionPoints.Action.DailyMessage), Current.Instance.Earthwatcher.PlayingRegion, Current.Instance.PrecisionScore, null, null, m.Id.ToString()));
                            AddPoints(Current.Instance.AddScore);

                            PopupMessageWindow popup = new PopupMessageWindow(m);
                            popup.Show();
                        }
                    }
                }
            }
        }
示例#2
0
        private void popupMessageRequests_MessageReceived(object sender, EventArgs e)
        {
            var messageInfo = sender as List<PopupMessage>;
            var read1 = true;
            foreach (var m in messageInfo)
            {
                if (m != null)
                {
                    if (!Current.Instance.Scores.Any(x => x.Action == ActionPoints.Action.DailyMessage.ToString() && x.Param1 == m.Id.ToString()))
                    {
                        if (read1 == true)
                        {
                            read1 = false;
                            //loguear que recibio el dailyMessage
                            Current.Instance.AddScore.Add(new Score { EarthwatcherId = Current.Instance.Earthwatcher.Id, Action = ActionPoints.Action.DailyMessage.ToString(), Param1 = m.Id.ToString(), Points = ActionPoints.Points(ActionPoints.Action.DailyMessage), Published = DateTime.Now });
                            AddPoints(Current.Instance.AddScore);

                            PopupMessageWindow popup = new PopupMessageWindow(m);
                            popup.Show();
                        }
                    }
                }
            }
        }