Ejemplo n.º 1
0
 protected virtual void OnSnapshotSeriesEvent(LongoMatch.Store.Play tNode)
 {
     if (SnapshotSeriesEvent != null)
     {
         SnapshotSeriesEvent(tNode);
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnTagPlay(LongoMatch.Store.Play tNode)
 {
     if (TagPlay != null)
     {
         TagPlay(tNode);
     }
 }
Ejemplo n.º 3
0
        public TaggerDialog(Play play, TeamTemplate localTeamTemplate, TeamTemplate visitorTeamTemplate)
        {
            this.Build();

            tagsnotebook.Visible = false;

            this.localTeamTemplate = localTeamTemplate;
            this.visitorTeamTemplate = visitorTeamTemplate;

            taggerwidget1.SetData(play, localTeamTemplate.TeamName, visitorTeamTemplate.TeamName);

            /* Iterate over all subcategories, adding a widget only for the FastTag ones */
            foreach (var subcat in play.Category.SubCategories) {
                if (!subcat.FastTag)
                    continue;
                if (subcat is TagSubCategory) {
                    var tagcat = subcat as TagSubCategory;
                    AddTagSubcategory(tagcat, play.Tags);
                } else if (subcat is PlayerSubCategory) {
                    var tagcat = subcat as PlayerSubCategory;
                    AddPlayerSubcategory(tagcat, play.Players);
                } else if (subcat is TeamSubCategory) {
                    var tagcat = subcat as TeamSubCategory;
                    AddTeamSubcategory(tagcat, play.Teams,
                                       localTeamTemplate.TeamName,
                                       visitorTeamTemplate.TeamName);
                }
            }
        }
Ejemplo n.º 4
0
 public void SetData(Play play, string localTeam, string visitorTeam)
 {
     this.play = play;
     localcheckbutton.Label = localTeam;
     visitorcheckbutton.Label = visitorTeam;
     localcheckbutton.Active = play.Team == Team.LOCAL || play.Team == Team.BOTH;
     visitorcheckbutton.Active = play.Team == Team.VISITOR || play.Team == Team.BOTH;
     localcheckbutton.Toggled += OnCheckbuttonToggled;
     visitorcheckbutton.Toggled += OnCheckbuttonToggled;
 }
Ejemplo n.º 5
0
 public PlayListPlay(Play play, MediaFile mediaFile, float rate, bool valid)
 {
     Name = play.Name;
     Start = play.Start;
     Stop = play.Stop;
     Miniature = play.Miniature;
     Drawings = play.Drawings;
     MediaFile = mediaFile;
     Rate = rate;
     Valid = valid;
 }
Ejemplo n.º 6
0
        public TaggerDialog(Play play,
		                    Categories categoriesTemplate,
		                    TeamTemplate localTeamTemplate,
		                    TeamTemplate visitorTeamTemplate,
		                    bool showAllSubcategories)
        {
            this.Build();

            firstExpose = false;
            tagsnotebook.Visible = false;

            this.localTeamTemplate = localTeamTemplate;
            this.visitorTeamTemplate = visitorTeamTemplate;

            taggerwidget1.SetData(categoriesTemplate, play,
                                  localTeamTemplate.TeamName,
                                  visitorTeamTemplate.TeamName);
            playersnotebook.Visible = false;

            /* Iterate over all subcategories, adding a widget only for the FastTag ones */
            foreach (var subcat in play.Category.SubCategories) {
                if (!subcat.FastTag && !showAllSubcategories)
                    continue;
                if (subcat is TagSubCategory) {
                    var tagcat = subcat as TagSubCategory;
                    AddTagSubcategory(tagcat, play.Tags);
                } else if (subcat is PlayerSubCategory) {
                    playersnotebook.Visible = false;
                    hbox.SetChildPacking(tagsnotebook, false, false, 0, Gtk.PackType.Start);
                    var tagcat = subcat as PlayerSubCategory;
                    AddPlayerSubcategory(tagcat, play.Players);
                } else if (subcat is TeamSubCategory) {
                    var tagcat = subcat as TeamSubCategory;
                    AddTeamSubcategory(tagcat, play.Teams,
                                       localTeamTemplate.TeamName,
                                       visitorTeamTemplate.TeamName);
                }
            }

            if (!play.Category.TagFieldPosition && !play.Category.TagHalfFieldPosition && !play.Category.TagGoalPosition) {
                coordstagger.Visible = false;
                (mainvbox[hbox] as Gtk.Box.BoxChild).Expand = true;
            } else {
                coordstagger.LoadBackgrounds (categoriesTemplate.FieldBackground,
                                              categoriesTemplate.HalfFieldBackground,
                                              categoriesTemplate.GoalBackground);
                coordstagger.LoadPlay (play);
            }

            if (subcategoryAdded || playersnotebook.Visible) {
                tagsnotebook.Visible = true;
            }
        }
Ejemplo n.º 7
0
 private void EmitPlaySelected(Play play)
 {
     if (PlaySelectedEvent != null)
         PlaySelectedEvent(play);
 }
Ejemplo n.º 8
0
 protected virtual void OnTimeNodeSelected(Play play)
 {
     rightvbox.Visible=true;
     if (PlaySelectedEvent != null)
         PlaySelectedEvent(play);
 }
Ejemplo n.º 9
0
 public void UpdateSelectedPlay(Play play)
 {
     timeline.SelectedTimeNode = play;
     notes.Visible = true;
     notes.Play= play;
 }
Ejemplo n.º 10
0
 public void AddPlay(Play play)
 {
     playsList.AddPlay(play);
     tagsList.AddPlay(play);
     timeline.AddPlay(play);
     /* FIXME: Check performance */
     UpdateTeamsModels();
     timeline.QueueDraw();
 }
Ejemplo n.º 11
0
 public void AddPlay(Play play)
 {
     timeline.Add(play);
 }
Ejemplo n.º 12
0
 private void OnPlayListNodeAdded(Play play)
 {
     if (PlayListNodeAddedEvent != null)
         PlayListNodeAddedEvent(play);
 }
 protected virtual void OnTimeNodeSelected(Play tNode)
 {
     if(TimeNodeSelected != null)
         TimeNodeSelected(tNode);
 }
 protected virtual void OnSnapshotSeriesEvent(Play tNode)
 {
     if(SnapshotSeriesEvent != null)
         SnapshotSeriesEvent(tNode);
 }
 protected virtual void OnPlayListNodeAdded(Play tNode)
 {
     if(PlayListNodeAdded != null)
         PlayListNodeAdded(tNode);
 }
Ejemplo n.º 16
0
 public void TagPlay(Play play, TeamTemplate local, TeamTemplate visitor)
 {
     TaggerDialog tg = new TaggerDialog(play, local, visitor);
     tg.TransientFor = mainWindow as Gtk.Window;
     tg.Run();
     tg.Destroy();
 }
Ejemplo n.º 17
0
        public void ExportFrameSeries(Project openedProject, Play play, string snapshotsDir)
        {
            SnapshotsDialog sd;
            uint interval;
            string seriesName;
            string outDir;

            sd= new SnapshotsDialog();
            sd.TransientFor= mainWindow as Gtk.Window;
            sd.Play = play.Name;

            if(sd.Run() == (int)ResponseType.Ok) {
                sd.Destroy();
                interval = sd.Interval;
                seriesName = sd.SeriesName;
                outDir = System.IO.Path.Combine(snapshotsDir, seriesName);
                var fsc = new FramesSeriesCapturer(openedProject.Description.File.FilePath,
                                               play.Start.MSeconds, play.Stop.MSeconds,
                                               interval, outDir);
                var fcpd = new FramesCaptureProgressDialog(fsc);
                fcpd.TransientFor = mainWindow as Gtk.Window;
                fcpd.Run();
                fcpd.Destroy();
            }
            else
                sd.Destroy();
        }
Ejemplo n.º 18
0
        public void DrawingTool(Image image, Play play, int stopTime)
        {
            DrawingTool dialog = new DrawingTool();

            dialog.Image = image.Value;
            if (play != null)
                dialog.SetPlay(play, stopTime);
            dialog.TransientFor = mainWindow as Gtk.Window;
            image.Dispose();
            dialog.Run();
            dialog.Destroy();
        }
Ejemplo n.º 19
0
 private void EmitSnapshotSeries(Play play)
 {
     if (SnapshotSeriesEvent != null)
         SnapshotSeriesEvent (play);
 }
Ejemplo n.º 20
0
 private void EmitTagPlay(Play play)
 {
     if (TagPlayEvent != null)
         TagPlayEvent (play);
 }
Ejemplo n.º 21
0
 protected virtual void OnPlaySelected(Play play)
 {
     Log.Debug("Play selected: " + play);
     selectedTimeNode = play;
     player.SetStartStop(play.Start.MSeconds,play.Stop.MSeconds);
     drawingManager.Play=play;
     mainWindow.UpdateSelectedPlay(play);
 }
Ejemplo n.º 22
0
 protected virtual void OnTagPlay(Play play)
 {
     LaunchPlayTagger(play);
 }
Ejemplo n.º 23
0
        /// <summary>
        /// Adds a new play to a given category
        /// </summary>
        /// <param name="dataSection">
        /// A <see cref="System.Int32"/>: category index
        /// </param>
        /// <param name="start">
        /// A <see cref="Time"/>: start time of the play
        /// </param>
        /// <param name="stop">
        /// A <see cref="Time"/>: stop time of the play
        /// </param>
        /// <param name="thumbnail">
        /// A <see cref="Pixbuf"/>: snapshot of the play
        /// </param>
        /// <returns>
        /// A <see cref="MediaTimeNode"/>: created play
        /// </returns>
        public Play AddPlay(Category category, Time start, Time stop, Image miniature)
        {
            string count= String.Format("{0:000}", PlaysInCategory (category).Count + 1);
            string name = String.Format("{0} {1}",category.Name, count);

            var play = new Play {
                Name = name,
                Start = start,
                Stop = stop,
                Category = category,
                Notes = "",
                Miniature = miniature,
                Fps = Description.File.Fps,
            };
            timeline.Add(play);
            return play;
        }
Ejemplo n.º 24
0
 protected virtual void OnSnapshotSeries(Play play)
 {
     player.Pause();
     guiToolkit.ExportFrameSeries(openedProject, play, Config.SnapshotsDir());
 }
Ejemplo n.º 25
0
        public void AddPlay(Play play)
        {
            TreeIter categoryIter;

            if(project == null)
                return;

            var cat = play.Category;
            var model = (TreeStore)treeview.Model;
            model.GetIterFromString(out categoryIter, CategoryPath(cat));
            var playIter = model.AppendValues(categoryIter,play);
            var playPath = model.GetPath(playIter);
            treeview.Selection.UnselectAll();
            treeview.ExpandToPath(playPath);
            treeview.Selection.SelectIter(playIter);
        }
Ejemplo n.º 26
0
 private void LaunchPlayTagger(Play play)
 {
     guiToolkit.TagPlay(play, openedProject.LocalTeamTemplate, openedProject.VisitorTeamTemplate);
 }
Ejemplo n.º 27
0
 protected virtual void OnPlayListNodeAdded(Play play)
 {
     Add(new PlayListPlay {
         MediaFile = OpenedProject.Description.File,
         Drawings = play.Drawings,
         Start = play.Start,
         Stop = play.Stop,
         Name = play.Name,
         Rate = 1.0f,
     });
 }
Ejemplo n.º 28
0
 public void SetPlay(Play play,int stopTime)
 {
     this.play = play;
     this.stopTime = stopTime;
     savetoprojectbutton.Visible = true;
 }
Ejemplo n.º 29
0
 public void AddPlay(Play play)
 {
     timeline.Add(play);
 }