public void SaveConfiguration(IObjectStorageWriter writer) { writer.WriteCollection("RecentImageDirectories", "Item", _cmbImagesDirectory.Items.Cast <string>() .Where(s => !s.Equals(SelectDirectoryTemplate, StringComparison.OrdinalIgnoreCase)) .Take(10), (sw, s) => sw.WriteAttribute("Value", s)); writer.WriteParameter("ImagesDirectory", _imageDirectory); var node = _trvImages.SelectedNode; if (node != null) { writer.WriteParameter("SelectedNode", node.FullPath); } var layout = writer.BeginChildObject("Layout"); layout.WriteParameter("X", Location.X); layout.WriteParameter("Y", Location.Y); layout.WriteParameter("Width", Size.Width); layout.WriteParameter("Height", Size.Height); layout.WriteParameter("ImageSpliter", _sptImage.SplitterDistance); layout.WriteParameter("TreeSpliter", _sptTree.SplitterDistance); layout.WriteParameter("ShowMode", _showMode); writer.EndChildObject(layout); }
public void Save(TestParameters parameters, IObjectStorageWriter writer) { writer.WriteParameter("TestParameter1", "Value", parameters.TestParameter1); }