void LoadProject(LMProjectVM project)
        {
            gamedescriptionheader1.ViewModel = project;
            detailCtx.UpdateViewModel(project);

            foreach (VideoFileInfo vfi in videoFileInfos)
            {
                videofileinfo_vbox.Remove(vfi);
            }
            videoFileInfos.Clear();

            foreach (var mf in project.FileSet)
            {
                VideoFileInfo vfi = new VideoFileInfo();

                vfi.SetMediaFileSet(project.FileSet, mf);
                vfi.Changed += HandleChanged;

                vfi.ShowAll();

                videoFileInfos.Add(vfi);

                videofileinfo_vbox.PackStart(vfi, true, true, 0);
            }

            rbox.Visible = true;
        }
Ejemplo n.º 2
0
        void LoadProject(Project project)
        {
            ProjectDescription pd = project.Description;

            loadedProject = null;
            gamedescriptionheader1.ProjectDescription = pd;
            seasonentry.Text      = pd.Season;
            competitionentry.Text = pd.Competition;
            datepicker.Date       = pd.MatchDate;
            templatelabel.Text    = project.Dashboard.Name;
            desctextview.Buffer.Clear();
            desctextview.Buffer.InsertAtCursor(project.Description.Description ?? "");
            loadedProject = project;

            foreach (VideoFileInfo vfi in videoFileInfos)
            {
                videofileinfo_vbox.Remove(vfi);
            }
            videoFileInfos.Clear();

            resyncbutton.Sensitive = project.Description.FileSet.Count > 1;

            int max = project.Description.FileSet.Count;

            // Cap to one media file for non multi camera version
            if (!Config.SupportsMultiCamera)
            {
                max = Math.Min(max, 1);
            }

            for (int i = 0; i < max; i++)
            {
                MediaFile     mf  = project.Description.FileSet [i];
                VideoFileInfo vfi = new VideoFileInfo();

                vfi.SetMediaFileSet(project.Description.FileSet, mf);
                vfi.Changed += HandleChanged;

                vfi.ShowAll();

                videoFileInfos.Add(vfi);

                videofileinfo_vbox.PackStart(vfi, true, true, 0);
            }

            projectbox.Visible = true;
            edited             = false;
        }