예제 #1
0
파일: Videotheque.cs 프로젝트: jokalee/Tuto
        public void SaveEditorModel(EditorModel model)
        {
            var container = new FileContainer {
                MontageModel = model.Montage, WindowState = model.WindowState
            };

            HeadedJsonFormat.Write(model.ModelFileLocation, container);
        }
예제 #2
0
파일: LocalIO.cs 프로젝트: IvanSorokin/Tuto
 public static void Save(EditorModel model)
 {
     var container = new FileContainer
     {
         MontageModel = model.Montage,
         WindowState = model.WindowState
     };
     HeadedJsonFormat.Write<FileContainer>(model.Locations.LocalFilePath, localFileHeader, CurrentLocalVersion, container);
 }
예제 #3
0
파일: Videotheque.cs 프로젝트: jokalee/Tuto
        EditorModel LoadExistingModel(FileContainer container, FileInfo file, DirectoryInfo rawLocation)
        {
            if (rawLocation != null)
            {
                container.MontageModel.DisplayedRawLocation = MyPath.RelativeTo(rawLocation.FullName, RawFolder.FullName);
            }
            else
            {
                container.MontageModel.DisplayedRawLocation = file.Name;
                rawLocation = new DirectoryInfo("Z:\\");
            }

            if (container.MontageModel.Patches == null)
            {
                container.MontageModel.Patches = new List <Patch>();
            }

            var model = new EditorModel(file, rawLocation, this, container.MontageModel, container.WindowState);

            SaveEditorModel(model);
            return(model);
        }