Ejemplo n.º 1
0
 public EditCategoryDialog(ProjectLongoMatch project, DashboardButton tagger, Window parent)
 {
     TransientFor = parent;
     this.Build ();
     timenodeproperties2.Tagger = tagger;
     timenodeproperties2.Dashboard = project.Dashboard;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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 ();
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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 ();
 }
Ejemplo n.º 7
0
 public void Refresh(DashboardButton b = null)
 {
     tagger.Refresh (b);
 }
Ejemplo n.º 8
0
 public void ClickButton(DashboardButton button, Tag tag = null)
 {
     tagger.Click (button, tag);
 }
Ejemplo n.º 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 ();
     }
 }
Ejemplo n.º 10
0
 public void ClickButton(DashboardButton button, Tag tag = null)
 {
     codingwidget.ClickButton (button, tag);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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
                }
            );
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 16
0
 public void EmitPressButton(DashboardButton button)
 {
 }
Ejemplo n.º 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);
            }
        }