Ejemplo n.º 1
0
        private void ConvertData()
        {
            /// memoinfo
            {
                var file = MemopadConstsV1.MemoInfosFilePath;
                var text = File.ReadAllText(file);
                _memoAccessor.InsertTextData("MemoInfo", text);
            }

            /// removed memoinfo
            {
                var file = MemopadConstsV1.RemovedMemoInfosFilePath;
                var text = File.ReadAllText(file);
                _memoAccessor.InsertTextData("RemovedMemoInfo", text);
            }

            /// removed embedded file
            {
                var file = MemopadConstsV1.RemovedEmbeddedFileIdsFilePath;
                var text = File.ReadAllText(file);
                _memoAccessor.InsertTextData("RemovedEmbeddedFileId", text);
            }


            /// memento
            var files = Directory.GetFiles(MemopadConstsV1.MementoRoot);

            foreach (var file in files)
            {
                var id    = Path.GetFileNameWithoutExtension(file);
                var bytes = File.ReadAllBytes(file);
                _memoAccessor.InsertMemento(id, bytes);
            }
        }