//TODO configure which ones you want to have in save queue public SaveQueue(string path, CoordinateMapper mapper, bool saveColor, bool saveDepth, bool saveIndex, bool saveTracked) { SaveColor = saveColor; SaveDepth = saveDepth; SaveIndex = saveIndex; SaveTracked = saveTracked; if (!String.IsNullOrEmpty(path)) { BasePath = path; } if (!Directory.Exists(BasePath)) { Directory.CreateDirectory(BasePath); } CurrentPath = Path.Combine(BasePath, DateTime.Now.ToString().Replace(':', '_').Replace('/', '_')); Directory.CreateDirectory(CurrentPath); if (SaveColor || SaveTracked) { if (SaveColor) { color = new ColorSaver(CurrentPath); } colorPool = new ArrayPool <byte>(Recorder.COLOR_SIZE, COLOR_POOL_SIZE); } if (SaveDepth || SaveTracked) { if (SaveDepth) { depth = new DepthSaver(CurrentPath); } depthPool = new ArrayPool <ushort>(Recorder.DEPTH_LENGTH, DEPTH_POOL_SIZE); } if (SaveIndex) { index = new IndexSaver(CurrentPath); indexPool = new ArrayPool <byte>(Recorder.INDEX_LENGTH, INDEX_POOL_SIZE); } if (SaveTracked) { tracked = new TrackedColorSaver(CurrentPath, mapper); } }
public BreakpointSave(Position position) { this.position = position; colorSaver = new ColorSaver(rtb => rtb.SelectionColor, (rtb, c) => rtb.SelectionColor = c, this.position); backColorSaver = new ColorSaver(rtb => rtb.SelectionBackColor, (rtb, c) => rtb.SelectionBackColor = c, this.position); }