diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/BookmarksManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/BookmarksManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/BookmarksManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/BookmarksManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Configuration.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Configuration.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Configuration.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Configuration.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/DocumentTypeSelector.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Controls/SolutionExplorer.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/AboutDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatAboutDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DataFormatOptionsDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/ExportOptionsDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/OptionsDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SelectEnvironmentDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/SessionDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/UnsavedDocumentsDialog.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/IconMethods.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/IconMethods.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/IconMethods.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/IconMethods.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/Application/DocumentsOptionPanel.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/OptionPanels/ApplicationOptionPanel.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Page.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EditorPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/EmbeddedEditorPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/ExplorerPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/FilePage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/GenericErrorPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/InvalidFormatPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/MultipleObjectModelPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/StartPage.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Pages/UnknownFormatPage.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Panel.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Perspective.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Perspective.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Perspective.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Perspective.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/PerspectiveManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/PerspectiveManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/PerspectiveManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/PerspectiveManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/AssemblyInfo.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/AssemblyInfo.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/AssemblyInfo.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/AssemblyInfo.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Resources.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.settings b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.settings similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.settings rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Properties/Settings.settings diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/RecentFileManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/RecentFileManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/RecentFileManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/RecentFileManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/mainicon.ico b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/mainicon.ico similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/mainicon.ico rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/mainicon.ico diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/ueproj-icon.ico b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/ueproj-icon.ico similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/ueproj-icon.ico rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/ueproj-icon.ico diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/uesln-icon.ico b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/uesln-icon.ico similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/uesln-icon.ico rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Resources/uesln-icon.ico diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SessionManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SessionManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SessionManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SessionManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SingleInstanceManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SingleInstanceManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SingleInstanceManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SingleInstanceManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.Designer.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.Designer.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.Designer.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.resx b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.resx similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.resx rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/SplashScreenWindow.resx diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/TemporaryFileManager.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/TemporaryFileManager.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/TemporaryFileManager.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/TemporaryFileManager.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj similarity index 94% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj index 570a8ff6..b14f9e01 100644 --- a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj @@ -17,7 +17,7 @@ true full false - ..\..\Output\Debug\ + ..\..\..\..\Output\Debug\ DEBUG;TRACE prompt 4 @@ -261,27 +261,27 @@ - + {617d9eb5-ca93-45d6-aa6b-5a012b7698ac} AwesomeControls - + {fe016ea3-dc31-4a92-8b0a-8c746ec117e1} Glue - + {2d4737e6-6d95-408a-90db-8dff38147e85} UniversalEditor.Core - + {bcbb72bd-0ecb-4ff2-8d91-e466361fb6f9} UniversalEditor.UserInterface.WindowsForms - + {8622ebc4-8e20-476e-b284-33d472081f5c} UniversalEditor.UserInterface - + {30467e5c-05bc-4856-aadc-13906ef4cadd} UniversalEditor.Essential diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UnsavedDocumentOption.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UnsavedDocumentOption.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UnsavedDocumentOption.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UnsavedDocumentOption.cs diff --git a/CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/WindowsFormsEngine.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/WindowsFormsEngine.cs similarity index 100% rename from CSharp/Environments/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/WindowsFormsEngine.cs rename to CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/WindowsFormsEngine.cs diff --git a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerAreas/BasicDesignerArea.cs b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerAreas/BasicDesignerArea.cs index 1167190e..acd26476 100644 --- a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerAreas/BasicDesignerArea.cs +++ b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerAreas/BasicDesignerArea.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.Multimedia.Picture.Collection; using UniversalEditor.ObjectModels.NWCSceneLayout; using UniversalEditor.DataFormats.Multimedia.Picture.NewWorldComputing.ICN; @@ -34,7 +34,7 @@ namespace UniversalEditor.Editors.NewWorldComputing.Scene.DesignerAreas ICNDataFormat icn = new ICNDataFormat(); PictureCollectionObjectModel picc = new PictureCollectionObjectModel(); - FileAccessor.Load(ICNFileName, picc, icn, true); + Document.Load(picc, icn, new FileAccessor(ICNFileName)); _bmpBackground = picc.Pictures[(int)mvarScene.BackgroundImageIndex].ToBitmap(); } if (_bmpBackground != null) diff --git a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerObjectClasses/NwcGenericControlClass.cs b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerObjectClasses/NwcGenericControlClass.cs index c2227662..1404e962 100644 --- a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerObjectClasses/NwcGenericControlClass.cs +++ b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/DesignerObjectClasses/NwcGenericControlClass.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.NWCSceneLayout; using UniversalEditor.ObjectModels.NWCSceneLayout.SceneObjects; @@ -13,170 +13,170 @@ using UniversalEditor.DataFormats.Multimedia.Picture.NewWorldComputing.ICN; namespace UniversalEditor.Editors.NewWorldComputing.Scene.DesignerObjectClasses { - public class NwcGenericControlClass : DesignerObjectClass - { - private static ICNDataFormat icn = new ICNDataFormat(); + public class NwcGenericControlClass : DesignerObjectClass + { + private static ICNDataFormat icn = new ICNDataFormat(); - protected override void RenderClientArea(DesignerObjectPaintEventArgs e) - { + protected override void RenderClientArea(DesignerObjectPaintEventArgs e) + { SceneObject obj = (SceneObject)e.Item.Properties["SceneObject"]; string ParentDirectory = String.Empty; if (e.Item.Properties.ContainsKey("ParentDirectory") && e.Item.Properties["ParentDirectory"] != null) ParentDirectory = e.Item.Properties["ParentDirectory"].ToString(); - if (obj is SceneObjectButton) - { - SceneObjectButton btn = (obj as SceneObjectButton); + if (obj is SceneObjectButton) + { + SceneObjectButton btn = (obj as SceneObjectButton); - System.Drawing.Bitmap _bmp = null; - if (e.Item.Properties.ContainsKey("Bitmap")) - { - _bmp = (e.Item.Properties["Bitmap"] as System.Drawing.Bitmap); - } - if (_bmp == null) - { - string imageFileName = btn.BackgroundImageFileName; - if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; + System.Drawing.Bitmap _bmp = null; + if (e.Item.Properties.ContainsKey("Bitmap")) + { + _bmp = (e.Item.Properties["Bitmap"] as System.Drawing.Bitmap); + } + if (_bmp == null) + { + string imageFileName = btn.BackgroundImageFileName; + if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; - if (!System.IO.File.Exists(imageFileName)) - { - e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); - return; - } + if (!System.IO.File.Exists(imageFileName)) + { + e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); + return; + } - PictureCollectionObjectModel picc = new PictureCollectionObjectModel(); - FileAccessor.Load(imageFileName, picc, icn, true); - _bmp = picc.Pictures[(int)btn.BackgroundImageIndex].ToBitmap(); - e.Item.Properties["Bitmap"] = _bmp; - } - e.Graphics.DrawImage(_bmp, e.Item.Bounds); - } - else if (obj is SceneObjectImage) - { - SceneObjectImage btn = (obj as SceneObjectImage); + PictureCollectionObjectModel picc = new PictureCollectionObjectModel(); + Document.Load(picc, icn, new FileAccessor(imageFileName)); + _bmp = picc.Pictures[(int)btn.BackgroundImageIndex].ToBitmap(); + e.Item.Properties["Bitmap"] = _bmp; + } + e.Graphics.DrawImage(_bmp, e.Item.Bounds); + } + else if (obj is SceneObjectImage) + { + SceneObjectImage btn = (obj as SceneObjectImage); - System.Drawing.Bitmap _bmp = null; - if (e.Item.Properties.ContainsKey("Bitmap")) - { - _bmp = (e.Item.Properties["Bitmap"] as System.Drawing.Bitmap); - } - if (_bmp == null) - { - string imageFileName = btn.BackgroundImageFileName; - if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; + System.Drawing.Bitmap _bmp = null; + if (e.Item.Properties.ContainsKey("Bitmap")) + { + _bmp = (e.Item.Properties["Bitmap"] as System.Drawing.Bitmap); + } + if (_bmp == null) + { + string imageFileName = btn.BackgroundImageFileName; + if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; - if (!System.IO.File.Exists(imageFileName)) - { - e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); - return; - } + if (!System.IO.File.Exists(imageFileName)) + { + e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); + return; + } - PictureCollectionObjectModel picc = new PictureCollectionObjectModel(); - FileAccessor.Load(imageFileName, picc, icn, true); - _bmp = picc.Pictures[(int)btn.BackgroundImageIndex].ToBitmap(); - e.Item.Properties["Bitmap"] = _bmp; - } - e.Graphics.DrawImageUnscaled(_bmp, e.Item.Bounds); - } - else if (obj is SceneObjectLabel) - { - SceneObjectLabel lbl = (obj as SceneObjectLabel); + PictureCollectionObjectModel picc = new PictureCollectionObjectModel(); + Document.Load(picc, icn, new FileAccessor(imageFileName)); + _bmp = picc.Pictures[(int)btn.BackgroundImageIndex].ToBitmap(); + e.Item.Properties["Bitmap"] = _bmp; + } + e.Graphics.DrawImageUnscaled(_bmp, e.Item.Bounds); + } + else if (obj is SceneObjectLabel) + { + SceneObjectLabel lbl = (obj as SceneObjectLabel); - PictureCollectionObjectModel piccFont = null; - if (e.Item.Properties.ContainsKey("Font")) - { - piccFont = (e.Item.Properties["Font"] as PictureCollectionObjectModel); - } - if (piccFont == null) - { - string imageFileName = lbl.FontFileName; - if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; - - UniversalEditor.ObjectModels.NewWorldComputing.Font.FontObjectModel font = new ObjectModels.NewWorldComputing.Font.FontObjectModel(); - UniversalEditor.DataFormats.NewWorldComputing.FNT.FNTDataFormat fnt = new DataFormats.NewWorldComputing.FNT.FNTDataFormat(); + PictureCollectionObjectModel piccFont = null; + if (e.Item.Properties.ContainsKey("Font")) + { + piccFont = (e.Item.Properties["Font"] as PictureCollectionObjectModel); + } + if (piccFont == null) + { + string imageFileName = lbl.FontFileName; + if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; + + UniversalEditor.ObjectModels.NewWorldComputing.Font.FontObjectModel font = new ObjectModels.NewWorldComputing.Font.FontObjectModel(); + UniversalEditor.DataFormats.NewWorldComputing.FNT.FNTDataFormat fnt = new DataFormats.NewWorldComputing.FNT.FNTDataFormat(); try { - FileAccessor.Load(imageFileName, font, fnt, true); + Document.Load(font, fnt, new FileAccessor(imageFileName)); } catch (System.IO.FileNotFoundException ex) { } - imageFileName = font.GlyphCollectionFileName; + imageFileName = font.GlyphCollectionFileName; - if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; + if (!String.IsNullOrEmpty(ParentDirectory)) imageFileName = ParentDirectory + "\\" + imageFileName; - if (!System.IO.File.Exists(imageFileName)) - { - e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); + if (!System.IO.File.Exists(imageFileName)) + { + e.Graphics.DrawRectangle(System.Drawing.Pens.Blue, e.Item.Bounds); e.Graphics.DrawString(lbl.Text, System.Windows.Forms.SystemInformation.MenuFont, System.Drawing.Brushes.Black, new System.Drawing.Rectangle(lbl.Left, lbl.Top, lbl.Width, lbl.Height)); - return; - } + return; + } - piccFont = new PictureCollectionObjectModel(); - FileAccessor.Load(imageFileName, piccFont, icn, true); - e.Item.Properties["Font"] = piccFont; - } - - System.Drawing.Bitmap bitmap = RenderFontICN(lbl.Text, piccFont, e.Item.Bounds); - if (bitmap != null) e.Graphics.DrawImage(bitmap, e.Item.Bounds); + piccFont = new PictureCollectionObjectModel(); + Document.Load(piccFont, icn, new FileAccessor(imageFileName)); + e.Item.Properties["Font"] = piccFont; + } + + System.Drawing.Bitmap bitmap = RenderFontICN(lbl.Text, piccFont, e.Item.Bounds); + if (bitmap != null) e.Graphics.DrawImage(bitmap, e.Item.Bounds); - // e.Graphics.DrawRectangle(System.Drawing.Pens.Black, e.Item.Bounds); - // e.Graphics.DrawString(lbl.Text, System.Drawing.SystemFonts.MenuFont, System.Drawing.Brushes.Black, e.Item.Bounds); - } + // e.Graphics.DrawRectangle(System.Drawing.Pens.Black, e.Item.Bounds); + // e.Graphics.DrawString(lbl.Text, System.Drawing.SystemFonts.MenuFont, System.Drawing.Brushes.Black, e.Item.Bounds); + } - // e.Graphics.FillRectangle(System.Drawing.Brushes.Red, e.Item.Bounds); - } + // e.Graphics.FillRectangle(System.Drawing.Brushes.Red, e.Item.Bounds); + } - private Dictionary icnsdata = null; - private System.Drawing.Bitmap RenderFontICN(string p, PictureCollectionObjectModel piccFont, System.Drawing.Rectangle rectangle) - { - if (icnsdata == null) - { - char[] icns = new char[] { '\'', '!', '"', '*', '$', '%', '&', '<', '(', ')', '*', '+', '`', '-', '\'', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '.', '=', '.', '?', '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '.', ']', '.', '_', ',', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; - icnsdata = new Dictionary(); - for (int i = 0; i < icns.Length; i++) - { - if (icnsdata.ContainsKey(icns[i])) continue; - icnsdata.Add(icns[i], i); - } - } + private Dictionary icnsdata = null; + private System.Drawing.Bitmap RenderFontICN(string p, PictureCollectionObjectModel piccFont, System.Drawing.Rectangle rectangle) + { + if (icnsdata == null) + { + char[] icns = new char[] { '\'', '!', '"', '*', '$', '%', '&', '<', '(', ')', '*', '+', '`', '-', '\'', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '.', '=', '.', '?', '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '.', ']', '.', '_', ',', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; + icnsdata = new Dictionary(); + for (int i = 0; i < icns.Length; i++) + { + if (icnsdata.ContainsKey(icns[i])) continue; + icnsdata.Add(icns[i], i); + } + } - if (rectangle.Width <= 0 || rectangle.Height <= 0) return null; + if (rectangle.Width <= 0 || rectangle.Height <= 0) return null; - System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(rectangle.Width, rectangle.Height); - System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap); + System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(rectangle.Width, rectangle.Height); + System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap); - int maxpich = piccFont.MaximumPictureHeight; + int maxpich = piccFont.MaximumPictureHeight; - int x = 0, y = 0; - for (int i = 0; i < p.Length; i++) - { - if (p[i] == ' ') - { - x += 8; - continue; - } + int x = 0, y = 0; + for (int i = 0; i < p.Length; i++) + { + if (p[i] == ' ') + { + x += 8; + continue; + } - if (!icnsdata.ContainsKey(p[i])) - { - x += 8; - continue; - } + if (!icnsdata.ContainsKey(p[i])) + { + x += 8; + continue; + } - int index = icnsdata[p[i]]; + int index = icnsdata[p[i]]; - System.Drawing.Bitmap bmp = piccFont.Pictures[index].ToBitmap(); - int diff = maxpich - bmp.Height; + System.Drawing.Bitmap bmp = piccFont.Pictures[index].ToBitmap(); + int diff = maxpich - bmp.Height; - graphics.DrawImage(bmp, x, y + diff); - x += bmp.Width; - } - return bitmap; - } + graphics.DrawImage(bmp, x, y + diff); + x += bmp.Width; + } + return bitmap; + } - protected override void RenderNonClientArea(DesignerObjectPaintEventArgs e) - { - } - } + protected override void RenderNonClientArea(DesignerObjectPaintEventArgs e) + { + } + } } diff --git a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/SceneEditor.cs b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/SceneEditor.cs index e0a6ba19..814d54a1 100644 --- a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/SceneEditor.cs +++ b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/Editors/NewWorldComputing/Scene/SceneEditor.cs @@ -13,7 +13,7 @@ using UniversalEditor.ObjectModels.NWCSceneLayout; using AwesomeControls.Designer; using UniversalEditor.Editors.NewWorldComputing.Scene.DesignerObjectClasses; using UniversalEditor.ObjectModels.Multimedia.Picture.Collection; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.DataFormats.Multimedia.Picture.NewWorldComputing.ICN; using UniversalEditor.ObjectModels.NWCSceneLayout.SceneObjects; diff --git a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms.csproj b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms.csproj index 892dfcad..79577f7b 100644 --- a/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms.csproj +++ b/CSharp/Environments/WindowsForms/Plugins/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms/UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms.csproj @@ -16,7 +16,7 @@ true full false - ..\..\Output\Debug\Plugins\ + ..\..\..\..\Output\Debug\Plugins\ DEBUG;TRACE prompt 4 @@ -67,14 +67,18 @@ {617d9eb5-ca93-45d6-aa6b-5a012b7698ac} AwesomeControls - - {a92d520b-ffa3-4464-8cf6-474d18959e03} + + {2d4737e6-6d95-408a-90db-8dff38147e85} UniversalEditor.Core {8622ebc4-8e20-476e-b284-33d472081f5c} UniversalEditor.UserInterface + + {30467e5c-05bc-4856-aadc-13906ef4cadd} + UniversalEditor.Essential + {369cfd53-3e65-4a9e-8bdd-4ccd78bf3e33} UniversalEditor.Plugins.Multimedia.Binders.GdiPlus diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/AGG/AGGDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/AGG/AGGDataFormat.cs index 33cd6ef7..72e98014 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/AGG/AGGDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/AGG/AGGDataFormat.cs @@ -7,14 +7,14 @@ using UniversalEditor.ObjectModels.FileSystem; namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.AGG { public class AGGDataFormat : DataFormat - { - private struct AGGFileEntry - { - public uint hash; - public uint offset; - public uint size; - public string name; - } + { + private struct AGGFileEntry + { + public uint hash; + public uint offset; + public uint size; + public string name; + } private static DataFormatReference _dfr = null; public override DataFormatReference MakeReference() @@ -30,85 +30,85 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.AGG protected override void LoadInternal(ref ObjectModel objectModel) { - FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); - if (fsom == null) return; + FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); + if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; - ushort fileCount = br.ReadUInt16(); + IO.Reader br = base.Accessor.Reader; + ushort fileCount = br.ReadUInt16(); - AGGFileEntry[] files = new AGGFileEntry[fileCount]; - for (ushort i = 0; i < fileCount; i++) - { - files[i].hash = br.ReadUInt32(); - files[i].offset = br.ReadUInt32(); - files[i].size = br.ReadUInt32(); - } - br.BaseStream.Seek(-(fileCount * 15), System.IO.SeekOrigin.End); - for (ushort i = 0; i < fileCount; i++) - { - files[i].name = br.ReadFixedLengthString(15); - files[i].name = files[i].name.TrimNull(); + AGGFileEntry[] files = new AGGFileEntry[fileCount]; + for (ushort i = 0; i < fileCount; i++) + { + files[i].hash = br.ReadUInt32(); + files[i].offset = br.ReadUInt32(); + files[i].size = br.ReadUInt32(); + } + br.Accessor.Seek(-(fileCount * 15), IO.SeekOrigin.End); + for (ushort i = 0; i < fileCount; i++) + { + files[i].name = br.ReadFixedLengthString(15); + files[i].name = files[i].name.TrimNull(); - File file = new File(); - file.Name = files[i].name; - file.Size = files[i].size; - file.Properties.Add("InternalData", files[i]); - file.Properties.Add("BinaryReader", br); - file.DataRequest += file_DataRequest; - fsom.Files.Add(file); - } + File file = new File(); + file.Name = files[i].name; + file.Size = files[i].size; + file.Properties.Add("InternalData", files[i]); + file.Properties.Add("BinaryReader", br); + file.DataRequest += file_DataRequest; + fsom.Files.Add(file); + } - // 43341516 + // 43341516 } - void file_DataRequest(object sender, DataRequestEventArgs e) - { - File file = (sender as File); + void file_DataRequest(object sender, DataRequestEventArgs e) + { + File file = (sender as File); - AGGFileEntry entry = (AGGFileEntry)file.Properties["InternalData"]; - IO.BinaryReader br = (IO.BinaryReader)file.Properties["BinaryReader"]; + AGGFileEntry entry = (AGGFileEntry)file.Properties["InternalData"]; + IO.Reader br = (IO.Reader)file.Properties["BinaryReader"]; - br.BaseStream.Seek(entry.offset, System.IO.SeekOrigin.Begin); - e.Data = br.ReadBytes(entry.size); + br.Accessor.Seek(entry.offset, IO.SeekOrigin.Begin); + e.Data = br.ReadBytes(entry.size); - // UniversalEditor.Common.Hashing.CRC32.Initialize(UniversalEditor.Common.Hashing.CRC32.Keys.ReversedReciprocal); + // UniversalEditor.Common.Hashing.CRC32.Initialize(UniversalEditor.Common.Hashing.CRC32.Keys.ReversedReciprocal); UniversalEditor.Checksum.Modules.CRC32.CRC32ChecksumModule cksm = new UniversalEditor.Checksum.Modules.CRC32.CRC32ChecksumModule(); - uint hash = (uint)cksm.Calculate(e.Data); + uint hash = (uint)cksm.Calculate(e.Data); - } + } - protected override void SaveInternal(ObjectModel objectModel) - { - FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); - if (fsom == null) return; + protected override void SaveInternal(ObjectModel objectModel) + { + FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); + if (fsom == null) return; - IO.BinaryWriter bw = base.Stream.BinaryWriter; - ushort fileCount = (ushort)fsom.Files.Count; - bw.Write(fileCount); + IO.Writer bw = base.Accessor.Writer; + ushort fileCount = (ushort)fsom.Files.Count; + bw.WriteUInt16(fileCount); - uint offset = (uint)(bw.BaseStream.Position + (12 * fsom.Files.Count)); - foreach (File file in fsom.Files) - { - uint hash = 0; - uint size = (uint)file.Size; + uint offset = (uint)(bw.Accessor.Position + (12 * fsom.Files.Count)); + foreach (File file in fsom.Files) + { + uint hash = 0; + uint size = (uint)file.Size; - bw.Write(hash); - bw.Write(offset); - bw.Write(size); + bw.WriteUInt32(hash); + bw.WriteUInt32(offset); + bw.WriteUInt32(size); - offset += size; - } + offset += size; + } - for (ushort i = 0; i < fileCount; i++) - { - bw.Write(fsom.Files[i].GetDataAsByteArray()); - } + for (ushort i = 0; i < fileCount; i++) + { + bw.WriteBytes(fsom.Files[i].GetDataAsByteArray()); + } - foreach (File file in fsom.Files) - { - bw.WriteFixedLengthString(file.Name, 15); - } + foreach (File file in fsom.Files) + { + bw.WriteFixedLengthString(file.Name, 15); + } } } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3SNDDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3SNDDataFormat.cs index c3293baf..b4ac5448 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3SNDDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3SNDDataFormat.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.FileSystem; namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing @@ -25,7 +25,7 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; uint fileCount = br.ReadUInt32(); for (uint i = 0; i < fileCount; i++) { @@ -56,9 +56,9 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing FileName = (Accessor as FileAccessor).FileName; } - IO.BinaryReader br = new IO.BinaryReader(System.IO.File.Open(FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)); + IO.Reader br = new IO.Reader(new FileAccessor(FileName)); File send = (sender as File); - br.BaseStream.Position = offsets[send]; + br.Accessor.Position = offsets[send]; e.Data = br.ReadBytes(lengths[send]); br.Close(); } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3VIDDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3VIDDataFormat.cs index 1c1271ce..69751ea9 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3VIDDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/Heroes3VIDDataFormat.cs @@ -2,72 +2,86 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.FileSystem; namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing { - public class Heroes3VIDDataFormat : DataFormat - { - private static DataFormatReference _dfr = null; - public override DataFormatReference MakeReference() - { - if (_dfr == null) - { - _dfr = base.MakeReference(); - _dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All); - _dfr.Filters.Add("Heroes of Might and Magic VID archive", new string[] { "*.vid" }); - } - return _dfr; - } - protected override void LoadInternal(ref ObjectModel objectModel) - { - FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); - if (fsom == null) return; + public class Heroes3VIDDataFormat : DataFormat + { + private static DataFormatReference _dfr = null; + public override DataFormatReference MakeReference() + { + if (_dfr == null) + { + _dfr = base.MakeReference(); + _dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All); + _dfr.Filters.Add("Heroes of Might and Magic VID archive", new string[] { "*.vid" }); + } + return _dfr; + } + protected override void LoadInternal(ref ObjectModel objectModel) + { + FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); + if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; - uint fileCount = br.ReadUInt32(); - uint offset = 0; - for (uint i = 0; i < fileCount; i++) - { - File file = new File(); - file.Name = br.ReadNullTerminatedString(40); + IO.Reader br = base.Accessor.Reader; + uint fileCount = br.ReadUInt32(); + uint offset = 0; + for (uint i = 0; i < fileCount; i++) + { + File file = new File(); + file.Name = br.ReadNullTerminatedString(40); - uint length = br.ReadUInt32(); + uint length = br.ReadUInt32(); - offsets.Add(file, offset); - lengths.Add(file, length); + offsets.Add(file, offset); + lengths.Add(file, length); - file.DataRequest += new DataRequestEventHandler(file_DataRequest); - file.Size = length; - fsom.Files.Add(file); + file.DataRequest += new DataRequestEventHandler(file_DataRequest); + file.Size = length; + fsom.Files.Add(file); - offset += length; - } - } + offset += length; + } + } - #region Data Request - private Dictionary offsets = new Dictionary(); - private Dictionary lengths = new Dictionary(); - private void file_DataRequest(object sender, DataRequestEventArgs e) - { - string FileName = String.Empty; - if (Accessor is FileAccessor) - { - FileName = (Accessor as FileAccessor).FileName; - } - - IO.BinaryReader br = new IO.BinaryReader(System.IO.File.Open(FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)); - File send = (sender as File); - br.BaseStream.Position = offsets[send]; - e.Data = br.ReadBytes(lengths[send]); - br.Close(); - } - #endregion + protected override void SaveInternal(ObjectModel objectModel) + { + FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); + if (fsom == null) return; - protected override void SaveInternal(ObjectModel objectModel) - { - throw new NotImplementedException(); - } - } + IO.Writer bw = base.Accessor.Writer; + File[] files = fsom.GetAllFiles(); + bw.WriteUInt32((uint)files.Length); + foreach (File file in files) + { + bw.WriteNullTerminatedString(file.Name, 40); + bw.WriteUInt32((uint)file.Size); + } + foreach (File file in files) + { + bw.WriteBytes(file.GetDataAsByteArray()); + } + } + + #region Data Request + private Dictionary offsets = new Dictionary(); + private Dictionary lengths = new Dictionary(); + private void file_DataRequest(object sender, DataRequestEventArgs e) + { + string FileName = String.Empty; + if (Accessor is FileAccessor) + { + FileName = (Accessor as FileAccessor).FileName; + } + + IO.Reader br = new IO.Reader(new FileAccessor(FileName)); + File send = (sender as File); + br.Accessor.Position = offsets[send]; + e.Data = br.ReadBytes(lengths[send]); + br.Close(); + } + #endregion + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Heroes3LODDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Heroes3LODDataFormat.cs index 7ad313e7..c0085a4b 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Heroes3LODDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Heroes3LODDataFormat.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using UniversalEditor.Accessors.File; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.FileSystem; namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD @@ -25,7 +25,7 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; string magic = br.ReadFixedLengthString(4); // LOD\0 if (magic != "LOD\0") throw new InvalidDataFormatException("File does not begin with LOD\\0"); @@ -65,12 +65,12 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD FileName = (Accessor as FileAccessor).FileName; } - IO.BinaryReader br = new IO.BinaryReader(System.IO.File.Open(FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)); + IO.Reader br = new IO.Reader(new FileAccessor(FileName)); File send = (sender as File); - br.BaseStream.Position = offsets[send]; + br.Accessor.Position = offsets[send]; byte[] compressedData = br.ReadBytes(lengths[send]); - byte[] uncompressedData = Compression.CompressionStream.Decompress(Compression.CompressionMethod.Zlib, compressedData); + byte[] uncompressedData = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Zlib).Decompress(compressedData); e.Data = uncompressedData; br.Close(); } @@ -81,33 +81,33 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); if (fsom == null) return; - IO.BinaryWriter bw = base.Stream.BinaryWriter; + IO.Writer bw = base.Accessor.Writer; bw.WriteFixedLengthString("LOD\0"); - bw.Write((uint)0); - bw.Write((uint)fsom.Files.Count); + bw.WriteUInt32((uint)0); + bw.WriteUInt32((uint)fsom.Files.Count); - bw.Write(new byte[80]); + bw.WriteBytes(new byte[80]); - uint offset = (uint)(bw.BaseStream.Position + (32 * fsom.Files.Count)); + uint offset = (uint)(bw.Accessor.Position + (32 * fsom.Files.Count)); List CompressedDatas = new List(); foreach (File file in fsom.Files) { bw.WriteFixedLengthString(file.Name, 16); - bw.Write(offset); + bw.WriteUInt32(offset); - bw.Write((uint)0); - bw.Write((uint)0); + bw.WriteUInt32((uint)0); + bw.WriteUInt32((uint)0); - byte[] compressedData = Compression.CompressionStream.Compress(Compression.CompressionMethod.Zlib, file.GetDataAsByteArray()); - bw.Write((uint)compressedData.Length); + byte[] compressedData = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Zlib).Compress(file.GetDataAsByteArray()); + bw.WriteUInt32((uint)compressedData.Length); CompressedDatas.Add(compressedData); } foreach (byte[] compressedData in CompressedDatas) { - bw.Write(compressedData); + bw.WriteBytes(compressedData); } bw.Flush(); } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Magic6LODDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Magic6LODDataFormat.cs index 371cdec0..87fb0ea6 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Magic6LODDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/FileSystem/NewWorldComputing/LOD/Magic6LODDataFormat.cs @@ -17,7 +17,7 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; string magic = br.ReadFixedLengthString(4); // LOD\0 if (magic != "LOD\0") throw new InvalidDataFormatException("File does not begin with \"LOD\\0\""); @@ -30,7 +30,7 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD uint unknown2 = br.ReadUInt32(); uint fileCount = br.ReadUInt32(); - br.BaseStream.Position = dirstart; + br.Accessor.Position = dirstart; for (uint i = 0; i < fileCount; i++) { File f = new File(); @@ -53,9 +53,9 @@ namespace UniversalEditor.DataFormats.FileSystem.NewWorldComputing.LOD private Dictionary lengths = new Dictionary(); private void f_DataRequest(object sender, DataRequestEventArgs e) { - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; File send = (sender as File); - br.BaseStream.Position = offsets[send]; + br.Accessor.Position = offsets[send]; e.Data = br.ReadBytes(lengths[send]); } #endregion diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Audio/NewWorldComputing/Eight2MDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Audio/NewWorldComputing/Eight2MDataFormat.cs index 4731af3f..1620638a 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Audio/NewWorldComputing/Eight2MDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Audio/NewWorldComputing/Eight2MDataFormat.cs @@ -28,7 +28,7 @@ namespace UniversalEditor.DataFormats.Multimedia.Audio.NewWorldComputing protected override void LoadInternal(ref ObjectModel objectModel) { WaveformAudioObjectModel wave = (objectModel as WaveformAudioObjectModel); - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; wave.Header.BitsPerSample = 8; wave.Header.ChannelCount = 1; diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Palette/NewWorldComputing/KBPaletteDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Palette/NewWorldComputing/KBPaletteDataFormat.cs index 11995d2e..ae0e8c41 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Palette/NewWorldComputing/KBPaletteDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Palette/NewWorldComputing/KBPaletteDataFormat.cs @@ -25,8 +25,8 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.NewWorldComputing PaletteObjectModel palette = (objectModel as PaletteObjectModel); if (palette == null) throw new ObjectModelNotSupportedException(); - IO.BinaryReader br = base.Stream.BinaryReader; - if (br.BaseStream.Length != 768) throw new InvalidDataFormatException("Expected a 768-byte palette"); + IO.Reader br = base.Accessor.Reader; + if (br.Accessor.Length != 768) throw new InvalidDataFormatException("Expected a 768-byte palette"); for (int i = 0; i < (768 / 3); i++) { @@ -38,7 +38,7 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.NewWorldComputing g <<= 2; b <<= 2; - Color color = Color.FromArgb(r, g, b); + Color color = Color.FromRGBA(r, g, b); palette.Entries.Add(color); } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/BMP/BMPDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/BMP/BMPDataFormat.cs index ae93a38d..e5e00b6b 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/BMP/BMPDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/BMP/BMPDataFormat.cs @@ -25,8 +25,8 @@ namespace UniversalEditor.DataFormats.Multimedia.Picture.NewWorldComputing.BMP PictureObjectModel pic = (objectModel as PictureObjectModel); if (pic == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; - br.BaseStream.Position = 0; + IO.Reader br = base.Accessor.Reader; + br.Accessor.Position = 0; ushort unknown = br.ReadUInt16(); ushort width = br.ReadUInt16(); diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/ICN/ICNDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/ICN/ICNDataFormat.cs index 285952e0..3efcffec 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/ICN/ICNDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/Multimedia/Picture/NewWorldComputing/ICN/ICNDataFormat.cs @@ -7,194 +7,194 @@ using UniversalEditor.ObjectModels.Multimedia.Picture.Collection; namespace UniversalEditor.DataFormats.Multimedia.Picture.NewWorldComputing.ICN { - public class ICNDataFormat : DataFormat - { - private struct SpriteHeader - { - public short offsetX; - public short offsetY; - public ushort width; - public ushort height; - public byte type; - public uint dataOffset; - } + public class ICNDataFormat : DataFormat + { + private struct SpriteHeader + { + public short offsetX; + public short offsetY; + public ushort width; + public ushort height; + public byte type; + public uint dataOffset; + } - private static DataFormatReference _dfr = null; - public override DataFormatReference MakeReference() - { - if (_dfr == null) - { - _dfr = base.MakeReference(); - _dfr.Capabilities.Add(typeof(PictureCollectionObjectModel), DataFormatCapabilities.All); - _dfr.Capabilities.Add(typeof(PictureObjectModel), DataFormatCapabilities.All); - _dfr.Filters.Add("Heroes of Might and Magic II ICN picture", new string[] { "*.icn" }); - } - return _dfr; - } + private static DataFormatReference _dfr = null; + public override DataFormatReference MakeReference() + { + if (_dfr == null) + { + _dfr = base.MakeReference(); + _dfr.Capabilities.Add(typeof(PictureCollectionObjectModel), DataFormatCapabilities.All); + _dfr.Capabilities.Add(typeof(PictureObjectModel), DataFormatCapabilities.All); + _dfr.Filters.Add("Heroes of Might and Magic II ICN picture", new string[] { "*.icn" }); + } + return _dfr; + } - private Color shadowColor = Color.FromArgb(0x40, 0, 0, 0); - private Color opaqueColor = Color.FromArgb(0xFF, 0, 0, 0); // non-transparent mask + private Color shadowColor = Color.FromRGBA(0, 0, 0, 0x40); + private Color opaqueColor = Color.FromRGBA(0, 0, 0, 0xFF); // non-transparent mask - private Color GetColorIndex(byte index) - { - int depth = 9; - if (depth == 8) return Color.Empty; + private Color GetColorIndex(byte index) + { + int depth = 9; + if (depth == 8) return Color.Empty; - // index *= 3; - return HoMM2Palette.ColorTable[index]; - } - - private void SpriteDrawICN(ref PictureObjectModel pic, SpriteHeader head, ref byte[] data, bool debug) - { - if (data == null || data.Length == 0) return; - - byte c = 0; - ushort x = 0, y = 0; + // index *= 3; + return HoMM2Palette.ColorTable[index]; + } + + private void SpriteDrawICN(ref PictureObjectModel pic, SpriteHeader head, ref byte[] data, bool debug) + { + if (data == null || data.Length == 0) return; + + byte c = 0; + ushort x = 0, y = 0; - int cur = 0; - while (cur < data.Length) - { - if (data[cur] == 0) - { - // 0x00 - end line - ++y; - x = 0; - ++cur; - } - else if (data[cur] < 0x80) - { - // 0x7F - count data - c = data[cur]; - ++cur; - while((c-- != 0) && (cur < data.Length)) - { - pic.SetPixel(GetColorIndex(data[cur]), x, y); - ++x; - ++cur; - } - } - else if (data[cur] == 0x80) - { - // 0x80 - end data - break; - } - else if (data[cur] < 0xC0) - { - // 0xBF - skip data - x += (ushort)(data[cur] - 0x80); - ++cur; - } - else if (data[cur] == 0xC0) - { - // 0xC0 - shadow - ++cur; - c = (byte)((data[cur] % 4 != 0) ? (data[cur] % 4) : data[++cur]); - while((c-- != 0)) - { - pic.SetPixel(shadowColor, x, y); - ++x; - } - ++cur; - } - else if (data[cur] == 0xC1) - { - // 0xC1 - ++cur; - c = data[cur]; - ++cur; - while (c-- != 0) - { - pic.SetPixel(GetColorIndex(data[cur]), x, y); - ++x; - } - ++cur; - } - else - { - c = (byte)(data[cur] - 0xC0); - ++cur; - while (c-- != 0) - { - pic.SetPixel(GetColorIndex(data[cur]), x, y); - ++x; - } - ++cur; - } + int cur = 0; + while (cur < data.Length) + { + if (data[cur] == 0) + { + // 0x00 - end line + ++y; + x = 0; + ++cur; + } + else if (data[cur] < 0x80) + { + // 0x7F - count data + c = data[cur]; + ++cur; + while((c-- != 0) && (cur < data.Length)) + { + pic.SetPixel(GetColorIndex(data[cur]), x, y); + ++x; + ++cur; + } + } + else if (data[cur] == 0x80) + { + // 0x80 - end data + break; + } + else if (data[cur] < 0xC0) + { + // 0xBF - skip data + x += (ushort)(data[cur] - 0x80); + ++cur; + } + else if (data[cur] == 0xC0) + { + // 0xC0 - shadow + ++cur; + c = (byte)((data[cur] % 4 != 0) ? (data[cur] % 4) : data[++cur]); + while((c-- != 0)) + { + pic.SetPixel(shadowColor, x, y); + ++x; + } + ++cur; + } + else if (data[cur] == 0xC1) + { + // 0xC1 + ++cur; + c = data[cur]; + ++cur; + while (c-- != 0) + { + pic.SetPixel(GetColorIndex(data[cur]), x, y); + ++x; + } + ++cur; + } + else + { + c = (byte)(data[cur] - 0xC0); + ++cur; + while (c-- != 0) + { + pic.SetPixel(GetColorIndex(data[cur]), x, y); + ++x; + } + ++cur; + } - if (cur > data.Length) - { - throw new ArgumentOutOfRangeException("cur", cur, "must be less than max " + data.Length.ToString()); - } - } - } + if (cur > data.Length) + { + throw new ArgumentOutOfRangeException("cur", cur, "must be less than max " + data.Length.ToString()); + } + } + } - protected override void LoadInternal(ref ObjectModel objectModel) - { - PictureCollectionObjectModel coll = (objectModel as PictureCollectionObjectModel); - PictureObjectModel picret = (objectModel as PictureObjectModel); - if (coll == null && picret == null) return; + protected override void LoadInternal(ref ObjectModel objectModel) + { + PictureCollectionObjectModel coll = (objectModel as PictureCollectionObjectModel); + PictureObjectModel picret = (objectModel as PictureObjectModel); + if (coll == null && picret == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; - #region header - ushort spriteCount = br.ReadUInt16(); - uint totalSize = br.ReadUInt32(); - #endregion + IO.Reader br = base.Accessor.Reader; + #region header + ushort spriteCount = br.ReadUInt16(); + uint totalSize = br.ReadUInt32(); + #endregion - long position = br.BaseStream.Position; + long position = br.Accessor.Position; - List shs = new List(); - for (ushort i = 0; i < spriteCount; i++) - { - SpriteHeader sh = new SpriteHeader(); - sh.offsetX = br.ReadInt16(); - sh.offsetY = br.ReadInt16(); - sh.width = br.ReadUInt16(); - sh.height = br.ReadUInt16(); - sh.type = br.ReadByte(); - sh.dataOffset = br.ReadUInt32(); - shs.Add(sh); - } - for (ushort i = 0; i < spriteCount; i++) - { - SpriteHeader sh = shs[i]; + List shs = new List(); + for (ushort i = 0; i < spriteCount; i++) + { + SpriteHeader sh = new SpriteHeader(); + sh.offsetX = br.ReadInt16(); + sh.offsetY = br.ReadInt16(); + sh.width = br.ReadUInt16(); + sh.height = br.ReadUInt16(); + sh.type = br.ReadByte(); + sh.dataOffset = br.ReadUInt32(); + shs.Add(sh); + } + for (ushort i = 0; i < spriteCount; i++) + { + SpriteHeader sh = shs[i]; - PictureObjectModel pic = new PictureObjectModel(); - /* - pic.Left = sh.offsetX; - pic.Top = sh.offsetY; - */ - pic.Width = sh.width; - pic.Height = sh.height; + PictureObjectModel pic = new PictureObjectModel(); + /* + pic.Left = sh.offsetX; + pic.Top = sh.offsetY; + */ + pic.Width = sh.width; + pic.Height = sh.height; - uint datasize = ((i + 1 != spriteCount) ? (shs[i + 1].dataOffset - shs[i].dataOffset) : (totalSize - shs[i].dataOffset)); + uint datasize = ((i + 1 != spriteCount) ? (shs[i + 1].dataOffset - shs[i].dataOffset) : (totalSize - shs[i].dataOffset)); - br.BaseStream.Seek(position + shs[i].dataOffset, System.IO.SeekOrigin.Begin); - byte[] data = br.ReadBytes(datasize); + br.Accessor.Seek(position + shs[i].dataOffset, IO.SeekOrigin.Begin); + byte[] data = br.ReadBytes(datasize); - try - { - SpriteDrawICN(ref pic, sh, ref data, false); - } - catch (InvalidOperationException) - { - continue; - } + try + { + SpriteDrawICN(ref pic, sh, ref data, false); + } + catch (InvalidOperationException) + { + continue; + } - // pic.ToBitmap().Save(@"C:\Temp\test.bmp", System.Drawing.Imaging.ImageFormat.Bmp); + // pic.ToBitmap().Save(@"C:\Temp\test.bmp", System.Drawing.Imaging.ImageFormat.Bmp); - if (picret != null) - { - pic.CopyTo(picret); - return; - } - coll.Pictures.Add(pic); - } - } - protected override void SaveInternal(ObjectModel objectModel) - { - throw new NotImplementedException(); - } - } + if (picret != null) + { + pic.CopyTo(picret); + return; + } + coll.Pictures.Add(pic); + } + } + protected override void SaveInternal(ObjectModel objectModel) + { + throw new NotImplementedException(); + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/CC/CCDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/CC/CCDataFormat.cs index 4408269e..cd641c8e 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/CC/CCDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/CC/CCDataFormat.cs @@ -2,197 +2,198 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.FileSystem; namespace UniversalEditor.DataFormats.NewWorldComputing.CC { - public partial class CCDataFormat : DataFormat - { - private static DataFormatReference _dfr = null; - public override DataFormatReference MakeReference() - { - if (_dfr == null) - { - _dfr = base.MakeReference(); - _dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All); - _dfr.Filters.Add("Might and Magic CC archive", new string[] { "*.cc" }); - _dfr.Sources.Add("http://rewiki.regengedanken.de/wiki/.CC"); - } - return _dfr; - } + public partial class CCDataFormat : DataFormat + { + private static DataFormatReference _dfr = null; + public override DataFormatReference MakeReference() + { + if (_dfr == null) + { + _dfr = base.MakeReference(); + _dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All); + _dfr.Filters.Add("Might and Magic CC archive", new string[] { "*.cc" }); + _dfr.Sources.Add("http://rewiki.regengedanken.de/wiki/.CC"); + } + return _dfr; + } - private byte mvarKey = 0x35; - /// - /// The key to use to encrypt the data. - /// - public byte Key { get { return mvarKey; } set { mvarKey = value; } } + private byte mvarKey = 0x35; + /// + /// The key to use to encrypt the data. + /// + public byte Key { get { return mvarKey; } set { mvarKey = value; } } - #region File name table - private string[] possibleFileNames = new string[] - { - "adlib.drv", "archer.mon", "award.bin", "back.raw", "ballface.mon", "bank.icn", "bank.m", - "bank.out", "bank2.icn", "barbaran.mon", "bat.brd", "bat.mon", "beetle.mon", "beholder.mon", - "blaster.drv", "blknight.mon", "bublman.mon", "bugeye.mon", "buy.icn", "candle.mon", "cast.icn", - "castle.til", "cataplr.mon", "cave.til", "caves.m", "charpow.icn", "city.m", "cleric.mon", "cobra.mon", - "combat.icn", "combat.m", "comet.vga", "comf1.vga", "comf2.vga", "comf3.vga", "comf4.vga", "comf5.vga", - "computer.raw", "confirm.icn", "confirm2.icn", "control.raw", "corak.bin", "covox.drv", "cpanel.icn", "cr1.vga", - "cr2.vga", "cr3.vga", "cr4.vga", "cr5.vga", "create.icn", "create.raw", "cris.mon", "cyber.m", "cyclop.mon", - "day.vga", "death.vga", "demo.drv", "demon.mon", "desert.vga", "detctmon.icn", "detect.icn", "devil.mon", - "dice.vga", "dino.mon", "dirt.vga", "draglord.mon", "dse.fac", "dthlocus.mon", "dtree.vga", "dung.til", "dungeon.m", - "duplicat.icn", "dwarf.mon", "eerie.m", "eface01.out", "eface02.out", "eface03.out", "eface04.out", "eface05.out", - "eface06.out", "eface07.out", "eface08.out", "eface09.out", "element.icn", "equip.icn", "esc.icn", "fba1.vga", "fba2.vga", - "fbb1.vga", "fbb2.vga", "fca1.vga", "fca2.vga", "fcb1.vga", "fcb2.vga", "fda1.vga", "fdb1.vga", "fecp.brd", "firelzrd.mon", - "firemon.mon", "flytrap.mon", "frame.out", "frnt.vga", "front.raw", "gargoyle.brd", "gargoyle.mon", "gatekepr.mon", "ghost.mon", - "ghoul.mon", "global.icn", "goblin.mon", "grabber.brd", "grndrgn.mon", "grounds.m", "guild.m", "guild1.out", "guild2.out", "hamr.mon", - "hand.mon", "head.mon", "higrass.vga", "hire0.fac", "hire1.fac", "hire2.fac", "hire3.fac", "hire4.fac", "hire5.fac", "hire6.fac", - "hire7.fac", "hire8.fac", "hire9.fac", "honky.m", "hpbars.icn", "hud.raw", "hud.vga", "hydra.mon", "ibm.drv", "ina.vga", "inb.vga", - "inc.vga", "ind.vga", "inh.raw", "inn.icn", "inn.out", "itit0.vga", "itit1.vga", "itit2.vga", "itit3.vga", "itit4.vga", "itit5.vga", - "itit6.vga", "itit7.vga", "itit8.vga", "itxt.vga", "jester.mon", "lava.vga", "lbut.vga", "led.vga", "lich.mon", "lizard.mon", "lloyds.icn", - "logy5.raw", "ltree.vga", "lytp1.vga", "lytp2.vga", "lytp3.vga", "lyts1.vga", "lyts2.vga", "lyts3.vga", "lyts4.vga", "lyts5.vga", "lyts6.vga", - "lyts7.vga", "lyts8.vga", "lyts9.vga", "main.icn", "mantis.mon", "martface.mon", "medieval.m", "medusa.mon", "mess.vga", "minidrgn.mon", "minotaur.mon", - "mm3theme.m", "MonAC.dat", "MonAcid.dat", "MonAttP.dat", "MonCold.dat", "MonDmgN.dat", "MonDmgS.dat", "MonDmgT.dat", "MonElec.dat", "MonEner.dat", - "MonExp.dat", "MonFire.dat", "MonGems.dat", "MonGold.dat", "MonHitB.dat", "MonHP.dat", "MonMagi.dat", "MonNumA.dat", "MonPhys.dat", "MonRang.dat", - "MonSpd.dat", "MonSpec.dat", "MonTrea.dat", "mount.vga", "mouse.icn", "mummy.mon", "night.vga", "ninja.mon", "octobest.mon", "orc.mon", "out.til", - "out0.spl", "out1.spl", "out2.spl", "out3.spl", "outa.vga", "outb.vga", "outc.vga", "outd.vga", "outh.raw", "paladin.mon", "palms.vga", "pan.vga", - "pegasus.mon", "phantom.mon", "pirana.mon", "plasmoid.mon", "pow0.icn", "pow10.icn", "pow11.icn", "pow12.icn", "pow13.icn", "pow14.icn", "pow2.icn", - "pow3.icn", "pow4.icn", "pow5.icn", "pow7.icn", "pow8.icn", "pow9.icn", "powsorc.mon", "protect.icn", "quest.bin", "ranger.mon", "rat.mon", "reaper.mon", - "reg.bin", "repthed.mon", "restore.icn", "road.vga", "robo.mon", "robo2.mon", "roc.mon", "roland.drv", "scifi.til", "scn1.vga", "scn2.vga", "scon.vga", - "scor.vga", "scorpia.mon", "scroll.icn", "sell.icn", "send.vga", "skel.mon", "snomtn.vga", "snotree.vga", "snow.vga", "sonicnja.mon", "sorc.mon", - "spfx1.icn", "spfx2.icn", "spfx3.icn", "spfx4.icn", "spfx5.icn", "spfx6.icn", "spfx7.icn", "spfx8.icn", "spfx9.icn", "spider.mon", "sprite.mon", - "spldesc.bin", "stars.raw", "start.icn", "swmtree.vga", "takb1.vga", "takb2.vga", "take.raw", "taks1.vga", "taks2.vga", "taks3.vga", "talk.vga", - "tandy.drv", "tavern.bin", "tavern.out", "temple.out", "temples.m", "termnatr.mon", "text01.maz", "text02.maz", "text03.maz", "text04.maz", "text05.maz", - "text06.maz", "text07.maz", "text08.maz", "text09.maz", "text10.maz", "text11.maz", "text12.maz", "text13.maz", "text14.maz", "text15.maz", "text16.maz", - "text17.maz", "text18.maz", "text19.maz", "text20.maz", "text21.maz", "text22.maz", "text23.maz", "text24.maz", "text25.maz", "text26.maz", "text27.maz", - "text28.maz", "text29.maz", "text30.maz", "text31.maz", "text32.maz", "text33.maz", "text34.maz", "text35.maz", "text36.maz", "text37.maz", "text38.maz", - "text39.maz", "text40.maz", "text41.maz", "text42.maz", "text43.maz", "text44.maz", "text45.maz", "text46.maz", "text47.maz", "text48.maz", "text49.maz", - "text50.maz", "text51.maz", "text52.maz", "text53.maz", "text54.maz", "text55.maz", "text56.maz", "text57.maz", "text58.maz", "text59.maz", "text60.maz", - "text61.maz", "text62.maz", "text63.maz", "text64.maz", "thief.mon", "topa1.vga", "topa2.vga", "toph.vga", "topi.vga", "topj.vga", "topk.vga", "topsea.raw", - "town.til", "towninn.m", "train.icn", "train1.out", "train2.out", "train3.out", "train4.out", "treeglum.mon", "troll.mon", "txt1.vga", "txt2.vga", "txt3.vga", - "txt4.vga", "txt5.vga", "undragon.mon", "vampire.mon", "venture.m", "view.icn", "water.vga", "weapon.out", "werewolf.mon", "witch.mon", "wizard.mon", "worm.mon", - "zombie.mon" - }; - #endregion + #region File name table + private string[] possibleFileNames = new string[] + { + "adlib.drv", "archer.mon", "award.bin", "back.raw", "ballface.mon", "bank.icn", "bank.m", + "bank.out", "bank2.icn", "barbaran.mon", "bat.brd", "bat.mon", "beetle.mon", "beholder.mon", + "blaster.drv", "blknight.mon", "bublman.mon", "bugeye.mon", "buy.icn", "candle.mon", "cast.icn", + "castle.til", "cataplr.mon", "cave.til", "caves.m", "charpow.icn", "city.m", "cleric.mon", "cobra.mon", + "combat.icn", "combat.m", "comet.vga", "comf1.vga", "comf2.vga", "comf3.vga", "comf4.vga", "comf5.vga", + "computer.raw", "confirm.icn", "confirm2.icn", "control.raw", "corak.bin", "covox.drv", "cpanel.icn", "cr1.vga", + "cr2.vga", "cr3.vga", "cr4.vga", "cr5.vga", "create.icn", "create.raw", "cris.mon", "cyber.m", "cyclop.mon", + "day.vga", "death.vga", "demo.drv", "demon.mon", "desert.vga", "detctmon.icn", "detect.icn", "devil.mon", + "dice.vga", "dino.mon", "dirt.vga", "draglord.mon", "dse.fac", "dthlocus.mon", "dtree.vga", "dung.til", "dungeon.m", + "duplicat.icn", "dwarf.mon", "eerie.m", "eface01.out", "eface02.out", "eface03.out", "eface04.out", "eface05.out", + "eface06.out", "eface07.out", "eface08.out", "eface09.out", "element.icn", "equip.icn", "esc.icn", "fba1.vga", "fba2.vga", + "fbb1.vga", "fbb2.vga", "fca1.vga", "fca2.vga", "fcb1.vga", "fcb2.vga", "fda1.vga", "fdb1.vga", "fecp.brd", "firelzrd.mon", + "firemon.mon", "flytrap.mon", "frame.out", "frnt.vga", "front.raw", "gargoyle.brd", "gargoyle.mon", "gatekepr.mon", "ghost.mon", + "ghoul.mon", "global.icn", "goblin.mon", "grabber.brd", "grndrgn.mon", "grounds.m", "guild.m", "guild1.out", "guild2.out", "hamr.mon", + "hand.mon", "head.mon", "higrass.vga", "hire0.fac", "hire1.fac", "hire2.fac", "hire3.fac", "hire4.fac", "hire5.fac", "hire6.fac", + "hire7.fac", "hire8.fac", "hire9.fac", "honky.m", "hpbars.icn", "hud.raw", "hud.vga", "hydra.mon", "ibm.drv", "ina.vga", "inb.vga", + "inc.vga", "ind.vga", "inh.raw", "inn.icn", "inn.out", "itit0.vga", "itit1.vga", "itit2.vga", "itit3.vga", "itit4.vga", "itit5.vga", + "itit6.vga", "itit7.vga", "itit8.vga", "itxt.vga", "jester.mon", "lava.vga", "lbut.vga", "led.vga", "lich.mon", "lizard.mon", "lloyds.icn", + "logy5.raw", "ltree.vga", "lytp1.vga", "lytp2.vga", "lytp3.vga", "lyts1.vga", "lyts2.vga", "lyts3.vga", "lyts4.vga", "lyts5.vga", "lyts6.vga", + "lyts7.vga", "lyts8.vga", "lyts9.vga", "main.icn", "mantis.mon", "martface.mon", "medieval.m", "medusa.mon", "mess.vga", "minidrgn.mon", "minotaur.mon", + "mm3theme.m", "MonAC.dat", "MonAcid.dat", "MonAttP.dat", "MonCold.dat", "MonDmgN.dat", "MonDmgS.dat", "MonDmgT.dat", "MonElec.dat", "MonEner.dat", + "MonExp.dat", "MonFire.dat", "MonGems.dat", "MonGold.dat", "MonHitB.dat", "MonHP.dat", "MonMagi.dat", "MonNumA.dat", "MonPhys.dat", "MonRang.dat", + "MonSpd.dat", "MonSpec.dat", "MonTrea.dat", "mount.vga", "mouse.icn", "mummy.mon", "night.vga", "ninja.mon", "octobest.mon", "orc.mon", "out.til", + "out0.spl", "out1.spl", "out2.spl", "out3.spl", "outa.vga", "outb.vga", "outc.vga", "outd.vga", "outh.raw", "paladin.mon", "palms.vga", "pan.vga", + "pegasus.mon", "phantom.mon", "pirana.mon", "plasmoid.mon", "pow0.icn", "pow10.icn", "pow11.icn", "pow12.icn", "pow13.icn", "pow14.icn", "pow2.icn", + "pow3.icn", "pow4.icn", "pow5.icn", "pow7.icn", "pow8.icn", "pow9.icn", "powsorc.mon", "protect.icn", "quest.bin", "ranger.mon", "rat.mon", "reaper.mon", + "reg.bin", "repthed.mon", "restore.icn", "road.vga", "robo.mon", "robo2.mon", "roc.mon", "roland.drv", "scifi.til", "scn1.vga", "scn2.vga", "scon.vga", + "scor.vga", "scorpia.mon", "scroll.icn", "sell.icn", "send.vga", "skel.mon", "snomtn.vga", "snotree.vga", "snow.vga", "sonicnja.mon", "sorc.mon", + "spfx1.icn", "spfx2.icn", "spfx3.icn", "spfx4.icn", "spfx5.icn", "spfx6.icn", "spfx7.icn", "spfx8.icn", "spfx9.icn", "spider.mon", "sprite.mon", + "spldesc.bin", "stars.raw", "start.icn", "swmtree.vga", "takb1.vga", "takb2.vga", "take.raw", "taks1.vga", "taks2.vga", "taks3.vga", "talk.vga", + "tandy.drv", "tavern.bin", "tavern.out", "temple.out", "temples.m", "termnatr.mon", "text01.maz", "text02.maz", "text03.maz", "text04.maz", "text05.maz", + "text06.maz", "text07.maz", "text08.maz", "text09.maz", "text10.maz", "text11.maz", "text12.maz", "text13.maz", "text14.maz", "text15.maz", "text16.maz", + "text17.maz", "text18.maz", "text19.maz", "text20.maz", "text21.maz", "text22.maz", "text23.maz", "text24.maz", "text25.maz", "text26.maz", "text27.maz", + "text28.maz", "text29.maz", "text30.maz", "text31.maz", "text32.maz", "text33.maz", "text34.maz", "text35.maz", "text36.maz", "text37.maz", "text38.maz", + "text39.maz", "text40.maz", "text41.maz", "text42.maz", "text43.maz", "text44.maz", "text45.maz", "text46.maz", "text47.maz", "text48.maz", "text49.maz", + "text50.maz", "text51.maz", "text52.maz", "text53.maz", "text54.maz", "text55.maz", "text56.maz", "text57.maz", "text58.maz", "text59.maz", "text60.maz", + "text61.maz", "text62.maz", "text63.maz", "text64.maz", "thief.mon", "topa1.vga", "topa2.vga", "toph.vga", "topi.vga", "topj.vga", "topk.vga", "topsea.raw", + "town.til", "towninn.m", "train.icn", "train1.out", "train2.out", "train3.out", "train4.out", "treeglum.mon", "troll.mon", "txt1.vga", "txt2.vga", "txt3.vga", + "txt4.vga", "txt5.vga", "undragon.mon", "vampire.mon", "venture.m", "view.icn", "water.vga", "weapon.out", "werewolf.mon", "witch.mon", "wizard.mon", "worm.mon", + "zombie.mon" + }; + #endregion - private Dictionary HashFileNames = new Dictionary(); - public CCDataFormat() - { - try - { - foreach (string filename in possibleFileNames) - { - ushort hash = GetFileNameHash(filename); - HashFileNames.Add(hash, filename); - } - } - catch (Exception ex) - { - } - } + private Dictionary HashFileNames = new Dictionary(); + public CCDataFormat() + { + try + { + foreach (string filename in possibleFileNames) + { + ushort hash = GetFileNameHash(filename); + HashFileNames.Add(hash, filename); + } + } + catch (Exception ex) + { + } + } - private ushort GetFileNameHash(string filename) - { - byte h0 = 0, h1 = 0; - byte[] filenamebytes = System.Text.Encoding.ASCII.GetBytes(filename); - for (int i = 0; i < filenamebytes.Length; i++) - { - // swap h0 and h1 - byte h2 = h1; - h1 = h0; - h0 = h2; + private ushort GetFileNameHash(string filename) + { + byte h0 = 0, h1 = 0; + byte[] filenamebytes = System.Text.Encoding.ASCII.GetBytes(filename); + for (int i = 0; i < filenamebytes.Length; i++) + { + // swap h0 and h1 + byte h2 = h1; + h1 = h0; + h0 = h2; - // rotate left - h2 = (byte)((((uint)h0 << 1) & 0xff) | (((uint)h1 >> 7) & 0xff)); - byte h3 = (byte)((((uint)h1 << 1) & 0xff) | (((uint)h0 >> 7) & 0xff)); - h0 = h2; - h1 = h3; - // calc toUpper(h1) - h2 = (byte)(filenamebytes[i] & 0x7f); - if (h2 >= 0x60) - { - h2 = (byte)(h2 - 0x20); - } - // add char to h1 - uint temp = (((uint)h0 << 8) | (uint)h1); - temp = (temp + h2) & 0xffff; - h0 = (byte)((temp >> 8) & 0xff); - h1 = (byte)(temp & 0xff); - } - return (ushort)(h1 | (h0 << 8)); - } + // rotate left + h2 = (byte)((((uint)h0 << 1) & 0xff) | (((uint)h1 >> 7) & 0xff)); + byte h3 = (byte)((((uint)h1 << 1) & 0xff) | (((uint)h0 >> 7) & 0xff)); + h0 = h2; + h1 = h3; + // calc toUpper(h1) + h2 = (byte)(filenamebytes[i] & 0x7f); + if (h2 >= 0x60) + { + h2 = (byte)(h2 - 0x20); + } + // add char to h1 + uint temp = (((uint)h0 << 8) | (uint)h1); + temp = (temp + h2) & 0xffff; + h0 = (byte)((temp >> 8) & 0xff); + h1 = (byte)(temp & 0xff); + } + return (ushort)(h1 | (h0 << 8)); + } - protected override void LoadInternal(ref ObjectModel objectModel) - { - FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); - if (fsom == null) return; + protected override void LoadInternal(ref ObjectModel objectModel) + { + FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel); + if (fsom == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; - ushort filecount = br.ReadUInt16(); + IO.Reader br = base.Accessor.Reader; + ushort filecount = br.ReadUInt16(); - byte[] headerData = br.ReadBytes(2 + (filecount * 8)); - headerData = DecodeHeader(headerData); + byte[] headerData = br.ReadBytes(2 + (filecount * 8)); + headerData = DecodeHeader(headerData); - IO.BinaryReader brh = new IO.BinaryReader(headerData); + IO.Reader brh = new IO.Reader(new MemoryAccessor(headerData)); - for (ushort i = 0; i < filecount; i++) - { - FileInfo fi = new FileInfo(); - fi.hash = brh.ReadUInt16(); + for (ushort i = 0; i < filecount; i++) + { + FileInfo fi = new FileInfo(); + fi.hash = brh.ReadUInt16(); - fi.filename = "FILE" + i.ToString().PadLeft(4, '0'); - if (HashFileNames.ContainsKey(fi.hash)) - { - fi.filename = HashFileNames[fi.hash]; - } + fi.filename = "FILE" + i.ToString().PadLeft(4, '0'); + if (HashFileNames.ContainsKey(fi.hash)) + { + fi.filename = HashFileNames[fi.hash]; + } - fi.offset = brh.ReadUInt24(); - fi.size = brh.ReadUInt16(); - fi.nul = brh.ReadByte(); + fi.offset = brh.ReadUInt24(); + fi.size = brh.ReadUInt16(); + fi.nul = brh.ReadByte(); - File file = new File(); - file.Name = fi.filename; - file.Properties.Add("reader", br); - file.Properties.Add("fileinfo", fi); - file.DataRequest += file_DataRequest; - fsom.Files.Add(file); - } - } + File file = new File(); + file.Name = fi.filename; + file.Properties.Add("reader", br); + file.Properties.Add("fileinfo", fi); + file.DataRequest += file_DataRequest; + fsom.Files.Add(file); + } + } - void file_DataRequest(object sender, DataRequestEventArgs e) - { - File file = (sender as File); - if (file == null) return; + void file_DataRequest(object sender, DataRequestEventArgs e) + { + File file = (sender as File); + if (file == null) return; - IO.BinaryReader br = (file.Properties["reader"] as IO.BinaryReader); - FileInfo fi = (FileInfo)file.Properties["fileinfo"]; + IO.Reader br = (file.Properties["reader"] as IO.Reader); + FileInfo fi = (FileInfo)file.Properties["fileinfo"]; - br.BaseStream.Seek(fi.offset, System.IO.SeekOrigin.Begin); - byte[] data = br.ReadBytes(fi.size); + br.Accessor.Seek(fi.offset, IO.SeekOrigin.Begin); + byte[] data = br.ReadBytes(fi.size); - for (int i = 0; i < data.Length; i++) - { - data[i] ^= mvarKey; - } - e.Data = data; - } + for (int i = 0; i < data.Length; i++) + { + data[i] ^= mvarKey; + } + e.Data = data; + } - protected override void SaveInternal(ObjectModel objectModel) - { - throw new NotImplementedException(); - } + protected override void SaveInternal(ObjectModel objectModel) + { + throw new NotImplementedException(); + } - private byte[] DecodeHeader(byte[] data) - { - byte al = 0xAC, ah = 0xAC; - byte[] output = (data.Clone() as byte[]); - for (int i = 0; i < output.Length; i++) - { - al = output[i]; - al = (byte)((((int)al << 2) | ((int)al >> 6)) & 0xff); // assembly: ROL al,2 - al = (byte)((al + ah) & 0xff); - output[i] = al; - ah = (byte)((ah + 0x67) & 0xff); - } - return output; - } - } + private byte[] DecodeHeader(byte[] data) + { + byte al = 0xAC, ah = 0xAC; + byte[] output = (data.Clone() as byte[]); + for (int i = 0; i < output.Length; i++) + { + al = output[i]; + al = (byte)((((int)al << 2) | ((int)al >> 6)) & 0xff); // assembly: ROL al,2 + al = (byte)((al + ah) & 0xff); + output[i] = al; + ah = (byte)((ah + 0x67) & 0xff); + } + return output; + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Campaign/Heroes4CampaignDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Campaign/Heroes4CampaignDataFormat.cs index d6d99868..e6bfbedc 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Campaign/Heroes4CampaignDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Campaign/Heroes4CampaignDataFormat.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.NewWorldComputing.Campaign; namespace UniversalEditor.DataFormats.NewWorldComputing.Campaign @@ -19,15 +20,15 @@ namespace UniversalEditor.DataFormats.NewWorldComputing.Campaign protected override void LoadInternal(ref ObjectModel objectModel) { - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; string H4CAMPAIGN = br.ReadFixedLengthString(10); int unknown1 = br.ReadInt32(); byte nul = br.ReadByte(); byte[] restOfDataCompressed = br.ReadToEnd(); - byte[] restOfDataUncompressed = UniversalEditor.Compression.Gzip.GzipStream.Decompress(restOfDataCompressed); + byte[] restOfDataUncompressed = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Gzip).Decompress(restOfDataCompressed); - br = new IO.BinaryReader(restOfDataUncompressed); + br = new IO.Reader(new MemoryAccessor(restOfDataUncompressed)); short unknown2 = br.ReadInt16(); short unknown3 = br.ReadInt16(); diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/FNT/FNTDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/FNT/FNTDataFormat.cs index 12ee025c..011efe58 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/FNT/FNTDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/FNT/FNTDataFormat.cs @@ -25,7 +25,7 @@ namespace UniversalEditor.DataFormats.NewWorldComputing.FNT { FontObjectModel font = (objectModel as FontObjectModel); - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; font.GlyphHeight = br.ReadUInt16(); font.GlyphWidth = br.ReadUInt16(); @@ -38,9 +38,9 @@ namespace UniversalEditor.DataFormats.NewWorldComputing.FNT { FontObjectModel font = (objectModel as FontObjectModel); - IO.BinaryWriter bw = base.Stream.BinaryWriter; - bw.Write(font.GlyphHeight); - bw.Write(font.GlyphWidth); + IO.Writer bw = base.Accessor.Writer; + bw.WriteUInt16(font.GlyphHeight); + bw.WriteUInt16(font.GlyphWidth); bw.WriteFixedLengthString(font.GlyphCollectionFileName, 15); bw.Flush(); } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Save/Heroes4SaveDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Save/Heroes4SaveDataFormat.cs index be907d3a..80031c68 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Save/Heroes4SaveDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/Save/Heroes4SaveDataFormat.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.NewWorldComputing.Save; namespace UniversalEditor.DataFormats.NewWorldComputing.Save @@ -19,11 +20,11 @@ namespace UniversalEditor.DataFormats.NewWorldComputing.Save protected override void LoadInternal(ref ObjectModel objectModel) { - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; byte[] dataCompressed = br.ReadToEnd(); - byte[] dataUncompressed = UniversalEditor.Compression.CompressionStream.Decompress(Compression.CompressionMethod.Gzip, dataCompressed); + byte[] dataUncompressed = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Gzip).Decompress(dataCompressed); - br = new IO.BinaryReader(dataUncompressed); + br = new IO.Reader(new MemoryAccessor(dataUncompressed)); string H4_SAVE_GAME = br.ReadFixedLengthString(12); if (H4_SAVE_GAME != "H4_SAVE_GAME") throw new InvalidDataFormatException(); diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes2/Heroes2MapDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes2/Heroes2MapDataFormat.cs index 8dcb4ef7..c7176120 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes2/Heroes2MapDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes2/Heroes2MapDataFormat.cs @@ -26,7 +26,7 @@ namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes if (map == null) return; - IO.BinaryReader br = base.Stream.BinaryReader; + IO.Reader br = base.Accessor.Reader; uint magic = br.ReadUInt32(); if (magic != 0x0000005C) throw new InvalidDataFormatException(); @@ -99,38 +99,38 @@ namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes #endregion // kingdom count - br.BaseStream.Seek(0x1A, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x1A, IO.SeekOrigin.Begin); byte kingdomCount = br.ReadByte(); - br.BaseStream.Seek(0x1D, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x1D, IO.SeekOrigin.Begin); map.WinConditions = (MapWinCondition)br.ReadByte(); byte wins1 = br.ReadByte(); byte wins2 = br.ReadByte(); ushort wins3 = br.ReadUInt16(); - br.BaseStream.Seek(0x2C, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x2C, IO.SeekOrigin.Begin); ushort wins4 = br.ReadUInt16(); - br.BaseStream.Seek(0x22, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x22, IO.SeekOrigin.Begin); map.LoseConditions = (MapLoseCondition)br.ReadByte(); ushort loss1 = br.ReadUInt16(); - br.BaseStream.Seek(0x2E, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x2E, IO.SeekOrigin.Begin); ushort loss2 = br.ReadUInt16(); // starting hero - br.BaseStream.Seek(0x25, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x25, IO.SeekOrigin.Begin); byte startingHero = br.ReadByte(); bool withHeroes = (startingHero == 0); byte[] races = br.ReadBytes(5); // name - br.BaseStream.Seek(0x3A, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x3A, IO.SeekOrigin.Begin); map.Name = br.ReadFixedLengthString(16); map.Name = map.Name.TrimNull(); // name - br.BaseStream.Seek(0x76, System.IO.SeekOrigin.Begin); + br.Accessor.Seek(0x76, IO.SeekOrigin.Begin); map.Description = br.ReadFixedLengthString(143); map.Description = map.Description.TrimNull(); @@ -140,8 +140,8 @@ namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes // 33044 bytes between here and there - tiles (36 * 36 * 25 bytes per tile) - long pos = br.BaseStream.Position; - br.BaseStream.Position = pos; + long pos = br.Accessor.Position; + br.Accessor.Position = pos; for (ushort i = 0; i < unknown2; i++) { @@ -165,7 +165,7 @@ namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes #endregion } - private MapTile ReadTile(IO.BinaryReader br) + private MapTile ReadTile(IO.Reader br) { MapTile tile = new MapTile(); tile.GroundType = (MapGroundType)br.ReadUInt16(); // tile (ocean, grass, snow, swamp, lava, desert, dirt, wasteland, beach) @@ -197,7 +197,7 @@ namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes return tile; } - private MapCastle ReadCastle(IO.BinaryReader br) + private MapCastle ReadCastle(IO.Reader br) { MapCastle castle = new MapCastle(); diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes3/Heroes3MapDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes3/Heroes3MapDataFormat.cs index 83a8e34b..f808afb5 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes3/Heroes3MapDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/DataFormats/NewWorldComputing/WorldMap2D/NewWorldComputing/Heroes3/Heroes3MapDataFormat.cs @@ -2,78 +2,79 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using UniversalEditor.Accessors; using UniversalEditor.ObjectModels.NewWorldComputing.Map; namespace UniversalEditor.DataFormats.Gaming.WorldMap2D.NewWorldComputing.Heroes3 { - public class Heroes3MapDataFormat : DataFormat - { - private static DataFormatReference _dfr = null; - public override DataFormatReference MakeReference() - { - if (_dfr == null) - { - _dfr = base.MakeReference(); - _dfr.Capabilities.Add(typeof(MapObjectModel), DataFormatCapabilities.All); - _dfr.Filters.Add("Heroes of Might and Magic III map", new byte?[][] { new byte?[] { 0x0E, 0x00, 0x00, 0x00 }, new byte?[] { 0x15, 0x00, 0x00, 0x00 }, new byte?[] { 0x1C, 0x00, 0x00, 0x00 }, new byte?[] { 0x33, 0x00, 0x00, 0x00 } }, new string[] { "*.h3m" }); - } - return _dfr; - } - protected override void LoadInternal(ref ObjectModel objectModel) - { - MapObjectModel map = (objectModel as MapObjectModel); + public class Heroes3MapDataFormat : DataFormat + { + private static DataFormatReference _dfr = null; + public override DataFormatReference MakeReference() + { + if (_dfr == null) + { + _dfr = base.MakeReference(); + _dfr.Capabilities.Add(typeof(MapObjectModel), DataFormatCapabilities.All); + _dfr.Filters.Add("Heroes of Might and Magic III map", new byte?[][] { new byte?[] { 0x0E, 0x00, 0x00, 0x00 }, new byte?[] { 0x15, 0x00, 0x00, 0x00 }, new byte?[] { 0x1C, 0x00, 0x00, 0x00 }, new byte?[] { 0x33, 0x00, 0x00, 0x00 } }, new string[] { "*.h3m" }); + } + return _dfr; + } + protected override void LoadInternal(ref ObjectModel objectModel) + { + MapObjectModel map = (objectModel as MapObjectModel); - #region decompress the map file - IO.BinaryReader br = base.Stream.BinaryReader; - byte[] gzipped = br.ReadToEnd(); - byte[] decompressed = UniversalEditor.Compression.Gzip.GzipStream.Decompress(gzipped); - br = new IO.BinaryReader(decompressed); - #endregion + #region decompress the map file + IO.Reader br = base.Accessor.Reader; + byte[] gzipped = br.ReadToEnd(); + byte[] decompressed = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Gzip).Decompress(gzipped); + br = new IO.Reader(new MemoryAccessor(decompressed)); + #endregion - Heroes3GameType u0 = (Heroes3GameType)br.ReadInt32(); - byte discard = br.ReadByte(); - int mapsize = br.ReadByte(); - int unknown = br.ReadInt32(); + Heroes3GameType u0 = (Heroes3GameType)br.ReadInt32(); + byte discard = br.ReadByte(); + int mapsize = br.ReadByte(); + int unknown = br.ReadInt32(); - map.Name = br.ReadInt32String(); - map.Description = br.ReadInt32String(); + map.Name = br.ReadInt32String(); + map.Description = br.ReadInt32String(); - short u1 = br.ReadInt16(); - short u2 = br.ReadInt16(); - short u3 = br.ReadInt16(); - byte u7 = br.ReadByte(); + short u1 = br.ReadInt16(); + short u2 = br.ReadInt16(); + short u3 = br.ReadInt16(); + byte u7 = br.ReadByte(); - short a1 = br.ReadInt16(); - short a2 = br.ReadInt16(); - short a3 = br.ReadInt16(); + short a1 = br.ReadInt16(); + short a2 = br.ReadInt16(); + short a3 = br.ReadInt16(); - string name = br.ReadInt32String(); + string name = br.ReadInt32String(); - /* - string sectTitle = br.ReadInt32String(); - string sectDesc = br.ReadInt32String(); - */ - } + /* + string sectTitle = br.ReadInt32String(); + string sectDesc = br.ReadInt32String(); + */ + } - protected override void SaveInternal(ObjectModel objectModel) - { - System.IO.MemoryStream ms = new System.IO.MemoryStream(); - IO.BinaryWriter bw = new IO.BinaryWriter(ms); + protected override void SaveInternal(ObjectModel objectModel) + { + MemoryAccessor ma = new MemoryAccessor(); + IO.Writer bw = new IO.Writer(ma); - bw.Flush(); - bw.Close(); + bw.Flush(); + bw.Close(); - #region compress the map file - bw = base.Stream.BinaryWriter; - byte[] decompressed = ms.ToArray(); - byte[] gzipped = UniversalEditor.Compression.Gzip.GzipStream.Compress(decompressed); - bw.Write(gzipped); - bw.Flush(); - #endregion - } - } + #region compress the map file + bw = base.Accessor.Writer; + byte[] decompressed = ma.ToArray(); + byte[] gzipped = UniversalEditor.Compression.CompressionModule.FromKnownCompressionMethod(Compression.CompressionMethod.Gzip).Compress(decompressed); + bw.WriteBytes(gzipped); + bw.Flush(); + #endregion + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/HoMM2Palette.cs b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/HoMM2Palette.cs index 2c815447..96727b54 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/HoMM2Palette.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/HoMM2Palette.cs @@ -74,7 +74,7 @@ namespace UniversalEditor g <<= 2; b <<= 2; - mvarColorTable.Add(Color.FromArgb(r, g, b)); + mvarColorTable.Add(Color.FromRGBA(r, g, b)); } } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/UniversalEditor.Plugins.NewWorldComputing.csproj b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/UniversalEditor.Plugins.NewWorldComputing.csproj index 7f841c42..2cf82a98 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/UniversalEditor.Plugins.NewWorldComputing.csproj +++ b/CSharp/Plugins/UniversalEditor.Plugins.NewWorldComputing/UniversalEditor.Plugins.NewWorldComputing.csproj @@ -86,10 +86,18 @@ + + {3f664673-7e22-4486-9ad0-fc81861d0b78} + UniversalEditor.Compression + {A92D520B-FFA3-4464-8CF6-474D18959E03} UniversalEditor.Core + + {30467e5c-05bc-4856-aadc-13906ef4cadd} + UniversalEditor.Essential + {BE4D0BA3-0888-42A5-9C09-FC308A4509D2} UniversalEditor.Plugins.Multimedia diff --git a/CSharp/UniversalEditor.sln b/CSharp/UniversalEditor.sln index b91aa6fd..24ec82d8 100644 --- a/CSharp/UniversalEditor.sln +++ b/CSharp/UniversalEditor.sln @@ -41,8 +41,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Bootstrappe EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Environments", "Environments", "{A846CA33-9CAA-4237-B14F-8721DBA89442}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.UserInterface.WindowsForms.DesktopApplication", "Environments\UniversalEditor.UserInterface.WindowsForms.DesktopApplication\UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj", "{118E40C4-323E-4B4B-8EF4-38EED6CC5E83}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsForms", "WindowsForms", "{C1F34183-7A2F-41A6-9958-F6F329099654}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2013757E-4240-4E07-AD22-91219AD9B74F}" @@ -57,6 +55,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.New EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engines", "Engines", "{54990D5E-CE09-459F-916E-AF13101765B4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.UserInterface.WindowsForms.DesktopApplication", "Environments\WindowsForms\Engines\UniversalEditor.UserInterface.WindowsForms.DesktopApplication\UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj", "{118E40C4-323E-4B4B-8EF4-38EED6CC5E83}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms", "Environments\WindowsForms\Plugins\UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms\UniversalEditor.Plugins.NewWorldComputing.UserInterface.WindowsForms.csproj", "{4250B20B-2DC9-432F-B0C2-BD20B80B4970}" EndProject Global @@ -159,12 +161,6 @@ Global {6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2}.Release|Any CPU.Build.0 = Release|Any CPU {6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2}.Release|x86.ActiveCfg = Release|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|Any CPU.Build.0 = Debug|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|x86.ActiveCfg = Debug|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|Any CPU.ActiveCfg = Release|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|Any CPU.Build.0 = Release|Any CPU - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|x86.ActiveCfg = Release|Any CPU {19AEFD28-37E8-4FFD-B879-FEE57824689D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19AEFD28-37E8-4FFD-B879-FEE57824689D}.Debug|Any CPU.Build.0 = Debug|Any CPU {19AEFD28-37E8-4FFD-B879-FEE57824689D}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -183,6 +179,12 @@ Global {26095090-3F7D-4DB5-A9BF-4C687230FC0F}.Release|Any CPU.ActiveCfg = Release|Any CPU {26095090-3F7D-4DB5-A9BF-4C687230FC0F}.Release|Any CPU.Build.0 = Release|Any CPU {26095090-3F7D-4DB5-A9BF-4C687230FC0F}.Release|x86.ActiveCfg = Release|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Debug|x86.ActiveCfg = Debug|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|Any CPU.Build.0 = Release|Any CPU + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83}.Release|x86.ActiveCfg = Release|Any CPU {4250B20B-2DC9-432F-B0C2-BD20B80B4970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4250B20B-2DC9-432F-B0C2-BD20B80B4970}.Debug|Any CPU.Build.0 = Debug|Any CPU {4250B20B-2DC9-432F-B0C2-BD20B80B4970}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -213,10 +215,11 @@ Global {C1F34183-7A2F-41A6-9958-F6F329099654} = {A846CA33-9CAA-4237-B14F-8721DBA89442} {2013757E-4240-4E07-AD22-91219AD9B74F} = {C1F34183-7A2F-41A6-9958-F6F329099654} {5A423A3E-51C5-4188-8AD5-FB5C0CB76C6A} = {C1F34183-7A2F-41A6-9958-F6F329099654} - {118E40C4-323E-4B4B-8EF4-38EED6CC5E83} = {C1F34183-7A2F-41A6-9958-F6F329099654} {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1} = {C1F34183-7A2F-41A6-9958-F6F329099654} + {54990D5E-CE09-459F-916E-AF13101765B4} = {C1F34183-7A2F-41A6-9958-F6F329099654} {BCBB72BD-0ECB-4FF2-8D91-E466361FB6F9} = {2013757E-4240-4E07-AD22-91219AD9B74F} {617D9EB5-CA93-45D6-AA6B-5A012B7698AC} = {5A423A3E-51C5-4188-8AD5-FB5C0CB76C6A} {4250B20B-2DC9-432F-B0C2-BD20B80B4970} = {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1} + {118E40C4-323E-4B4B-8EF4-38EED6CC5E83} = {54990D5E-CE09-459F-916E-AF13101765B4} EndGlobalSection EndGlobal