コード例 #1
0
 protected void ResetGui()
 {
     //Unrealize all children
     foreach (Widget w in TimelineBox.AllChildren)
     {
         TimelineBox.Remove(w);
         w.Destroy();
     }
 }
コード例 #2
0
        public void SetProject(Project project, PlaysFilter filter)
        {
            ResetGui();

            if (project == null)
            {
                categories = null;
                tsList.Clear();
                loaded = false;
                return;
            }
            loaded     = true;
            categories = project.Categories;
            tsList.Clear();
            frames = project.Description.File.GetFrames();

            cs.Categories = categories;
            cs.Filter     = filter;
            cs.Show();

            tr.Frames    = frames;
            tr.FrameRate = project.Description.File.Fps;
            tr.Show();

            foreach (Category cat in  categories)
            {
                List <Play> playsList = project.PlaysInCategory(cat);
                TimeScale   ts        = new TimeScale(cat, playsList, frames, filter,
                                                      project.Description.File);
                tsList[cat]             = ts;
                ts.TimeNodeChanged     += HandleTimeNodeChanged;
                ts.TimeNodeSelected    += HandleTimeNodeSelected;
                ts.TimeNodeDeleted     += HandleTimeNodeDeleted;
                ts.NewMarkAtFrameEvent += HandleNewMark;
                ts.TagPlay             += HandleTagPlay;
                ts.RenderPlaylist      += HandleRenderPlaylist;
                ts.SnapshotSeries      += HandleSnapshotSeries;
                ts.PlayListNodeAdded   += HandlePlayListNodeAdded;
                TimelineBox.PackStart(ts, false, true, 0);
                ts.Show();
            }
            SetPixelRatio(3);
        }