Inheritance: BindableBase
示例#1
0
        public void TestSerialization()
        {
            Score s = new Score ();
            s.Color = Color.Red;
            s.Name = "test";
            s.Points = 2;

            Utils.CheckSerialization (s);

            Score s2 = Utils.SerializeDeserialize (s);
            Assert.AreEqual (s.Color, s2.Color);
            Assert.AreEqual (s.Name, s2.Name);
            Assert.AreEqual (s.Points, s2.Points);
        }
示例#2
0
        public void EmitNewEvent(EventType eventType, List<Player> players = null, TeamType team = TeamType.NONE,
		                          List<Tag> tags = null, Time start = null, Time stop = null,
		                          Time eventTime = null, Score score = null, PenaltyCard card = null)
        {
            if (NewEventEvent != null)
                NewEventEvent (eventType, players, team, tags, start, stop, eventTime, score, card, null);
        }
示例#3
0
        void HandleNewTagEvent(EventType evntType, List<Player> players, TeamType team, List<Tag> tags,
		                        Time start, Time stop, Time eventTime, Score score, PenaltyCard card, DashboardButton btn)
        {
            /* Forward event until we have players integrted in the dashboard layout */
            if (NewTagEvent != null) {
                NewTagEvent (evntType, players, team, tags, start, stop, eventTime, score, card, btn);
            }
            //Config.EventsBroker.EmitNewTag (button, players, tags, start, stop);
        }
示例#4
0
        public void OnNewTag(EventType evType, List<Player> players, TeamType team, List<Tag> tags,
		                      Time start, Time stop, Time eventTime, Score score, PenaltyCard card, DashboardButton btn)
        {
            if (player == null || openedProject == null)
                return;

            if (projectType == ProjectType.CaptureProject ||
                projectType == ProjectType.URICaptureProject) {
                if (!capturer.Capturing) {
                    guiToolkit.WarningMessage (Catalog.GetString ("Video capture is stopped"));
                    return;
                }
            }
            Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
                start.ToMSecondsString (), stop.ToMSecondsString (),
                evType.Name));
            /* Add the new created play to the project and update the GUI*/
            var play = openedProject.AddEvent (evType, start, stop, eventTime, null, score, card);
            play.Team = team;
            if (players != null) {
                play.Players = players;
            }
            if (tags != null) {
                play.Tags = tags;
            }
            AddNewPlay (play);
        }