public MainForm(string partDirectory, IGraphicsPlus graphicsPlus, IStructureLoader loader, IStructureProvider structureProvider, IFileConverter smdConverter) { this.partDirectory = partDirectory; Directory.SetCurrentDirectory(partDirectory); this.graphicsPlus = graphicsPlus; this.loader = loader; this.structureProvider = structureProvider; this.smdConverter = smdConverter; ////string structure = loader.Load("c:\\scratch\\temp.str"); ////IDictionary<string, string> settings = new Dictionary<string, string>(); ////settings["configured_color"] = "Yellow"; ////IDictionary<string, string> structures = new Dictionary<string, string>(); ////structures["head_joint"] = loader.Load("c:\\scratch\\temphead.str"); ////worldRoot = structureProvider.Create(structure, settings, structures); InitializeComponent(); Application.Idle += Application_Idle; RefreshFileDirectory(); RefreshDictionaryView(structures, StructuresListBox); RefreshDictionaryView(settings, SettingsListBox); RefreshObjectTree(); }
public static void Register(Type type, IStructureLoader loader) { Loaders.Add(type, loader); }