public void OpenMaterialManager() { var surfacesStore = XmlSerializer <List <Surface> > .Deserialize(PluginInfoProvider.PathToSurfacesStore, Log) ?? new List <Surface>(); var materialsStore = XmlSerializer <List <Material> > .Deserialize(PluginInfoProvider.PathToMaterialsStore, Log) ?? new List <Material>(); var materialProvider = new MaterialProvider(materialsStore, surfacesStore); var dialogResult = materialProvider.ShowDialog(); if (dialogResult != DialogResult.OK) { return; } XmlSerializer <List <Material> > .Serialize(materialProvider.MaterialsStore, PluginInfoProvider.PathToMaterialsStore); XmlSerializer <List <Surface> > .Serialize(materialProvider.SurfacesStore, PluginInfoProvider.PathToSurfacesStore); }
public void MaterialProviderTest() { TestSetup(null); var materials = new List <Material>(); var surfaces = new List <Surface>(); materials.Add(material); materials.Add(material); materials.Add(material); materials.Add(material); surfaces.Add(surface); surfaces.Add(surface); surfaces.Add(surface); surfaces.Add(surface); var materialProvider = new MaterialProvider(materials, surfaces); materialProvider.ShowDialog(); }