protected virtual void OnSnapshotSeriesEvent(LongoMatch.Store.Play tNode) { if (SnapshotSeriesEvent != null) { SnapshotSeriesEvent(tNode); } }
protected virtual void OnTagPlay(LongoMatch.Store.Play tNode) { if (TagPlay != null) { TagPlay(tNode); } }
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); } } }
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; }
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; }
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; } }
private void EmitPlaySelected(Play play) { if (PlaySelectedEvent != null) PlaySelectedEvent(play); }
protected virtual void OnTimeNodeSelected(Play play) { rightvbox.Visible=true; if (PlaySelectedEvent != null) PlaySelectedEvent(play); }
public void UpdateSelectedPlay(Play play) { timeline.SelectedTimeNode = play; notes.Visible = true; notes.Play= play; }
public void AddPlay(Play play) { playsList.AddPlay(play); tagsList.AddPlay(play); timeline.AddPlay(play); /* FIXME: Check performance */ UpdateTeamsModels(); timeline.QueueDraw(); }
public void AddPlay(Play play) { timeline.Add(play); }
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); }
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(); }
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(); }
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(); }
private void EmitSnapshotSeries(Play play) { if (SnapshotSeriesEvent != null) SnapshotSeriesEvent (play); }
private void EmitTagPlay(Play play) { if (TagPlayEvent != null) TagPlayEvent (play); }
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); }
protected virtual void OnTagPlay(Play play) { LaunchPlayTagger(play); }
/// <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; }
protected virtual void OnSnapshotSeries(Play play) { player.Pause(); guiToolkit.ExportFrameSeries(openedProject, play, Config.SnapshotsDir()); }
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); }
private void LaunchPlayTagger(Play play) { guiToolkit.TagPlay(play, openedProject.LocalTeamTemplate, openedProject.VisitorTeamTemplate); }
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, }); }
public void SetPlay(Play play,int stopTime) { this.play = play; this.stopTime = stopTime; savetoprojectbutton.Visible = true; }