Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added Processors (System)

  • Loading branch information...
commit 40ed78b1342184e35bb56634f47f2061b7718a9d 0 parents
joreg authored

Showing 5,101 changed files with 32,663 additions and 0 deletions. Show diff stats Hide diff stats

  1. +17 0 .gitignore
  2. +31 0 Hoster/AssemblyInfo.cs
  3. +137 0 Hoster/MainForm.Designer.cs
  4. +340 0 Hoster/MainForm.cs
  5. BIN  Hoster/MainForm.resources
  6. +123 0 Hoster/MainForm.resx
  7. +47 0 Hoster/PinPanel.Designer.cs
  8. +174 0 Hoster/PinPanel.cs
  9. +177 0 Hoster/PluginHost/BasePin.cs
  10. +154 0 Hoster/PluginHost/ColorPin.cs
  11. +75 0 Hoster/PluginHost/EnumPin.cs
  12. +28 0 Hoster/PluginHost/LayerPin.cs
  13. +33 0 Hoster/PluginHost/MeshPin.cs
  14. +69 0 Hoster/PluginHost/NodePins.cs
  15. +420 0 Hoster/PluginHost/PluginHost.cs
  16. +45 0 Hoster/PluginHost/StatePin.cs
  17. +151 0 Hoster/PluginHost/StringPin.cs
  18. +33 0 Hoster/PluginHost/TexturePin.cs
  19. +246 0 Hoster/PluginHost/Timer.cs
  20. +255 0 Hoster/PluginHost/TransformPins.cs
  21. +308 0 Hoster/PluginHost/ValuePin.cs
  22. +307 0 Hoster/PluginPage.Designer.cs
  23. +621 0 Hoster/PluginPage.cs
  24. BIN  Hoster/PluginPage.resources
  25. +120 0 Hoster/PluginPage.resx
  26. +127 0 Hoster/VVVVPlugHostMono.csproj
  27. +39 0 Hoster/VVVVPlugHostMono.sln
  28. +3 0  Hoster/app.config
  29. +18 0 README.txt
  30. +108 0 common/src/Common.sln
  31. +32 0 common/src/Default.Project.settings
  32. +30 0 common/src/core/Core/Collections/DotNetCollectionExtensions.cs
  33. +373 0 common/src/core/Core/Collections/EditableCollection.cs
  34. +422 0 common/src/core/Core/Collections/EditableIDList.cs
  35. +150 0 common/src/core/Core/Collections/EditableList.cs
  36. +82 0 common/src/core/Core/Collections/SortedEditableList.cs
  37. +71 0 common/src/core/Core/Collections/SortedViewableList.cs
  38. +14 0 common/src/core/Core/Collections/Sync/Enums.cs
  39. +83 0 common/src/core/Core/Collections/Sync/ImmutableSynchronizers.cs
  40. +38 0 common/src/core/Core/Collections/Sync/SourceChangedEventArgs.cs
  41. +236 0 common/src/core/Core/Collections/Sync/Sources.cs
  42. +44 0 common/src/core/Core/Collections/Sync/SyncEventArgs.cs
  43. +393 0 common/src/core/Core/Collections/Sync/Synchronizer.cs
  44. +173 0 common/src/core/Core/Collections/Sync/Targets.cs
  45. +278 0 common/src/core/Core/Collections/ViewableCollection.cs
  46. +235 0 common/src/core/Core/Collections/ViewableIDList.cs
  47. +98 0 common/src/core/Core/Collections/ViewableList.cs
  48. +80 0 common/src/core/Core/Commands/AddCommand.cs
  49. +51 0 common/src/core/Core/Commands/ClientCommandHistory.cs
  50. +158 0 common/src/core/Core/Commands/Command.cs
  51. +149 0 common/src/core/Core/Commands/CommandHistory.cs
  52. +118 0 common/src/core/Core/Commands/CommandSender.cs
  53. +104 0 common/src/core/Core/Commands/CompoundCommand.cs
  54. +42 0 common/src/core/Core/Commands/ICommandHistory.cs
  55. +68 0 common/src/core/Core/Commands/RemoveCommand.cs
  56. +65 0 common/src/core/Core/Commands/RenameCommand.cs
  57. +92 0 common/src/core/Core/Commands/SetPropertyCommand.cs
  58. +260 0 common/src/core/Core/Core.csproj
  59. +28 0 common/src/core/Core/Core.sln
  60. +95 0 common/src/core/Core/Dialogs/BaseDialog.Designer.cs
  61. +18 0 common/src/core/Core/Dialogs/BaseDialog.cs
  62. +120 0 common/src/core/Core/Dialogs/BaseDialog.resx
  63. +65 0 common/src/core/Core/Dialogs/NameDialog.Designer.cs
  64. +110 0 common/src/core/Core/Dialogs/NameDialog.cs
  65. +120 0 common/src/core/Core/Dialogs/NameDialog.resx
  66. +36 0 common/src/core/Core/Dialogs/NamespaceNameDialog.Designer.cs
  67. +72 0 common/src/core/Core/Dialogs/NamespaceNameDialog.cs
  68. +319 0 common/src/core/Core/Dialogs/ReferenceDialog.Designer.cs
  69. +231 0 common/src/core/Core/Dialogs/ReferenceDialog.cs
  70. +141 0 common/src/core/Core/Dialogs/ReferenceDialog.resx
  71. +72 0 common/src/core/Core/Helper/CommandlineArguments.cs
  72. +109 0 common/src/core/Core/Helper/ExtensionMethods.cs
  73. +12 0 common/src/core/Core/Helper/IConverter.cs
  74. +306 0 common/src/core/Core/Helper/MappingRegistry.cs
  75. +518 0 common/src/core/Core/Helper/ModelMapper.cs
  76. +37 0 common/src/core/Core/Helper/NodeAndPinAttributes.cs
  77. +184 0 common/src/core/Core/Helper/Shell.cs
  78. +149 0 common/src/core/Core/Helper/Traverser.cs
  79. +491 0 common/src/core/Core/Helper/TypeExtensions.cs
  80. +85 0 common/src/core/Core/Helper/UnityContainerExtensions.cs
  81. +41 0 common/src/core/Core/Logging/DebugHelpers.cs
  82. +16 0 common/src/core/Core/Logging/DebugLogger.cs
  83. +65 0 common/src/core/Core/Logging/DefaultLogger.cs
  84. +53 0 common/src/core/Core/Logging/ILogger.cs
  85. +29 0 common/src/core/Core/Logging/LogType.cs
  86. +19 0 common/src/core/Core/Menu/AddMenuEntry.cs
  87. +35 0 common/src/core/Core/Menu/Default/AddItemMenuEntry.cs
  88. +25 0 common/src/core/Core/Menu/Default/DefaultAddMenuEntry.cs
  89. +12 0 common/src/core/Core/Menu/IAddMenuProvider.cs
  90. +39 0 common/src/core/Core/Menu/IMenuEntry.cs
  91. +26 0 common/src/core/Core/Menu/LoadMenuEntry.cs
  92. +75 0 common/src/core/Core/Menu/MenuEntry.cs
  93. +59 0 common/src/core/Core/Menu/MenuSeparator.cs
  94. +20 0 common/src/core/Core/Menu/RedoMenuEntry.cs
  95. +33 0 common/src/core/Core/Menu/RemoveMenuEntry.cs
  96. +86 0 common/src/core/Core/Menu/RenameMenuEntry.cs
  97. +38 0 common/src/core/Core/Menu/SetPropertyMenuEntry.cs
  98. +21 0 common/src/core/Core/Menu/UndoMenuEntry.cs
  99. +33 0 common/src/core/Core/Menu/UnloadMenuEntry.cs
  100. +61 0 common/src/core/Core/Model/AssemblyReference.cs
  101. +174 0 common/src/core/Core/Model/CS/CSDocument.cs
  102. +152 0 common/src/core/Core/Model/CS/CSProject.cs
  103. +57 0 common/src/core/Core/Model/Document.cs
  104. +87 0 common/src/core/Core/Model/DocumentFactory.cs
  105. +33 0 common/src/core/Core/Model/DotNetExecutable.cs
  106. +10 0 common/src/core/Core/Model/Enums.cs
  107. +28 0 common/src/core/Core/Model/FX/FXDocument.cs
  108. +145 0 common/src/core/Core/Model/FX/FXProject.cs
  109. +51 0 common/src/core/Core/Model/FX/FXReference.cs
  110. +159 0 common/src/core/Core/Model/IDContainer.cs
  111. +248 0 common/src/core/Core/Model/IDItem.cs
  112. +49 0 common/src/core/Core/Model/MissingDocument.cs
  113. +432 0 common/src/core/Core/Model/MsBuildProject.cs
  114. +45 0 common/src/core/Core/Model/MsBuildProjectReference.cs
  115. +337 0 common/src/core/Core/Model/Project.cs
  116. +41 0 common/src/core/Core/Model/ProjectItem.cs
  117. +164 0 common/src/core/Core/Model/Properties.cs
  118. +76 0 common/src/core/Core/Model/RemotableObject.cs
  119. +89 0 common/src/core/Core/Model/Solution.cs
  120. +104 0 common/src/core/Core/Model/TextDocument.cs
  121. +54 0 common/src/core/Core/Model/_Interfaces/IDocument.cs
  122. +10 0 common/src/core/Core/Model/_Interfaces/IPatchDocument.cs
  123. +93 0 common/src/core/Core/Model/_Interfaces/IProject.cs
  124. +10 0 common/src/core/Core/Model/_Interfaces/IProjectFactory.cs
  125. +27 0 common/src/core/Core/Model/_Interfaces/IProjectItem.cs
  126. +66 0 common/src/core/Core/Model/_Interfaces/IReference.cs
  127. +58 0 common/src/core/Core/Model/_Interfaces/ISolution.cs
  128. +23 0 common/src/core/Core/Model/_Interfaces/ITextDocument.cs
  129. +34 0 common/src/core/Core/Properties/AssemblyInfo.cs
  130. +33 0 common/src/core/Core/Runtime/CS/CSParser.cs
  131. +48 0 common/src/core/Core/Runtime/CS/CSParserResults.cs
  132. +68 0 common/src/core/Core/Runtime/RuntimeError.cs
  133. +51 0 common/src/core/Core/Serialization/ISerializer.cs
  134. +285 0 common/src/core/Core/Serialization/Serializer.cs
  135. +30 0 common/src/core/Core/Serialization/XElementExtensions.cs
  136. +107 0 common/src/core/Core/View/DefaultContextMenuProvider.cs
  137. +70 0 common/src/core/Core/View/DefaultDecoratableProvider.cs
  138. +156 0 common/src/core/Core/View/DefaultDragDropProvider.cs
  139. +95 0 common/src/core/Core/View/DefaultNameProvider.cs
  140. +37 0 common/src/core/Core/View/DefaultParentProvider.cs
  141. +76 0 common/src/core/Core/View/DocumentViewProvider.cs
  142. +56 0 common/src/core/Core/View/FilteredParentProvider.cs
  143. +49 0 common/src/core/Core/View/GraphicalEditor/IConnectable.cs
  144. +12 0 common/src/core/Core/View/GraphicalEditor/IDeletable.cs
  145. +10 0 common/src/core/Core/View/GraphicalEditor/IGraphElementHost.cs
  146. +29 0 common/src/core/Core/View/GraphicalEditor/IMouseEvents.cs
  147. +12 0 common/src/core/Core/View/GraphicalEditor/IMovable.cs
  148. +52 0 common/src/core/Core/View/HDEForm.Designer.cs
  149. +48 0 common/src/core/Core/View/HDEForm.cs
  150. +120 0 common/src/core/Core/View/HDEForm.resx
  151. +24 0 common/src/core/Core/View/IDecoratable.cs
  152. +15 0 common/src/core/Core/View/IDescripted.cs
  153. +13 0 common/src/core/Core/View/IDraggable.cs
  154. +15 0 common/src/core/Core/View/IDroppable.cs
  155. +9 0 common/src/core/Core/View/ILinkSink.cs
  156. +12 0 common/src/core/Core/View/ILinkSource.cs
  157. +19 0 common/src/core/Core/View/ISelectable.cs
  158. +44 0 common/src/core/Core/View/MissingDocumentViewProvider.cs
  159. +182 0 common/src/core/Core/View/ProjectProvider.cs
  160. +591 0 common/src/core/Core/View/ProjectViewProvider.cs
  161. +142 0 common/src/core/Core/View/ReferenceProvider.cs
  162. +49 0 common/src/core/Core/View/ReferenceViewProvider.cs
  163. +76 0 common/src/core/Core/View/ReferencesViewProvider.cs
  164. +65 0 common/src/core/Core/View/SolutionProvider.cs
  165. +102 0 common/src/core/Core/View/SolutionViewProvider.cs
  166. +60 0 common/src/core/Core/View/Table/Cell.cs
  167. +49 0 common/src/core/Core/View/Table/Column.cs
  168. +50 0 common/src/core/Core/View/Table/DefaultColumnProvider.cs
  169. +43 0 common/src/core/Core/View/Table/EditablePropertyCell.cs
  170. +37 0 common/src/core/Core/View/Table/EditablePropertyCellProvider.cs
  171. +13 0 common/src/core/Core/View/Table/Enums.cs
  172. +32 0 common/src/core/Core/View/Table/ICell.cs
  173. +38 0 common/src/core/Core/View/Table/IDContainerCellProvider.cs
  174. +75 0 common/src/core/Core/View/Table/ViewablePropertyCell.cs
  175. +37 0 common/src/core/Core/View/Table/ViewablePropertyCellProvider.cs
  176. +143 0 common/src/core/Core/Viewer/GraphicalEditor/ICanvas.cs
  177. +15 0 common/src/core/Core/Viewer/GraphicalEditor/ICircle.cs
  178. +22 0 common/src/core/Core/Viewer/GraphicalEditor/IDot.cs
  179. +56 0 common/src/core/Core/Viewer/GraphicalEditor/IGraphElement.cs
  180. +91 0 common/src/core/Core/Viewer/GraphicalEditor/IPath.cs
  181. +23 0 common/src/core/Core/Viewer/GraphicalEditor/IPolygon.cs
  182. +16 0 common/src/core/Core/Viewer/GraphicalEditor/IRectangle.cs
  183. +62 0 common/src/core/Core/Viewer/GraphicalEditor/ISolid.cs
  184. +28 0 common/src/core/Core/Viewer/GraphicalEditor/IText.cs
  185. +44 0 common/src/core/Core/Viewer/ILabelEditor.cs
  186. +12 0 common/src/core/Core/Viewer/ISelection.cs
  187. +37 0 common/src/core/Core/Viewer/ISelectionProvider.cs
  188. +37 0 common/src/core/Core/Viewer/ISelectionService.cs
  189. +40 0 common/src/core/Core/Viewer/Selection.cs
  190. +45 0 common/src/core/Core/Viewer/SelectionService.cs
  191. +12 0 common/src/core/Core/_Interfaces/IChangedSequence.cs
  192. +56 0 common/src/core/Core/_Interfaces/IEditableCollection.cs
  193. +27 0 common/src/core/Core/_Interfaces/IEditableIDList.cs
  194. +27 0 common/src/core/Core/_Interfaces/IEditableList.cs
  195. +31 0 common/src/core/Core/_Interfaces/IEditableProperty.cs
  196. +16 0 common/src/core/Core/_Interfaces/IFocus.cs
  197. +85 0 common/src/core/Core/_Interfaces/IIDContainer.cs
  198. +82 0 common/src/core/Core/_Interfaces/IIDItem.cs
  199. +16 0 common/src/core/Core/_Interfaces/INamed.cs
  200. +24 0 common/src/core/Core/_Interfaces/IParent.cs
  201. +15 0 common/src/core/Core/_Interfaces/IRenameable.cs
  202. +100 0 common/src/core/Core/_Interfaces/IViewableCollection.cs
  203. +23 0 common/src/core/Core/_Interfaces/IViewableIDList.cs
  204. +28 0 common/src/core/Core/_Interfaces/IViewableList.cs
  205. +35 0 common/src/core/Core/_Interfaces/IViewableProperty.cs
  206. +17 0 common/src/core/Core/_Interfaces/IVisitor.cs
  207. +2 0  common/src/core/Core/license.txt
  208. +4 0 common/src/core/Default.Core.Project.settings
  209. +410 0 common/src/core/Utils/Algorithm/Treemap.cs
  210. +28 0 common/src/core/Utils/Animation/IIRFilter.cs
  211. +109 0 common/src/core/Utils/Animation/Particle.cs
  212. +95 0 common/src/core/Utils/Application/AppInfo.cs
  213. +31 0 common/src/core/Utils/AssemblyInfo.cs
  214. +43 0 common/src/core/Utils/Collections/DictionaryExtensions.cs
  215. +16 0 common/src/core/Utils/Collections/EnumerableExtensions.cs
  216. +308 0 common/src/core/Utils/Color/RGBAColor.cs
  217. +415 0 common/src/core/Utils/Color/VColor.cs
  218. +86 0 common/src/core/Utils/Concurrent/BlockingQueue.cs
  219. +54 0 common/src/core/Utils/Crypto/StringHasher.cs
  220. +63 0 common/src/core/Utils/Disposable.cs
  221. +486 0 common/src/core/Utils/GACWrap.cs
  222. +109 0 common/src/core/Utils/IO/AggregatedStream.cs
  223. +8 0 common/src/core/Utils/IO/ByteOrder.cs
  224. +221 0 common/src/core/Utils/IO/KeyboardState.cs
  225. +115 0 common/src/core/Utils/IO/MouseState.cs
  226. +423 0 common/src/core/Utils/IO/SystemIOExtensions.cs
  227. +138 0 common/src/core/Utils/IO/SystemIOExtensions.tt
  228. +54 0 common/src/core/Utils/Linq/LinqExtensions.cs
  229. +206 0 common/src/core/Utils/ManagedVCL/ManagedVCLControl.cs
  230. +120 0 common/src/core/Utils/ManagedVCL/ManagedVCLControl.resx
  231. +190 0 common/src/core/Utils/Math/Matrix2x2.cs
  232. +802 0 common/src/core/Utils/Math/Matrix4x4.cs
  233. +706 0 common/src/core/Utils/Math/Tweener.cs
  234. +1,660 0 common/src/core/Utils/Math/VMath.cs
  235. +446 0 common/src/core/Utils/Math/Vector2D.cs
  236. +570 0 common/src/core/Utils/Math/Vector3D.cs
  237. +577 0 common/src/core/Utils/Math/Vector4D.cs
  238. +7 0 common/src/core/Utils/NamespaceDecl.cs
  239. +32 0 common/src/core/Utils/Network/IRemotingManager.cs
  240. +83 0 common/src/core/Utils/Network/Network.cs
  241. +291 0 common/src/core/Utils/Network/RemotingManager.cs
  242. +173 0 common/src/core/Utils/Network/UDPServer.cs
  243. +206 0 common/src/core/Utils/Network/UDPTimeSync.cs
  244. +124 0 common/src/core/Utils/OSC/OSCBundle.cs
  245. +161 0 common/src/core/Utils/OSC/OSCMessage.cs
  246. +192 0 common/src/core/Utils/OSC/OSCPacket.cs
  247. +78 0 common/src/core/Utils/OSC/OSCReceiver.cs
  248. +81 0 common/src/core/Utils/OSC/OSCTransmitter.cs
  249. +31 0 common/src/core/Utils/PathUtils.cs
  250. +79 0 common/src/core/Utils/Reflection/TypeExtensions.cs
  251. +310 0 common/src/core/Utils/SharedMemory/Segment.cs
  252. +94 0 common/src/core/Utils/SharedMemory/Win32Native.cs
  253. +303 0 common/src/core/Utils/Skeleton/ISkeleton.cs
  254. +347 0 common/src/core/Utils/Streams/BufferedIOStream.cs
  255. +57 0 common/src/core/Utils/Streams/CyclicStream.cs
  256. +165 0 common/src/core/Utils/Streams/CyclicStreamReader.cs
  257. +24 0 common/src/core/Utils/Streams/IFlushable.cs
  258. +17 0 common/src/core/Utils/Streams/IIOStream.cs
  259. +29 0 common/src/core/Utils/Streams/IInStream.cs
  260. +37 0 common/src/core/Utils/Streams/IOutStream.cs
  261. +22 0 common/src/core/Utils/Streams/IStream.cs
  262. +59 0 common/src/core/Utils/Streams/IStreamReader.cs
  263. +61 0 common/src/core/Utils/Streams/IStreamWriter.cs
  264. +39 0 common/src/core/Utils/Streams/IStreamer.cs
  265. +28 0 common/src/core/Utils/Streams/ISynchronizable.cs
  266. +53 0 common/src/core/Utils/Streams/MemoryPool.cs
  267. +147 0 common/src/core/Utils/Streams/RangeStream.cs
  268. +151 0 common/src/core/Utils/Streams/ReverseStream.cs
  269. +504 0 common/src/core/Utils/Streams/StreamUtils.cs
  270. +68 0 common/src/core/Utils/System/ArrayExtensions.cs
  271. +25 0 common/src/core/Utils/System/IntPtrExtensions.cs
  272. +17 0 common/src/core/Utils/Utils.build
  273. +110 0 common/src/core/Utils/Utils.csproj
  274. +18 0 common/src/core/Utils/Utils.sln
  275. +66 0 common/src/core/Utils/Win32/HiPerfTimer.cs
  276. +164 0 common/src/core/Utils/Win32/IStream.cs
  277. +4 0 common/src/gui/Default.Gui.Project.settings
  278. +48 0 common/src/gui/PiccoloGraphicalEditor/Circle.cs
  279. +57 0 common/src/gui/PiccoloGraphicalEditor/Dot.cs
Sorry, we could not display the entire diff because too many files (5,101) changed.
17 .gitignore
... ... @@ -0,0 +1,17 @@
  1 +crack.exe
  2 +crack.rsm
  3 +vvvv.exe
  4 +vvvv.rsm
  5 +vvvv.map
  6 +*~.xml
  7 +*.csproj.user
  8 +*.tvsconfig
  9 +obj/
  10 +bin/
  11 +*.suo
  12 +UpgradeLog.XML
  13 +Backup/
  14 +_UpgradeReport_Files/
  15 +*.log
  16 +vvvv_*.zip
  17 +addons_*.zip
31 Hoster/AssemblyInfo.cs
... ... @@ -0,0 +1,31 @@
  1 +using System.Reflection;
  2 +using System.Runtime.CompilerServices;
  3 +using System.Runtime.InteropServices;
  4 +
  5 +// Information about this assembly is defined by the following
  6 +// attributes.
  7 +//
  8 +// change them to the information which is associated with the assembly
  9 +// you compile.
  10 +
  11 +[assembly: AssemblyTitle("VVVV Plugin Hoster")]
  12 +[assembly: AssemblyDescription("Hosts VVVV Plugins")]
  13 +[assembly: AssemblyConfiguration("")]
  14 +[assembly: AssemblyCompany("VVVV group")]
  15 +[assembly: AssemblyProduct("VVVV Plugin Hoster")]
  16 +[assembly: AssemblyCopyright("")]
  17 +[assembly: AssemblyTrademark("")]
  18 +[assembly: AssemblyCulture("")]
  19 +
  20 +// This sets the default COM visibility of types in the assembly to invisible.
  21 +// If you need to expose a type to COM, use [ComVisible(true)] on that type.
  22 +[assembly: ComVisible(false)]
  23 +
  24 +// The assembly version has following format :
  25 +//
  26 +// Major.Minor.Build.Revision
  27 +//
  28 +// You can specify all values by your own or you can build default build and revision
  29 +// numbers with the '*' character (the default):
  30 +
  31 +[assembly: AssemblyVersion("1.0.*")]
137 Hoster/MainForm.Designer.cs
... ... @@ -0,0 +1,137 @@
  1 +namespace Hoster
  2 +{
  3 + partial class MainForm : System.Windows.Forms.Form
  4 + {
  5 + /// <summary>
  6 + /// Designer variable used to keep track of non-visual components.
  7 + /// </summary>
  8 + private System.ComponentModel.IContainer components = null;
  9 +
  10 + /// <summary>
  11 + /// Disposes resources used by the form.
  12 + /// </summary>
  13 + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14 + protected override void Dispose(bool disposing)
  15 + {
  16 + if (disposing) {
  17 + if (components != null) {
  18 + components.Dispose();
  19 + }
  20 + }
  21 + base.Dispose(disposing);
  22 + }
  23 +
  24 + /// <summary>
  25 + /// This method is required for Windows Forms designer support.
  26 + /// Do not change the method contents inside the source code editor. The Forms designer might
  27 + /// not be able to load this method if it was changed manually.
  28 + /// </summary>
  29 + private void InitializeComponent()
  30 + {
  31 + this.MainPanel = new System.Windows.Forms.Panel();
  32 + this.menuStrip1 = new System.Windows.Forms.MenuStrip();
  33 + this.menuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  34 + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  35 + this.oSCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  36 + this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  37 + this.exiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  38 + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  39 + this.menuStrip1.SuspendLayout();
  40 + this.SuspendLayout();
  41 + //
  42 + // MainPanel
  43 + //
  44 + this.MainPanel.BackColor = System.Drawing.SystemColors.Control;
  45 + this.MainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
  46 + this.MainPanel.Location = new System.Drawing.Point(0, 24);
  47 + this.MainPanel.Name = "MainPanel";
  48 + this.MainPanel.Size = new System.Drawing.Size(779, 443);
  49 + this.MainPanel.TabIndex = 2;
  50 + //
  51 + // menuStrip1
  52 + //
  53 + this.menuStrip1.BackColor = System.Drawing.SystemColors.Control;
  54 + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
  55 + this.menuToolStripMenuItem,
  56 + this.newToolStripMenuItem});
  57 + this.menuStrip1.Location = new System.Drawing.Point(0, 0);
  58 + this.menuStrip1.Name = "menuStrip1";
  59 + this.menuStrip1.Size = new System.Drawing.Size(779, 24);
  60 + this.menuStrip1.TabIndex = 3;
  61 + this.menuStrip1.Text = "menuStrip1";
  62 + //
  63 + // menuToolStripMenuItem
  64 + //
  65 + this.menuToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
  66 + this.saveToolStripMenuItem,
  67 + this.oSCToolStripMenuItem,
  68 + this.debugToolStripMenuItem,
  69 + this.exiToolStripMenuItem});
  70 + this.menuToolStripMenuItem.Name = "menuToolStripMenuItem";
  71 + this.menuToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
  72 + this.menuToolStripMenuItem.Text = "Main";
  73 + //
  74 + // saveToolStripMenuItem
  75 + //
  76 + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
  77 + this.saveToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
  78 + this.saveToolStripMenuItem.Text = "Save";
  79 + this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveButtonClick);
  80 + //
  81 + // oSCToolStripMenuItem
  82 + //
  83 + this.oSCToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
  84 + this.oSCToolStripMenuItem.Name = "oSCToolStripMenuItem";
  85 + this.oSCToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
  86 + this.oSCToolStripMenuItem.Text = "OSC";
  87 + this.oSCToolStripMenuItem.Click += new System.EventHandler(this.OSCToolStripMenuItemClick);
  88 + //
  89 + // debugToolStripMenuItem
  90 + //
  91 + this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
  92 + this.debugToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
  93 + this.debugToolStripMenuItem.Text = "Debug";
  94 + this.debugToolStripMenuItem.Click += new System.EventHandler(this.DebugToolStripMenuItemClick);
  95 + //
  96 + // exiToolStripMenuItem
  97 + //
  98 + this.exiToolStripMenuItem.Name = "exiToolStripMenuItem";
  99 + this.exiToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
  100 + this.exiToolStripMenuItem.Text = "Exit";
  101 + this.exiToolStripMenuItem.Click += new System.EventHandler(this.ExitToolStripMenuItemClick);
  102 + //
  103 + // newToolStripMenuItem
  104 + //
  105 + this.newToolStripMenuItem.Name = "newToolStripMenuItem";
  106 + this.newToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
  107 + this.newToolStripMenuItem.Text = "New";
  108 + this.newToolStripMenuItem.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.NewToolStripMenuItemDropDownItemClicked);
  109 + //
  110 + // MainForm
  111 + //
  112 + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  113 + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  114 + this.ClientSize = new System.Drawing.Size(779, 467);
  115 + this.Controls.Add(this.MainPanel);
  116 + this.Controls.Add(this.menuStrip1);
  117 + this.KeyPreview = true;
  118 + this.Name = "MainForm";
  119 + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  120 + this.Text = "Hoster";
  121 + this.menuStrip1.ResumeLayout(false);
  122 + this.menuStrip1.PerformLayout();
  123 + this.ResumeLayout(false);
  124 + this.PerformLayout();
  125 + }
  126 + private System.Windows.Forms.Panel MainPanel;
  127 + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
  128 + private System.Windows.Forms.ToolStripMenuItem exiToolStripMenuItem;
  129 + private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem;
  130 + private System.Windows.Forms.ToolStripMenuItem oSCToolStripMenuItem;
  131 + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
  132 + private System.Windows.Forms.ToolStripMenuItem menuToolStripMenuItem;
  133 + private System.Windows.Forms.MenuStrip menuStrip1;
  134 +
  135 +
  136 + }
  137 +}
340 Hoster/MainForm.cs
... ... @@ -0,0 +1,340 @@
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Windows.Forms;
  4 +using System.Xml;
  5 +using System.IO;
  6 +
  7 +using VVVV.PluginInterfaces.V1;
  8 +
  9 +namespace Hoster
  10 +{
  11 + public partial class MainForm
  12 + {
  13 + public List<PlugInfo> FPlugins;
  14 + private XmlDocument FDocument;
  15 + private int FPluginCount = 0;
  16 + private TabControl PluginTabs;
  17 +
  18 + [STAThread]
  19 + public static void Main(string[] args)
  20 + {
  21 + Application.EnableVisualStyles();
  22 + Application.SetCompatibleTextRenderingDefault(false);
  23 + Application.Run(new MainForm());
  24 + }
  25 +
  26 + public MainForm()
  27 + {
  28 + // The InitializeComponent() call is required for Windows Forms designer support.
  29 + InitializeComponent();
  30 +
  31 + FPlugins = new List<PlugInfo>();
  32 + ScanForPlugins();
  33 +
  34 + if (! System.IO.File.Exists("./savegame.xml"))
  35 + {
  36 + XmlTextWriter xml = new XmlTextWriter("savegame.xml", null);
  37 + xml.WriteStartElement("HOST");
  38 + xml.WriteEndElement();
  39 + xml.Close();
  40 + }
  41 +
  42 + FDocument = new XmlDocument();
  43 + LoadFile();
  44 + }
  45 +
  46 + public PluginPage AddPlugin(string Path, string ClassName)
  47 + {
  48 + //if this is the first plugin, simply put it on the panel
  49 + PluginPage pp = new PluginPage();
  50 + pp.Dock = DockStyle.Fill;
  51 +
  52 + if (FPluginCount == 0)
  53 + pp.Parent = MainPanel;
  54 + else
  55 + {
  56 + TabPage tab;
  57 + //if not yet there, create the TabControl
  58 + if (PluginTabs == null)
  59 + {
  60 + PluginTabs = new TabControl();
  61 + PluginTabs.MouseClick += PluginTabsMouseClick;
  62 + PluginTabs.SelectedIndexChanged += PluginTabsSelectedIndexChanged;
  63 + PluginTabs.Parent = MainPanel;
  64 + PluginTabs.Dock = DockStyle.Fill;
  65 +
  66 + //move first plugin to TabPage
  67 + tab = new TabPage();
  68 + MainPanel.Controls[0].Parent = tab;
  69 + tab.Text = (tab.Controls[0] as PluginPage).NodeInfoName;
  70 +
  71 + PluginTabs.TabPages.Add(tab);
  72 + }
  73 +
  74 + tab = new TabPage();
  75 + PluginTabs.TabPages.Add(tab);
  76 + pp.Parent = tab;
  77 +
  78 + //tab.Height = PluginPages.Height; //initializing
  79 + PluginTabs.SelectedIndex = PluginTabs.TabPages.Count-1;
  80 + }
  81 +
  82 + //if this is an additional plugin (to the first)
  83 + //create a TabPage and put allplugins there
  84 + //AddPluginPage(FPlugins[PlugIndex].Path, FPlugins[PlugIndex].ClassName);
  85 +
  86 + pp.LoadPlugin(Path, ClassName);
  87 +
  88 + if (PluginTabs != null)
  89 + PluginTabs.TabPages[PluginTabs.SelectedIndex].Text = pp.NodeInfoName;
  90 +
  91 + this.Text = pp.NodeInfoName + "SA";
  92 + FPluginCount++;
  93 + return pp;
  94 + }
  95 +
  96 + private PluginPage AddPluginPage(string Path, string ClassName)
  97 + {
  98 + TabPage tab = new TabPage();
  99 + tab.Text = ClassName;
  100 + PluginTabs.TabPages.Add(tab);
  101 + tab.Height = PluginTabs.Height; //initializing
  102 + PluginTabs.SelectedIndex = PluginTabs.TabPages.Count-1;
  103 +
  104 + PluginPage pp = new PluginPage();
  105 + pp.Parent = tab;
  106 + pp.Dock = DockStyle.Fill;
  107 +
  108 + pp.LoadPlugin(Path, ClassName);
  109 +
  110 + this.Text = pp.NodeInfoName + "SA";
  111 +
  112 + return pp;
  113 + }
  114 +
  115 + void ScanForPlugins()
  116 + {
  117 + string[] dlls;
  118 + Type objInterface;
  119 + string path = Application.StartupPath;
  120 + dlls = System.IO.Directory.GetFileSystemEntries(path, "*.dll");
  121 +
  122 + System.Reflection.Assembly plugindll;
  123 + for (int i=0; i<dlls.Length; i++)
  124 + {
  125 + try
  126 + {
  127 + plugindll = System.Reflection.Assembly.LoadFrom(dlls[i]);
  128 + //Loop through each type in the DLL
  129 +
  130 + foreach (System.Type objType in plugindll.GetTypes())
  131 + {
  132 + //Only look at public, non abstract types
  133 + if (objType.IsPublic && !objType.IsAbstract)
  134 + {
  135 + //See if this type implements our interface
  136 + objInterface = objType.GetInterface("VVVV.PluginInterfaces.V1.IPlugin");
  137 + if (objInterface != null)
  138 + {
  139 + PlugInfo p = new PlugInfo();
  140 + p.ClassName = objType.FullName;
  141 + p.Path = plugindll.Location;
  142 + FPlugins.Add(p);
  143 + }
  144 + }
  145 + }
  146 + }
  147 + catch
  148 + {
  149 + //some .dlls except on being asked for types
  150 + //Console.Beep(400, 10);
  151 + }
  152 + }
  153 +
  154 + //add plugins to menu
  155 + foreach (PlugInfo p in FPlugins)
  156 + {
  157 + newToolStripMenuItem.DropDownItems.Add(p.ClassName);
  158 + }
  159 + }
  160 +
  161 + void NewToolStripMenuItemDropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
  162 + {
  163 + int plugIndex = newToolStripMenuItem.DropDownItems.IndexOf(e.ClickedItem);
  164 + AddPlugin(FPlugins[plugIndex].Path, FPlugins[plugIndex].ClassName);
  165 + }
  166 +
  167 + void PluginTabsMouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
  168 + {
  169 + if (e.Button == MouseButtons.Middle)
  170 + {
  171 + for (int i=0; i<PluginTabs.TabPages.Count; i++)
  172 + {
  173 + if (PluginTabs.GetTabRect(i).Contains(e.Location))
  174 + {
  175 + RemovePage(PluginTabs.TabPages[i]);
  176 + break;
  177 + }
  178 + }
  179 + }
  180 +
  181 + //if there is only one plugin left, remove the TabControl
  182 + if (PluginTabs.TabCount == 1)
  183 + {
  184 + TabPage page = PluginTabs.TabPages[0];
  185 + page.Controls[0].Parent = MainPanel;
  186 + RemovePage(page);
  187 + PluginTabs.Dispose();
  188 + PluginTabs = null;
  189 + }
  190 + }
  191 +
  192 + public void RemovePage(TabPage page)
  193 + {
  194 + PluginTabs.TabPages.Remove(page);
  195 + page.Dispose();
  196 + }
  197 +
  198 + void SaveButtonClick(object sender, System.EventArgs e)
  199 + {
  200 + Save();
  201 + }
  202 +
  203 + void Save()
  204 + {
  205 + string path = Path.Combine(Application.StartupPath, "savegame.xml");
  206 + FDocument.Load(path);
  207 + XmlNode host = FDocument.SelectSingleNode(@"//HOST");
  208 + if (host != null)
  209 + {
  210 + host.RemoveAll();
  211 +
  212 + XmlAttribute st;
  213 +
  214 + if (PluginTabs != null)
  215 + for (int i=0; i<PluginTabs.TabPages.Count; i++)
  216 + {
  217 + if (PluginTabs.TabPages[i].Controls[0] is PluginPage)
  218 + (PluginTabs.TabPages[i].Controls[0] as PluginPage).SaveToXML(FDocument);
  219 +
  220 + //save host attributes
  221 + st = FDocument.CreateAttribute("selectedtab");
  222 + st.Value = PluginTabs.SelectedIndex.ToString();
  223 + host.Attributes.Append(st);
  224 + }
  225 + else
  226 + (MainPanel.Controls[0] as PluginPage).SaveToXML(FDocument);
  227 +
  228 + st = FDocument.CreateAttribute("windowleft");
  229 + st.Value = this.Left.ToString();
  230 + host.Attributes.Append(st);
  231 + st = FDocument.CreateAttribute("windowtop");
  232 + st.Value = this.Top.ToString();
  233 + host.Attributes.Append(st);
  234 + st = FDocument.CreateAttribute("windowwidth");
  235 + st.Value = this.Width.ToString();
  236 + host.Attributes.Append(st);
  237 + st = FDocument.CreateAttribute("windowheight");
  238 + st.Value = this.Height.ToString();
  239 + host.Attributes.Append(st);
  240 + }
  241 +
  242 + FDocument.Save(path);
  243 + }
  244 +
  245 + void LoadFile()
  246 + {
  247 + string path = Path.Combine(Application.StartupPath, "savegame.xml");
  248 + FDocument.Load(path);
  249 +
  250 + XmlNode host;
  251 + XmlAttribute attr;
  252 + string[] nodename;
  253 + char[] separator = {'|'};
  254 + host = FDocument.SelectSingleNode(@"//HOST");
  255 +
  256 + if (host != null)
  257 + {
  258 + //restore window
  259 + attr = host.Attributes.GetNamedItem("windowleft") as XmlAttribute;
  260 + if (attr != null)
  261 + this.Left = Convert.ToInt32(attr.Value);
  262 + attr = host.Attributes.GetNamedItem("windowtop") as XmlAttribute;
  263 + if (attr != null)
  264 + this.Top = Convert.ToInt32(attr.Value);
  265 + attr = host.Attributes.GetNamedItem("windowwidth") as XmlAttribute;
  266 + if (attr != null)
  267 + this.Width = Convert.ToInt32(attr.Value);
  268 + attr = host.Attributes.GetNamedItem("windowheight") as XmlAttribute;
  269 + if (attr != null)
  270 + this.Height = Convert.ToInt32(attr.Value);
  271 +
  272 + foreach(XmlNode plugin in host.ChildNodes)
  273 + {
  274 + attr = plugin.LastChild.Attributes.GetNamedItem("nodename") as XmlAttribute;
  275 + nodename = attr.Value.Split(separator);
  276 +
  277 + if (System.IO.File.Exists(nodename[0]))
  278 + {
  279 + PluginPage pp = AddPlugin(nodename[0], nodename[1]);
  280 + System.Diagnostics.Debug.WriteLine("Loading From XML");
  281 + pp.LoadFromXML(plugin);
  282 + }
  283 + }
  284 +
  285 + //select saved tabindex
  286 + attr = host.Attributes.GetNamedItem("selectedtab") as XmlAttribute;
  287 + if ((attr != null) && (PluginTabs != null))
  288 + PluginTabs.SelectedIndex = Convert.ToInt32(attr.Value);
  289 + }
  290 + }
  291 +
  292 + void PluginTabsSelectedIndexChanged(object sender, EventArgs e)
  293 + {
  294 + if (PluginTabs.TabPages.Count > 0)
  295 + if (PluginTabs.SelectedTab.Controls.Count > 0)
  296 + if (PluginTabs.SelectedTab.Controls[0] is PluginPage)
  297 + {
  298 + this.Text = (PluginTabs.SelectedTab.Controls[0] as PluginPage).NodeInfoName + "SA";
  299 + }
  300 + }
  301 +
  302 + void ExitToolStripMenuItemClick(object sender, EventArgs e)
  303 + {
  304 + Close();
  305 + }
  306 +
  307 + void OSCToolStripMenuItemClick(object sender, EventArgs e)
  308 + {
  309 + if (PluginTabs == null)
  310 + (MainPanel.Controls[0] as PluginPage).OSC = !(MainPanel.Controls[0] as PluginPage).OSC;
  311 + else
  312 + (PluginTabs.TabPages[PluginTabs.SelectedIndex].Controls[0] as PluginPage).OSC = !(PluginTabs.TabPages[PluginTabs.SelectedIndex].Controls[0] as PluginPage).OSC;
  313 + }
  314 +
  315 + void DebugToolStripMenuItemClick(object sender, EventArgs e)
  316 + {
  317 + if (PluginTabs == null)
  318 + (MainPanel.Controls[0] as PluginPage).Debug = !(MainPanel.Controls[0] as PluginPage).Debug;
  319 + else
  320 + (PluginTabs.TabPages[PluginTabs.SelectedIndex].Controls[0] as PluginPage).Debug = !(PluginTabs.TabPages[PluginTabs.SelectedIndex].Controls[0] as PluginPage).Debug;
  321 + }
  322 + }
  323 +
  324 + public class PlugInfo
  325 + {
  326 + private string FPath;
  327 + private string FClassName;
  328 +
  329 + public string Path
  330 + {
  331 + get {return FPath;}
  332 + set {FPath = value;}
  333 + }
  334 + public string ClassName
  335 + {
  336 + get {return FClassName;}
  337 + set {FClassName = value;}
  338 + }
  339 + }
  340 +}
BIN  Hoster/MainForm.resources
Binary file not shown
0  Hoster/MainForm.resources
Sorry, we could not display the changes to this file because there were too many other changes to display.
123 Hoster/MainForm.resx
... ... @@ -0,0 +1,123 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<root>
  3 + <!--
  4 + Microsoft ResX Schema
  5 +
  6 + Version 2.0
  7 +
  8 + The primary goals of this format is to allow a simple XML format
  9 + that is mostly human readable. The generation and parsing of the
  10 + various data types are done through the TypeConverter classes
  11 + associated with the data types.
  12 +
  13 + Example:
  14 +
  15 + ... ado.net/XML headers & schema ...
  16 + <resheader name="resmimetype">text/microsoft-resx</resheader>
  17 + <resheader name="version">2.0</resheader>
  18 + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
  19 + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
  20 + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
  21 + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
  22 + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
  23 + <value>[base64 mime encoded serialized .NET Framework object]</value>
  24 + </data>
  25 + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
  26 + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
  27 + <comment>This is a comment</comment>
  28 + </data>
  29 +
  30 + There are any number of "resheader" rows that contain simple
  31 + name/value pairs.
  32 +
  33 + Each data row contains a name, and value. The row also contains a
  34 + type or mimetype. Type corresponds to a .NET class that support
  35 + text/value conversion through the TypeConverter architecture.
  36 + Classes that don't support this are serialized and stored with the
  37 + mimetype set.
  38 +
  39 + The mimetype is used for serialized objects, and tells the
  40 + ResXResourceReader how to depersist the object. This is currently not
  41 + extensible. For a given mimetype the value must be set accordingly:
  42 +
  43 + Note - application/x-microsoft.net.object.binary.base64 is the format
  44 + that the ResXResourceWriter will generate, however the reader can
  45 + read any of the formats listed below.
  46 +
  47 + mimetype: application/x-microsoft.net.object.binary.base64
  48 + value : The object must be serialized with
  49 + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
  50 + : and then encoded with base64 encoding.
  51 +
  52 + mimetype: application/x-microsoft.net.object.soap.base64
  53 + value : The object must be serialized with
  54 + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
  55 + : and then encoded with base64 encoding.
  56 +
  57 + mimetype: application/x-microsoft.net.object.bytearray.base64
  58 + value : The object must be serialized into a byte array
  59 + : using a System.ComponentModel.TypeConverter
  60 + : and then encoded with base64 encoding.
  61 + -->
  62 + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  63 + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
  64 + <xsd:element name="root" msdata:IsDataSet="true">
  65 + <xsd:complexType>
  66 + <xsd:choice maxOccurs="unbounded">
  67 + <xsd:element name="metadata">
  68 + <xsd:complexType>
  69 + <xsd:sequence>
  70 + <xsd:element name="value" type="xsd:string" minOccurs="0" />
  71 + </xsd:sequence>
  72 + <xsd:attribute name="name" use="required" type="xsd:string" />
  73 + <xsd:attribute name="type" type="xsd:string" />
  74 + <xsd:attribute name="mimetype" type="xsd:string" />
  75 + <xsd:attribute ref="xml:space" />
  76 + </xsd:complexType>
  77 + </xsd:element>
  78 + <xsd:element name="assembly">
  79 + <xsd:complexType>
  80 + <xsd:attribute name="alias" type="xsd:string" />
  81 + <xsd:attribute name="name" type="xsd:string" />
  82 + </xsd:complexType>
  83 + </xsd:element>
  84 + <xsd:element name="data">
  85 + <xsd:complexType>
  86 + <xsd:sequence>
  87 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  88 + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
  89 + </xsd:sequence>
  90 + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
  91 + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
  92 + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
  93 + <xsd:attribute ref="xml:space" />
  94 + </xsd:complexType>
  95 + </xsd:element>
  96 + <xsd:element name="resheader">
  97 + <xsd:complexType>
  98 + <xsd:sequence>
  99 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  100 + </xsd:sequence>
  101 + <xsd:attribute name="name" type="xsd:string" use="required" />
  102 + </xsd:complexType>
  103 + </xsd:element>
  104 + </xsd:choice>
  105 + </xsd:complexType>
  106 + </xsd:element>
  107 + </xsd:schema>
  108 + <resheader name="resmimetype">
  109 + <value>text/microsoft-resx</value>
  110 + </resheader>
  111 + <resheader name="version">
  112 + <value>2.0</value>
  113 + </resheader>
  114 + <resheader name="reader">
  115 + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  116 + </resheader>
  117 + <resheader name="writer">
  118 + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  119 + </resheader>
  120 + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
  121 + <value>17, 17</value>
  122 + </metadata>
  123 +</root>
47 Hoster/PinPanel.Designer.cs
... ... @@ -0,0 +1,47 @@
  1 +namespace Hoster
  2 +{
  3 + partial class PinPanel
  4 + {
  5 + /// <summary>
  6 + /// Designer variable used to keep track of non-visual components.
  7 + /// </summary>
  8 + private System.ComponentModel.IContainer components = null;
  9 +
  10 + /// <summary>
  11 + /// Disposes resources used by the control.
  12 + /// </summary>
  13 + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14 + protected override void Dispose(bool disposing)
  15 + {
  16 + if (disposing) {
  17 + if (components != null) {
  18 + components.Dispose();
  19 + }
  20 + }
  21 + base.Dispose(disposing);
  22 + }
  23 +
  24 + /// <summary>
  25 + /// This method is required for Windows Forms designer support.
  26 + /// Do not change the method contents inside the source code editor. The Forms designer might
  27 + /// not be able to load this method if it was changed manually.
  28 + /// </summary>
  29 + private void InitializeComponent()
  30 + {
  31 + this.SuspendLayout();
  32 + //
  33 + // PinPanel
  34 + //
  35 + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  36 + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  37 + this.DoubleBuffered = true;
  38 + this.Name = "PinPanel";
  39 + this.Size = new System.Drawing.Size(702, 53);
  40 + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PinPanelMouseDown);
  41 + this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PinPanelMouseMove);
  42 + this.Paint += new System.Windows.Forms.PaintEventHandler(this.PinPanelPaint);
  43 + this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.PinPanelMouseUp);
  44 + this.ResumeLayout(false);
  45 + }
  46 + }
  47 +}
174 Hoster/PinPanel.cs
... ... @@ -0,0 +1,174 @@
  1 +using System;
  2 +using System.ComponentModel;
  3 +using System.Drawing;
  4 +using System.Windows.Forms;
  5 +using System.Collections.Generic;
  6 +
  7 +using VVVV.PluginInterfaces.V1;
  8 +
  9 +namespace Hoster
  10 +{
  11 + /// <summary>
  12 + /// Description of PinPanel.
  13 + /// </summary>
  14 + public partial class PinPanel : UserControl
  15 + {
  16 + const int FPinWidth = 70;
  17 + const int FSliceHeight = 15;
  18 + private List<TBasePin> FPinList;
  19 + private int FTargetPin;
  20 + private int FTargetSlice;
  21 + private Point FMousePoint;
  22 + private bool FMouseDown;
  23 + private int FDelta;
  24 + private List<TBasePin> FVisiblePins;
  25 +
  26 + private OpenFileDialog FOpenDialog = new OpenFileDialog();
  27 +
  28 +
  29 + public List<TBasePin> PinList
  30 + {
  31 + set {FPinList = value;}
  32 + }
  33 +
  34 + public int TargetPin
  35 + {
  36 + set {FTargetPin = value;}
  37 + }
  38 +
  39 + public int TargetSlice
  40 + {
  41 + set {FTargetSlice = value;}
  42 + }
  43 +
  44 + public PinPanel()
  45 + {
  46 + //
  47 + // The InitializeComponent() call is required for Windows Forms designer support.
  48 + //
  49 + InitializeComponent();
  50 + }
  51 +
  52 + public void UpdateVisiblePinList()
  53 + {
  54 + FVisiblePins = FPinList.FindAll(delegate(TBasePin p) {return (p as TBasePin).Visibility != TPinVisibility.False;});
  55 + }
  56 +
  57 + void PinPanelPaint(object sender, PaintEventArgs e)
  58 + {
  59 + if (FVisiblePins == null)
  60 + return;
  61 +
  62 + FVisiblePins.Sort(delegate(TBasePin p1, TBasePin p2) {return (p1 as TBasePin).Order.CompareTo((p2 as TBasePin).Order);});
  63 +
  64 + System.Drawing.Graphics g = e.Graphics;
  65 +
  66 + //mark current slice
  67 + Brush bgray = new System.Drawing.SolidBrush(Color.Gray);
  68 + Rectangle r = new Rectangle(0, 0, 0, 0);
  69 +
  70 + r.Location = new Point(FTargetPin * FPinWidth, (FTargetSlice+1) * FSliceHeight);
  71 + r.Width = FPinWidth;
  72 + r.Height = FSliceHeight+1;
  73 + g.FillRectangle(bgray, r);
  74 +
  75 + //draw inputs
  76 + Font f = new Font("Lucida Sans", 8);
  77 + Brush bblack = new System.Drawing.SolidBrush(Color.Black);
  78 + Pen p = new Pen(Color.Black);
  79 +
  80 + int idx=0;
  81 + foreach (TBasePin pin in FVisiblePins)
  82 + {
  83 + r.X = idx*FPinWidth;
  84 + r.Y = 0;
  85 + r.Width = FPinWidth;
  86 + r.Height = this.ClientRectangle.Height-1;
  87 +
  88 + g.ResetClip();
  89 + g.DrawRectangle(p, r);
  90 +
  91 + g.SetClip(r);
  92 + pin.Draw(g, f, bblack, p, r);
  93 + idx++;
  94 + }
  95 + }
  96 +
  97 + void PinPanelMouseDown(object sender, MouseEventArgs e)
  98 + {
  99 + FMouseDown = true;
  100 + FMousePoint = e.Location;
  101 + }
  102 +
  103 + void PinPanelMouseMove(object sender, MouseEventArgs e)
  104 + {
  105 + if (!FMouseDown)
  106 + {
  107 + int pin = (int) (e.X / FPinWidth);
  108 + if (pin < FVisiblePins.Count)
  109 + FTargetPin = pin;
  110 + else
  111 + FTargetPin = -1;
  112 +
  113 + int slice = (int) (e.Y / FSliceHeight) - 1;
  114 + if ((FTargetPin >= 0) && (slice >= 0))
  115 + {
  116 + if (slice < (FVisiblePins[FTargetPin] as TBasePin).SliceCount * (FVisiblePins[FTargetPin] as TBasePin).Dimension)
  117 + FTargetSlice = slice;
  118 + else
  119 + FTargetSlice = -1;
  120 + }
  121 + else
  122 + FTargetSlice = -1;
  123 + }
  124 + else
  125 + {
  126 + FDelta = (e.Y - FMousePoint.Y);
  127 +
  128 + FMousePoint = e.Location;
  129 + }
  130 + }
  131 +
  132 + void PinPanelMouseUp(object sender, MouseEventArgs e)
  133 + {
  134 + FMouseDown = false;
  135 +
  136 + if ((e.Button == MouseButtons.Right) && (FVisiblePins[FTargetPin] is TStringPin))
  137 + {
  138 + FOpenDialog.ShowDialog();
  139 + (FVisiblePins[FTargetPin] as TStringPin).SetString(FTargetSlice, FOpenDialog.FileName);
  140 + }
  141 + }
  142 +
  143 + public void SetInputs()
  144 + {
  145 + //set inputs
  146 + if ((FTargetSlice > -1) && (FMouseDown))
  147 + {
  148 + if (FVisiblePins[FTargetPin] is TValuePin)
  149 + {
  150 + switch ((FVisiblePins[FTargetPin] as TValuePin).Dimension)
  151 + {
  152 + case 1: (FVisiblePins[FTargetPin] as TValuePin).SetDeltaValue(FTargetSlice, FDelta); break;
  153 + case 2:
  154 + {
  155 + if (FTargetSlice % 2 == 0)
  156 + (FVisiblePins[FTargetPin] as TValuePin).SetDeltaValue2D(FTargetSlice, FDelta, 0);
  157 + else
  158 + (FVisiblePins[FTargetPin] as TValuePin).SetDeltaValue2D(FTargetSlice-1, 0, FDelta);
  159 + break;
  160 + }
  161 + }
  162 + FDelta = 0;
  163 +
  164 + }
  165 + else if (FVisiblePins[FTargetPin] is TStringPin)
  166 + {
  167 +
  168 + }
  169 +
  170 + Invalidate();
  171 + }
  172 + }
  173 + }
  174 +}
177 Hoster/PluginHost/BasePin.cs
... ... @@ -0,0 +1,177 @@
  1 +using System;
  2 +using System.Collections;
  3 +using System.Drawing;
  4 +
  5 +using VVVV.PluginInterfaces.V1;
  6 +
  7 +namespace Hoster
  8 +{
  9 + public delegate void TOnConfigurate(IPluginConfig Input);
  10 +
  11 + abstract public class TBasePin: IPluginIO, IPluginIn, IPluginOut
  12 + {
  13 + public int FSliceCount = 0;
  14 + protected IPluginHost FParent;
  15 + protected string FName;
  16 + protected int FOrder;
  17 + protected int FDimension;
  18 + protected bool FAutoValidate;
  19 + protected bool FPinIsChanged;
  20 + protected bool FSliceCountIsChanged;
  21 + private TSliceMode FSliceMode;
  22 + private TPinVisibility FVisibility;
  23 + private TPinDirection FPinDirection;
  24 +
  25 + protected const int FSliceHeight = 15;
  26 +
  27 + abstract protected void ChangeSliceCount();
  28 + abstract protected string AsString(int index);
  29 +
  30 + public TOnConfigurate FOnConfigurate;
  31 +
  32 + static int GlobalPinCount = 0;
  33 +
  34 + public TBasePin(IPluginHost Parent, string PinName, int Dimension, TPinDirection PinDirection, TOnConfigurate Callback, TSliceMode SliceMode, TPinVisibility Visibility)
  35 + {
  36 + FParent = Parent;
  37 + FName = PinName;
  38 + FDimension = Dimension;
  39 + FSliceMode = SliceMode;
  40 + FVisibility = Visibility;
  41 + FPinDirection = PinDirection;
  42 + FOnConfigurate = Callback;
  43 + FPinIsChanged = true;
  44 +
  45 + SliceCount = 1;
  46 +
  47 + //initialize with an arbitrary order so that the sortby-order in the gui is not flickering
  48 + FOrder = GlobalPinCount++;
  49 + }
  50 +
  51 + public string Name
  52 + {
  53 + get {return FName;}
  54 + set {FName = value;}
  55 + }
  56 +
  57 + public TSliceMode SliceMode
  58 + {
  59 + get {return FSliceMode;}
  60 + set {FSliceMode = value;}
  61 + }
  62 +
  63 + public int Order
  64 + {
  65 + get {return FOrder;}
  66 + set {FOrder = value;}
  67 + }
  68 +
  69 + public int Dimension
  70 + {
  71 + get {return FDimension;}
  72 + set {FDimension = value;}
  73 + }
  74 +
  75 + public TPinDirection Direction
  76 + {
  77 + get {return FPinDirection;}
  78 + set {FPinDirection = value;}
  79 + }
  80 +
  81 + public TPinVisibility Visibility
  82 + {
  83 + get {return FVisibility;}
  84 + set {FVisibility = value;}
  85 + }
  86 +
  87 + public bool AutoValidate
  88 + {
  89 + get {return FAutoValidate;}
  90 + set {FAutoValidate = value;}
  91 + }
  92 +
  93 + public int SliceCount
  94 + {
  95 + get {return FSliceCount;}
  96 + set
  97 + {
  98 + if (FSliceCount != value)
  99 + {
  100 + FSliceCount = value;
  101 +
  102 + ChangeSliceCount();
  103 +
  104 + FSliceCountIsChanged = true;
  105 + FPinIsChanged = true;
  106 +
  107 + //don't call configurate here for vvvv doesn't do it either
  108 + //if (FOnConfigurate != null)
  109 + // FOnConfigurate(this);
  110 + }
  111 + }
  112