public FormReconstruction(IPERunArgs args, SevenZipCompressor compressor, LogArchive logArchive) { InitializeComponent(); Args = args; Compressor = compressor; LogArchive = logArchive; }
public void Invoke() { var modelPathTmp = Model.FilePath; Connector.SavePMXFile(ModelTmpFilename); // コミット保存をした時点でModel.FilePathの値が書き換わるのでもとに戻す Model.FilePath = modelPathTmp; // 上書き保存 Connector.SavePMXFile(Model.FilePath); LogArchive.Append(Log, ModelTmpFilename); }
public Commit(IPXPmx model, IPEFormConnector connector, string message, ICompressor compressor, LogArchive logArchive) { Compressor = compressor; LogArchive = logArchive; Connector = connector; Model = model; DateTime now = DateTime.Now; Log = new CommitLog( now, message, (date, msg) => $"{date:yyyy-MM-dd-HH-mm-ss-ff}_{Regex.Replace(msg, @"[<>:\/\\|? *""]", "")}.pmx", CommitLog.ConvertFormatEnum(Compressor.ArchiveFormat), LogArchive.ArchivePath ); }