Exemplo n.º 1
0
        public static Videotheque Load(string videothequeFileName, IVideothequeLoadingUI ui, bool ignoreExternalSoftware, string customProgramFolder = null)
        {
            ui = new LoadingUIDecorator(ui);
            Videotheque v = new Videotheque();

            if (customProgramFolder == null)
            {
                v.ProgramFolder = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).Directory;
            }
            else
            {
                v.ProgramFolder = new DirectoryInfo(customProgramFolder);
            }
            v.Locations = new VideothequeLocations(v);
            try
            {
                if (!ignoreExternalSoftware)
                {
                    v.LoadBuiltInSoftware(ui);
                    v.LoadExternalReferences(ui);
                    v.SaveStartupFile();
                }
                else
                {
                    v.StartupSettings = new VideothequeStartupSettings();
                }

                v.LoadVideotheque(videothequeFileName, ui);
                var fname = v.VideothequeSettingsFile.FullName;
                if (v.StartupSettings.LastLoadedProjects.Contains(fname))
                {
                    v.StartupSettings.LastLoadedProjects.Remove(fname);
                }
                v.StartupSettings.LastLoadedProjects.Insert(0, fname);
                v.SaveStartupFile();

                v.CheckSubdirectories(ui);
                v.Save();


                v.LoadBinaryHashes(ui);
                v.LoadContainers(ui);
                v.CreateModels(ui);
                v.CheckGUIDCorrectness(ui);


                ui.ExitSuccessfully();
                return(v);
            }
            catch (LoadingException)
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 public EditorModel(
     FileInfo model,
     DirectoryInfo raw,
     Videotheque videotheque,
     MontageModel montage,
     WindowState windowState)
 {
     Montage                 = montage;
     WindowState             = windowState;
     windowState.EditorModel = this;
     Videotheque             = videotheque;
     RawLocation             = raw;
     ModelFileLocation       = model;
     Locations               = new Locations(this);
     Statuses                = new Statuses(this);
 }
Exemplo n.º 3
0
 public AllProjectData(Videotheque global)
 {
     Global = global;
     Models = new List <EditorModel>();
 }
Exemplo n.º 4
0
 public void Save()
 {
     Videotheque.SaveEditorModel(this);
 }
Exemplo n.º 5
0
 public override FileInfo GetFileName(Videotheque v)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public override FileInfo GetFileName(Videotheque v)
 {
     return(new FileInfo(Path.Combine(v.PatchFolder.FullName, RelativeFileName)));
 }
Exemplo n.º 7
0
 public abstract FileInfo GetFileName(Videotheque v);
Exemplo n.º 8
0
 public VideothequeLocations(Videotheque videotheque)
 {
     this.videotheque = videotheque;
 }