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); } }
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); }
public AllProjectData(Videotheque global) { Global = global; Models = new List <EditorModel>(); }
public void Save() { Videotheque.SaveEditorModel(this); }
public override FileInfo GetFileName(Videotheque v) { throw new NotImplementedException(); }
public override FileInfo GetFileName(Videotheque v) { return(new FileInfo(Path.Combine(v.PatchFolder.FullName, RelativeFileName))); }
public abstract FileInfo GetFileName(Videotheque v);
public VideothequeLocations(Videotheque videotheque) { this.videotheque = videotheque; }