예제 #1
0
 public EditCategoryDialog(ProjectLongoMatch project, DashboardButton tagger, Window parent)
 {
     TransientFor = parent;
     this.Build ();
     timenodeproperties2.Tagger = tagger;
     timenodeproperties2.Dashboard = project.Dashboard;
 }
예제 #2
0
 public void TestSerialization()
 {
     DashboardButton db = new DashboardButton ();
     Utils.CheckSerialization (db);
     db = new PenaltyCardButton ();
     Utils.CheckSerialization (db);
     db = new PenaltyCardButton ();
     Utils.CheckSerialization (db);
     db = new ScoreButton ();
     Utils.CheckSerialization (db);
 }
예제 #3
0
 void RemoveButton(DashboardButton button)
 {
     string msg = Catalog.GetString ("Do you want to delete: ") +
                  button.Name + "?";
     if (Config.GUIToolkit.QuestionMessage (msg, null, this)) {
         template.RemoveButton (button);
         Edited = true;
         Refresh ();
     }
 }
예제 #4
0
 void HandleTaggersSelectedEvent(List<DashboardButton> taggers)
 {
     if (taggers.Count == 1) {
         selected = taggers [0];
         tagproperties.Tagger = taggers [0];
         propertiesnotebook.Page = PROPERTIES_NOTEBOOK_PAGE_TAGS;
     } else {
         selected = null;
         tagproperties.Tagger = null;
         propertiesnotebook.Page = PROPERTIES_NOTEBOOK_PAGE_EMPTY;
     }
 }
예제 #5
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);
        }
예제 #6
0
 void EditEventSubcategories(DashboardButton dashboardButton)
 {
     AnalysisEventButton button = (dashboardButton as AnalysisEventButton);
     AnalysisEventType evt = button.AnalysisEventType;
     EventTypeTagsEditor dialog = new EventTypeTagsEditor (this.Toplevel as Window);
     dialog.EventType = evt;
     dialog.Run ();
     dialog.Destroy ();
     template.RemoveDeadLinks (button);
     Edited = true;
     Refresh ();
 }
예제 #7
0
 public void Refresh(DashboardButton b = null)
 {
     tagger.Refresh (b);
 }
예제 #8
0
 public void ClickButton(DashboardButton button, Tag tag = null)
 {
     tagger.Click (button, tag);
 }
예제 #9
0
 void RemoveButton(DashboardButton button)
 {
     string msg = Catalog.GetString ("Do you want to delete: ") +
                  button.Name + "?";
     if (App.Current.Dialogs.QuestionMessage (msg, null, this).Result) {
         template.RemoveButton (button);
         Edited = true;
         Refresh ();
     }
 }
예제 #10
0
 public void ClickButton(DashboardButton button, Tag tag = null)
 {
     codingwidget.ClickButton (button, tag);
 }
예제 #11
0
 public void TestSerialization()
 {
     DashboardButton db = new DashboardButton ();
     Utils.CheckSerialization (db);
     db = new TimedDashboardButton ();
     Utils.CheckSerialization (db);
     db = new TagButton ();
     Utils.CheckSerialization (db);
     db = new TimerButton ();
     Utils.CheckSerialization (db);
     db = new EventButton ();
     Utils.CheckSerialization (db);
     db = new AnalysisEventButton ();
     Utils.CheckSerialization (db);
     db = new PenaltyCardButton ();
     Utils.CheckSerialization (db);
     db = new PenaltyCardButton ();
     Utils.CheckSerialization (db);
     db = new ScoreButton ();
     Utils.CheckSerialization (db);
 }
예제 #12
0
        void HandleNewTagEvent(EventType eventType, List<Player> players, ObservableCollection<Team> teams, List<Tag> tags,
		                        Time start, Time stop, Time eventTime, DashboardButton btn)
        {
            TimelineEventLongoMatch play = project.AddEvent (eventType, start, stop, eventTime,
                                               null, false) as TimelineEventLongoMatch;
            play.Teams = new ObservableCollection<Team> (teamtagger.SelectedTeams);
            if (selectedPlayers != null) {
                play.Players = new ObservableCollection<Player> (selectedPlayers);
            } else {
                play.Players = new ObservableCollection<Player> ();
            }
            if (tags != null) {
                play.Tags = new ObservableCollection <Tag> (tags);
            } else {
                play.Tags = new ObservableCollection<Tag> ();
            }
            teamtagger.ResetSelection ();
            selectedPlayers = null;
            App.Current.EventsBroker.Publish<NewDashboardEvent> (
                new NewDashboardEvent {
                    TimelineEvent = play,
                    DashboardButton = btn,
                    Edit = true,
                    DashboardButtons = null
                }
            );
        }
예제 #13
0
        public void HandleNewDashboardEvent(TimelineEvent play, DashboardButton btn, bool edit, List<DashboardButton> from)
        {
            if (openedProject == null)
                return;

            if (projectType == ProjectType.CaptureProject ||
                projectType == ProjectType.URICaptureProject ||
                projectType == ProjectType.FakeCaptureProject) {
                if (!capturer.Capturing) {
                    guiToolkit.WarningMessage (Catalog.GetString ("Video capture is stopped"));
                    return;
                }
            }

            if (!openedProject.Dashboard.DisablePopupWindow && edit) {
                if (projectType == ProjectType.FileProject) {
                    bool playing = player.Playing;
                    player.Pause ();
                    Config.GUIToolkit.EditPlay (play, openedProject, true, true, true, true);
                    if (playing) {
                        player.Play ();
                    }
                } else {
                    Config.GUIToolkit.EditPlay (play, openedProject, true, true, true, true);
                }
            }

            Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
                play.Start.ToMSecondsString (), play.Stop.ToMSecondsString (),
                play.EventType.Name));
            openedProject.AddEvent (play);
            AddNewPlay (play);
        }
예제 #14
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);
        }
예제 #15
0
 public void EmitNewDashboardEvent(TimelineEvent evt, DashboardButton btn, bool edit, List<DashboardButton> from)
 {
     if (NewDashboardEventEvent != null) {
         if (from == null)
             from = new List<DashboardButton> ();
         NewDashboardEventEvent (evt, btn, edit, from);
     }
 }
예제 #16
0
 public void EmitPressButton(DashboardButton button)
 {
 }
예제 #17
0
        void HandleNewTagEvent(EventType evntType, List<Player> players, ObservableCollection<Team> teams, List<Tag> tags,
		                        Time start, Time stop, Time eventTime, DashboardButton btn)
        {
            /* Forward event until we have players integrted in the dashboard layout */
            if (NewTagEvent != null) {
                NewTagEvent (evntType, players, teams, tags, start, stop, eventTime, btn);
            }
        }