From fca23736c9c77f1ce47d22befc0f92d78209fff3 Mon Sep 17 00:00:00 2001 From: Joshua Askharoun Date: Fri, 2 Apr 2021 21:55:08 -0500 Subject: [PATCH] Remove copy of UIX project; First UIX source that compiles --- UIX/.gitattributes | 63 - UIX/.gitignore | 340 - UIX/AssemblyInfo.cs | 21 - .../Iris/Accessibility/AccChildID.cs | 13 - UIX/Microsoft/Iris/Accessibility/AccEvents.cs | 55 - .../Iris/Accessibility/AccNavDirs.cs | 22 - .../Iris/Accessibility/AccObjectID.cs | 24 - UIX/Microsoft/Iris/Accessibility/AccRole.cs | 77 - .../Iris/Accessibility/AccSelFlags.cs | 22 - UIX/Microsoft/Iris/Accessibility/AccStates.cs | 49 - .../Iris/Accessibility/Accessible.cs | 478 - .../Iris/Accessibility/AccessibleChildren.cs | 98 - .../Iris/Accessibility/AccessibleProperty.cs | 37 - .../Iris/Accessibility/AccessibleProxy.cs | 549 - .../Iris/Accessibility/RootAccessibleProxy.cs | 53 - UIX/Microsoft/Iris/AggregateList.cs | 197 - .../Iris/Animations/ActiveSequence.cs | 309 - .../Iris/Animations/ActiveTransitions.cs | 33 - .../Iris/Animations/AlphaKeyframe.cs | 34 - UIX/Microsoft/Iris/Animations/Animation.cs | 152 - .../Iris/Animations/AnimationArgs.cs | 108 - .../Iris/Animations/AnimationCompleteArgs.cs | 19 - .../Iris/Animations/AnimationEventType.cs | 24 - .../Iris/Animations/AnimationHandle.cs | 47 - .../Iris/Animations/AnimationManager.cs | 141 - .../Iris/Animations/AnimationProxy.cs | 339 - .../Iris/Animations/AnimationSystem.cs | 81 - .../Iris/Animations/AnimationTemplate.cs | 208 - .../Iris/Animations/AnimationType.cs | 35 - .../Iris/Animations/BaseFloatKeyframe.cs | 50 - UIX/Microsoft/Iris/Animations/BaseKeyframe.cs | 139 - .../Animations/BaseMultiplyFloatKeyframe.cs | 15 - .../Animations/BaseMultiplyVector3Keyframe.cs | 31 - .../Iris/Animations/BaseRotationKeyframe.cs | 51 - .../Iris/Animations/BaseVector2Keyframe.cs | 50 - .../Iris/Animations/BaseVector3Keyframe.cs | 50 - .../Iris/Animations/BaseVector4Keyframe.cs | 50 - .../Iris/Animations/CameraAtKeyframe.cs | 25 - .../Iris/Animations/CameraEyeKeyframe.cs | 25 - .../Iris/Animations/CameraUpKeyframe.cs | 25 - .../Iris/Animations/CameraZnKeyframe.cs | 28 - .../Iris/Animations/EffectAnimation.cs | 21 - .../Iris/Animations/EffectColorKeyframe.cs | 26 - .../Iris/Animations/EffectFloatKeyframe.cs | 17 - .../Iris/Animations/EffectVector3Keyframe.cs | 19 - .../Iris/Animations/IAnimatableOwner.cs | 15 - .../Iris/Animations/IAnimationProvider.cs | 17 - .../Iris/Animations/Interpolation.cs | 106 - .../Iris/Animations/InterpolationType.cs | 21 - .../Iris/Animations/KeyframeFilter.cs | 18 - .../Iris/Animations/MergeAnimation.cs | 97 - .../Iris/Animations/NonIntensiveAnimation.cs | 12 - .../Iris/Animations/OrientationKeyframe.cs | 13 - .../Animations/OrphanedVisualCollection.cs | 95 - .../Iris/Animations/PositionKeyframe.cs | 66 - .../Iris/Animations/PositionXKeyframe.cs | 31 - .../Iris/Animations/PositionYKeyframe.cs | 31 - .../Iris/Animations/ReferenceAnimation.cs | 41 - UIX/Microsoft/Iris/Animations/RelativeTo.cs | 138 - .../Iris/Animations/RendererProperty.cs | 35 - .../Iris/Animations/RotateKeyframe.cs | 34 - .../Iris/Animations/ScaleKeyframe.cs | 60 - .../Iris/Animations/ScaleXKeyframe.cs | 31 - .../Iris/Animations/ScaleYKeyframe.cs | 31 - UIX/Microsoft/Iris/Animations/SizeKeyframe.cs | 28 - .../Iris/Animations/SizeXKeyframe.cs | 26 - .../Iris/Animations/SizeYKeyframe.cs | 26 - .../Iris/Animations/SnapshotPolicy.cs | 15 - .../Iris/Animations/SnapshotRelativeTo.cs | 21 - UIX/Microsoft/Iris/Animations/StopCommand.cs | 15 - .../Iris/Animations/StopCommandSet.cs | 47 - .../Iris/Animations/SwitchAnimation.cs | 63 - .../Iris/Animations/TransformAnimation.cs | 176 - .../Iris/Animations/TransformAttribute.cs | 17 - .../TransformByAttributeAnimation.cs | 174 - .../Iris/Animations/ValueTransformer.cs | 76 - UIX/Microsoft/Iris/Application.cs | 517 - UIX/Microsoft/Iris/ArrayListDataSet.cs | 23 - .../Iris/AssemblyDataProviderWrapper.cs | 30 - UIX/Microsoft/Iris/Audio/Sound.cs | 63 - UIX/Microsoft/Iris/BooleanChoice.cs | 68 - UIX/Microsoft/Iris/ByteRangedValue.cs | 52 - UIX/Microsoft/Iris/Choice.cs | 342 - .../CodeModel/Cpp/DllConstructorSchema.cs | 83 - .../Iris/CodeModel/Cpp/DllEnumProxy.cs | 36 - .../Iris/CodeModel/Cpp/DllEnumSchema.cs | 141 - .../Iris/CodeModel/Cpp/DllEventSchema.cs | 51 - .../Iris/CodeModel/Cpp/DllInterfaceProxy.cs | 25 - .../CodeModel/Cpp/DllIntrinsicTypeSchema.cs | 24 - .../Iris/CodeModel/Cpp/DllLoadResult.cs | 337 - .../CodeModel/Cpp/DllLoadResultFactory.cs | 118 - .../Iris/CodeModel/Cpp/DllMethodSchema.cs | 128 - .../Iris/CodeModel/Cpp/DllPropertySchema.cs | 165 - .../Iris/CodeModel/Cpp/DllProxyHandleTable.cs | 61 - .../Iris/CodeModel/Cpp/DllProxyList.cs | 319 - .../Iris/CodeModel/Cpp/DllProxyObject.cs | 272 - .../Cpp/DllProxyObjectHandleTable.cs | 19 - .../CodeModel/Cpp/DllProxyObjectReference.cs | 42 - .../Iris/CodeModel/Cpp/DllProxyServices.cs | 311 - .../Iris/CodeModel/Cpp/DllTypeSchema.cs | 548 - .../Iris/CodeModel/Cpp/DllTypeSchemaBase.cs | 215 - .../Cpp/MarkupDataQueryHandleTable.cs | 21 - .../Cpp/MarkupDataTypeHandleTable.cs | 21 - .../Cpp/NativeDataProviderWrapper.cs | 41 - .../CodeModel/Cpp/NativeTraceCategories.cs | 19 - .../Iris/CodeModel/Cpp/ProxyHandleTable.cs | 28 - .../Iris/CodeModel/Cpp/ProxyHandleTable`1.cs | 207 - .../Iris/CodeModel/Cpp/StringPinState.cs | 16 - .../CodeModel/Cpp/StringProxyHandleTable.cs | 76 - .../CodeModel/Cpp/TypeSchemaHandleTable.cs | 21 - UIX/Microsoft/Iris/CodeModel/Cpp/UIXID.cs | 44 - .../Iris/CodeModel/Cpp/UIXIDVerifier.cs | 45 - .../Iris/CodeModel/Cpp/UIXVariant.cs | 267 - UIX/Microsoft/Iris/Command.cs | 127 - UIX/Microsoft/Iris/CompilerInput.cs | 15 - UIX/Microsoft/Iris/Data/INotifyList.cs | 17 - UIX/Microsoft/Iris/Data/IResourceProvider.cs | 13 - UIX/Microsoft/Iris/Data/IVirtualList.cs | 30 - UIX/Microsoft/Iris/Data/IntListUtility.cs | 37 - .../Iris/Data/ItemRequestCallback.cs | 10 - UIX/Microsoft/Iris/Data/ListUtility.cs | 80 - UIX/Microsoft/Iris/Data/Resource.cs | 135 - .../ResourceAcquisitionCompleteHandler.cs | 10 - UIX/Microsoft/Iris/Data/ResourceManager.cs | 138 - UIX/Microsoft/Iris/Data/ResourceStatus.cs | 16 - .../Iris/Data/SingleArrayListCache.cs | 30 - .../Data/SlowDataAcquireCompleteHandler.cs | 10 - UIX/Microsoft/Iris/Data/StringUtility.cs | 180 - .../Iris/Data/UIListContentsChangeType.cs | 21 - .../Iris/Data/UIListContentsChangedArgs.cs | 45 - .../Iris/Data/UIListContentsChangedHandler.cs | 14 - UIX/Microsoft/Iris/Data/UpdateHelper.cs | 192 - UIX/Microsoft/Iris/DataProviderMapping.cs | 70 - UIX/Microsoft/Iris/DataProviderObject.cs | 94 - .../DataProviderPropertyChangedEventArgs.cs | 21 - UIX/Microsoft/Iris/DataProviderQuery.cs | 204 - .../Iris/DataProviderQueryFactory.cs | 10 - UIX/Microsoft/Iris/DataProviderQueryStatus.cs | 17 - UIX/Microsoft/Iris/DeferredInvokeHandler.cs | 10 - UIX/Microsoft/Iris/DeferredInvokePriority.cs | 14 - UIX/Microsoft/Iris/DeferredInvokeProxy.cs | 22 - UIX/Microsoft/Iris/Drawing/Camera.cs | 448 - UIX/Microsoft/Iris/Drawing/Color.cs | 227 - .../Drawing/ContentLoadCompleteHandler.cs | 10 - UIX/Microsoft/Iris/Drawing/EditCursorType.cs | 14 - UIX/Microsoft/Iris/Drawing/Font.cs | 92 - UIX/Microsoft/Iris/Drawing/FontStyles.cs | 19 - UIX/Microsoft/Iris/Drawing/ImageStatus.cs | 16 - UIX/Microsoft/Iris/Drawing/RawImage.cs | 92 - UIX/Microsoft/Iris/Drawing/RawImageItem.cs | 49 - UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs | 29 - .../Iris/Drawing/ResourceImageItem.cs | 154 - UIX/Microsoft/Iris/Drawing/RichText.cs | 463 - UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs | 79 - UIX/Microsoft/Iris/Drawing/Rotation.cs | 66 - .../Iris/Drawing/ScavengeImageCache.cs | 88 - .../Iris/Drawing/ScrollbarEnableFlags.cs | 16 - UIX/Microsoft/Iris/Drawing/ScrollbarType.cs | 15 - UIX/Microsoft/Iris/Drawing/SimpleText.cs | 87 - UIX/Microsoft/Iris/Drawing/TextFlow.cs | 198 - UIX/Microsoft/Iris/Drawing/TextImageCache.cs | 88 - UIX/Microsoft/Iris/Drawing/TextImageItem.cs | 72 - .../Iris/Drawing/TextMeasureParams.cs | 153 - UIX/Microsoft/Iris/Drawing/TextRun.cs | 211 - UIX/Microsoft/Iris/Drawing/TextStyle.cs | 246 - UIX/Microsoft/Iris/Drawing/UIImage.cs | 194 - UIX/Microsoft/Iris/Drawing/UriImage.cs | 114 - UIX/Microsoft/Iris/Error.cs | 32 - UIX/Microsoft/Iris/ErrorReportHandler.cs | 10 - UIX/Microsoft/Iris/Group.cs | 59 - UIX/Microsoft/Iris/GroupedList.cs | 380 - UIX/Microsoft/Iris/ICommand.cs | 24 - UIX/Microsoft/Iris/IDataProvider.cs | 17 - UIX/Microsoft/Iris/IDataProviderBaseObject.cs | 15 - UIX/Microsoft/Iris/IDataProviderObject.cs | 12 - UIX/Microsoft/Iris/IDataProviderQuery.cs | 29 - UIX/Microsoft/Iris/IModelItem.cs | 20 - UIX/Microsoft/Iris/IModelItemOwner.cs | 15 - UIX/Microsoft/Iris/ISearchableList.cs | 13 - UIX/Microsoft/Iris/IThreadSafeObject.cs | 15 - UIX/Microsoft/Iris/IValueRange.cs | 23 - UIX/Microsoft/Iris/Image.cs | 195 - UIX/Microsoft/Iris/ImageFormatUtils.cs | 37 - UIX/Microsoft/Iris/ImageInset.cs | 36 - .../Iris/ImageLoadCompleteHandler.cs | 10 - UIX/Microsoft/Iris/IndexedTree.cs | 444 - UIX/Microsoft/Iris/Input/AppCommandMapping.cs | 54 - UIX/Microsoft/Iris/Input/CommandCode.cs | 98 - UIX/Microsoft/Iris/Input/DragDropInfo.cs | 70 - UIX/Microsoft/Iris/Input/DragOperation.cs | 17 - UIX/Microsoft/Iris/Input/HIDCommandMapping.cs | 76 - UIX/Microsoft/Iris/Input/HidDevice.cs | 24 - UIX/Microsoft/Iris/Input/ICookedInputSite.cs | 17 - UIX/Microsoft/Iris/Input/IInputCustomFocus.cs | 13 - UIX/Microsoft/Iris/Input/InputDevice.cs | 17 - UIX/Microsoft/Iris/Input/InputEventType.cs | 34 - UIX/Microsoft/Iris/Input/InputInfo.cs | 146 - UIX/Microsoft/Iris/Input/InputItem.cs | 89 - UIX/Microsoft/Iris/Input/InputManager.cs | 653 - UIX/Microsoft/Iris/Input/InputQueue.cs | 768 - UIX/Microsoft/Iris/Input/KeyActionInfo.cs | 71 - UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs | 59 - UIX/Microsoft/Iris/Input/KeyCommandInfo.cs | 44 - UIX/Microsoft/Iris/Input/KeyFocusInfo.cs | 54 - UIX/Microsoft/Iris/Input/KeyFocusReason.cs | 20 - UIX/Microsoft/Iris/Input/KeyInfo.cs | 12 - UIX/Microsoft/Iris/Input/KeyStateInfo.cs | 63 - UIX/Microsoft/Iris/Input/KeyboardDevice.cs | 285 - UIX/Microsoft/Iris/Input/MouseActionInfo.cs | 72 - UIX/Microsoft/Iris/Input/MouseButtonInfo.cs | 80 - UIX/Microsoft/Iris/Input/MouseDevice.cs | 103 - UIX/Microsoft/Iris/Input/MouseFocusInfo.cs | 57 - UIX/Microsoft/Iris/Input/MouseInfo.cs | 35 - UIX/Microsoft/Iris/Input/MouseMoveInfo.cs | 35 - UIX/Microsoft/Iris/Input/MouseWheelInfo.cs | 41 - .../Iris/InputHandlers/BeginDragPolicy.cs | 14 - .../Iris/InputHandlers/Characters.cs | 46 - .../Iris/InputHandlers/ClickCount.cs | 14 - .../Iris/InputHandlers/ClickHandler.cs | 482 - UIX/Microsoft/Iris/InputHandlers/ClickType.cs | 27 - .../Iris/InputHandlers/DragDropHelper.cs | 105 - .../Iris/InputHandlers/DragHandler.cs | 473 - .../Iris/InputHandlers/DragSourceHandler.cs | 279 - .../Iris/InputHandlers/DropAction.cs | 19 - .../Iris/InputHandlers/DropTargetHandler.cs | 102 - .../Iris/InputHandlers/EventContext.cs | 30 - .../Iris/InputHandlers/FocusChangeReason.cs | 21 - .../Iris/InputHandlers/FocusHandler.cs | 81 - .../Iris/InputHandlers/KeyHandler.cs | 273 - .../Iris/InputHandlers/KeyHandlerKey.cs | 155 - .../InputHandlers/ModifierInputHandler.cs | 63 - .../Iris/InputHandlers/MouseWheelHandler.cs | 51 - .../Iris/InputHandlers/ScrollingHandler.cs | 366 - .../Iris/InputHandlers/ShortcutHandler.cs | 94 - .../InputHandlers/ShortcutHandlerCommand.cs | 41 - .../Iris/InputHandlers/TextEditingHandler.cs | 1113 -- .../Iris/InputHandlers/TypingHandler.cs | 224 - UIX/Microsoft/Iris/IntRangedValue.cs | 52 - UIX/Microsoft/Iris/InvokePolicy.cs | 15 - UIX/Microsoft/Iris/ItemCountHandler.cs | 10 - UIX/Microsoft/Iris/Key.cs | 16 - UIX/Microsoft/Iris/Layout/Alignment.cs | 17 - UIX/Microsoft/Iris/Layout/AreaOfInterest.cs | 93 - UIX/Microsoft/Iris/Layout/AreaOfInterestID.cs | 20 - .../Iris/Layout/AreaOfInterestLayoutInput.cs | 42 - .../Iris/Layout/ExtendedLayoutOutput.cs | 19 - UIX/Microsoft/Iris/Layout/ILayout.cs | 19 - UIX/Microsoft/Iris/Layout/ILayoutInput.cs | 15 - UIX/Microsoft/Iris/Layout/ILayoutNode.cs | 78 - UIX/Microsoft/Iris/Layout/ItemAlignment.cs | 54 - .../Iris/Layout/LayoutCompleteEventHandler.cs | 10 - UIX/Microsoft/Iris/Layout/LayoutConstants.cs | 13 - .../Iris/Layout/LayoutNodeEnumerator.cs | 44 - UIX/Microsoft/Iris/Layout/LayoutSlot.cs | 104 - UIX/Microsoft/Iris/Layout/SharedSize.cs | 222 - UIX/Microsoft/Iris/Layout/SharedSizePolicy.cs | 22 - UIX/Microsoft/Iris/Layout/Visibility.cs | 15 - UIX/Microsoft/Iris/Layouts/AnchorEdge.cs | 142 - UIX/Microsoft/Iris/Layouts/AnchorLayout.cs | 415 - .../Iris/Layouts/AnchorLayoutInput.cs | 63 - .../Iris/Layouts/ContentPositioningPolicy.cs | 14 - UIX/Microsoft/Iris/Layouts/DefaultLayout.cs | 46 - UIX/Microsoft/Iris/Layouts/DockLayout.cs | 124 - UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs | 44 - UIX/Microsoft/Iris/Layouts/FlipDirection.cs | 19 - UIX/Microsoft/Iris/Layouts/FlowLayout.cs | 790 - .../Iris/Layouts/FlowSizeMemoryLayoutInput.cs | 50 - UIX/Microsoft/Iris/Layouts/FormLayoutInput.cs | 12 - UIX/Microsoft/Iris/Layouts/GridLayout.cs | 650 - UIX/Microsoft/Iris/Layouts/InterestPoint.cs | 18 - .../Iris/Layouts/KeepAliveLayoutInput.cs | 31 - UIX/Microsoft/Iris/Layouts/MajorMinor.cs | 105 - .../Iris/Layouts/MissingItemPolicy.cs | 16 - UIX/Microsoft/Iris/Layouts/MouseTarget.cs | 15 - UIX/Microsoft/Iris/Layouts/PlacementMode.cs | 242 - UIX/Microsoft/Iris/Layouts/PopupLayout.cs | 288 - .../Iris/Layouts/PopupLayoutInput.cs | 120 - UIX/Microsoft/Iris/Layouts/PopupPosition.cs | 40 - UIX/Microsoft/Iris/Layouts/RelativeEdge.cs | 14 - UIX/Microsoft/Iris/Layouts/RepeatPolicy.cs | 16 - UIX/Microsoft/Iris/Layouts/RotateLayout.cs | 75 - UIX/Microsoft/Iris/Layouts/ScaleLayout.cs | 96 - .../Iris/Layouts/ScrollIntoViewDisposition.cs | 142 - UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs | 333 - .../Iris/Layouts/ScrollingLayoutInput.cs | 119 - .../Iris/Layouts/ScrollingLayoutOutput.cs | 86 - UIX/Microsoft/Iris/Layouts/StackLayout.cs | 100 - .../Iris/Layouts/StackLayoutInput.cs | 34 - UIX/Microsoft/Iris/Layouts/StackPriority.cs | 15 - UIX/Microsoft/Iris/Layouts/StripAlignment.cs | 15 - .../Iris/Library/AncestorEnumerator.cs | 47 - UIX/Microsoft/Iris/Library/Bits.cs | 79 - UIX/Microsoft/Iris/Library/DataCookie.cs | 41 - .../Library/DisposableNotifyObjectBase.cs | 25 - .../Iris/Library/DisposableObject.cs | 38 - UIX/Microsoft/Iris/Library/DynamicData.cs | 45 - UIX/Microsoft/Iris/Library/EventCookie.cs | 41 - UIX/Microsoft/Iris/Library/ExpandableArray.cs | 161 - .../Iris/Library/IDisposableObject.cs | 19 - .../Iris/Library/IDisposableOwner.cs | 15 - UIX/Microsoft/Iris/Library/ITreeNode.cs | 17 - UIX/Microsoft/Iris/Library/KeyAllocator.cs | 17 - UIX/Microsoft/Iris/Library/Math2.cs | 45 - .../Iris/Library/NotifyObjectBase.cs | 25 - UIX/Microsoft/Iris/Library/Result.cs | 30 - .../Iris/Library/SharedDisposableObject.cs | 27 - UIX/Microsoft/Iris/Library/SmartMap.cs | 179 - .../Iris/Library/StackIListEnumerator.cs | 31 - .../Library/StackIListReverseEnumerator.cs | 30 - UIX/Microsoft/Iris/Library/TreeNode.cs | 261 - .../Iris/Library/TreeNodeCollection.cs | 116 - .../Iris/Library/TreeNodeEnumerator.cs | 43 - UIX/Microsoft/Iris/Library/Utility.cs | 13 - UIX/Microsoft/Iris/ListContentsChangeType.cs | 21 - UIX/Microsoft/Iris/ListContentsChangedArgs.cs | 43 - .../Iris/ListContentsChangedHandler.cs | 12 - .../Iris/ListContentsChangedProxy.cs | 65 - UIX/Microsoft/Iris/ListDataSet.cs | 365 - UIX/Microsoft/Iris/Markup/AliasMapping.cs | 22 - .../Iris/Markup/AssemblyConstructorSchema.cs | 39 - .../Iris/Markup/AssemblyEventSchema.cs | 21 - .../Iris/Markup/AssemblyLoadResult.cs | 356 - .../Iris/Markup/AssemblyMarkupDataQuery.cs | 74 - .../Iris/Markup/AssemblyMarkupDataType.cs | 37 - .../Iris/Markup/AssemblyMethodSchema.cs | 46 - .../Iris/Markup/AssemblyObjectProxyHelper.cs | 649 - .../Iris/Markup/AssemblyPropertySchema.cs | 77 - .../Iris/Markup/AssemblyTypeSchema.cs | 340 - UIX/Microsoft/Iris/Markup/BooleanBoxes.cs | 16 - UIX/Microsoft/Iris/Markup/ByteCodeReader.cs | 142 - UIX/Microsoft/Iris/Markup/ByteCodeWriter.cs | 228 - .../Iris/Markup/ClassMethodSchema.cs | 25 - .../Iris/Markup/ClassPropertySchema.cs | 32 - UIX/Microsoft/Iris/Markup/ClassTypeSchema.cs | 68 - UIX/Microsoft/Iris/Markup/CodeListeners.cs | 16 - .../Iris/Markup/CompilationMessage.cs | 22 - .../Iris/Markup/CompiledMarkupLoadResult.cs | 71 - .../Iris/Markup/CompiledMarkupLoader.cs | 816 - UIX/Microsoft/Iris/Markup/ConstructHandler.cs | 10 - .../Iris/Markup/ConstructorSchema.cs | 28 - .../Iris/Markup/CreateLoadResultHandler.cs | 10 - .../Iris/Markup/DecodeBinaryHandler.cs | 10 - .../Iris/Markup/DefaultConstructHandler.cs | 10 - UIX/Microsoft/Iris/Markup/DelegateListener.cs | 37 - .../Iris/Markup/DestructiveListener.cs | 30 - .../Iris/Markup/EffectClassTypeSchema.cs | 123 - .../Iris/Markup/EncodeBinaryHandler.cs | 10 - UIX/Microsoft/Iris/Markup/EnumSchema.cs | 211 - UIX/Microsoft/Iris/Markup/ErrorLoadResult.cs | 20 - UIX/Microsoft/Iris/Markup/EventSchema.cs | 26 - .../Iris/Markup/ExpressionRestriction.cs | 15 - .../Markup/FastReflectionInvokeHandler.cs | 10 - .../Markup/FindCanonicalInstanceHandler.cs | 10 - ...rkCompatibleAssemblyPrimitiveTypeSchema.cs | 42 - .../FrameworkCompatibleAssemblyTypeSchema.cs | 51 - UIX/Microsoft/Iris/Markup/GetValueHandler.cs | 10 - .../Iris/Markup/IDynamicConstructionSchema.cs | 13 - UIX/Microsoft/Iris/Markup/IMarkupTypeBase.cs | 38 - UIX/Microsoft/Iris/Markup/INotifyObject.cs | 13 - UIX/Microsoft/Iris/Markup/ISchemaInfo.cs | 13 - UIX/Microsoft/Iris/Markup/Int32Boxes.cs | 15 - UIX/Microsoft/Iris/Markup/Int64Boxes.cs | 15 - UIX/Microsoft/Iris/Markup/Interpreter.cs | 819 - .../Iris/Markup/InterpreterContext.cs | 126 - UIX/Microsoft/Iris/Markup/InvokeHandler.cs | 10 - UIX/Microsoft/Iris/Markup/Listener.cs | 25 - .../Iris/Markup/ListenerEncodeMode.cs | 33 - UIX/Microsoft/Iris/Markup/ListenerNodeBase.cs | 67 - UIX/Microsoft/Iris/Markup/ListenerRootNode.cs | 13 - UIX/Microsoft/Iris/Markup/ListenerType.cs | 15 - UIX/Microsoft/Iris/Markup/Listeners.cs | 37 - UIX/Microsoft/Iris/Markup/LoadPass.cs | 17 - UIX/Microsoft/Iris/Markup/LoadResult.cs | 117 - UIX/Microsoft/Iris/Markup/LoadResultCache.cs | 57 - UIX/Microsoft/Iris/Markup/LoadResultStatus.cs | 15 - .../Iris/Markup/MarkupBinaryDataTable.cs | 79 - UIX/Microsoft/Iris/Markup/MarkupCompiler.cs | 603 - .../Iris/Markup/MarkupConstantPersist.cs | 15 - .../Iris/Markup/MarkupConstantPersistMode.cs | 15 - .../Iris/Markup/MarkupConstantsTable.cs | 127 - .../Iris/Markup/MarkupDataMapping.cs | 45 - .../Iris/Markup/MarkupDataMappingEntry.cs | 40 - .../Iris/Markup/MarkupDataProvider.cs | 100 - UIX/Microsoft/Iris/Markup/MarkupDataQuery.cs | 44 - ...MarkupDataQueryPreDefinedPropertySchema.cs | 35 - .../Markup/MarkupDataQueryPropertySchema.cs | 39 - .../MarkupDataQueryRefreshMethodSchema.cs | 32 - .../Iris/Markup/MarkupDataQuerySchema.cs | 101 - UIX/Microsoft/Iris/Markup/MarkupDataType.cs | 16 - .../Iris/Markup/MarkupDataTypeBaseObject.cs | 67 - .../Markup/MarkupDataTypePropertySchema.cs | 25 - .../Iris/Markup/MarkupDataTypeSchema.cs | 27 - .../Iris/Markup/MarkupDebugHelper.cs | 33 - UIX/Microsoft/Iris/Markup/MarkupEncoder.cs | 903 - UIX/Microsoft/Iris/Markup/MarkupError.cs | 40 - .../Iris/Markup/MarkupImportTables.cs | 17 - .../Iris/Markup/MarkupLineNumberTable.cs | 78 - UIX/Microsoft/Iris/Markup/MarkupListener.cs | 50 - UIX/Microsoft/Iris/Markup/MarkupListeners.cs | 45 - UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs | 180 - .../Iris/Markup/MarkupMethodSchema.cs | 131 - .../Iris/Markup/MarkupPropertySchema.cs | 66 - UIX/Microsoft/Iris/Markup/MarkupServices.cs | 57 - UIX/Microsoft/Iris/Markup/MarkupSystem.cs | 261 - UIX/Microsoft/Iris/Markup/MarkupType.cs | 18 - UIX/Microsoft/Iris/Markup/MarkupTypeSchema.cs | 389 - UIX/Microsoft/Iris/Markup/MethodSchema.cs | 34 - .../Iris/Markup/MethodSignatureKey.cs | 46 - .../Iris/Markup/NamedContentRecord.cs | 18 - .../Iris/Markup/NativeCodeModelMessage.cs | 31 - .../Iris/Markup/NativeMarkupDataQuery.cs | 123 - .../Iris/Markup/NativeMarkupDataType.cs | 164 - UIX/Microsoft/Iris/Markup/NotificationID.cs | 314 - UIX/Microsoft/Iris/Markup/NotifyService.cs | 75 - UIX/Microsoft/Iris/Markup/ObjectSourceType.cs | 16 - UIX/Microsoft/Iris/Markup/OpCode.cs | 59 - UIX/Microsoft/Iris/Markup/OperationType.cs | 30 - UIX/Microsoft/Iris/Markup/ParameterContext.cs | 44 - UIX/Microsoft/Iris/Markup/ParseResult.cs | 23 - UIX/Microsoft/Iris/Markup/Parser.cs | 380 - .../Iris/Markup/PerformOperationHandler.cs | 10 - .../Iris/Markup/PropertyOverrideCriteria.cs | 15 - .../PropertyOverrideCriteriaTypeConstraint.cs | 34 - UIX/Microsoft/Iris/Markup/PropertySchema.cs | 48 - .../Iris/Markup/ProviderlessMarkupDataType.cs | 58 - UIX/Microsoft/Iris/Markup/RangeValidator.cs | 12 - UIX/Microsoft/Iris/Markup/ReflectionHelper.cs | 94 - UIX/Microsoft/Iris/Markup/RuntimeMessage.cs | 81 - .../Iris/Markup/SSLexUnicodeBufferConsumer.cs | 65 - UIX/Microsoft/Iris/Markup/SchemaType.cs | 19 - .../Iris/Markup/ScriptRunScheduler.cs | 77 - UIX/Microsoft/Iris/Markup/SetValueHandler.cs | 10 - .../Iris/Markup/SourceMarkupImportTables.cs | 59 - .../Iris/Markup/SourceMarkupLoadResult.cs | 84 - .../Iris/Markup/SourceMarkupLoader.cs | 450 - .../Iris/Markup/StandardAssemblyTypeSchema.cs | 18 - .../Iris/Markup/SupportsOperationHandler.cs | 10 - .../Markup/SupportsTypeConversionHandler.cs | 10 - UIX/Microsoft/Iris/Markup/SymbolOrigin.cs | 22 - UIX/Microsoft/Iris/Markup/SymbolRecord.cs | 16 - UIX/Microsoft/Iris/Markup/SymbolReference.cs | 24 - UIX/Microsoft/Iris/Markup/TypeConstraint.cs | 26 - .../Iris/Markup/TypeConverterHandler.cs | 15 - UIX/Microsoft/Iris/Markup/TypeSchema.cs | 248 - UIX/Microsoft/Iris/Markup/UIB.cs | 17 - .../Iris/Markup/UIClassMethodSchema.cs | 35 - .../Iris/Markup/UIClassPropertySchema.cs | 22 - .../Iris/Markup/UIClassTypeSchema.cs | 96 - .../Iris/Markup/UIX/AccessibleSchema.cs | 181 - UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs | 28 - .../Iris/Markup/UIX/AlphaKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/AnchorEdgeSchema.cs | 175 - .../Markup/UIX/AnchorLayoutInputSchema.cs | 113 - .../Iris/Markup/UIX/AnchorLayoutSchema.cs | 106 - .../Iris/Markup/UIX/AnimationHandleSchema.cs | 34 - .../Iris/Markup/UIX/AnimationSchema.cs | 79 - UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs | 50 - UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs | 44 - .../Iris/Markup/UIX/BooleanChoiceSchema.cs | 39 - .../Iris/Markup/UIX/BooleanSchema.cs | 173 - .../Markup/UIX/BrightnessInstanceSchema.cs | 44 - .../Iris/Markup/UIX/BrightnessSchema.cs | 32 - .../Iris/Markup/UIX/ByteRangedValueSchema.cs | 67 - UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs | 216 - .../Iris/Markup/UIX/CameraAtKeyframeSchema.cs | 33 - .../Markup/UIX/CameraEyeKeyframeSchema.cs | 33 - UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs | 130 - .../Iris/Markup/UIX/CameraUpKeyframeSchema.cs | 33 - .../Iris/Markup/UIX/CameraZnKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/CaretInfoSchema.cs | 48 - UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs | 104 - UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs | 154 - UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs | 51 - .../Iris/Markup/UIX/ClassStateSchema.cs | 51 - .../Iris/Markup/UIX/ClickHandlerSchema.cs | 126 - UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs | 104 - .../Markup/UIX/ColorElementInstanceSchema.cs | 45 - .../Iris/Markup/UIX/ColorElementSchema.cs | 31 - UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs | 1030 -- .../Iris/Markup/UIX/CommandSchema.cs | 49 - .../Iris/Markup/UIX/ContrastInstanceSchema.cs | 55 - .../Iris/Markup/UIX/ContrastSchema.cs | 43 - .../Iris/Markup/UIX/DataMappingSchema.cs | 38 - .../Iris/Markup/UIX/DataQuerySchema.cs | 36 - .../Iris/Markup/UIX/DataTypeSchema.cs | 29 - .../Iris/Markup/UIX/DebugOutlinesSchema.cs | 122 - UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs | 130 - .../Iris/Markup/UIX/DefaultLayoutSchema.cs | 21 - .../Markup/UIX/DesaturateInstanceSchema.cs | 55 - .../Iris/Markup/UIX/DesaturateSchema.cs | 43 - .../UIX/DestinationElementInstanceSchema.cs | 49 - .../Markup/UIX/DestinationElementSchema.cs | 49 - .../Iris/Markup/UIX/DictionarySchema.cs | 84 - .../Iris/Markup/UIX/DockLayoutInputSchema.cs | 85 - .../Iris/Markup/UIX/DockLayoutSchema.cs | 39 - UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs | 239 - .../Iris/Markup/UIX/DragHandlerSchema.cs | 124 - .../Markup/UIX/DragSourceHandlerSchema.cs | 82 - .../Markup/UIX/DropTargetHandlerSchema.cs | 63 - .../Markup/UIX/EdgeDetectionInstanceSchema.cs | 55 - .../Iris/Markup/UIX/EdgeDetectionSchema.cs | 43 - .../Iris/Markup/UIX/EditableTextDataSchema.cs | 66 - .../Iris/Markup/UIX/EffectAnimationSchema.cs | 30 - .../Markup/UIX/EffectColorAnimationSchema.cs | 30 - .../Markup/UIX/EffectColorKeyframeSchema.cs | 33 - .../Markup/UIX/EffectElementInstanceSchema.cs | 19 - .../Iris/Markup/UIX/EffectElementSchema.cs | 30 - .../Markup/UIX/EffectFloatAnimationSchema.cs | 30 - .../Markup/UIX/EffectFloatKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/EffectInputSchema.cs | 19 - .../Iris/Markup/UIX/EffectInstanceSchema.cs | 19 - .../Iris/Markup/UIX/EffectLayerSchema.cs | 39 - .../Iris/Markup/UIX/EffectOperationSchema.cs | 19 - UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs | 28 - .../UIX/EffectVector3AnimationSchema.cs | 30 - .../Markup/UIX/EffectVector3KeyframeSchema.cs | 33 - .../Iris/Markup/UIX/EmbossInstanceSchema.cs | 28 - UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs | 32 - .../Iris/Markup/UIX/EnumeratorSchema.cs | 42 - .../Iris/Markup/UIX/EnvironmentSchema.cs | 86 - .../Iris/Markup/UIX/EventContextSchema.cs | 32 - .../Iris/Markup/UIX/FlowLayoutSchema.cs | 82 - .../Iris/Markup/UIX/FocusHandlerSchema.cs | 65 - UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs | 337 - .../Iris/Markup/UIX/FormLayoutInputSchema.cs | 21 - .../Iris/Markup/UIX/GraphicSchema.cs | 97 - .../Iris/Markup/UIX/GridLayoutSchema.cs | 102 - UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs | 32 - UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs | 461 - .../Iris/Markup/UIX/HwndHostSchema.cs | 36 - .../Iris/Markup/UIX/IAnimationSchema.cs | 19 - .../Markup/UIX/ImageElementInstanceSchema.cs | 34 - .../Iris/Markup/UIX/ImageElementSchema.cs | 37 - UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs | 334 - UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs | 38 - .../Iris/Markup/UIX/InputHandlerSchema.cs | 36 - UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs | 288 - UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs | 239 - UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs | 228 - .../Iris/Markup/UIX/IntRangedValueSchema.cs | 67 - .../UIX/InterpolateElementInstanceSchema.cs | 55 - .../Markup/UIX/InterpolateElementSchema.cs | 55 - .../Iris/Markup/UIX/InterpolationSchema.cs | 193 - .../Iris/Markup/UIX/InvAlphaSchema.cs | 21 - .../Iris/Markup/UIX/InvColorSchema.cs | 21 - UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs | 21 - .../Iris/Markup/UIX/ItemAlignmentSchema.cs | 160 - .../Iris/Markup/UIX/KeyHandlerSchema.cs | 127 - .../Iris/Markup/UIX/KeyframeSchema.cs | 42 - .../Iris/Markup/UIX/LayoutInputSchema.cs | 19 - .../Iris/Markup/UIX/LayoutOutputSchema.cs | 28 - UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs | 97 - .../Markup/UIX/LightShaftInstanceSchema.cs | 130 - .../Iris/Markup/UIX/LightShaftSchema.cs | 109 - UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs | 225 - .../Iris/Markup/UIX/MajorMinorSchema.cs | 119 - .../Iris/Markup/UIX/MappingSchema.cs | 48 - .../UIX/MarkupDataQueryInstanceSchema.cs | 46 - .../UIX/MarkupDataTypeInstanceSchema.cs | 17 - .../Iris/Markup/UIX/MarkupErrorSchema.cs | 46 - UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs | 56 - UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs | 288 - .../Iris/Markup/UIX/MergeAnimationSchema.cs | 36 - .../Markup/UIX/MouseWheelHandlerSchema.cs | 45 - UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs | 44 - UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs | 53 - .../Markup/UIX/OrientationKeyframeSchema.cs | 33 - UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs | 31 - .../Iris/Markup/UIX/PlacementModeSchema.cs | 118 - .../Markup/UIX/PointLight2DInstanceSchema.cs | 114 - .../Iris/Markup/UIX/PointLight2DSchema.cs | 64 - UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs | 153 - .../Iris/Markup/UIX/PopupLayoutInputSchema.cs | 72 - .../Iris/Markup/UIX/PopupLayoutSchema.cs | 21 - .../Iris/Markup/UIX/PopupPositionSchema.cs | 62 - .../Iris/Markup/UIX/PositionKeyframeSchema.cs | 33 - .../Markup/UIX/PositionXKeyframeSchema.cs | 32 - .../Markup/UIX/PositionYKeyframeSchema.cs | 32 - UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs | 108 - .../Iris/Markup/UIX/RangedValueSchema.cs | 71 - .../Iris/Markup/UIX/RectangleSchema.cs | 217 - .../Iris/Markup/UIX/RelativeToSchema.cs | 168 - .../Iris/Markup/UIX/RepeaterSchema.cs | 112 - .../Iris/Markup/UIX/RotateKeyframeSchema.cs | 33 - .../Iris/Markup/UIX/RotateLayoutSchema.cs | 59 - .../Iris/Markup/UIX/RotationSchema.cs | 215 - .../Iris/Markup/UIX/SavedKeyFocusSchema.cs | 19 - .../Iris/Markup/UIX/ScaleKeyframeSchema.cs | 33 - .../Iris/Markup/UIX/ScaleLayoutSchema.cs | 65 - .../Iris/Markup/UIX/ScaleXKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/ScaleYKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/ScrollModelBaseSchema.cs | 137 - .../Iris/Markup/UIX/ScrollModelSchema.cs | 114 - .../Iris/Markup/UIX/ScrollerSchema.cs | 50 - .../Iris/Markup/UIX/ScrollingHandlerSchema.cs | 76 - .../Iris/Markup/UIX/SelectionManagerSchema.cs | 196 - .../Iris/Markup/UIX/SelectionRangeSchema.cs | 112 - .../Iris/Markup/UIX/SepiaInstanceSchema.cs | 116 - UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs | 67 - .../Iris/Markup/UIX/SharedSizeSchema.cs | 84 - .../Iris/Markup/UIX/ShortcutHandlerSchema.cs | 56 - UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs | 239 - .../Iris/Markup/UIX/SizeKeyframeSchema.cs | 33 - UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs | 126 - .../Iris/Markup/UIX/SizeXKeyframeSchema.cs | 32 - .../Iris/Markup/UIX/SizeYKeyframeSchema.cs | 32 - UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs | 100 - .../Markup/UIX/SpotLight2DInstanceSchema.cs | 165 - .../Iris/Markup/UIX/SpotLight2DSchema.cs | 100 - .../Iris/Markup/UIX/StackLayoutInputSchema.cs | 39 - .../Iris/Markup/UIX/StackLayoutSchema.cs | 21 - UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs | 238 - .../Iris/Markup/UIX/SwitchAnimationSchema.cs | 43 - .../Markup/UIX/TextEditingHandlerSchema.cs | 203 - .../Iris/Markup/UIX/TextFragmentSchema.cs | 40 - .../Iris/Markup/UIX/TextRunDataSchema.cs | 40 - .../Iris/Markup/UIX/TextRunRendererSchema.cs | 46 - UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs | 178 - .../Iris/Markup/UIX/TextScrollModelSchema.cs | 21 - .../Iris/Markup/UIX/TextStyleSchema.cs | 122 - UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs | 74 - .../Markup/UIX/TransformAnimationSchema.cs | 60 - .../TransformByAttributeAnimationSchema.cs | 62 - .../Iris/Markup/UIX/TypeConstraintSchema.cs | 36 - .../Iris/Markup/UIX/TypeSchemaDefinition.cs | 17 - .../Iris/Markup/UIX/TypeSelectorSchema.cs | 38 - .../Iris/Markup/UIX/TypingHandlerSchema.cs | 56 - UIX/Microsoft/Iris/Markup/UIX/UISchema.cs | 59 - .../Iris/Markup/UIX/UIStateSchema.cs | 169 - .../Iris/Markup/UIX/ValueRangeSchema.cs | 54 - .../Iris/Markup/UIX/ValueTransformerSchema.cs | 82 - .../Iris/Markup/UIX/Vector2Schema.cs | 238 - .../Iris/Markup/UIX/Vector3Schema.cs | 179 - .../Markup/UIX/VideoElementInstanceSchema.cs | 29 - .../Iris/Markup/UIX/VideoElementSchema.cs | 37 - UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs | 45 - .../Iris/Markup/UIX/VideoStreamSchema.cs | 28 - .../Iris/Markup/UIX/ViewItemSchema.cs | 456 - UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs | 17 - UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs | 155 - .../Iris/Markup/UIXConstructorSchema.cs | 28 - UIX/Microsoft/Iris/Markup/UIXEnumData.cs | 819 - UIX/Microsoft/Iris/Markup/UIXEnumSchema.cs | 27 - UIX/Microsoft/Iris/Markup/UIXEventSchema.cs | 19 - UIX/Microsoft/Iris/Markup/UIXLoadResult.cs | 59 - .../Iris/Markup/UIXLoadResultExports.cs | 520 - UIX/Microsoft/Iris/Markup/UIXMethodSchema.cs | 43 - .../Iris/Markup/UIXPropertySchema.cs | 72 - UIX/Microsoft/Iris/Markup/UIXTypeFlags.cs | 16 - UIX/Microsoft/Iris/Markup/UIXTypeID.cs | 256 - UIX/Microsoft/Iris/Markup/UIXTypeSchema.cs | 255 - UIX/Microsoft/Iris/Markup/UIXTypes.cs | 31 - UIX/Microsoft/Iris/Markup/ValidateMessage.cs | 155 - .../Iris/Markup/Validation/CastMethod.cs | 14 - .../Iris/Markup/Validation/ConstantType.cs | 20 - .../Iris/Markup/Validation/ExpressionType.cs | 29 - .../Iris/Markup/Validation/ExpressionUsage.cs | 15 - .../Iris/Markup/Validation/MethodSpecifier.cs | 14 - .../Iris/Markup/Validation/NameUsage.cs | 17 - .../Markup/Validation/PropertyAttribute.cs | 25 - .../Iris/Markup/Validation/StatementType.cs | 23 - .../Validation/SymbolResolutionDirective.cs | 14 - .../Iris/Markup/Validation/TriggerRecord.cs | 14 - .../Iris/Markup/Validation/TypeRestriction.cs | 66 - .../Iris/Markup/Validation/Validate.cs | 83 - .../Iris/Markup/Validation/ValidateAlias.cs | 67 - .../Iris/Markup/Validation/ValidateClass.cs | 392 - .../Iris/Markup/Validation/ValidateCode.cs | 158 - .../Iris/Markup/Validation/ValidateContext.cs | 629 - .../Markup/Validation/ValidateDataMapping.cs | 166 - .../Markup/Validation/ValidateDataQuery.cs | 53 - .../Markup/Validation/ValidateDataType.cs | 81 - .../Iris/Markup/Validation/ValidateEffect.cs | 177 - .../Validation/ValidateEffectElement.cs | 40 - .../Markup/Validation/ValidateExpression.cs | 58 - .../Markup/Validation/ValidateExpressionAs.cs | 47 - .../ValidateExpressionAssignment.cs | 55 - .../Validation/ValidateExpressionBaseClass.cs | 25 - .../Validation/ValidateExpressionCall.cs | 269 - .../Validation/ValidateExpressionCast.cs | 120 - .../Validation/ValidateExpressionConstant.cs | 106 - .../ValidateExpressionDeclareTrigger.cs | 76 - .../Validation/ValidateExpressionIndex.cs | 58 - .../Validation/ValidateExpressionIsCheck.cs | 45 - .../Validation/ValidateExpressionList.cs | 56 - .../Validation/ValidateExpressionNew.cs | 109 - .../ValidateExpressionNullCoalescing.cs | 60 - .../Validation/ValidateExpressionOperation.cs | 163 - .../Validation/ValidateExpressionSymbol.cs | 75 - .../Validation/ValidateExpressionTernary.cs | 60 - .../Validation/ValidateExpressionThis.cs | 23 - .../Validation/ValidateExpressionTypeOf.cs | 37 - .../Markup/Validation/ValidateFromString.cs | 70 - .../Markup/Validation/ValidateMetadata.cs | 14 - .../Iris/Markup/Validation/ValidateMethod.cs | 194 - .../Markup/Validation/ValidateMethodList.cs | 82 - .../Markup/Validation/ValidateNamespace.cs | 57 - .../Iris/Markup/Validation/ValidateObject.cs | 44 - .../Markup/Validation/ValidateObjectTag.cs | 396 - .../Markup/Validation/ValidateParameter.cs | 63 - .../Validation/ValidateParameterDefinition.cs | 42 - .../ValidateParameterDefinitionList.cs | 33 - .../Markup/Validation/ValidateProperty.cs | 358 - .../Iris/Markup/Validation/ValidateScripts.cs | 49 - .../Markup/Validation/ValidateStatement.cs | 42 - .../Validation/ValidateStatementAssignment.cs | 59 - .../Validation/ValidateStatementAttribute.cs | 100 - .../Validation/ValidateStatementBreak.cs | 48 - .../Validation/ValidateStatementCompound.cs | 52 - .../Validation/ValidateStatementExpression.cs | 33 - .../Validation/ValidateStatementForEach.cs | 92 - .../Markup/Validation/ValidateStatementIf.cs | 43 - .../Validation/ValidateStatementIfElse.cs | 51 - .../Validation/ValidateStatementLoop.cs | 26 - .../Validation/ValidateStatementReturn.cs | 52 - .../ValidateStatementScopedLocal.cs | 70 - .../Validation/ValidateStatementWhile.cs | 56 - .../Validation/ValidateTypeConstraint.cs | 62 - .../Validation/ValidateTypeIdentifier.cs | 83 - .../Iris/Markup/Validation/ValidateUI.cs | 175 - .../Iris/Markup/Validation/ValueApplyMode.cs | 20 - UIX/Microsoft/Iris/MaximizeMode.cs | 14 - UIX/Microsoft/Iris/ModelItem.cs | 328 - UIX/Microsoft/Iris/ModelItemDisposeMode.cs | 14 - .../Iris/ModelItems/BooleanChoice.cs | 43 - .../Iris/ModelItems/ByteRangedValue.cs | 23 - UIX/Microsoft/Iris/ModelItems/CaretInfo.cs | 94 - UIX/Microsoft/Iris/ModelItems/Choice.cs | 278 - UIX/Microsoft/Iris/ModelItems/Clipboard.cs | 20 - .../Iris/ModelItems/EditableTextData.cs | 93 - .../ModelItems/ITextScrollModelCallback.cs | 21 - .../Iris/ModelItems/IUIBooleanChoice.cs | 15 - .../Iris/ModelItems/IUIByteRangedValue.cs | 14 - UIX/Microsoft/Iris/ModelItems/IUIChoice.cs | 41 - UIX/Microsoft/Iris/ModelItems/IUICommand.cs | 17 - UIX/Microsoft/Iris/ModelItems/IUIGroup.cs | 17 - .../Iris/ModelItems/IUIIntRangedValue.cs | 14 - UIX/Microsoft/Iris/ModelItems/IUIList.cs | 19 - .../Iris/ModelItems/IUIRangedValue.cs | 23 - .../Iris/ModelItems/IUIValueRange.cs | 21 - .../Iris/ModelItems/IntRangedValue.cs | 23 - .../Iris/ModelItems/InvokePriority.cs | 14 - UIX/Microsoft/Iris/ModelItems/LayoutOutput.cs | 33 - UIX/Microsoft/Iris/ModelItems/NotifyList.cs | 111 - UIX/Microsoft/Iris/ModelItems/Range.cs | 79 - UIX/Microsoft/Iris/ModelItems/RangedValue.cs | 134 - UIX/Microsoft/Iris/ModelItems/ScrollModel.cs | 908 - .../Iris/ModelItems/ScrollModelBase.cs | 43 - .../Iris/ModelItems/SelectionManager.cs | 536 - .../Iris/ModelItems/TextScrollModel.cs | 247 - UIX/Microsoft/Iris/ModelItems/UICommand.cs | 60 - UIX/Microsoft/Iris/ModelItems/UITimer.cs | 56 - .../Iris/Navigation/FindFromPointWorker.cs | 158 - .../Iris/Navigation/INavigationSite.cs | 38 - .../Iris/Navigation/NavigationClass.cs | 14 - .../Iris/Navigation/NavigationFlow.cs | 208 - .../Iris/Navigation/NavigationItem.cs | 623 - .../Iris/Navigation/NavigationOrder.cs | 41 - .../Iris/Navigation/NavigationOrientation.cs | 19 - .../Iris/Navigation/NavigationPolicies.cs | 35 - .../Iris/Navigation/NavigationServices.cs | 298 - .../Iris/Navigation/NavigationSpace.cs | 259 - .../Iris/Navigation/NavigationStrip.cs | 205 - .../Navigation/TransientNavigationSite.cs | 85 - UIX/Microsoft/Iris/OS/CLR/NativeMethods.cs | 18 - .../Iris/OS/CLR/StandardOleMarshalObject.cs | 120 - .../Iris/OS/CLR/UnsafeNativeMethods.cs | 95 - UIX/Microsoft/Iris/OS/COMResult.cs | 21 - UIX/Microsoft/Iris/OS/DataObject.cs | 57 - UIX/Microsoft/Iris/OS/DllResource.cs | 42 - UIX/Microsoft/Iris/OS/DllResources.cs | 92 - UIX/Microsoft/Iris/OS/FileResource.cs | 90 - UIX/Microsoft/Iris/OS/FileResources.cs | 19 - UIX/Microsoft/Iris/OS/HttpResource.cs | 64 - UIX/Microsoft/Iris/OS/HttpResources.cs | 43 - UIX/Microsoft/Iris/OS/IImeCallbacks.cs | 21 - UIX/Microsoft/Iris/OS/IRawUIXServices.cs | 76 - UIX/Microsoft/Iris/OS/IRichTextCallbacks.cs | 69 - UIX/Microsoft/Iris/OS/IUIXListCallbacks.cs | 22 - UIX/Microsoft/Iris/OS/NativeApi.cs | 942 - UIX/Microsoft/Iris/OS/NativeXmlException.cs | 31 - UIX/Microsoft/Iris/OS/NativeXmlNodeType.cs | 23 - UIX/Microsoft/Iris/OS/NativeXmlReader.cs | 400 - UIX/Microsoft/Iris/OS/Win32Api.cs | 398 - UIX/Microsoft/Iris/ObjectPropertyPair.cs | 24 - UIX/Microsoft/Iris/PropertySet.cs | 166 - UIX/Microsoft/Iris/PropertyValue.cs | 26 - .../Iris/ProviderlessDataProviderObject.cs | 35 - UIX/Microsoft/Iris/Queues/Dispatcher.cs | 136 - UIX/Microsoft/Iris/Queues/Feeder.cs | 70 - UIX/Microsoft/Iris/Queues/Interconnect.cs | 54 - UIX/Microsoft/Iris/Queues/PriorityQueue.cs | 256 - UIX/Microsoft/Iris/Queues/Queue.cs | 28 - UIX/Microsoft/Iris/Queues/QueueItem.cs | 252 - UIX/Microsoft/Iris/Queues/SimpleQueue.cs | 45 - UIX/Microsoft/Iris/RangedValue.cs | 205 - UIX/Microsoft/Iris/RawImageFormat.cs | 15 - UIX/Microsoft/Iris/ReleaseBehavior.cs | 15 - .../Iris/RenderAPI/Audio/SoundData.cs | 126 - .../Iris/RenderAPI/Audio/SoundManager.cs | 109 - .../Iris/RenderAPI/Audio/SystemSoundEvent.cs | 42 - .../RenderAPI/Audio/SystemSoundEventTable.cs | 83 - UIX/Microsoft/Iris/RenderAPI/Drawing/Dib.cs | 51 - .../Iris/RenderAPI/Drawing/EdgeFade.cs | 205 - .../Iris/RenderAPI/Drawing/PointF.cs | 71 - .../Iris/RenderAPI/Drawing/RectangleF.cs | 205 - UIX/Microsoft/Iris/RenderAPI/Drawing/SizeF.cs | 96 - UIX/Microsoft/Iris/RenderAPI/HRESULT.cs | 42 - UIX/Microsoft/Iris/RenderAPI/Memory.cs | 93 - .../Iris/RenderAPI/RenderException.cs | 93 - UIX/Microsoft/Iris/RenderAPI/RendererApi.cs | 101 - .../VideoPlayback/BasicVideoGeometry.cs | 21 - .../VideoPlayback/BasicVideoPresentation.cs | 30 - .../RenderAPI/VideoPlayback/IUIVideoPortal.cs | 23 - .../RenderAPI/VideoPlayback/IUIVideoStream.cs | 17 - .../VideoPlayback/LinearVideoStretch.cs | 115 - .../VideoPlayback/VideoDisplayMode.cs | 16 - .../VideoPlayback/VideoOverscanMode.cs | 15 - .../VideoPlayback/VideoPresentationBuilder.cs | 368 - .../VideoPlayback/VideoZoomHandler.cs | 16 - UIX/Microsoft/Iris/RenderingQuality.cs | 14 - UIX/Microsoft/Iris/RenderingType.cs | 15 - UIX/Microsoft/Iris/RequestItemHandler.cs | 10 - UIX/Microsoft/Iris/RequestSlowDataHandler.cs | 10 - UIX/Microsoft/Iris/Session/DeferredCall.cs | 170 - UIX/Microsoft/Iris/Session/DeferredHandler.cs | 10 - UIX/Microsoft/Iris/Session/Direction.cs | 18 - .../Iris/Session/DispatchPriority.cs | 30 - UIX/Microsoft/Iris/Session/DispatcherTimer.cs | 220 - UIX/Microsoft/Iris/Session/EffectManager.cs | 98 - UIX/Microsoft/Iris/Session/ErrorManager.cs | 202 - UIX/Microsoft/Iris/Session/ErrorRecord.cs | 17 - UIX/Microsoft/Iris/Session/ErrorWatermark.cs | 17 - .../Iris/Session/EventRouteStages.cs | 22 - UIX/Microsoft/Iris/Session/Form.cs | 509 - .../Iris/Session/FormSessionConnectHandler.cs | 10 - .../Iris/Session/IErrorContextSource.cs | 15 - UIX/Microsoft/Iris/Session/IModalSession.cs | 13 - UIX/Microsoft/Iris/Session/ITimerOwner.cs | 13 - .../Iris/Session/ITrackableUIElement.cs | 17 - .../Iris/Session/ITrackableUIElementEvents.cs | 15 - .../Iris/Session/IZoneDisplayChild.cs | 13 - .../Iris/Session/InputDeliveryStatus.cs | 14 - .../Session/InputNotificationEventArgs.cs | 33 - .../Iris/Session/InputNotificationHandler.cs | 10 - .../Iris/Session/InvalidKeyFocusHandler.cs | 12 - .../Iris/Session/KeyCoalesceFilter.cs | 12 - UIX/Microsoft/Iris/Session/LoopCondition.cs | 10 - .../Iris/Session/NotifyErrorBatch.cs | 12 - UIX/Microsoft/Iris/Session/SimpleCallback.cs | 10 - UIX/Microsoft/Iris/Session/StaticServices.cs | 17 - UIX/Microsoft/Iris/Session/TimeoutHandler.cs | 10 - UIX/Microsoft/Iris/Session/TimeoutManager.cs | 311 - UIX/Microsoft/Iris/Session/TransformSet.cs | 18 - UIX/Microsoft/Iris/Session/UIApplication.cs | 126 - UIX/Microsoft/Iris/Session/UIDispatcher.cs | 336 - UIX/Microsoft/Iris/Session/UISession.cs | 409 - UIX/Microsoft/Iris/Session/UiTask.cs | 16 - UIX/Microsoft/Iris/SessionConnectedHandler.cs | 10 - .../Iris/SimpleAnimationPropertyMap.cs | 27 - UIX/Microsoft/Iris/SoundType.cs | 14 - UIX/Microsoft/Iris/ThreadSafety.cs | 21 - UIX/Microsoft/Iris/ThreadSafetyBlock.cs | 45 - UIX/Microsoft/Iris/Timer.cs | 135 - .../Iris/UI/ChildFaultedInDelegate.cs | 10 - UIX/Microsoft/Iris/UI/Class.cs | 158 - UIX/Microsoft/Iris/UI/ColorScheme.cs | 15 - UIX/Microsoft/Iris/UI/EffectClass.cs | 158 - UIX/Microsoft/Iris/UI/EffectElementWrapper.cs | 86 - UIX/Microsoft/Iris/UI/EffectProperty.cs | 39 - UIX/Microsoft/Iris/UI/EffectValue.cs | 57 - UIX/Microsoft/Iris/UI/EffectValueType.cs | 19 - UIX/Microsoft/Iris/UI/Environment.cs | 84 - UIX/Microsoft/Iris/UI/FindChildResult.cs | 15 - UIX/Microsoft/Iris/UI/FocusStateHandler.cs | 13 - .../Iris/UI/FormCloseRequestedHandler.cs | 12 - .../Iris/UI/FormPropertyChangedHandler.cs | 10 - UIX/Microsoft/Iris/UI/InputEventHandler.cs | 12 - UIX/Microsoft/Iris/UI/InputHandler.cs | 336 - UIX/Microsoft/Iris/UI/InputHandlerList.cs | 17 - .../Iris/UI/InputHandlerModifiers.cs | 21 - UIX/Microsoft/Iris/UI/InputHandlerStage.cs | 18 - .../Iris/UI/InputHandlerTransition.cs | 14 - UIX/Microsoft/Iris/UI/RootLoadResult.cs | 36 - UIX/Microsoft/Iris/UI/RootUI.cs | 33 - UIX/Microsoft/Iris/UI/SavedKeyFocus.cs | 17 - UIX/Microsoft/Iris/UI/SessionInputHandler.cs | 13 - UIX/Microsoft/Iris/UI/UIClass.cs | 1454 -- UIX/Microsoft/Iris/UI/UIForm.cs | 407 - UIX/Microsoft/Iris/UI/UIZone.cs | 592 - UIX/Microsoft/Iris/UI/ViewItem.cs | 2880 --- UIX/Microsoft/Iris/UI/ViewItemID.cs | 50 - UIX/Microsoft/Iris/VideoStream.cs | 289 - UIX/Microsoft/Iris/ViewItems/Clip.cs | 228 - .../Iris/ViewItems/ContentViewItem.cs | 70 - .../Iris/ViewItems/CountLayoutInput.cs | 31 - UIX/Microsoft/Iris/ViewItems/Graphic.cs | 452 - UIX/Microsoft/Iris/ViewItems/Host.cs | 508 - .../Iris/ViewItems/HostRequestPacket.cs | 26 - UIX/Microsoft/Iris/ViewItems/HostStatus.cs | 16 - UIX/Microsoft/Iris/ViewItems/HwndHost.cs | 114 - .../Iris/ViewItems/ICustomRepeatedItem.cs | 13 - UIX/Microsoft/Iris/ViewItems/ImageLayout.cs | 76 - UIX/Microsoft/Iris/ViewItems/Index.cs | 55 - .../Iris/ViewItems/IndexLayoutInput.cs | 34 - UIX/Microsoft/Iris/ViewItems/IndexType.cs | 14 - UIX/Microsoft/Iris/ViewItems/LineAlignment.cs | 15 - .../ViewItems/PaintInvalidEventHandler.cs | 10 - UIX/Microsoft/Iris/ViewItems/Panel.cs | 14 - UIX/Microsoft/Iris/ViewItems/Repeater.cs | 1203 -- .../Iris/ViewItems/RepeaterContentSelector.cs | 40 - .../RepeaterListContentsChangedArgs.cs | 33 - UIX/Microsoft/Iris/ViewItems/RootViewItem.cs | 43 - UIX/Microsoft/Iris/ViewItems/Scroller.cs | 76 - UIX/Microsoft/Iris/ViewItems/SizingPolicy.cs | 15 - .../Iris/ViewItems/StretchingPolicy.cs | 16 - UIX/Microsoft/Iris/ViewItems/Text.cs | 1492 -- UIX/Microsoft/Iris/ViewItems/TextBounds.cs | 20 - .../Iris/ViewItems/TextFlowRenderingHelper.cs | 47 - UIX/Microsoft/Iris/ViewItems/TextFragment.cs | 81 - UIX/Microsoft/Iris/ViewItems/TextRunData.cs | 61 - .../Iris/ViewItems/TextRunRenderer.cs | 119 - UIX/Microsoft/Iris/ViewItems/TextSharpness.cs | 14 - UIX/Microsoft/Iris/ViewItems/TypeSelector.cs | 30 - .../Iris/ViewItems/UIPropertyRecord.cs | 37 - UIX/Microsoft/Iris/ViewItems/Video.cs | 169 - .../VisibleIndexRangeLayoutOutput.cs | 51 - UIX/Microsoft/Iris/VirtualList.cs | 844 - UIX/Microsoft/Iris/Window.cs | 425 - .../Iris/WindowCloseRequestedEventArgs.cs | 19 - .../Iris/WindowCloseRequestedHandler.cs | 12 - UIX/Microsoft/Iris/WindowColor.cs | 52 - UIX/Microsoft/Iris/WindowPosition.cs | 32 - UIX/Microsoft/Iris/WindowPositionPolicy.cs | 18 - UIX/Microsoft/Iris/WindowSize.cs | 38 - UIX/Microsoft/Iris/WindowState.cs | 15 - UIX/ParserLexClass.cs | 87 - UIX/ParserLexTable.cs | 2486 --- UIX/ParserYaccClass.cs | 387 - UIX/ParserYaccTable.cs | 15327 ---------------- UIX/SSVParseLib/SSLex.cs | 143 - UIX/SSVParseLib/SSLexConsumer.cs | 110 - UIX/SSVParseLib/SSLexFinalState.cs | 54 - UIX/SSVParseLib/SSLexLexeme.cs | 69 - UIX/SSVParseLib/SSLexMark.cs | 24 - UIX/SSVParseLib/SSLexSubtable.cs | 36 - UIX/SSVParseLib/SSLexTable.cs | 51 - UIX/SSVParseLib/SSLexTableRow.cs | 40 - UIX/SSVParseLib/SSLexTableRowEntry.cs | 28 - UIX/SSVParseLib/SSYacc.cs | 331 - UIX/SSVParseLib/SSYaccCache.cs | 23 - UIX/SSVParseLib/SSYaccStack.cs | 29 - UIX/SSVParseLib/SSYaccStackElement.cs | 29 - UIX/SSVParseLib/SSYaccTable.cs | 26 - UIX/SSVParseLib/SSYaccTableProd.cs | 24 - UIX/SSVParseLib/SSYaccTableRow.cs | 62 - UIX/SSVParseLib/SSYaccTableRowEntry.cs | 41 - UIX/UIX.csproj | 1043 -- UIX/UIXSign/App.config | 6 - UIX/UIXSign/Program.cs | 24 - UIX/UIXSign/Properties/AssemblyInfo.cs | 36 - UIX/UIXSign/UIXSign.csproj | 57 - UIX/UIXSign/packages.config | 4 - UIX/app.config | 15 - UIX/packages.config | 5 - ZuneUIXTools.sln | 2 +- ZuneUIXTools/MainWindow.xaml.cs | 17 +- ZuneUIXTools/ZuneUIXTools.csproj | 2 +- test/testA.uib | Bin 0 -> 175 bytes test/testA.uix | 2 +- 970 files changed, 19 insertions(+), 116645 deletions(-) delete mode 100644 UIX/.gitattributes delete mode 100644 UIX/.gitignore delete mode 100644 UIX/AssemblyInfo.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccChildID.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccEvents.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccNavDirs.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccObjectID.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccRole.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccSelFlags.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccStates.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/Accessible.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccessibleChildren.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccessibleProperty.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs delete mode 100644 UIX/Microsoft/Iris/Accessibility/RootAccessibleProxy.cs delete mode 100644 UIX/Microsoft/Iris/AggregateList.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ActiveSequence.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ActiveTransitions.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AlphaKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/Animation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationArgs.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationCompleteArgs.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationEventType.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationHandle.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationManager.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationProxy.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationSystem.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationTemplate.cs delete mode 100644 UIX/Microsoft/Iris/Animations/AnimationType.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseFloatKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseMultiplyFloatKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseMultiplyVector3Keyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseRotationKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseVector2Keyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseVector3Keyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/BaseVector4Keyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/CameraAtKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/CameraEyeKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/CameraUpKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/CameraZnKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/EffectAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/EffectColorKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/EffectFloatKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/EffectVector3Keyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/IAnimatableOwner.cs delete mode 100644 UIX/Microsoft/Iris/Animations/IAnimationProvider.cs delete mode 100644 UIX/Microsoft/Iris/Animations/Interpolation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/InterpolationType.cs delete mode 100644 UIX/Microsoft/Iris/Animations/KeyframeFilter.cs delete mode 100644 UIX/Microsoft/Iris/Animations/MergeAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/NonIntensiveAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/OrientationKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/OrphanedVisualCollection.cs delete mode 100644 UIX/Microsoft/Iris/Animations/PositionKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/PositionXKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/PositionYKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ReferenceAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/RelativeTo.cs delete mode 100644 UIX/Microsoft/Iris/Animations/RendererProperty.cs delete mode 100644 UIX/Microsoft/Iris/Animations/RotateKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ScaleXKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ScaleYKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SizeKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SizeXKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SizeYKeyframe.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SnapshotPolicy.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SnapshotRelativeTo.cs delete mode 100644 UIX/Microsoft/Iris/Animations/StopCommand.cs delete mode 100644 UIX/Microsoft/Iris/Animations/StopCommandSet.cs delete mode 100644 UIX/Microsoft/Iris/Animations/SwitchAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/TransformAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/TransformAttribute.cs delete mode 100644 UIX/Microsoft/Iris/Animations/TransformByAttributeAnimation.cs delete mode 100644 UIX/Microsoft/Iris/Animations/ValueTransformer.cs delete mode 100644 UIX/Microsoft/Iris/Application.cs delete mode 100644 UIX/Microsoft/Iris/ArrayListDataSet.cs delete mode 100644 UIX/Microsoft/Iris/AssemblyDataProviderWrapper.cs delete mode 100644 UIX/Microsoft/Iris/Audio/Sound.cs delete mode 100644 UIX/Microsoft/Iris/BooleanChoice.cs delete mode 100644 UIX/Microsoft/Iris/ByteRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/Choice.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllConstructorSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumProxy.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllEventSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyList.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectReference.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataQueryHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataTypeHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/NativeDataProviderWrapper.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/NativeTraceCategories.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable`1.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/StringPinState.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/TypeSchemaHandleTable.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/UIXID.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/UIXIDVerifier.cs delete mode 100644 UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs delete mode 100644 UIX/Microsoft/Iris/Command.cs delete mode 100644 UIX/Microsoft/Iris/CompilerInput.cs delete mode 100644 UIX/Microsoft/Iris/Data/INotifyList.cs delete mode 100644 UIX/Microsoft/Iris/Data/IResourceProvider.cs delete mode 100644 UIX/Microsoft/Iris/Data/IVirtualList.cs delete mode 100644 UIX/Microsoft/Iris/Data/IntListUtility.cs delete mode 100644 UIX/Microsoft/Iris/Data/ItemRequestCallback.cs delete mode 100644 UIX/Microsoft/Iris/Data/ListUtility.cs delete mode 100644 UIX/Microsoft/Iris/Data/Resource.cs delete mode 100644 UIX/Microsoft/Iris/Data/ResourceAcquisitionCompleteHandler.cs delete mode 100644 UIX/Microsoft/Iris/Data/ResourceManager.cs delete mode 100644 UIX/Microsoft/Iris/Data/ResourceStatus.cs delete mode 100644 UIX/Microsoft/Iris/Data/SingleArrayListCache.cs delete mode 100644 UIX/Microsoft/Iris/Data/SlowDataAcquireCompleteHandler.cs delete mode 100644 UIX/Microsoft/Iris/Data/StringUtility.cs delete mode 100644 UIX/Microsoft/Iris/Data/UIListContentsChangeType.cs delete mode 100644 UIX/Microsoft/Iris/Data/UIListContentsChangedArgs.cs delete mode 100644 UIX/Microsoft/Iris/Data/UIListContentsChangedHandler.cs delete mode 100644 UIX/Microsoft/Iris/Data/UpdateHelper.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderMapping.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderObject.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderPropertyChangedEventArgs.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderQuery.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderQueryFactory.cs delete mode 100644 UIX/Microsoft/Iris/DataProviderQueryStatus.cs delete mode 100644 UIX/Microsoft/Iris/DeferredInvokeHandler.cs delete mode 100644 UIX/Microsoft/Iris/DeferredInvokePriority.cs delete mode 100644 UIX/Microsoft/Iris/DeferredInvokeProxy.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/Camera.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/Color.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ContentLoadCompleteHandler.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/EditCursorType.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/Font.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/FontStyles.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ImageStatus.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/RawImage.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/RawImageItem.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/RichText.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/Rotation.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ScrollbarEnableFlags.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/ScrollbarType.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/SimpleText.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextFlow.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextImageCache.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextImageItem.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextRun.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/TextStyle.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/UIImage.cs delete mode 100644 UIX/Microsoft/Iris/Drawing/UriImage.cs delete mode 100644 UIX/Microsoft/Iris/Error.cs delete mode 100644 UIX/Microsoft/Iris/ErrorReportHandler.cs delete mode 100644 UIX/Microsoft/Iris/Group.cs delete mode 100644 UIX/Microsoft/Iris/GroupedList.cs delete mode 100644 UIX/Microsoft/Iris/ICommand.cs delete mode 100644 UIX/Microsoft/Iris/IDataProvider.cs delete mode 100644 UIX/Microsoft/Iris/IDataProviderBaseObject.cs delete mode 100644 UIX/Microsoft/Iris/IDataProviderObject.cs delete mode 100644 UIX/Microsoft/Iris/IDataProviderQuery.cs delete mode 100644 UIX/Microsoft/Iris/IModelItem.cs delete mode 100644 UIX/Microsoft/Iris/IModelItemOwner.cs delete mode 100644 UIX/Microsoft/Iris/ISearchableList.cs delete mode 100644 UIX/Microsoft/Iris/IThreadSafeObject.cs delete mode 100644 UIX/Microsoft/Iris/IValueRange.cs delete mode 100644 UIX/Microsoft/Iris/Image.cs delete mode 100644 UIX/Microsoft/Iris/ImageFormatUtils.cs delete mode 100644 UIX/Microsoft/Iris/ImageInset.cs delete mode 100644 UIX/Microsoft/Iris/ImageLoadCompleteHandler.cs delete mode 100644 UIX/Microsoft/Iris/IndexedTree.cs delete mode 100644 UIX/Microsoft/Iris/Input/AppCommandMapping.cs delete mode 100644 UIX/Microsoft/Iris/Input/CommandCode.cs delete mode 100644 UIX/Microsoft/Iris/Input/DragDropInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/DragOperation.cs delete mode 100644 UIX/Microsoft/Iris/Input/HIDCommandMapping.cs delete mode 100644 UIX/Microsoft/Iris/Input/HidDevice.cs delete mode 100644 UIX/Microsoft/Iris/Input/ICookedInputSite.cs delete mode 100644 UIX/Microsoft/Iris/Input/IInputCustomFocus.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputDevice.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputEventType.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputItem.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputManager.cs delete mode 100644 UIX/Microsoft/Iris/Input/InputQueue.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyActionInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyCommandInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyFocusInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyFocusReason.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyStateInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/KeyboardDevice.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseActionInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseButtonInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseDevice.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseFocusInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseMoveInfo.cs delete mode 100644 UIX/Microsoft/Iris/Input/MouseWheelInfo.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/BeginDragPolicy.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/Characters.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ClickCount.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ClickType.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/DragHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/DragSourceHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/DropAction.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/DropTargetHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/EventContext.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/FocusChangeReason.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/KeyHandlerKey.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/MouseWheelHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ShortcutHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/ShortcutHandlerCommand.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs delete mode 100644 UIX/Microsoft/Iris/InputHandlers/TypingHandler.cs delete mode 100644 UIX/Microsoft/Iris/IntRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/InvokePolicy.cs delete mode 100644 UIX/Microsoft/Iris/ItemCountHandler.cs delete mode 100644 UIX/Microsoft/Iris/Key.cs delete mode 100644 UIX/Microsoft/Iris/Layout/Alignment.cs delete mode 100644 UIX/Microsoft/Iris/Layout/AreaOfInterest.cs delete mode 100644 UIX/Microsoft/Iris/Layout/AreaOfInterestID.cs delete mode 100644 UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layout/ExtendedLayoutOutput.cs delete mode 100644 UIX/Microsoft/Iris/Layout/ILayout.cs delete mode 100644 UIX/Microsoft/Iris/Layout/ILayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layout/ILayoutNode.cs delete mode 100644 UIX/Microsoft/Iris/Layout/ItemAlignment.cs delete mode 100644 UIX/Microsoft/Iris/Layout/LayoutCompleteEventHandler.cs delete mode 100644 UIX/Microsoft/Iris/Layout/LayoutConstants.cs delete mode 100644 UIX/Microsoft/Iris/Layout/LayoutNodeEnumerator.cs delete mode 100644 UIX/Microsoft/Iris/Layout/LayoutSlot.cs delete mode 100644 UIX/Microsoft/Iris/Layout/SharedSize.cs delete mode 100644 UIX/Microsoft/Iris/Layout/SharedSizePolicy.cs delete mode 100644 UIX/Microsoft/Iris/Layout/Visibility.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/AnchorEdge.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/AnchorLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ContentPositioningPolicy.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/DefaultLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/DockLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/FlipDirection.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/FlowLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/FormLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/GridLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/InterestPoint.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/MajorMinor.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/MissingItemPolicy.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/MouseTarget.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/PlacementMode.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/PopupLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/PopupPosition.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/RelativeEdge.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/RepeatPolicy.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/RotateLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ScaleLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ScrollIntoViewDisposition.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/StackLayout.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/StackLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/StackPriority.cs delete mode 100644 UIX/Microsoft/Iris/Layouts/StripAlignment.cs delete mode 100644 UIX/Microsoft/Iris/Library/AncestorEnumerator.cs delete mode 100644 UIX/Microsoft/Iris/Library/Bits.cs delete mode 100644 UIX/Microsoft/Iris/Library/DataCookie.cs delete mode 100644 UIX/Microsoft/Iris/Library/DisposableNotifyObjectBase.cs delete mode 100644 UIX/Microsoft/Iris/Library/DisposableObject.cs delete mode 100644 UIX/Microsoft/Iris/Library/DynamicData.cs delete mode 100644 UIX/Microsoft/Iris/Library/EventCookie.cs delete mode 100644 UIX/Microsoft/Iris/Library/ExpandableArray.cs delete mode 100644 UIX/Microsoft/Iris/Library/IDisposableObject.cs delete mode 100644 UIX/Microsoft/Iris/Library/IDisposableOwner.cs delete mode 100644 UIX/Microsoft/Iris/Library/ITreeNode.cs delete mode 100644 UIX/Microsoft/Iris/Library/KeyAllocator.cs delete mode 100644 UIX/Microsoft/Iris/Library/Math2.cs delete mode 100644 UIX/Microsoft/Iris/Library/NotifyObjectBase.cs delete mode 100644 UIX/Microsoft/Iris/Library/Result.cs delete mode 100644 UIX/Microsoft/Iris/Library/SharedDisposableObject.cs delete mode 100644 UIX/Microsoft/Iris/Library/SmartMap.cs delete mode 100644 UIX/Microsoft/Iris/Library/StackIListEnumerator.cs delete mode 100644 UIX/Microsoft/Iris/Library/StackIListReverseEnumerator.cs delete mode 100644 UIX/Microsoft/Iris/Library/TreeNode.cs delete mode 100644 UIX/Microsoft/Iris/Library/TreeNodeCollection.cs delete mode 100644 UIX/Microsoft/Iris/Library/TreeNodeEnumerator.cs delete mode 100644 UIX/Microsoft/Iris/Library/Utility.cs delete mode 100644 UIX/Microsoft/Iris/ListContentsChangeType.cs delete mode 100644 UIX/Microsoft/Iris/ListContentsChangedArgs.cs delete mode 100644 UIX/Microsoft/Iris/ListContentsChangedHandler.cs delete mode 100644 UIX/Microsoft/Iris/ListContentsChangedProxy.cs delete mode 100644 UIX/Microsoft/Iris/ListDataSet.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AliasMapping.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyConstructorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyEventSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyMarkupDataQuery.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyMarkupDataType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/BooleanBoxes.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ByteCodeReader.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ByteCodeWriter.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ClassMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ClassPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ClassTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/CodeListeners.cs delete mode 100644 UIX/Microsoft/Iris/Markup/CompilationMessage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/CompiledMarkupLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ConstructHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ConstructorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/CreateLoadResultHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/DecodeBinaryHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/DefaultConstructHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/DelegateListener.cs delete mode 100644 UIX/Microsoft/Iris/Markup/DestructiveListener.cs delete mode 100644 UIX/Microsoft/Iris/Markup/EffectClassTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/EncodeBinaryHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/EnumSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ErrorLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/EventSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ExpressionRestriction.cs delete mode 100644 UIX/Microsoft/Iris/Markup/FastReflectionInvokeHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/FindCanonicalInstanceHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyPrimitiveTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/GetValueHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/IDynamicConstructionSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/IMarkupTypeBase.cs delete mode 100644 UIX/Microsoft/Iris/Markup/INotifyObject.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ISchemaInfo.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Int32Boxes.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Int64Boxes.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Interpreter.cs delete mode 100644 UIX/Microsoft/Iris/Markup/InterpreterContext.cs delete mode 100644 UIX/Microsoft/Iris/Markup/InvokeHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Listener.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ListenerEncodeMode.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ListenerNodeBase.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ListenerRootNode.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ListenerType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Listeners.cs delete mode 100644 UIX/Microsoft/Iris/Markup/LoadPass.cs delete mode 100644 UIX/Microsoft/Iris/Markup/LoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/LoadResultCache.cs delete mode 100644 UIX/Microsoft/Iris/Markup/LoadResultStatus.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupBinaryDataTable.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupCompiler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupConstantPersist.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupConstantPersistMode.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupConstantsTable.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataMapping.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataMappingEntry.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataQuery.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataQueryPreDefinedPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataQueryPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataQueryRefreshMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataTypeBaseObject.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataTypePropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDataTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupDebugHelper.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupEncoder.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupError.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupImportTables.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupListener.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupListeners.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupServices.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupSystem.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MarkupTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/MethodSignatureKey.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NamedContentRecord.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NativeCodeModelMessage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NotificationID.cs delete mode 100644 UIX/Microsoft/Iris/Markup/NotifyService.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ObjectSourceType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/OpCode.cs delete mode 100644 UIX/Microsoft/Iris/Markup/OperationType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ParameterContext.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ParseResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Parser.cs delete mode 100644 UIX/Microsoft/Iris/Markup/PerformOperationHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/PropertyOverrideCriteria.cs delete mode 100644 UIX/Microsoft/Iris/Markup/PropertyOverrideCriteriaTypeConstraint.cs delete mode 100644 UIX/Microsoft/Iris/Markup/PropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ProviderlessMarkupDataType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/RangeValidator.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ReflectionHelper.cs delete mode 100644 UIX/Microsoft/Iris/Markup/RuntimeMessage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SSLexUnicodeBufferConsumer.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SchemaType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SetValueHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SourceMarkupImportTables.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SourceMarkupLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SourceMarkupLoader.cs delete mode 100644 UIX/Microsoft/Iris/Markup/StandardAssemblyTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SupportsOperationHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SupportsTypeConversionHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SymbolOrigin.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SymbolRecord.cs delete mode 100644 UIX/Microsoft/Iris/Markup/SymbolReference.cs delete mode 100644 UIX/Microsoft/Iris/Markup/TypeConstraint.cs delete mode 100644 UIX/Microsoft/Iris/Markup/TypeConverterHandler.cs delete mode 100644 UIX/Microsoft/Iris/Markup/TypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIB.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIClassMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIClassPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIClassTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/UISchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXConstructorSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXEnumData.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXEnumSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXEventSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXMethodSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXPropertySchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXTypeFlags.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXTypeID.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXTypeSchema.cs delete mode 100644 UIX/Microsoft/Iris/Markup/UIXTypes.cs delete mode 100644 UIX/Microsoft/Iris/Markup/ValidateMessage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/CastMethod.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ConstantType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ExpressionType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ExpressionUsage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/MethodSpecifier.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/NameUsage.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/PropertyAttribute.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/StatementType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/SymbolResolutionDirective.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/TriggerRecord.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/TypeRestriction.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/Validate.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateAlias.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateClass.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateCode.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateContext.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateDataMapping.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateDataQuery.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateDataType.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateEffect.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateEffectElement.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpression.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionAs.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionAssignment.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionBaseClass.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionCall.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionCast.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionConstant.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionDeclareTrigger.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionIndex.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionIsCheck.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionList.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionNew.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionNullCoalescing.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionOperation.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionSymbol.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionTernary.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionThis.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionTypeOf.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateFromString.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateMetadata.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateMethod.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateMethodList.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateNamespace.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateObject.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateObjectTag.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateParameter.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateParameterDefinition.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateParameterDefinitionList.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateProperty.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateScripts.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatement.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementAssignment.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementAttribute.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementBreak.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementCompound.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementExpression.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementForEach.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementIf.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementIfElse.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementLoop.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementReturn.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementScopedLocal.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateStatementWhile.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateTypeConstraint.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateTypeIdentifier.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValidateUI.cs delete mode 100644 UIX/Microsoft/Iris/Markup/Validation/ValueApplyMode.cs delete mode 100644 UIX/Microsoft/Iris/MaximizeMode.cs delete mode 100644 UIX/Microsoft/Iris/ModelItem.cs delete mode 100644 UIX/Microsoft/Iris/ModelItemDisposeMode.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/BooleanChoice.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/ByteRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/CaretInfo.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/Choice.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/Clipboard.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/EditableTextData.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/ITextScrollModelCallback.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIBooleanChoice.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIByteRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIChoice.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUICommand.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIGroup.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIIntRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIList.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IUIValueRange.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/IntRangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/InvokePriority.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/LayoutOutput.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/NotifyList.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/Range.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/RangedValue.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/ScrollModel.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/ScrollModelBase.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/SelectionManager.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/TextScrollModel.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/UICommand.cs delete mode 100644 UIX/Microsoft/Iris/ModelItems/UITimer.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/FindFromPointWorker.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/INavigationSite.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationClass.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationFlow.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationItem.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationOrder.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationOrientation.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationPolicies.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationServices.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationSpace.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/NavigationStrip.cs delete mode 100644 UIX/Microsoft/Iris/Navigation/TransientNavigationSite.cs delete mode 100644 UIX/Microsoft/Iris/OS/CLR/NativeMethods.cs delete mode 100644 UIX/Microsoft/Iris/OS/CLR/StandardOleMarshalObject.cs delete mode 100644 UIX/Microsoft/Iris/OS/CLR/UnsafeNativeMethods.cs delete mode 100644 UIX/Microsoft/Iris/OS/COMResult.cs delete mode 100644 UIX/Microsoft/Iris/OS/DataObject.cs delete mode 100644 UIX/Microsoft/Iris/OS/DllResource.cs delete mode 100644 UIX/Microsoft/Iris/OS/DllResources.cs delete mode 100644 UIX/Microsoft/Iris/OS/FileResource.cs delete mode 100644 UIX/Microsoft/Iris/OS/FileResources.cs delete mode 100644 UIX/Microsoft/Iris/OS/HttpResource.cs delete mode 100644 UIX/Microsoft/Iris/OS/HttpResources.cs delete mode 100644 UIX/Microsoft/Iris/OS/IImeCallbacks.cs delete mode 100644 UIX/Microsoft/Iris/OS/IRawUIXServices.cs delete mode 100644 UIX/Microsoft/Iris/OS/IRichTextCallbacks.cs delete mode 100644 UIX/Microsoft/Iris/OS/IUIXListCallbacks.cs delete mode 100644 UIX/Microsoft/Iris/OS/NativeApi.cs delete mode 100644 UIX/Microsoft/Iris/OS/NativeXmlException.cs delete mode 100644 UIX/Microsoft/Iris/OS/NativeXmlNodeType.cs delete mode 100644 UIX/Microsoft/Iris/OS/NativeXmlReader.cs delete mode 100644 UIX/Microsoft/Iris/OS/Win32Api.cs delete mode 100644 UIX/Microsoft/Iris/ObjectPropertyPair.cs delete mode 100644 UIX/Microsoft/Iris/PropertySet.cs delete mode 100644 UIX/Microsoft/Iris/PropertyValue.cs delete mode 100644 UIX/Microsoft/Iris/ProviderlessDataProviderObject.cs delete mode 100644 UIX/Microsoft/Iris/Queues/Dispatcher.cs delete mode 100644 UIX/Microsoft/Iris/Queues/Feeder.cs delete mode 100644 UIX/Microsoft/Iris/Queues/Interconnect.cs delete mode 100644 UIX/Microsoft/Iris/Queues/PriorityQueue.cs delete mode 100644 UIX/Microsoft/Iris/Queues/Queue.cs delete mode 100644 UIX/Microsoft/Iris/Queues/QueueItem.cs delete mode 100644 UIX/Microsoft/Iris/Queues/SimpleQueue.cs delete mode 100644 UIX/Microsoft/Iris/RangedValue.cs delete mode 100644 UIX/Microsoft/Iris/RawImageFormat.cs delete mode 100644 UIX/Microsoft/Iris/ReleaseBehavior.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Audio/SoundData.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Audio/SoundManager.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEvent.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEventTable.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Drawing/Dib.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Drawing/EdgeFade.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Drawing/PointF.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Drawing/RectangleF.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Drawing/SizeF.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/HRESULT.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/Memory.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/RenderException.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/RendererApi.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/BasicVideoGeometry.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/BasicVideoPresentation.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/IUIVideoPortal.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/IUIVideoStream.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/LinearVideoStretch.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoDisplayMode.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoOverscanMode.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoPresentationBuilder.cs delete mode 100644 UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoZoomHandler.cs delete mode 100644 UIX/Microsoft/Iris/RenderingQuality.cs delete mode 100644 UIX/Microsoft/Iris/RenderingType.cs delete mode 100644 UIX/Microsoft/Iris/RequestItemHandler.cs delete mode 100644 UIX/Microsoft/Iris/RequestSlowDataHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/DeferredCall.cs delete mode 100644 UIX/Microsoft/Iris/Session/DeferredHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/Direction.cs delete mode 100644 UIX/Microsoft/Iris/Session/DispatchPriority.cs delete mode 100644 UIX/Microsoft/Iris/Session/DispatcherTimer.cs delete mode 100644 UIX/Microsoft/Iris/Session/EffectManager.cs delete mode 100644 UIX/Microsoft/Iris/Session/ErrorManager.cs delete mode 100644 UIX/Microsoft/Iris/Session/ErrorRecord.cs delete mode 100644 UIX/Microsoft/Iris/Session/ErrorWatermark.cs delete mode 100644 UIX/Microsoft/Iris/Session/EventRouteStages.cs delete mode 100644 UIX/Microsoft/Iris/Session/Form.cs delete mode 100644 UIX/Microsoft/Iris/Session/FormSessionConnectHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/IErrorContextSource.cs delete mode 100644 UIX/Microsoft/Iris/Session/IModalSession.cs delete mode 100644 UIX/Microsoft/Iris/Session/ITimerOwner.cs delete mode 100644 UIX/Microsoft/Iris/Session/ITrackableUIElement.cs delete mode 100644 UIX/Microsoft/Iris/Session/ITrackableUIElementEvents.cs delete mode 100644 UIX/Microsoft/Iris/Session/IZoneDisplayChild.cs delete mode 100644 UIX/Microsoft/Iris/Session/InputDeliveryStatus.cs delete mode 100644 UIX/Microsoft/Iris/Session/InputNotificationEventArgs.cs delete mode 100644 UIX/Microsoft/Iris/Session/InputNotificationHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/InvalidKeyFocusHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/KeyCoalesceFilter.cs delete mode 100644 UIX/Microsoft/Iris/Session/LoopCondition.cs delete mode 100644 UIX/Microsoft/Iris/Session/NotifyErrorBatch.cs delete mode 100644 UIX/Microsoft/Iris/Session/SimpleCallback.cs delete mode 100644 UIX/Microsoft/Iris/Session/StaticServices.cs delete mode 100644 UIX/Microsoft/Iris/Session/TimeoutHandler.cs delete mode 100644 UIX/Microsoft/Iris/Session/TimeoutManager.cs delete mode 100644 UIX/Microsoft/Iris/Session/TransformSet.cs delete mode 100644 UIX/Microsoft/Iris/Session/UIApplication.cs delete mode 100644 UIX/Microsoft/Iris/Session/UIDispatcher.cs delete mode 100644 UIX/Microsoft/Iris/Session/UISession.cs delete mode 100644 UIX/Microsoft/Iris/Session/UiTask.cs delete mode 100644 UIX/Microsoft/Iris/SessionConnectedHandler.cs delete mode 100644 UIX/Microsoft/Iris/SimpleAnimationPropertyMap.cs delete mode 100644 UIX/Microsoft/Iris/SoundType.cs delete mode 100644 UIX/Microsoft/Iris/ThreadSafety.cs delete mode 100644 UIX/Microsoft/Iris/ThreadSafetyBlock.cs delete mode 100644 UIX/Microsoft/Iris/Timer.cs delete mode 100644 UIX/Microsoft/Iris/UI/ChildFaultedInDelegate.cs delete mode 100644 UIX/Microsoft/Iris/UI/Class.cs delete mode 100644 UIX/Microsoft/Iris/UI/ColorScheme.cs delete mode 100644 UIX/Microsoft/Iris/UI/EffectClass.cs delete mode 100644 UIX/Microsoft/Iris/UI/EffectElementWrapper.cs delete mode 100644 UIX/Microsoft/Iris/UI/EffectProperty.cs delete mode 100644 UIX/Microsoft/Iris/UI/EffectValue.cs delete mode 100644 UIX/Microsoft/Iris/UI/EffectValueType.cs delete mode 100644 UIX/Microsoft/Iris/UI/Environment.cs delete mode 100644 UIX/Microsoft/Iris/UI/FindChildResult.cs delete mode 100644 UIX/Microsoft/Iris/UI/FocusStateHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/FormCloseRequestedHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/FormPropertyChangedHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputEventHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputHandlerList.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputHandlerModifiers.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputHandlerStage.cs delete mode 100644 UIX/Microsoft/Iris/UI/InputHandlerTransition.cs delete mode 100644 UIX/Microsoft/Iris/UI/RootLoadResult.cs delete mode 100644 UIX/Microsoft/Iris/UI/RootUI.cs delete mode 100644 UIX/Microsoft/Iris/UI/SavedKeyFocus.cs delete mode 100644 UIX/Microsoft/Iris/UI/SessionInputHandler.cs delete mode 100644 UIX/Microsoft/Iris/UI/UIClass.cs delete mode 100644 UIX/Microsoft/Iris/UI/UIForm.cs delete mode 100644 UIX/Microsoft/Iris/UI/UIZone.cs delete mode 100644 UIX/Microsoft/Iris/UI/ViewItem.cs delete mode 100644 UIX/Microsoft/Iris/UI/ViewItemID.cs delete mode 100644 UIX/Microsoft/Iris/VideoStream.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Clip.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/ContentViewItem.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/CountLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Graphic.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Host.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/HostRequestPacket.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/HostStatus.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/HwndHost.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/ICustomRepeatedItem.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/ImageLayout.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Index.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/IndexLayoutInput.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/IndexType.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/LineAlignment.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/PaintInvalidEventHandler.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Panel.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Repeater.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/RepeaterContentSelector.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/RepeaterListContentsChangedArgs.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/RootViewItem.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Scroller.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/SizingPolicy.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/StretchingPolicy.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Text.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextBounds.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextFlowRenderingHelper.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextFragment.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextRunData.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextRunRenderer.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TextSharpness.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/TypeSelector.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/UIPropertyRecord.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/Video.cs delete mode 100644 UIX/Microsoft/Iris/ViewItems/VisibleIndexRangeLayoutOutput.cs delete mode 100644 UIX/Microsoft/Iris/VirtualList.cs delete mode 100644 UIX/Microsoft/Iris/Window.cs delete mode 100644 UIX/Microsoft/Iris/WindowCloseRequestedEventArgs.cs delete mode 100644 UIX/Microsoft/Iris/WindowCloseRequestedHandler.cs delete mode 100644 UIX/Microsoft/Iris/WindowColor.cs delete mode 100644 UIX/Microsoft/Iris/WindowPosition.cs delete mode 100644 UIX/Microsoft/Iris/WindowPositionPolicy.cs delete mode 100644 UIX/Microsoft/Iris/WindowSize.cs delete mode 100644 UIX/Microsoft/Iris/WindowState.cs delete mode 100644 UIX/ParserLexClass.cs delete mode 100644 UIX/ParserLexTable.cs delete mode 100644 UIX/ParserYaccClass.cs delete mode 100644 UIX/ParserYaccTable.cs delete mode 100644 UIX/SSVParseLib/SSLex.cs delete mode 100644 UIX/SSVParseLib/SSLexConsumer.cs delete mode 100644 UIX/SSVParseLib/SSLexFinalState.cs delete mode 100644 UIX/SSVParseLib/SSLexLexeme.cs delete mode 100644 UIX/SSVParseLib/SSLexMark.cs delete mode 100644 UIX/SSVParseLib/SSLexSubtable.cs delete mode 100644 UIX/SSVParseLib/SSLexTable.cs delete mode 100644 UIX/SSVParseLib/SSLexTableRow.cs delete mode 100644 UIX/SSVParseLib/SSLexTableRowEntry.cs delete mode 100644 UIX/SSVParseLib/SSYacc.cs delete mode 100644 UIX/SSVParseLib/SSYaccCache.cs delete mode 100644 UIX/SSVParseLib/SSYaccStack.cs delete mode 100644 UIX/SSVParseLib/SSYaccStackElement.cs delete mode 100644 UIX/SSVParseLib/SSYaccTable.cs delete mode 100644 UIX/SSVParseLib/SSYaccTableProd.cs delete mode 100644 UIX/SSVParseLib/SSYaccTableRow.cs delete mode 100644 UIX/SSVParseLib/SSYaccTableRowEntry.cs delete mode 100644 UIX/UIX.csproj delete mode 100644 UIX/UIXSign/App.config delete mode 100644 UIX/UIXSign/Program.cs delete mode 100644 UIX/UIXSign/Properties/AssemblyInfo.cs delete mode 100644 UIX/UIXSign/UIXSign.csproj delete mode 100644 UIX/UIXSign/packages.config delete mode 100644 UIX/app.config delete mode 100644 UIX/packages.config create mode 100644 test/testA.uib diff --git a/UIX/.gitattributes b/UIX/.gitattributes deleted file mode 100644 index 1ff0c42..0000000 --- a/UIX/.gitattributes +++ /dev/null @@ -1,63 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain diff --git a/UIX/.gitignore b/UIX/.gitignore deleted file mode 100644 index 4ce6fdd..0000000 --- a/UIX/.gitignore +++ /dev/null @@ -1,340 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- Backup*.rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb \ No newline at end of file diff --git a/UIX/AssemblyInfo.cs b/UIX/AssemblyInfo.cs deleted file mode 100644 index 12c32b0..0000000 --- a/UIX/AssemblyInfo.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -[assembly: StringFreezing] -[assembly: AssemblyTitle("UIX")] -[assembly: CLSCompliant(true)] -[assembly: AssemblyDescription("Microsoft.Iris")] -[assembly: AssemblyCompany("Microsoft Corporation")] -[assembly: AssemblyDelaySign(true)] -//assembly: AssemblyKeyFile("e:\\temp\\466296\\public.amd64fre\\internal\\strongnamekeys\\fake\\36MSApp1024.snk")] -[assembly: AssemblyFileVersion("4.8.0015.0")] -[assembly: AssemblyProduct("Microsoft (R) Windows (R) Operating System")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")] -[assembly: ComVisible(false)] -[assembly: InternalsVisibleTo("UIXLanguagePackage, PublicKey=002400000480000094000000060200000024000052534131000400000100010079ac5df018758f13b930394f7b6e7672b5221e5a299339cc185b20dcae03a23e4766f75d7ba8d3fc46163826f2df26cd474e6326c58ea8e4f8fcc3a66818134788ae709fd3f68995b6db8efe31ed952c98b2e3b43141b41a08ff4fd205548f19e32d22b6ada74a1d4bd04c6e08ff54a16272b669624cd6a4d68c98050db929f0")] -[assembly: InternalsVisibleTo("IrisEditor,PublicKey=00240000048000009400000006020000002400005253413100040000010001001dc70401884cdfad2010ce192e1f08a30fb034cf504759943eec3359d4ed09af3ce1616dbb124e479617ec73e4162903766e7a5e7bf1984bb318040118fe0f69dfb8b6e5c7c47a0e1bc9a8984b22f7221cc235986c09c74cab38ea3562c18adb8e3a95b73faf1ed71d7c309058b86d951af2165eb215b47de335e360a6a25da7")] -[assembly: AssemblyVersion("4.8.0.0")] -[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] diff --git a/UIX/Microsoft/Iris/Accessibility/AccChildID.cs b/UIX/Microsoft/Iris/Accessibility/AccChildID.cs deleted file mode 100644 index ab9d3a3..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccChildID.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccChildID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccChildID - { - Self, - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccEvents.cs b/UIX/Microsoft/Iris/Accessibility/AccEvents.cs deleted file mode 100644 index 119baf8..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccEvents.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccEvents -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccEvents - { - None = 0, - SystemSound = 1, - SystemAlert = 2, - SystemForeground = 3, - SystemMenuStart = 4, - SystemMenuEnd = 5, - SystemMenuPopupStart = 6, - SystemMenuPopupEnd = 7, - SystemCaptureStart = 8, - SystemCaptureEnd = 9, - SystemMoveSizeStart = 10, // 0x0000000A - SystemMoveSizeEnd = 11, // 0x0000000B - SystemContextHelpStart = 12, // 0x0000000C - SystemContextHelpEnd = 13, // 0x0000000D - SystemDragDropStart = 14, // 0x0000000E - SystemDragDropEnd = 15, // 0x0000000F - SystemDialogStart = 16, // 0x00000010 - SystemDialogEnd = 17, // 0x00000011 - SystemScrollingStart = 18, // 0x00000012 - SystemScrollingEnd = 19, // 0x00000013 - SystemSwitchStart = 20, // 0x00000014 - SystemSwitchEnd = 21, // 0x00000015 - SystemMinimizeStart = 22, // 0x00000016 - SystemMinimizeEnd = 23, // 0x00000017 - ObjectCreate = 32768, // 0x00008000 - ObjectDestroy = 32769, // 0x00008001 - ObjectShow = 32770, // 0x00008002 - ObjectHide = 32771, // 0x00008003 - ObjectReorder = 32772, // 0x00008004 - ObjectFocus = 32773, // 0x00008005 - ObjectSelection = 32774, // 0x00008006 - ObjectSelectionAdd = 32775, // 0x00008007 - ObjectSelectionRemove = 32776, // 0x00008008 - ObjectSelectionWithin = 32777, // 0x00008009 - ObjectStateChange = 32778, // 0x0000800A - ObjectLocationChange = 32779, // 0x0000800B - ObjectNameChange = 32780, // 0x0000800C - ObjectDescriptionChange = 32781, // 0x0000800D - ObjectValueChange = 32782, // 0x0000800E - ObjectParentChange = 32783, // 0x0000800F - ObjectHelpChange = 32784, // 0x00008010 - ObjectDefaultActionChange = 32785, // 0x00008011 - ObjectAcceleratorChange = 32786, // 0x00008012 - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccNavDirs.cs b/UIX/Microsoft/Iris/Accessibility/AccNavDirs.cs deleted file mode 100644 index f8d2f12..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccNavDirs.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccNavDirs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccNavDirs - { - Min, - Up, - Down, - Left, - Right, - Next, - Previous, - FirstChild, - LastChild, - Max, - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccObjectID.cs b/UIX/Microsoft/Iris/Accessibility/AccObjectID.cs deleted file mode 100644 index abaf854..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccObjectID.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccObjectID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccObjectID - { - Sound = -11, // 0xFFFFFFF5 - Alert = -10, // 0xFFFFFFF6 - Cursor = -9, // 0xFFFFFFF7 - Caret = -8, // 0xFFFFFFF8 - SizeGrip = -7, // 0xFFFFFFF9 - HScroll = -6, // 0xFFFFFFFA - VScroll = -5, // 0xFFFFFFFB - Client = -4, // 0xFFFFFFFC - Menu = -3, // 0xFFFFFFFD - TitleBar = -2, // 0xFFFFFFFE - SysMenu = -1, // 0xFFFFFFFF - Window = 0, - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccRole.cs b/UIX/Microsoft/Iris/Accessibility/AccRole.cs deleted file mode 100644 index 542c711..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccRole.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccRole -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccRole - { - None, - TitleBar, - MenuBar, - ScrollBar, - Grip, - Sound, - Cursor, - Caret, - Alert, - Window, - Client, - MenuPopup, - MenuItem, - ToolTip, - Application, - Document, - Pane, - Chart, - Dialog, - Border, - Grouping, - Separator, - ToolBar, - StatusBar, - Table, - ColumnHeader, - RowHeader, - Column, - Row, - Cell, - Link, - HelpBalloon, - Character, - List, - ListItem, - Outline, - OutlineItem, - PageTab, - PropertyPage, - Indicator, - Graphic, - StaticText, - Text, - PushButton, - CheckButton, - RadioButton, - ComboBox, - DropList, - ProgressBar, - Dial, - HotkeyField, - Slider, - SpinButton, - Diagram, - Animation, - Equation, - ButtonDropDown, - ButtonMenu, - ButtonDropDownGrid, - Whitespace, - PageTabList, - Clock, - SplitButton, - IPAddress, - OutlineButton, - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccSelFlags.cs b/UIX/Microsoft/Iris/Accessibility/AccSelFlags.cs deleted file mode 100644 index 5eb068f..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccSelFlags.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccSelFlags -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Accessibility -{ - [Flags] - public enum AccSelFlags - { - None = 0, - TakeFocus = 1, - TakeSelection = 2, - ExtendSelection = 4, - AddSelection = 8, - RemoveSelection = 16, // 0x00000010 - Valid = RemoveSelection | AddSelection | ExtendSelection | TakeSelection | TakeFocus, // 0x0000001F - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccStates.cs b/UIX/Microsoft/Iris/Accessibility/AccStates.cs deleted file mode 100644 index 0bf3e19..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccStates.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccStates -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Accessibility -{ - [Flags] - public enum AccStates - { - None = 0, - Unavailable = 1, - Selected = 2, - Focused = 4, - Pressed = 8, - Checked = 16, // 0x00000010 - Mixed = 32, // 0x00000020 - Indeterminate = Mixed, // 0x00000020 - ReadOnly = 64, // 0x00000040 - HotTracked = 128, // 0x00000080 - Default = 256, // 0x00000100 - Expanded = 512, // 0x00000200 - Collapsed = 1024, // 0x00000400 - Busy = 2048, // 0x00000800 - Floating = 4096, // 0x00001000 - Marquee = 8192, // 0x00002000 - Animated = 16384, // 0x00004000 - Invisible = 32768, // 0x00008000 - OffScreen = 65536, // 0x00010000 - Sizeable = 131072, // 0x00020000 - Moveable = 262144, // 0x00040000 - SelfVoicing = 524288, // 0x00080000 - Focusable = 1048576, // 0x00100000 - Selectable = 2097152, // 0x00200000 - Linked = 4194304, // 0x00400000 - Traversed = 8388608, // 0x00800000 - MultiSelectable = 16777216, // 0x01000000 - ExtSelectable = 33554432, // 0x02000000 - Alert_Low = 67108864, // 0x04000000 - Alert_Medium = 134217728, // 0x08000000 - Alert_High = 268435456, // 0x10000000 - Protected = 536870912, // 0x20000000 - HasPopup = 1073741824, // 0x40000000 - Valid = HasPopup | Protected | Alert_High | Alert_Medium | Alert_Low | ExtSelectable | MultiSelectable | Traversed | Linked | Selectable | Focusable | SelfVoicing | Moveable | Sizeable | OffScreen | Invisible | Animated | Marquee | Floating | Busy | Collapsed | Expanded | Default | HotTracked | ReadOnly | Indeterminate | Checked | Pressed | Focused | Selected | Unavailable, // 0x7FFFFFFF - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/Accessible.cs b/UIX/Microsoft/Iris/Accessibility/Accessible.cs deleted file mode 100644 index 96c2e3c..0000000 --- a/UIX/Microsoft/Iris/Accessibility/Accessible.cs +++ /dev/null @@ -1,478 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.Accessible -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Accessibility -{ - public class Accessible : NotifyObjectBase - { - private DynamicData _dataMap; - private AccessibleProxy _proxy; - private static readonly DataCookie s_descriptionSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_defaultActionSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_defaultActionCommandSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_helpSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_helpTopicSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_keyboardShortcutSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_nameSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_roleSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_valueSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_animatedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_unavailableStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_selectedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_busyStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_pressedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_checkedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_collapsedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_defaultStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_marqueeStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_mixedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_expandedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_traversedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_selectableStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_protectedStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_popupStateSlot = DataCookie.ReserveSlot(); - private static readonly DataCookie s_multiSelectableStateSlot = DataCookie.ReserveSlot(); - - public Accessible() => this.SetData(s_roleSlot, AccRole.Client); - - public void Attach(AccessibleProxy proxy) - { - this._proxy = proxy; - this.FireNotification(NotificationID.Enabled); - } - - public void Detach() - { - this.SetData(s_defaultActionCommandSlot, null); - this._proxy = null; - } - - public bool Enabled => this._proxy != null; - - public string Description - { - get => (string)this.GetData(s_descriptionSlot); - set - { - string description = this.Description; - if (!(value != description)) - return; - this.SetData(s_descriptionSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.Description, AccessibleProperty.Description); - } - } - - public string DefaultAction - { - get => (string)this.GetData(s_defaultActionSlot); - set - { - string defaultAction = this.DefaultAction; - if (!(value != defaultAction)) - return; - this.SetData(s_defaultActionSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.DefaultAction, AccessibleProperty.DefaultAction); - } - } - - public IUICommand DefaultActionCommand - { - get => (IUICommand)this.GetData(s_defaultActionCommandSlot); - set - { - IUICommand defaultActionCommand = this.DefaultActionCommand; - if (value == defaultActionCommand) - return; - this.SetData(s_defaultActionCommandSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.DefaultActionCommand, AccessibleProperty.DefaultActionCommand); - } - } - - public string Help - { - get => (string)this.GetData(s_helpSlot); - set - { - string help = this.Help; - if (!(value != help)) - return; - this.SetData(s_helpSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.Help, AccessibleProperty.Help); - } - } - - public int HelpTopic - { - get - { - object data = this.GetData(s_helpTopicSlot); - return data != null ? (int)data : -1; - } - set - { - int helpTopic = this.HelpTopic; - if (value == helpTopic) - return; - this.SetData(s_helpTopicSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.HelpTopic, AccessibleProperty.HelpTopic); - } - } - - public string KeyboardShortcut - { - get => (string)this.GetData(s_keyboardShortcutSlot); - set - { - string keyboardShortcut = this.KeyboardShortcut; - if (!(value != keyboardShortcut)) - return; - this.SetData(s_keyboardShortcutSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.KeyboardShortcut, AccessibleProperty.KeyboardShortcut); - } - } - - public string Name - { - get => (string)this.GetData(s_nameSlot); - set - { - string name = this.Name; - if (!(value != name)) - return; - this.SetData(s_nameSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.Name, AccessibleProperty.Name); - } - } - - public AccRole Role - { - get - { - object data = this.GetData(s_roleSlot); - return data != null ? (AccRole)data : AccRole.None; - } - set - { - AccRole role = this.Role; - if (value == role) - return; - this.SetData(s_roleSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.Role, AccessibleProperty.Role); - } - } - - public string Value - { - get => (string)this.GetData(s_valueSlot); - set - { - string str = this.Value; - if (!(value != str)) - return; - this.SetData(s_valueSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.Value, AccessibleProperty.Value); - } - } - - public bool IsAnimated - { - get - { - object data = this.GetData(s_animatedStateSlot); - return data != null && (bool)data; - } - set - { - bool isAnimated = this.IsAnimated; - if (value == isAnimated) - return; - this.SetData(s_animatedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsAnimated, AccessibleProperty.IsAnimated); - } - } - - public bool IsUnavailable - { - get - { - object data = this.GetData(s_unavailableStateSlot); - return data != null && (bool)data; - } - set - { - bool isUnavailable = this.IsUnavailable; - if (value == isUnavailable) - return; - this.SetData(s_unavailableStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsUnavailable, AccessibleProperty.IsUnavailable); - } - } - - public bool IsSelected - { - get - { - object data = this.GetData(s_selectedStateSlot); - return data != null && (bool)data; - } - set - { - bool isSelected = this.IsSelected; - if (value == isSelected) - return; - this.SetData(s_selectedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsSelected, AccessibleProperty.IsSelected); - } - } - - public bool IsBusy - { - get - { - object data = this.GetData(s_busyStateSlot); - return data != null && (bool)data; - } - set - { - bool isBusy = this.IsBusy; - if (value == isBusy) - return; - this.SetData(s_busyStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsBusy, AccessibleProperty.IsBusy); - } - } - - public bool IsPressed - { - get - { - object data = this.GetData(s_pressedStateSlot); - return data != null && (bool)data; - } - set - { - bool isPressed = this.IsPressed; - if (value == isPressed) - return; - this.SetData(s_pressedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsPressed, AccessibleProperty.IsPressed); - } - } - - public bool IsChecked - { - get - { - object data = this.GetData(s_checkedStateSlot); - return data != null && (bool)data; - } - set - { - bool isChecked = this.IsChecked; - if (value == isChecked) - return; - this.SetData(s_checkedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsChecked, AccessibleProperty.IsChecked); - } - } - - public bool IsCollapsed - { - get - { - object data = this.GetData(s_collapsedStateSlot); - return data != null && (bool)data; - } - set - { - bool isCollapsed = this.IsCollapsed; - if (value == isCollapsed) - return; - this.SetData(s_collapsedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsCollapsed, AccessibleProperty.IsCollapsed); - } - } - - public bool IsDefault - { - get - { - object data = this.GetData(s_defaultStateSlot); - return data != null && (bool)data; - } - set - { - bool isDefault = this.IsDefault; - if (value == isDefault) - return; - this.SetData(s_defaultStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsDefault, AccessibleProperty.IsDefault); - } - } - - public bool IsMarquee - { - get - { - object data = this.GetData(s_marqueeStateSlot); - return data != null && (bool)data; - } - set - { - bool isMarquee = this.IsMarquee; - if (value == isMarquee) - return; - this.SetData(s_marqueeStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsMarquee, AccessibleProperty.IsMarquee); - } - } - - public bool IsMixed - { - get - { - object data = this.GetData(s_mixedStateSlot); - return data != null && (bool)data; - } - set - { - bool isMixed = this.IsMixed; - if (value == isMixed) - return; - this.SetData(s_mixedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsMixed, AccessibleProperty.IsMixed); - } - } - - public bool IsExpanded - { - get - { - object data = this.GetData(s_expandedStateSlot); - return data != null && (bool)data; - } - set - { - bool isExpanded = this.IsExpanded; - if (value == isExpanded) - return; - this.SetData(s_expandedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsExpanded, AccessibleProperty.IsExpanded); - } - } - - public bool IsTraversed - { - get - { - object data = this.GetData(s_traversedStateSlot); - return data != null && (bool)data; - } - set - { - bool isTraversed = this.IsTraversed; - if (value == isTraversed) - return; - this.SetData(s_traversedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsTraversed, AccessibleProperty.IsTraversed); - } - } - - public bool IsSelectable - { - get - { - object data = this.GetData(s_selectableStateSlot); - return data != null && (bool)data; - } - set - { - bool isSelectable = this.IsSelectable; - if (value == isSelectable) - return; - this.SetData(s_selectableStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsSelectable, AccessibleProperty.IsSelectable); - } - } - - public bool IsMultiSelectable - { - get - { - object data = this.GetData(s_multiSelectableStateSlot); - return data != null && (bool)data; - } - set - { - bool isMultiSelectable = this.IsMultiSelectable; - if (value == isMultiSelectable) - return; - this.SetData(s_multiSelectableStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsMultiSelectable, AccessibleProperty.IsMultiSelectable); - } - } - - public bool IsProtected - { - get - { - object data = this.GetData(s_protectedStateSlot); - return data != null && (bool)data; - } - set - { - bool isProtected = this.IsProtected; - if (value == isProtected) - return; - this.SetData(s_protectedStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.IsProtected, AccessibleProperty.IsProtected); - } - } - - public bool HasPopup - { - get - { - object data = this.GetData(s_popupStateSlot); - return data != null && (bool)data; - } - set - { - bool hasPopup = this.HasPopup; - if (value == hasPopup) - return; - this.SetData(s_popupStateSlot, value); - this.FireAccessiblePropertyChanged(NotificationID.HasPopup, AccessibleProperty.HasPopup); - } - } - - protected void FireAccessiblePropertyChanged( - string propertyName, - AccessibleProperty accessibleProperty) - { - this.FireNotification(propertyName); - if (this._proxy != null) - { - this._proxy.NotifyAccessiblePropertyChanged(accessibleProperty); - } - else - { - if (accessibleProperty == AccessibleProperty.Name) - return; - ErrorManager.ReportWarning("Accessibility: Script modifications to the 'Accessible' object ('{0}' property) detected even though an Accessibility client is not is use. Use 'if (Accessible.Enabled) {{ ... }}' to bypass Accessible property access in this case", propertyName); - } - } - - protected object GetData(DataCookie cookie) => this._dataMap.GetData(cookie); - - protected void SetData(DataCookie cookie, object value) => this._dataMap.SetData(cookie, value); - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccessibleChildren.cs b/UIX/Microsoft/Iris/Accessibility/AccessibleChildren.cs deleted file mode 100644 index d84091b..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccessibleChildren.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccessibleChildren -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; - -namespace Microsoft.Iris.Accessibility -{ - [ComVisible(true)] - public class AccessibleChildren : IEnumVARIANT - { - private AccessibleProxy _proxy; - private int _current; - - public AccessibleChildren(AccessibleProxy proxy) - : this(proxy, -1) - { - } - - public AccessibleChildren(AccessibleProxy proxy, int position) - { - this._proxy = proxy; - this._current = position; - } - - public IEnumVARIANT Clone() => new AccessibleChildren(this._proxy, this._current); - - public int Next(int count, object[] children) - { - int index = 0; - do - { - ++this._current; - if (this._current >= this._proxy.UI.Children.Count) - { - this._current = this._proxy.UI.Children.Count; - break; - } - UIClass child = (UIClass)this._proxy.UI.Children[this._current]; - children[index] = child.AccessibleProxy; - ++index; - } - while (index < count); - return index; - } - - public void Reset() => this._current = -1; - - public bool Skip(int count) - { - this._current += count; - if (this._current < this._proxy.UI.Children.Count) - return true; - this._current = this._proxy.UI.Children.Count; - return false; - } - - IEnumVARIANT IEnumVARIANT.Clone() - { - this.VerifyEnumeratorAccess(); - return this.Clone(); - } - - unsafe int IEnumVARIANT.Next(int celt, object[] rgVar, IntPtr pceltFetched) - { - this.VerifyEnumeratorAccess(); - int num = this.Next(celt, rgVar); - *(int*)(void*)pceltFetched = num; - return num != celt ? 1 : 0; - } - - int IEnumVARIANT.Reset() - { - this.VerifyEnumeratorAccess(); - this.Reset(); - return 0; - } - - int IEnumVARIANT.Skip(int celt) - { - this.VerifyEnumeratorAccess(); - return !this.Skip(celt) ? 1 : 0; - } - - private void VerifyEnumeratorAccess() - { - if (this._proxy.UI != null && UIDispatcher.IsUIThread) - return; - Marshal.ThrowExceptionForHR(-2147467259); - } - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccessibleProperty.cs b/UIX/Microsoft/Iris/Accessibility/AccessibleProperty.cs deleted file mode 100644 index 0e8d942..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccessibleProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccessibleProperty -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Accessibility -{ - public enum AccessibleProperty - { - DefaultAction, - DefaultActionCommand, - Description, - HasPopup, - Help, - HelpTopic, - IsAnimated, - IsBusy, - IsChecked, - IsCollapsed, - IsDefault, - IsExpanded, - IsMarquee, - IsMixed, - IsMultiSelectable, - IsPressed, - IsProtected, - IsSelectable, - IsSelected, - IsTraversed, - IsUnavailable, - KeyboardShortcut, - Name, - Role, - Value, - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs b/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs deleted file mode 100644 index 2460520..0000000 --- a/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs +++ /dev/null @@ -1,549 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.AccessibleProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Accessibility; -using Microsoft.Iris.Navigation; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using System.Security; - -namespace Microsoft.Iris.Accessibility -{ - [ComVisible(true)] - [SuppressUnmanagedCodeSecurity] - public class AccessibleProxy : Microsoft.Iris.OS.CLR.StandardOleMarshalObject, IAccessible, IEnumVARIANT - { - public static readonly Guid IID_IAccessible = new Guid("618736E0-3C3D-11CF-810C-00AA00389B71"); - private UIClass _ui; - private Accessible _data; - private IEnumVARIANT _children; - private int _proxyID = -1; - private static int s_proxyIDAllocator = 0; - private static Map s_proxyFromID = new Map(); - private static DeferredHandler s_notifyEventHandler = new DeferredHandler(NotifyEvent); - private static bool s_accessibilityActive; - - public AccessibleProxy(UIClass ui, Accessible data) - { - this._ui = ui; - this._data = data; - this._data.Attach(this); - this._children = new AccessibleChildren(this); - } - - public UIClass UI => this._ui; - - public void Detach() - { - this._data.Detach(); - this._ui = null; - if (this._proxyID == -1) - return; - s_proxyFromID.Remove(this._proxyID); - } - - public static bool AccessibilityActive - { - get => s_accessibilityActive; - set => s_accessibilityActive = true; - } - - public virtual IAccessible Parent => this._ui.Parent != null ? _ui.Parent.AccessibleProxy : null; - - public int ChildCount => this._ui.Children.Count; - - public virtual string Name - { - get => this._data.Name; - set => this._data.Name = value; - } - - public string Value - { - get => this._data.Value; - set => this._data.Value = value; - } - - public string Description => this._data.Description; - - public AccRole Role => this._data.Role; - - public AccStates State - { - get - { - AccStates accStates = AccStates.None; - if (this._ui.DirectKeyFocus) - accStates |= AccStates.Focused; - if (this._ui.IsKeyFocusable()) - accStates |= AccStates.Focusable; - if (this._ui.DirectMouseFocus) - accStates |= AccStates.HotTracked; - if (!this._ui.Visible) - accStates |= AccStates.Invisible; - if (this._ui.Host != null && this._ui.Host.IsOffscreen) - accStates |= AccStates.OffScreen; - if (this._data.HasPopup) - accStates |= AccStates.HasPopup; - if (this._data.IsAnimated) - accStates |= AccStates.Animated; - if (this._data.IsBusy) - accStates |= AccStates.Busy; - if (this._data.IsChecked) - accStates |= AccStates.Checked; - if (this._data.IsCollapsed) - accStates |= AccStates.Collapsed; - if (this._data.IsDefault) - accStates |= AccStates.Default; - if (this._data.IsExpanded) - accStates |= AccStates.Expanded; - if (this._data.IsMarquee) - accStates |= AccStates.Marquee; - if (this._data.IsMixed) - accStates |= AccStates.Mixed; - if (this._data.IsMultiSelectable) - accStates |= AccStates.MultiSelectable; - if (this._data.IsPressed) - accStates |= AccStates.Pressed; - if (this._data.IsProtected) - accStates |= AccStates.Protected; - if (this._data.IsSelectable) - accStates |= AccStates.Selectable; - if (this._data.IsSelected) - accStates |= AccStates.Selected; - if (this._data.IsTraversed) - accStates |= AccStates.Traversed; - if (this._data.IsUnavailable) - accStates |= AccStates.Unavailable; - return accStates; - } - } - - public string Help => this._data.Help; - - public int HelpTopic => this._data.HelpTopic; - - public string KeyboardShortcut => this._data.KeyboardShortcut; - - public bool HasFocus => this._ui.DirectKeyFocus; - - public string DefaultAction => this._data.DefaultAction; - - public Rectangle Location - { - get - { - Rectangle rectangle = Rectangle.Zero; - Vector3 positionPxlVector; - Vector3 sizePxlVector; - if (this._ui.RootItem != null && ((INavigationSite)this._ui.RootItem).ComputeBounds(out positionPxlVector, out sizePxlVector)) - { - rectangle = new Rectangle((int)positionPxlVector.X, (int)positionPxlVector.Y, (int)sizePxlVector.X, (int)sizePxlVector.Y); - Point location = rectangle.Location; - UISession.Default.Form.ClientToScreen(ref location); - rectangle.Location = location; - } - return rectangle; - } - } - - public virtual IAccessible Navigate(AccNavDirs navDir) - { - UIClass resultUI = null; - switch (navDir) - { - case AccNavDirs.Up: - this._ui.FindNextFocusablePeer(Direction.North, RectangleF.Zero, out resultUI); - break; - case AccNavDirs.Down: - this._ui.FindNextFocusablePeer(Direction.South, RectangleF.Zero, out resultUI); - break; - case AccNavDirs.Left: - this._ui.FindNextFocusablePeer(Direction.West, RectangleF.Zero, out resultUI); - break; - case AccNavDirs.Right: - this._ui.FindNextFocusablePeer(Direction.East, RectangleF.Zero, out resultUI); - break; - case AccNavDirs.Next: - resultUI = (UIClass)this._ui.NextSibling; - break; - case AccNavDirs.Previous: - resultUI = (UIClass)this._ui.PreviousSibling; - break; - case AccNavDirs.FirstChild: - resultUI = (UIClass)this._ui.FirstChild; - break; - case AccNavDirs.LastChild: - resultUI = (UIClass)this._ui.LastChild; - break; - } - return resultUI != null ? resultUI.AccessibleProxy : null; - } - - public void DoDefaultAction() - { - if (this._data.DefaultActionCommand == null) - return; - this._data.DefaultActionCommand.Invoke(); - } - - public static void NotifyCreated(UIClass ui) - { - if (!AccessibilityActive) - return; - ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectCreate); - } - - public static void NotifyDestroyed(UIClass ui) - { - if (!AccessibilityActive) - return; - ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectDestroy); - } - - public static void NotifyTreeChanged(UIClass ui) - { - if (!AccessibilityActive || !ui.Initialized) - return; - ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectReorder); - } - - public static void NotifyVisibilityChange(UIClass ui, bool visible) - { - if (!AccessibilityActive || !ui.Initialized) - return; - ui.AccessibleProxy.QueueNotifyEvent(visible ? AccEvents.ObjectShow : AccEvents.ObjectHide); - } - - public static void NotifyFocus(UIClass ui) - { - if (!AccessibilityActive || !ui.Initialized) - return; - ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectFocus); - } - - public void NotifyAccessiblePropertyChanged(AccessibleProperty property) - { - if (!this._ui.Initialized) - return; - AccEvents eventType = AccEvents.None; - switch (property) - { - case AccessibleProperty.DefaultAction: - eventType = AccEvents.ObjectDefaultActionChange; - break; - case AccessibleProperty.Description: - eventType = AccEvents.ObjectDescriptionChange; - break; - case AccessibleProperty.HasPopup: - case AccessibleProperty.IsAnimated: - case AccessibleProperty.IsBusy: - case AccessibleProperty.IsChecked: - case AccessibleProperty.IsCollapsed: - case AccessibleProperty.IsDefault: - case AccessibleProperty.IsExpanded: - case AccessibleProperty.IsMarquee: - case AccessibleProperty.IsMixed: - case AccessibleProperty.IsMultiSelectable: - case AccessibleProperty.IsPressed: - case AccessibleProperty.IsProtected: - case AccessibleProperty.IsSelectable: - case AccessibleProperty.IsTraversed: - case AccessibleProperty.IsUnavailable: - eventType = AccEvents.ObjectStateChange; - break; - case AccessibleProperty.Help: - eventType = AccEvents.ObjectHelpChange; - break; - case AccessibleProperty.HelpTopic: - eventType = AccEvents.ObjectHelpChange; - break; - case AccessibleProperty.IsSelected: - if (this._data.IsSelected) - { - eventType = AccEvents.ObjectSelection; - break; - } - break; - case AccessibleProperty.KeyboardShortcut: - eventType = AccEvents.ObjectAcceleratorChange; - break; - case AccessibleProperty.Name: - eventType = AccEvents.ObjectNameChange; - break; - case AccessibleProperty.Value: - eventType = AccEvents.ObjectValueChange; - break; - } - if (eventType == AccEvents.None) - return; - this.QueueNotifyEvent(eventType); - } - - private void QueueNotifyEvent(AccEvents eventType) - { - object obj = new object[2] - { - this, - (int) eventType - }; - DeferredCall.Post(DispatchPriority.AppEvent, s_notifyEventHandler, obj); - } - - private static void NotifyEvent(object payload) - { - object[] objArray = (object[])payload; - AccessibleProxy accessibleProxy = (AccessibleProxy)objArray[0]; - AccEvents accEvents = (AccEvents)objArray[1]; - int proxyId = accessibleProxy.ProxyID; - UISession.Default.Form.NotifyWinEvent((int)accEvents, proxyId, 0); - if (accEvents != AccEvents.ObjectDestroy) - return; - accessibleProxy.Detach(); - } - - object IAccessible.accParent - { - get - { - this.VerifyProxyAccess(); - return Parent; - } - } - - object IAccessible.get_accChild(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this; - } - - int IAccessible.accChildCount - { - get - { - this.VerifyProxyAccess(); - return this.ChildCount; - } - } - - string IAccessible.get_accName(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.Name; - } - - string IAccessible.get_accValue(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.Value; - } - - string IAccessible.get_accDescription(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.Description; - } - - object IAccessible.get_accRole(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return (int)this.Role; - } - - object IAccessible.get_accState(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return (int)this.State; - } - - string IAccessible.get_accHelp(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.Help; - } - - int IAccessible.get_accHelpTopic(out string pszHelpFile, object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - pszHelpFile = null; - return this.HelpTopic; - } - - string IAccessible.get_accKeyboardShortcut(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.KeyboardShortcut; - } - - object IAccessible.accFocus - { - get - { - this.VerifyProxyAccess(); - return this.HasFocus ? 0 : (object)null; - } - } - - object IAccessible.accSelection - { - get - { - this.VerifyProxyAccess(); - Marshal.ThrowExceptionForHR(-2147467263); - return null; - } - } - - string IAccessible.get_accDefaultAction(object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - return this.DefaultAction; - } - - void IAccessible.accSelect(int flagsSelect, object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - Marshal.ThrowExceptionForHR(-2147467263); - } - - void IAccessible.accLocation( - out int pxLeft, - out int pyTop, - out int pcxWidth, - out int pcyHeight, - object varChild) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - Rectangle location = this.Location; - pxLeft = location.X; - pyTop = location.Y; - pcxWidth = location.Width; - pcyHeight = location.Height; - } - - object IAccessible.accNavigate(int navDir, object varStart) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varStart); - return this.Navigate((AccNavDirs)navDir); - } - - object IAccessible.accHitTest(int xLeft, int yTop) - { - this.VerifyProxyAccess(); - Marshal.ThrowExceptionForHR(-2147467263); - return null; - } - - void IAccessible.accDoDefaultAction(object varChild) - { - this.VerifyProxyAccess(); - this.DoDefaultAction(); - } - - void IAccessible.set_accName(object varChild, string pszName) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - this.Name = pszName; - } - - void IAccessible.set_accValue(object varChild, string pszValue) - { - this.VerifyProxyAccess(); - this.VerifySelfChildID(varChild); - this.Value = pszValue; - } - - IEnumVARIANT IEnumVARIANT.Clone() - { - this.VerifyProxyAccess(); - return this._children.Clone(); - } - - int IEnumVARIANT.Next(int celt, object[] rgVar, IntPtr pceltFetched) - { - this.VerifyProxyAccess(); - return this._children.Next(celt, rgVar, pceltFetched); - } - - int IEnumVARIANT.Reset() - { - this.VerifyProxyAccess(); - return this._children.Reset(); - } - - int IEnumVARIANT.Skip(int celt) - { - this.VerifyProxyAccess(); - return this._children.Skip(celt); - } - - private void VerifyProxyAccess() - { - if (this._ui != null && UIDispatcher.IsUIThread) - return; - Marshal.ThrowExceptionForHR(-2147467259); - } - - private void VerifySelfChildID(object varChild) - { - if (varChild is int && (AccChildID)varChild == AccChildID.Self) - return; - Marshal.ThrowExceptionForHR(-2147024809); - } - - private int ProxyID - { - get - { - if (this._proxyID == -1) - { - this._proxyID = ++s_proxyIDAllocator; - s_proxyFromID[this._proxyID] = this; - } - return this._proxyID; - } - } - - public static AccessibleProxy AccessibleProxyFromID(int proxyID) - { - AccessibleProxy accessibleProxy; - s_proxyFromID.TryGetValue(proxyID, out accessibleProxy); - return accessibleProxy; - } - - [DllImport("oleacc.dll")] - public static extern IntPtr LresultFromObject( - ref Guid riid, - IntPtr wParam, - [MarshalAs(UnmanagedType.Interface)] object accPtr); - - [DllImport("oleacc.dll")] - public static extern int CreateStdAccessibleObject( - IntPtr hwnd, - int objectID, - [MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.Interface)] out object accPtr); - } -} diff --git a/UIX/Microsoft/Iris/Accessibility/RootAccessibleProxy.cs b/UIX/Microsoft/Iris/Accessibility/RootAccessibleProxy.cs deleted file mode 100644 index 0b5e2e1..0000000 --- a/UIX/Microsoft/Iris/Accessibility/RootAccessibleProxy.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Accessibility.RootAccessibleProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Accessibility; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Accessibility -{ - [ComVisible(true)] - public class RootAccessibleProxy : AccessibleProxy - { - private IAccessible _clientBridge; - - public RootAccessibleProxy(UIClass ui, Accessible data) - : base(ui, data) - { - } - - public override IAccessible Parent => (IAccessible)this._clientBridge.accParent; - - public override IAccessible Navigate(AccNavDirs navDir) - { - IAccessible accessible = null; - switch (navDir) - { - case AccNavDirs.Up: - case AccNavDirs.Down: - case AccNavDirs.Left: - case AccNavDirs.Right: - case AccNavDirs.Next: - case AccNavDirs.Previous: - accessible = (IAccessible)this._clientBridge.accNavigate((int)navDir, 0); - break; - case AccNavDirs.FirstChild: - case AccNavDirs.LastChild: - accessible = base.Navigate(navDir); - break; - } - return accessible; - } - - public override string Name => UIApplication.ApplicationName; - - public IAccessible ClientBridge => this._clientBridge; - - public void AttachClientBridge(IAccessible clientBridge) => this._clientBridge = clientBridge; - } -} diff --git a/UIX/Microsoft/Iris/AggregateList.cs b/UIX/Microsoft/Iris/AggregateList.cs deleted file mode 100644 index 50b183c..0000000 --- a/UIX/Microsoft/Iris/AggregateList.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.AggregateList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using System; -using System.Collections; -using System.Diagnostics; - -namespace Microsoft.Iris -{ - public class AggregateList : VirtualList - { - private IList[] _lists; - - public AggregateList() - : this(null) - { - } - - public AggregateList(IList list1) - : this(new IList[1] { list1 }) - { - } - - public AggregateList(IList list1, IList list2) - : this(new IList[2] { list1, list2 }) - { - } - - public AggregateList(IList list1, IList list2, IList list3) - : this(new IList[3] { list1, list2, list3 }) - { - } - - public AggregateList(IList list1, IList list2, IList list3, IList list4) - : this(new IList[4] { list1, list2, list3, list4 }) - { - } - - public AggregateList(IList[] lists) - : base(true) - { - if (lists == null) - lists = new IList[0]; - this._lists = lists; - UIListContentsChangedHandler contentsChangedHandler = new UIListContentsChangedHandler(this.ChildListModified); - SlowDataAcquireCompleteHandler acquireCompleteHandler = new SlowDataAcquireCompleteHandler(this.ChildListSlowDataAcquired); - for (int index = 0; index < this._lists.Length; ++index) - { - if (this._lists[index] == null) - this._lists[index] = new ArrayList(); - IList list = this._lists[index]; - if (list is INotifyList notifyList) - notifyList.ContentsChanged += contentsChangedHandler; - if (list is IVirtualList virtualList && virtualList.SlowDataRequestsEnabled) - virtualList.SlowDataAcquireCompleteHandler = acquireCompleteHandler; - } - this.Count = this.ItemCount; - } - - protected override void OnDispose(bool disposing) - { - if (disposing) - { - UIListContentsChangedHandler contentsChangedHandler = new UIListContentsChangedHandler(this.ChildListModified); - foreach (IList list in this._lists) - { - if (list is INotifyList notifyList) - notifyList.ContentsChanged -= contentsChangedHandler; - if (list is IVirtualList virtualList && virtualList.SlowDataRequestsEnabled) - virtualList.SlowDataAcquireCompleteHandler = null; - } - } - base.OnDispose(disposing); - } - - protected override object OnRequestItem(int index) - { - foreach (IList list in this._lists) - { - if (index < list.Count) - return list[index]; - index -= list.Count; - } - throw new IndexOutOfRangeException(nameof(index)); - } - - protected override void OnRequestSlowData(int index) - { - foreach (IList list in this._lists) - { - if (index < list.Count) - { - if (list is IVirtualList virtualList && virtualList.SlowDataRequestsEnabled) - { - virtualList.NotifyRequestSlowData(index); - break; - } - break; - } - index -= list.Count; - } - this.NotifySlowDataAcquireComplete(index); - } - - private bool ChildListSlowDataAcquired(IVirtualList childList, int index) - { - this.NotifySlowDataAcquireComplete(this.ListIndexToMasterIndex(childList, index)); - return true; - } - - private void ChildListModified(IList listSender, UIListContentsChangedArgs args) - { - int masterIndex1 = this.ListIndexToMasterIndex(listSender, args.OldIndex); - int masterIndex2 = this.ListIndexToMasterIndex(listSender, args.NewIndex); - switch (args.Type) - { - case UIListContentsChangeType.Add: - case UIListContentsChangeType.Insert: - this.Insert(masterIndex2); - break; - case UIListContentsChangeType.AddRange: - case UIListContentsChangeType.InsertRange: - this.InsertRange(masterIndex2, args.Count); - break; - case UIListContentsChangeType.Remove: - this.RemoveAt(masterIndex1); - break; - case UIListContentsChangeType.Move: - if (masterIndex1 == masterIndex2) - break; - this.Move(masterIndex1, masterIndex2); - break; - case UIListContentsChangeType.Modified: - this.Modified(masterIndex2); - break; - default: - this.Clear(); - this.Count = this.ItemCount; - break; - } - } - - [Conditional("DEBUG")] - private void DEBUG_ValidateConsistency() - { - int index1 = 0; - for (int index2 = 0; index2 < this._lists.Length; ++index2) - { - for (int index3 = 0; index3 < this._lists[index2].Count; ++index3) - { - object obj1 = this._lists[index2][index3]; - object obj2 = this[index1]; - ++index1; - } - } - } - - private int ListIndexToMasterIndex(IList list, int index) - { - int num = 0; - for (int index1 = 0; index1 < this._lists.Length && this._lists[index1] != list; ++index1) - num += this._lists[index1].Count; - return num + index; - } - - private void MasterIndexToListIndex(int masterIndex, out IList list, out int index) - { - int num = 0; - int index1 = 0; - list = null; - for (; index1 < this._lists.Length; ++index1) - { - list = this._lists[index1]; - if (num + list.Count <= masterIndex) - num += list.Count; - else - break; - } - index = masterIndex - num; - } - - private int ItemCount - { - get - { - int num = 0; - foreach (IList list in this._lists) - num += list.Count; - return num; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/ActiveSequence.cs b/UIX/Microsoft/Iris/Animations/ActiveSequence.cs deleted file mode 100644 index 3060fab..0000000 --- a/UIX/Microsoft/Iris/Animations/ActiveSequence.cs +++ /dev/null @@ -1,309 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ActiveSequence -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using System; -using System.Text; - -namespace Microsoft.Iris.Animations -{ - public class ActiveSequence : DisposableObject - { - private UISession _session; - private IAnimatable _animatableTarget; - private Vector _ready; - private Vector _playing; - private float _lastProgress; - private AnimationTemplate _template; - private int _playingCount; - - public ActiveSequence( - AnimationTemplate template_, - IAnimatable animatableTarget, - UISession session) - { - this._animatableTarget = animatableTarget; - this._session = session; - this._template = template_; - this._ready = new Vector(); - } - - protected override void OnDispose() - { - base.OnDispose(); - Vector animationCollection = this.GetAnimationCollection(); - if (animationCollection != null) - { - foreach (DisposableObject disposableObject in animationCollection) - disposableObject.Dispose(this); - this.FireComplete(false); - } - this._session = null; - this._animatableTarget = null; - this._template = null; - this._ready = null; - } - - public UISession Session => this._session; - - public IAnimatable Target => this._animatableTarget; - - public AnimationTemplate Template => this._template; - - public bool Playing => this._playing != null; - - public Vector PendingProxies => this._ready; - - public void Play() - { - Vector ready = this._ready; - this._ready = null; - if (ready.Count > 0) - { - foreach (AnimationProxy animationProxy in ready) - animationProxy.Play(); - this._playing = ready; - this.FireStart(); - } - else - { - this.FireStart(); - this.FireComplete(true); - } - } - - public void Stop() => this.Stop(null); - - public void Stop(StopCommandSet stopSetCommand) - { - if (UIDispatcher.IsUIThread) - { - this.StopWorker(stopSetCommand); - } - else - { - try - { - if (!this.Session.IsValid) - return; - DeferredCall.Post(DispatchPriority.High, new DeferredHandler(this.DeferredStop), stopSetCommand); - } - catch (InvalidOperationException ex) - { - } - } - } - - private void StopWorker(StopCommandSet stopSetCommand) - { - if (this._playing == null) - return; - foreach (AnimationProxy animationProxy in this._playing) - { - if (stopSetCommand != null) - animationProxy.Stop(stopSetCommand[animationProxy.Type]); - else - animationProxy.Stop(); - } - } - - private void DeferredStop(object args) => this.StopWorker((StopCommandSet)args); - - public bool ValidatePlayable() - { - foreach (AnimationProxy animationProxy in this._ready) - { - if (!animationProxy.ValidatePlayable()) - return false; - } - return true; - } - - public void OnAttachChildAnimation(AnimationProxy child) - { - child.DeclareOwner(this); - this._ready.Add(child); - } - - private Vector GetAnimationCollection() => this._ready ?? this._playing; - - public void OnDetachChildAnimation(AnimationProxy child, float progress) - { - Vector animationCollection = this.GetAnimationCollection(); - if (animationCollection == null) - return; - animationCollection.Remove(child); - child.Dispose(this); - if (_lastProgress < (double)progress) - this._lastProgress = progress; - if (animationCollection != this._playing || animationCollection.Count != 0) - return; - this.FireComplete(true); - } - - private void FireStart() => this.OnStart(); - - private void FireComplete(bool notify) - { - if (this._playing != null) - this._playing = null; - this.OnStop(this._lastProgress, notify); - } - - public StopCommandSet GetStopCommandSet() - { - StopCommandSet stopCommandSet = null; - foreach (AnimationProxy animation in this.GetAnimationCollection()) - { - if (animation.HasDynamicKeyframes) - { - if (stopCommandSet == null) - stopCommandSet = new StopCommandSet(StopCommand.MoveToEnd); - stopCommandSet[animation.Type] = StopCommand.LeaveCurrent; - } - } - return stopCommandSet; - } - - public ActiveTransitions GetActiveTransitions() - { - Vector animationCollection = this.GetAnimationCollection(); - ActiveTransitions activeTransitions = ActiveTransitions.None; - foreach (AnimationProxy animationProxy in animationCollection) - { - ActiveTransitions activeTransition = ConvertToActiveTransition(animationProxy.Type); - activeTransitions |= activeTransition; - } - return activeTransitions; - } - - public static ActiveTransitions ConvertToActiveTransition(AnimationType type) - { - switch (type) - { - case AnimationType.Position: - return ActiveTransitions.Move; - case AnimationType.Size: - return ActiveTransitions.Size; - case AnimationType.Alpha: - return ActiveTransitions.Alpha; - case AnimationType.Scale: - return ActiveTransitions.Scale; - case AnimationType.Rotate: - return ActiveTransitions.Rotate; - case AnimationType.Orientation: - return ActiveTransitions.Orientation; - case AnimationType.PositionX: - return ActiveTransitions.PositionX; - case AnimationType.PositionY: - return ActiveTransitions.PositionY; - case AnimationType.SizeX: - return ActiveTransitions.SizeX; - case AnimationType.SizeY: - return ActiveTransitions.SizeY; - case AnimationType.ScaleX: - return ActiveTransitions.ScaleX; - case AnimationType.ScaleY: - return ActiveTransitions.ScaleY; - case AnimationType.Float: - case AnimationType.Vector2: - case AnimationType.Vector3: - return ActiveTransitions.Effect; - case AnimationType.CameraEye: - return ActiveTransitions.CameraEye; - case AnimationType.CameraAt: - return ActiveTransitions.CameraAt; - case AnimationType.CameraUp: - return ActiveTransitions.CameraUp; - case AnimationType.CameraZn: - return ActiveTransitions.CameraZn; - default: - return ActiveTransitions.None; - } - } - - public static ActiveTransitions ConvertToActiveTransition( - AnimationEventType type) - { - switch (type) - { - case AnimationEventType.Move: - return ActiveTransitions.Move; - case AnimationEventType.Size: - return ActiveTransitions.Size; - case AnimationEventType.Scale: - return ActiveTransitions.Scale; - case AnimationEventType.Rotate: - return ActiveTransitions.Rotate | ActiveTransitions.Orientation; - case AnimationEventType.Alpha: - return ActiveTransitions.Alpha; - default: - return ActiveTransitions.None; - } - } - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("{ActiveSequence Template=\""); - if (this._template.DebugID != null) - { - stringBuilder.Append(this._template.DebugID); - } - else - { - Animation template = this._template as Animation; - if (template != null) - stringBuilder.Append(template.Type); - else - stringBuilder.Append(""); - } - stringBuilder.Append("\", Target="); - stringBuilder.Append(this._animatableTarget.GetType().Name); - if (this._animatableTarget is IVisual) - { - stringBuilder.Append(", IVisual="); - stringBuilder.Append(((IVisual)this._animatableTarget).DebugID); - } - stringBuilder.Append("}"); - return stringBuilder.ToString(); - } - - public event EventHandler AnimationStarted; - - public event EventHandler AnimationCompleted; - - public event EventHandler AfterAnimationCompleted; - - public void OnStart() - { - ++this._playingCount; - if (this._playingCount != 1 || this.AnimationStarted == null) - return; - this.AnimationStarted(this, EventArgs.Empty); - } - - public void OnStop(float progress, bool notify) - { - --this._playingCount; - if (notify && this._playingCount == 0) - { - EventArgs e = new AnimationCompleteArgs(progress); - if (this.AnimationCompleted != null) - this.AnimationCompleted(this, e); - if (this.AfterAnimationCompleted == null) - return; - this.AfterAnimationCompleted(this, e); - } - else - { - int playingCount = this._playingCount; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/ActiveTransitions.cs b/UIX/Microsoft/Iris/Animations/ActiveTransitions.cs deleted file mode 100644 index dc12ce3..0000000 --- a/UIX/Microsoft/Iris/Animations/ActiveTransitions.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ActiveTransitions -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Animations -{ - [Flags] - public enum ActiveTransitions - { - None = 0, - Move = 1, - Scale = 2, - Alpha = 4, - Rotate = 8, - Size = 16, // 0x00000010 - Effect = 32, // 0x00000020 - PositionX = 64, // 0x00000040 - PositionY = 128, // 0x00000080 - SizeX = 256, // 0x00000100 - SizeY = 512, // 0x00000200 - ScaleX = 1024, // 0x00000400 - ScaleY = 2048, // 0x00000800 - Orientation = 4096, // 0x00001000 - CameraEye = 8192, // 0x00002000 - CameraAt = 16384, // 0x00004000 - CameraUp = 32768, // 0x00008000 - CameraZn = 65536, // 0x00010000 - } -} diff --git a/UIX/Microsoft/Iris/Animations/AlphaKeyframe.cs b/UIX/Microsoft/Iris/Animations/AlphaKeyframe.cs deleted file mode 100644 index 7d00da9..0000000 --- a/UIX/Microsoft/Iris/Animations/AlphaKeyframe.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AlphaKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class AlphaKeyframe : BaseMultiplyFloatKeyframe - { - public override AnimationType Type => AnimationType.Alpha; - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return this.RelativeTo == RelativeTo.Final ? baseValue * args.NewAlpha : baseValue; - } - - public override void Apply(IAnimatableOwner animationTarget, float value) => ((ViewItem)animationTarget).VisualAlpha = value; - - public override void MagnifyValue(float magnifyValue) - { - float num = this.Value * magnifyValue; - if (num > 1.0) - num = 1f; - this.Value = num; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/Animation.cs b/UIX/Microsoft/Iris/Animations/Animation.cs deleted file mode 100644 index 7118aa6..0000000 --- a/UIX/Microsoft/Iris/Animations/Animation.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.Animation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; -using System.Collections.Specialized; -using System.Text; - -namespace Microsoft.Iris.Animations -{ - public class Animation : AnimationTemplate, IAnimationProvider - { - private static readonly DataCookie s_rotationAxisProperty = DataCookie.ReserveSlot(); - private static readonly DataCookie s_centerPointScaleProperty = DataCookie.ReserveSlot(); - private static readonly DataCookie s_centerPointOffsetProperty = DataCookie.ReserveSlot(); - private BitVector32 _bitsBitVector; - private AnimationEventType _type; - private DynamicData _dataMap; - - public Animation() - { - this._type = AnimationEventType.Idle; - this._bitsBitVector = new BitVector32(); - this._dataMap = new DynamicData(); - } - - public override object Clone() - { - Animation animation = new Animation(); - this.CloneWorker(animation); - return animation; - } - - protected override void CloneWorker(AnimationTemplate rawAnimation) - { - base.CloneWorker(rawAnimation); - Animation animation = (Animation)rawAnimation; - animation.Type = this.Type; - if (this.GetBit(Bits.CenterPointScale)) - animation.CenterPointPercent = this.CenterPointPercent; - if (this.GetBit(Bits.RotationAxis)) - animation.RotationAxis = this.RotationAxis; - animation.DisableMouseInput = this.DisableMouseInput; - } - - private void PrepareToPlay(ref AnimationArgs args) - { - if (this.GetBit(Bits.CenterPointScale)) - args.ViewItem.VisualCenterPoint = this.CenterPointPercent; - if (!this.GetBit(Bits.RotationAxis)) - return; - Rotation visualRotation = args.ViewItem.VisualRotation; - args.ViewItem.VisualRotation = new Rotation(visualRotation.AngleRadians, this.RotationAxis); - } - - public AnimationEventType Type - { - get => this._type; - set => this._type = value; - } - - public Vector3 CenterPointPercent - { - get => !this.GetBit(Bits.CenterPointScale) ? Vector3.Zero : (Vector3)this.GetData(s_centerPointScaleProperty); - set - { - if (!(this.CenterPointPercent != value)) - return; - this.SetData(s_centerPointScaleProperty, value); - this.SetBit(Bits.CenterPointScale, true); - } - } - - public Vector3 RotationAxis - { - get => !this.GetBit(Bits.RotationAxis) ? Rotation.Default.Axis : (Vector3)this.GetData(s_rotationAxisProperty); - set - { - if (!(this.RotationAxis != value)) - return; - this.SetData(s_rotationAxisProperty, value); - this.SetBit(Bits.RotationAxis, true); - } - } - - public bool DisableMouseInput - { - get => this.GetBit(Bits.DisableMouseInput); - set => this.SetBit(Bits.DisableMouseInput, value); - } - - AnimationTemplate IAnimationProvider.Build( - ref AnimationArgs args) - { - this.PrepareToPlay(ref args); - return this; - } - - public bool CanCache => true; - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("{AnimationTemplate ID="); - stringBuilder.Append(this.DebugID); - stringBuilder.Append(", Loop="); - stringBuilder.Append(this.Loop); - stringBuilder.Append(", KeyframeCount="); - stringBuilder.Append(this.Keyframes.Count); - stringBuilder.Append("}"); - return stringBuilder.ToString(); - } - - private bool GetBit(Animation.Bits bit) => this._bitsBitVector[(int)bit]; - - private void SetBit(Animation.Bits bit, bool value) => this._bitsBitVector[(int)bit] = value; - - private bool ChangeBit(Animation.Bits bit, bool value) - { - if (this._bitsBitVector[(int)bit] == value) - return false; - this._bitsBitVector[(int)bit] = value; - return true; - } - - protected object GetData(DataCookie cookie) => this._dataMap.GetData(cookie); - - protected void SetData(DataCookie cookie, object value) => this._dataMap.SetData(cookie, value); - - protected Delegate GetEventHandler(EventCookie cookie) => this._dataMap.GetEventHandler(cookie); - - protected void AddEventHandler(EventCookie cookie, Delegate handlerToAdd) => this._dataMap.AddEventHandler(cookie, handlerToAdd); - - protected void RemoveEventHandler(EventCookie cookie, Delegate handlerToRemove) => this._dataMap.RemoveEventHandler(cookie, handlerToRemove); - - protected void RemoveEventHandlers(EventCookie cookie) => this._dataMap.RemoveEventHandlers(cookie); - - private static uint GetKey(EventCookie cookie) => EventCookie.ToUInt32(cookie); - - private enum Bits - { - CenterPointScale = 1, - RotationAxis = 2, - DisableMouseInput = 4, - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationArgs.cs b/UIX/Microsoft/Iris/Animations/AnimationArgs.cs deleted file mode 100644 index cd3b1a9..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationArgs.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationArgs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public struct AnimationArgs - { - public ViewItem ViewItem; - public Vector3 OldPosition; - public Vector2 OldSize; - public Vector3 OldScale; - public Rotation OldRotation; - public float OldAlpha; - public Vector3 NewPosition; - public Vector2 NewSize; - public Vector3 NewScale; - public Rotation NewRotation; - public float NewAlpha; - public Vector3 OldEye; - public Vector3 OldAt; - public Vector3 OldUp; - public float OldZn; - public Vector3 NewEye; - public Vector3 NewAt; - public Vector3 NewUp; - public float NewZn; - - public AnimationArgs(Camera cam) - { - this.ViewItem = null; - this.OldPosition = Vector3.Zero; - this.OldSize = Vector2.Zero; - this.OldScale = Vector3.Zero; - this.OldRotation = Rotation.Default; - this.OldAlpha = 0.0f; - this.NewPosition = Vector3.Zero; - this.NewSize = Vector2.Zero; - this.NewScale = Vector3.Zero; - this.NewRotation = Rotation.Default; - this.NewAlpha = 0.0f; - this.OldEye = cam.Eye; - this.NewEye = cam.Eye; - this.OldAt = cam.At; - this.NewAt = cam.At; - this.OldUp = cam.Up; - this.NewUp = cam.Up; - this.OldZn = cam.Zn; - this.NewZn = cam.Zn; - } - - public AnimationArgs( - ViewItem vi, - Vector3 oldPosition, - Vector2 oldSize, - Vector3 oldScale, - Rotation oldRotation, - float oldAlpha, - Vector3 newPosition, - Vector2 newSize, - Vector3 newScale, - Rotation newRotation, - float newAlpha) - { - this.ViewItem = vi; - this.OldPosition = oldPosition; - this.OldSize = oldSize; - this.OldScale = oldScale; - this.OldRotation = oldRotation; - this.OldAlpha = oldAlpha; - this.NewPosition = newPosition; - this.NewSize = newSize; - this.NewScale = newScale; - this.NewRotation = newRotation; - this.NewAlpha = newAlpha; - this.OldEye = Vector3.Zero; - this.NewEye = Vector3.Zero; - this.OldAt = Vector3.Zero; - this.NewAt = Vector3.Zero; - this.OldUp = Vector3.Zero; - this.NewUp = Vector3.Zero; - this.OldZn = 0.0f; - this.NewZn = 0.0f; - } - - public AnimationArgs( - ViewItem vi, - Vector3 oldPosition, - Vector2 oldSize, - Vector3 oldScale, - Rotation oldRotation, - float oldAlpha) - : this(vi, oldPosition, oldSize, oldScale, oldRotation, oldAlpha, oldPosition, oldSize, oldScale, oldRotation, oldAlpha) - { - } - - public AnimationArgs(ViewItem vi) - : this(vi, vi.VisualPosition, vi.VisualSize, vi.VisualScale, vi.VisualRotation, vi.VisualAlpha, vi.VisualPosition, vi.VisualSize, vi.VisualScale, vi.VisualRotation, vi.VisualAlpha) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationCompleteArgs.cs b/UIX/Microsoft/Iris/Animations/AnimationCompleteArgs.cs deleted file mode 100644 index ef11d12..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationCompleteArgs.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationCompleteArgs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Animations -{ - public class AnimationCompleteArgs : EventArgs - { - private float _progress; - - public AnimationCompleteArgs(float progress) => this._progress = progress; - - public float Progress => this._progress; - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationEventType.cs b/UIX/Microsoft/Iris/Animations/AnimationEventType.cs deleted file mode 100644 index 897c415..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationEventType.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationEventType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum AnimationEventType - { - Show, - Hide, - Move, - Size, - Scale, - Rotate, - Alpha, - GainFocus, - LoseFocus, - ContentChangeShow, - ContentChangeHide, - Idle, - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationHandle.cs b/UIX/Microsoft/Iris/Animations/AnimationHandle.cs deleted file mode 100644 index 4c163a2..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationHandle.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationHandle -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using System; - -namespace Microsoft.Iris.Animations -{ - public class AnimationHandle : NotifyObjectBase - { - private int _playing; - - public event EventHandler Completed; - - public bool Playing => this._playing > 0; - - public void AssociateWithAnimationInstance(ActiveSequence anim) - { - anim.AnimationCompleted += new EventHandler(this.OnAnimationCompleted); - ++this._playing; - if (this._playing != 1) - return; - this.FireNotification(NotificationID.Playing); - } - - public void FireCompleted() - { - if (this.Completed != null) - this.Completed(this, EventArgs.Empty); - this.FireNotification(NotificationID.Completed); - } - - private void OnAnimationCompleted(object sender, EventArgs args) - { - ((ActiveSequence)sender).AnimationCompleted -= new EventHandler(this.OnAnimationCompleted); - --this._playing; - if (this._playing != 0) - return; - this.FireNotification(NotificationID.Playing); - this.FireCompleted(); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationManager.cs b/UIX/Microsoft/Iris/Animations/AnimationManager.cs deleted file mode 100644 index 0515214..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationManager.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationManager -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; - -namespace Microsoft.Iris.Animations -{ - public class AnimationManager : IDisposable - { - private IRenderSession _session; - private Vector _orphans; - private bool _shuttingDown; - private static ConstantAnimationInput s_defaultPositionInput = new ConstantAnimationInput(Vector3.Zero); - private static ConstantAnimationInput s_defaultSizeInput = new ConstantAnimationInput(Vector2.Zero); - private static ConstantAnimationInput s_defaultAlphaInput = new ConstantAnimationInput(0.0f); - private static ConstantAnimationInput s_defaultScaleInput = new ConstantAnimationInput(Vector3.UnitVector); - private static ConstantAnimationInput s_defaultRotationInput = new ConstantAnimationInput(AxisAngle.Identity.ToVector4()); - private static ConstantAnimationInput s_defaultOrientationInput = new ConstantAnimationInput(AxisAngle.Identity.ToQuaternion()); - private static ConstantAnimationInput s_defaultFloatInput = new ConstantAnimationInput(0.0f); - private static ConstantAnimationInput s_defaultVector2Input = new ConstantAnimationInput(Vector2.Zero); - private static ConstantAnimationInput s_defaultVector3Input = new ConstantAnimationInput(Vector3.Zero); - private static ConstantAnimationInput s_defaultVector4Input = new ConstantAnimationInput(Vector4.Zero); - private static ConstantAnimationInput s_defaultCameraEyeInput = new ConstantAnimationInput(new Vector3(0.0f, 0.0f, -4f)); - private static ConstantAnimationInput s_defaultCameraAtInput = new ConstantAnimationInput(new Vector3(0.0f, 0.0f, 0.0f)); - private static ConstantAnimationInput s_defaultCameraUpInput = new ConstantAnimationInput(new Vector3(0.0f, 1f, 0.0f)); - private static ConstantAnimationInput s_defaultCameraZnInput = new ConstantAnimationInput(2f); - - public AnimationManager(IRenderSession session) - { - this._session = session; - this._orphans = new Vector(); - this._session.AnimationSystem.UpdatesPerSecond = session.GraphicsDevice.DeviceType != GraphicsDeviceType.Gdi ? 0 : 3; - this._session.AnimationSystem.BackCompat = true; - } - - ~AnimationManager() => this.Dispose(false); - - public void Dispose() - { - GC.SuppressFinalize(this); - this.Dispose(true); - } - - protected virtual void Dispose(bool inDisposeFlag) - { - this._shuttingDown = true; - if (!inDisposeFlag) - return; - foreach (DisposableObject orphan in this._orphans) - orphan.Dispose(this); - this._orphans.Clear(); - } - - public bool ShuttingDown => this._shuttingDown; - - public void SetGlobalSpeedAdjustment(float value) - { - this.ValidateConnected(); - this._session.AnimationSystem.SpeedAdjustment = value; - } - - public void PulseTimeAdvance(int pulseSize) - { - this.ValidateConnected(); - this._session.AnimationSystem.PulseTimeAdvance(pulseSize); - } - - public void RegisterAnimatedOrphans(OrphanedVisualCollection orphan) => this._orphans.Add(orphan); - - public void UnregisterAnimatedOrphans(OrphanedVisualCollection orphan) => this._orphans.Remove(orphan); - - public bool CanPlayAnimationType(AnimationType type) => this._session.GraphicsDevice.DeviceType != GraphicsDeviceType.Gdi || type == AnimationType.Position || (type == AnimationType.Size || type == AnimationType.Scale) || type == AnimationType.Alpha; - - private void ValidateConnected() - { - } - - public IKeyframeAnimation BuildAnimation(AnimationProxy owner) - { - this.ValidateConnected(); - IKeyframeAnimation keyframeAnimation = null; - switch (owner.Type) - { - case AnimationType.Position: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultPositionInput); - break; - case AnimationType.Size: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultSizeInput); - break; - case AnimationType.Alpha: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultAlphaInput); - break; - case AnimationType.Scale: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultScaleInput); - break; - case AnimationType.Rotate: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultRotationInput); - break; - case AnimationType.Orientation: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultOrientationInput); - break; - case AnimationType.PositionX: - case AnimationType.PositionY: - case AnimationType.SizeX: - case AnimationType.SizeY: - case AnimationType.ScaleX: - case AnimationType.ScaleY: - case AnimationType.Float: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultFloatInput); - break; - case AnimationType.Vector2: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultVector2Input); - break; - case AnimationType.Vector3: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultVector3Input); - break; - case AnimationType.Vector4: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultVector4Input); - break; - case AnimationType.CameraEye: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultCameraEyeInput); - break; - case AnimationType.CameraAt: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultCameraAtInput); - break; - case AnimationType.CameraUp: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultCameraUpInput); - break; - case AnimationType.CameraZn: - keyframeAnimation = this._session.AnimationSystem.CreateKeyframeAnimation(owner, s_defaultCameraZnInput); - break; - } - return keyframeAnimation; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationProxy.cs b/UIX/Microsoft/Iris/Animations/AnimationProxy.cs deleted file mode 100644 index acca699..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationProxy.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Animations -{ - public class AnimationProxy : DisposableObject - { - private ActiveSequence _activeSequence; - private IKeyframeAnimation _animation; - private int _keyframesValue; - private bool _playingFlag; - private AnimationType _type; - private bool _dynamicFlag; - private bool _doNotAutoReleaseFlag; - private IAnimatable _animatableTarget; - private RendererProperty _rendererProperty; - private static DeferredHandler s_deferredCleanupWorker = new DeferredHandler(DeferredCleanupWorker); - - public AnimationProxy( - ActiveSequence activeSequence, - IAnimatable animatableTarget, - AnimationType createType, - RendererProperty rendererProperty, - int loopCount, - StopCommand stopCmd) - { - UISession.Validate(activeSequence.Session); - AnimationSystem.ValidateAnimationType(createType); - this._activeSequence = activeSequence; - this._type = createType; - this._animatableTarget = animatableTarget; - this._rendererProperty = rendererProperty; - this._animation = this._activeSequence.Session.AnimationManager.BuildAnimation(this); - this.CommonCreate(loopCount, stopCmd); - } - - private void CommonCreate(int loopCount, StopCommand stopCmd) - { - this._animation.RepeatCount = loopCount; - this._animation.AsyncNotifyEvent += new AsyncNotifyHandler(this.OnAsyncNotification); - this._animation.AddStageEvent(AnimationStage.Complete, new AnimationEvent(_animation, "AsyncNotify", 1U)); - this._animation.AddStageEvent(AnimationStage.Reset, new AnimationEvent(_animation, "AsyncNotify", 2U)); - this.SetStopCommand(stopCmd); - this._activeSequence.OnAttachChildAnimation(this); - } - - protected override void OnDispose() - { - this.CleanupWorker(0.0f, false); - base.OnDispose(); - } - - public UISession Session => this._activeSequence.Session; - - public AnimationType Type => this._type; - - public bool HasDynamicKeyframes => this._dynamicFlag; - - public bool DoNotAutoRelease - { - get => this._doNotAutoReleaseFlag; - set => this._doNotAutoReleaseFlag = value; - } - - public void AddFloatKeyframe(BaseKeyframe keyframe, float value) - { - ++this._keyframesValue; - AnimationInput animationInput1; - if (keyframe.IsRelativeToObject) - { - this._dynamicFlag = true; - animationInput1 = keyframe.RelativeTo.CreateAnimationInput(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.SourceMask); - if (keyframe.Multiply && value != 1.0) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 *= animationInput2; - } - else if (!keyframe.Multiply && value != 0.0) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 += animationInput2; - } - } - else - animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); - } - - public void AddVector2Keyframe(BaseKeyframe keyframe, Vector2 value) - { - ++this._keyframesValue; - AnimationInput animationInput1; - if (keyframe.IsRelativeToObject) - { - this._dynamicFlag = true; - animationInput1 = keyframe.RelativeTo.CreateAnimationInput(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.SourceMask); - if (keyframe.Multiply && value != Vector2.UnitVector) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 *= animationInput2; - } - else if (!keyframe.Multiply && value != Vector2.Zero) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 += animationInput2; - } - } - else - animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); - } - - public void AddVector3Keyframe(BaseKeyframe keyframe, Vector3 value) - { - ++this._keyframesValue; - AnimationInput animationInput1; - if (keyframe.IsRelativeToObject) - { - this._dynamicFlag = true; - animationInput1 = keyframe.RelativeTo.CreateAnimationInput(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.SourceMask); - if (keyframe.Multiply && value != Vector3.UnitVector) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 *= animationInput2; - } - else if (!keyframe.Multiply && value != Vector3.Zero) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 += animationInput2; - } - } - else - animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); - } - - public void AddVector4Keyframe(BaseKeyframe keyframe, Vector4 value) - { - ++this._keyframesValue; - AnimationInput animationInput1; - if (keyframe.IsRelativeToObject) - { - this._dynamicFlag = true; - animationInput1 = keyframe.RelativeTo.CreateAnimationInput(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.SourceMask); - if (keyframe.Multiply && value != Vector4.UnitVector) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 *= animationInput2; - } - else if (!keyframe.Multiply && value != Vector4.Zero) - { - AnimationInput animationInput2 = new ConstantAnimationInput(value); - animationInput1 += animationInput2; - } - } - else - animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); - } - - public void AddRotationKeyframe(BaseKeyframe keyframe, Rotation value) - { - if (keyframe.Type != AnimationType.Orientation) - { - this.AddVector4Keyframe(keyframe, new Vector4(value.Axis.X, value.Axis.Y, value.Axis.Z, value.AngleRadians)); - } - else - { - ++this._keyframesValue; - AnimationInput animationInput1; - if (keyframe.IsRelativeToObject) - { - this._dynamicFlag = true; - animationInput1 = keyframe.RelativeTo.CreateAnimationInput(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.SourceMask); - if (value != Rotation.Default) - { - AnimationInput animationInput2 = new ConstantAnimationInput(new Quaternion(value.Axis, value.AngleRadians)); - animationInput1 *= animationInput2; - } - } - else - animationInput1 = new ConstantAnimationInput(new Quaternion(value.Axis, value.AngleRadians)); - AnimationInterpolation interpolation = GenerateInterpolation(keyframe.Interpolation); - interpolation.UseSphericalCombination = true; - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, interpolation)); - } - } - - public void SetStopCommand(StopCommand stopCmd) - { - switch (stopCmd) - { - case StopCommand.LeaveCurrent: - this._animation.ResetBehavior = AnimationResetBehavior.LeaveCurrent; - break; - case StopCommand.MoveToBegin: - this._animation.ResetBehavior = AnimationResetBehavior.SetInitialValue; - break; - case StopCommand.MoveToEnd: - this._animation.ResetBehavior = AnimationResetBehavior.SetFinalValue; - break; - } - this._animation.AutoReset = true; - } - - public bool ValidatePlayable() - { - if (this._keyframesValue >= 2) - return true; - ErrorManager.ReportError("Animations must have at least 2 keyframes to play"); - return false; - } - - public void Play() - { - if (!this.ValidatePlayable()) - return; - if (!this._activeSequence.Session.AnimationManager.CanPlayAnimationType(this._type)) - { - this.Cleanup(0.0f, true); - } - else - { - if (this._playingFlag || this._animation == null || !this.Session.IsValid) - return; - this._animation.AddTarget(this._animatableTarget, this._rendererProperty.Property, this._rendererProperty.TargetMask); - this._animation.Play(); - this._playingFlag = true; - } - } - - public void Stop() => this.StopWorker(false, StopCommand.MoveToEnd); - - public void Stop(StopCommand stopCommand) => this.StopWorker(true, stopCommand); - - private void StopWorker(bool stopCommandFlag, StopCommand stopCommand) - { - if (!this._playingFlag) - return; - this._playingFlag = false; - if (this._animation == null || !this.Session.IsValid) - return; - if (stopCommandFlag) - this.SetStopCommand(stopCommand); - this._animation.Reset(); - this._animation.RemoveAllTargets(); - } - - private void Cleanup(float progress, bool forceDeferFlag) - { - if (this._animation == null) - return; - if (UIDispatcher.IsUIThread && !forceDeferFlag) - { - this.CleanupWorker(progress, true); - } - else - { - if (!this.Session.IsValid) - return; - DeferredCall.Post(DispatchPriority.Housekeeping, s_deferredCleanupWorker, this); - } - } - - private void CleanupWorker(float progress, bool withNotifications) - { - this._playingFlag = false; - if (this._animation != null) - { - this._animation.AsyncNotifyEvent -= new AsyncNotifyHandler(this.OnAsyncNotification); - this._animation.UnregisterUsage(this); - this._animation = null; - } - this._animatableTarget = null; - if (!withNotifications) - return; - this._activeSequence.OnDetachChildAnimation(this, progress); - } - - private static void DeferredCleanupWorker(object args) => (args as AnimationProxy).CleanupWorker(0.0f, true); - - private static AnimationInterpolation GenerateInterpolation( - Interpolation interpolation) - { - if (interpolation == null) - return new LinearInterpolation(); - switch (interpolation.Type) - { - case InterpolationType.Linear: - return new LinearInterpolation(); - case InterpolationType.SCurve: - return new SCurveInterpolation(interpolation.Weight * 10f); - case InterpolationType.Exp: - return interpolation.Weight > 0.0 ? new ExponentialInterpolation(interpolation.Weight * 10f) : (AnimationInterpolation)new LinearInterpolation(); - case InterpolationType.Log: - return interpolation.Weight > 0.0 ? new LogarithmicInterpolation(interpolation.Weight * 10f) : (AnimationInterpolation)new LinearInterpolation(); - case InterpolationType.Sine: - return new SineInterpolation(); - case InterpolationType.Cosine: - return new CosineInterpolation(); - case InterpolationType.Bezier: - return new BezierInterpolation(interpolation.BezierHandle1, interpolation.BezierHandle2); - case InterpolationType.EaseIn: - return new EaseInInterpolation(interpolation.Weight * 10f, interpolation.EasePercent); - case InterpolationType.EaseOut: - return new EaseOutInterpolation(interpolation.Weight * 10f, interpolation.EasePercent); - default: - return new LinearInterpolation(); - } - } - - private void OnAsyncNotification(int nCookie) - { - switch (nCookie) - { - case 1: - this.Cleanup(0.0f, false); - break; - case 2: - this.Cleanup(0.0f, false); - break; - } - } - - private enum AsyncNotifications - { - OnComplete = 1, - OnReset = 2, - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationSystem.cs b/UIX/Microsoft/Iris/Animations/AnimationSystem.cs deleted file mode 100644 index 50372af..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationSystem.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationSystem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.Iris.Animations -{ - public static class AnimationSystem - { - private static bool _enabledFlag = true; - private static bool _overrideToFalseFlag; - private static int _disableAnimationCount; - private static Dictionary _sequences = new Dictionary(); - - public static void ValidateAnimationType(AnimationType paramType) - { - } - - public static bool SequenceExists(string id) => _sequences.ContainsKey(id); - - public static AnimationTemplate GetSequenceByID(string id) - { - if (!Enabled) - return null; - return SequenceExists(id) ? (AnimationTemplate)_sequences[id].Clone() : null; - } - - public static AnimationTemplate GetSequenceByIDAlways(string id) => SequenceExists(id) ? (AnimationTemplate)_sequences[id].Clone() : null; - - public static void AddSequenceByID(string id, AnimationTemplate seq) - { - if (SequenceExists(id)) - return; - _sequences.Add(id, seq); - } - - public static void ClearSequences() => _sequences = new Dictionary(); - - public static ICollection GetAllSequences() => _sequences.Values; - - public static bool Enabled => _enabledFlag; - - public static void SetEnableState(bool value) => _enabledFlag = value; - - public static void OverrideAnimationState(bool overrideToFalseFlag) - { - if (_overrideToFalseFlag == overrideToFalseFlag) - return; - _overrideToFalseFlag = overrideToFalseFlag; - UpdateAnimationState(); - } - - public static void UpdateAnimationState() - { - bool flag = true; - if (_disableAnimationCount > 0 || _overrideToFalseFlag) - flag = false; - SetEnableState(flag); - } - - public static void PushDisableAnimations() - { - ++_disableAnimationCount; - if (_disableAnimationCount != 1) - return; - UpdateAnimationState(); - } - - public static void PopDisableAnimations() - { - --_disableAnimationCount; - if (_disableAnimationCount != 0) - return; - UpdateAnimationState(); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs b/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs deleted file mode 100644 index 7f45f57..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationTemplate -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.Iris.Animations -{ - public class AnimationTemplate : ICloneable - { - private const float k_epsilon = 0.0001f; - private const StopCommand k_defaultStopCommand = StopCommand.MoveToEnd; - private string _debugIDName; - private List _keyframesList; - private int _loopCount; - private StopCommandSet _StopCommandSet; - - public AnimationTemplate() - : this(null) - { - } - - public AnimationTemplate(string debugIDName) - { - this._keyframesList = new List(); - this.DebugID = debugIDName; - } - - public string DebugID - { - get => this._debugIDName; - set => this._debugIDName = value; - } - - public int Loop - { - get => this._loopCount; - set => this._loopCount = value; - } - - public List Keyframes => this._keyframesList; - - public ActiveSequence Play(ViewItem vi) - { - AnimationArgs args = new AnimationArgs(vi); - return this.Play(vi.RendererVisual, ref args, null); - } - - public ActiveSequence Play( - IVisual visualTarget, - ref AnimationArgs args, - EventHandler onCompleteHandler) - { - ActiveSequence instance = this.CreateInstance(visualTarget, ref args); - if (onCompleteHandler != null) - instance.AnimationCompleted += onCompleteHandler; - instance.Play(); - return instance; - } - - public ActiveSequence CreateInstance( - IAnimatable animatableTarget, - string property, - ref AnimationArgs args) - { - if (this._keyframesList.Count == 0) - { - ErrorManager.ReportError("Animations must have at least 2 keyframes to play"); - return null; - } - ActiveSequence aseq = new ActiveSequence(this, animatableTarget, UISession.Default); - AnimationProxy[] animationProxyArray = new AnimationProxy[20]; - int[] numArray = new int[20]; - bool[] flagArray = new bool[20]; - foreach (BaseKeyframe keyframes in this._keyframesList) - { - int type = (int)keyframes.Type; - keyframes.AddtoAnimation(this, aseq, property, ref args, ref animationProxyArray[type]); - ++numArray[type]; - flagArray[type] |= keyframes.Time == 0.0; - } - for (int index = 0; index <= 19; ++index) - { - if (animationProxyArray[index] != null) - { - AnimationType animationType = (AnimationType)index; - if (numArray[index] < 2) - { - ErrorManager.ReportError("Animation must have at least 2 keyframes of each type. Attempted to play an animation that only has {0} keyframe of type '{1}'.", numArray[index], animationType); - return null; - } - if (!flagArray[index]) - { - ErrorManager.ReportError("Animation must have a keyframe at time 0.0 for each type. Attempted to play an animation that has no start keyframe for type '{0}'", animationType); - return null; - } - } - } - return !aseq.ValidatePlayable() ? null : aseq; - } - - public ActiveSequence CreateInstance( - IAnimatable animatableTarget, - ref AnimationArgs args) - { - return this.CreateInstance(animatableTarget, null, ref args); - } - - public void AddKeyframe(BaseKeyframe key) => this.InsertSorted(key); - - public BaseKeyframe GetKeyframe(float time) - { - int count = this._keyframesList.Count; - for (int index = 0; index < count; ++index) - { - BaseKeyframe keyframes = this._keyframesList[index]; - if (IsSameTime(time, keyframes.Time)) - return keyframes; - } - return null; - } - - public void RemoveKeyframe(float time) - { - BaseKeyframe keyframe = this.GetKeyframe(time); - if (keyframe == null) - return; - this._keyframesList.Remove(keyframe); - } - - public StopCommand GetStopCommand(AnimationType paramType) - { - AnimationSystem.ValidateAnimationType(paramType); - StopCommand stopCommand = StopCommand.MoveToEnd; - if (this._StopCommandSet != null) - stopCommand = this._StopCommandSet[paramType]; - return stopCommand; - } - - public void SetStopCommand(AnimationType paramType, StopCommand command) - { - AnimationSystem.ValidateAnimationType(paramType); - if (this._StopCommandSet == null) - this._StopCommandSet = new StopCommandSet(StopCommand.MoveToEnd); - this._StopCommandSet[paramType] = command; - } - - object ICloneable.Clone() => this.Clone(); - - public virtual object Clone() - { - AnimationTemplate anim = new AnimationTemplate(this._debugIDName); - this.CloneWorker(anim); - return anim; - } - - protected virtual void CloneWorker(AnimationTemplate anim) - { - anim._loopCount = this._loopCount; - int count = this._keyframesList.Count; - for (int index = 0; index < count; ++index) - anim._keyframesList.Add(this._keyframesList[index].Clone()); - anim._debugIDName = this._debugIDName; - } - - private void InsertSorted(BaseKeyframe key) - { - for (int index = this._keyframesList.Count - 1; index >= 0; --index) - { - if (_keyframesList[index].Time < (double)key.Time) - { - this._keyframesList.Insert(index + 1, key); - return; - } - } - this._keyframesList.Insert(0, key); - } - - private static bool IsSameTime(float t1, float t2) - { - float num = t2 - t1; - if (num < 0.0) - num *= -1f; - return num < 9.99999974737875E-05; - } - - public class AnimationTemplateComparer : IComparer - { - public int Compare(object objx, object objy) - { - AnimationTemplate animationTemplate1 = objx as AnimationTemplate; - AnimationTemplate animationTemplate2 = objy as AnimationTemplate; - if (animationTemplate1 == null && animationTemplate2 == null) - return 0; - if (animationTemplate1 == null) - return -1; - return animationTemplate2 == null ? 1 : string.Compare(animationTemplate1.DebugID, animationTemplate2.DebugID, StringComparison.Ordinal); - } - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/AnimationType.cs b/UIX/Microsoft/Iris/Animations/AnimationType.cs deleted file mode 100644 index 57e0f19..0000000 --- a/UIX/Microsoft/Iris/Animations/AnimationType.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.AnimationType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum AnimationType - { - First = 0, - Position = 0, - Size = 1, - Alpha = 2, - Scale = 3, - Rotate = 4, - Orientation = 5, - PositionX = 6, - PositionY = 7, - SizeX = 8, - SizeY = 9, - ScaleX = 10, // 0x0000000A - ScaleY = 11, // 0x0000000B - Float = 12, // 0x0000000C - Vector2 = 13, // 0x0000000D - Vector3 = 14, // 0x0000000E - Vector4 = 15, // 0x0000000F - CameraEye = 16, // 0x00000010 - CameraAt = 17, // 0x00000011 - CameraUp = 18, // 0x00000012 - CameraZn = 19, // 0x00000013 - Last = 19, // 0x00000013 - NumTypes = 20, // 0x00000014 - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseFloatKeyframe.cs b/UIX/Microsoft/Iris/Animations/BaseFloatKeyframe.cs deleted file mode 100644 index ccfd50a..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseFloatKeyframe.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseFloatKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseFloatKeyframe : BaseKeyframe - { - private float _value; - - protected override void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args) - { - float effectiveValue = this.GetEffectiveValue(targetObject, this._value, ref args); - animation.AddFloatKeyframe(this, effectiveValue); - } - - public float Value - { - get => this._value; - set => this._value = value; - } - - public override object ObjectValue => Value; - - public virtual float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return baseValue; - } - - public override void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args) - { - float effectiveValue = this.GetEffectiveValue(animationTarget.AnimationTarget, this._value, ref args); - this.Apply(animationTarget, effectiveValue); - } - - public abstract void Apply(IAnimatableOwner animationTarget, float value); - - public override void MagnifyValue(float magnifyValue) => this.Value *= magnifyValue; - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs b/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs deleted file mode 100644 index 11cea46..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using System; -using System.Text; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseKeyframe : ICloneable - { - private Interpolation _interpolation; - private RelativeTo _relative; - private float _timeValue; - private static RendererProperty[] s_propertyMap = new RendererProperty[20]; - - static BaseKeyframe() - { - s_propertyMap[0] = new RendererProperty("Position"); - s_propertyMap[1] = new RendererProperty("Size"); - s_propertyMap[2] = new RendererProperty("Alpha"); - s_propertyMap[3] = new RendererProperty("Scale"); - s_propertyMap[4] = new RendererProperty("Rotation"); - s_propertyMap[5] = new RendererProperty("Orientation"); - s_propertyMap[6] = new RendererProperty("Position", "X", "X00"); - s_propertyMap[7] = new RendererProperty("Position", "Y", "0X0"); - s_propertyMap[8] = new RendererProperty("Size", "X", "X0"); - s_propertyMap[9] = new RendererProperty("Size", "Y", "0X"); - s_propertyMap[10] = new RendererProperty("Scale", "X", "X00"); - s_propertyMap[11] = new RendererProperty("Scale", "Y", "0X0"); - s_propertyMap[16] = new RendererProperty("CameraEye"); - s_propertyMap[17] = new RendererProperty("CameraAt"); - s_propertyMap[18] = new RendererProperty("CameraUp"); - s_propertyMap[19] = new RendererProperty("CameraZn"); - } - - public BaseKeyframe() - : this(0.0f) - { - } - - public BaseKeyframe(float timeValue) - { - this._timeValue = timeValue; - this._relative = RelativeTo.Final; - } - - public void AddtoAnimation( - AnimationTemplate anim, - ActiveSequence aseq, - string property, - ref AnimationArgs args, - ref AnimationProxy animation) - { - if (animation == null) - animation = this.CreateProxy(anim, aseq, property); - this.PopulateAnimationWorker(aseq.Target, animation, ref args); - } - - protected virtual AnimationProxy CreateProxy( - AnimationTemplate anim, - ActiveSequence aseq, - string property) - { - StopCommand stopCommand = anim.GetStopCommand(this.Type); - RendererProperty rendererProperty = property != null ? new RendererProperty(property) : s_propertyMap[(int)this.Type]; - return new AnimationProxy(aseq, aseq.Target, this.Type, rendererProperty, anim.Loop, stopCommand); - } - - public BaseKeyframe Clone() => (BaseKeyframe)this.MemberwiseClone(); - - object ICloneable.Clone() => this.Clone(); - - protected abstract void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args); - - public float Time - { - get => this._timeValue; - set => this._timeValue = value; - } - - public RelativeTo RelativeTo - { - get => this._relative == null ? RelativeTo.Absolute : this._relative; - set => this._relative = value; - } - - public bool IsRelativeToObject => this.RelativeTo.IsRelativeToObject; - - public Interpolation Interpolation - { - get => this._interpolation; - set => this._interpolation = value; - } - - public abstract AnimationType Type { get; } - - public abstract object ObjectValue { get; } - - public abstract void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args); - - public abstract void MagnifyValue(float magnifyValue); - - public virtual bool Multiply => false; - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("<"); - stringBuilder.Append(this.GetType().Name); - stringBuilder.Append(" Time=\""); - stringBuilder.Append(this._timeValue); - stringBuilder.Append("\""); - if (this._interpolation != null) - { - stringBuilder.Append(" Interpolation=\""); - stringBuilder.Append(this._interpolation.ToString()); - stringBuilder.Append("\""); - } - if (this._relative != RelativeTo.Absolute) - { - stringBuilder.Append(" RelativeTo=\""); - stringBuilder.Append(_relative); - stringBuilder.Append("\""); - } - stringBuilder.Append(" Value=\""); - stringBuilder.Append(this.ObjectValue); - stringBuilder.Append("\""); - stringBuilder.Append("/>"); - return stringBuilder.ToString(); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseMultiplyFloatKeyframe.cs b/UIX/Microsoft/Iris/Animations/BaseMultiplyFloatKeyframe.cs deleted file mode 100644 index ba0f578..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseMultiplyFloatKeyframe.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseMultiplyFloatKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseMultiplyFloatKeyframe : BaseFloatKeyframe - { - public BaseMultiplyFloatKeyframe() => this.Value = 1f; - - public override bool Multiply => true; - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseMultiplyVector3Keyframe.cs b/UIX/Microsoft/Iris/Animations/BaseMultiplyVector3Keyframe.cs deleted file mode 100644 index c7d7a17..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseMultiplyVector3Keyframe.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseMultiplyVector3Keyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseMultiplyVector3Keyframe : BaseVector3Keyframe - { - public BaseMultiplyVector3Keyframe() => this.Value = Vector3.UnitVector; - - public override bool Multiply => true; - - public override Vector3 GetEffectiveValue( - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - if (this.RelativeTo == RelativeTo.Final) - baseValueVector *= this.GetRelativeToFinalValue(targetObject, ref args); - return baseValueVector; - } - - public abstract Vector3 GetRelativeToFinalValue( - IAnimatable targetObject, - ref AnimationArgs args); - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseRotationKeyframe.cs b/UIX/Microsoft/Iris/Animations/BaseRotationKeyframe.cs deleted file mode 100644 index 14aa405..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseRotationKeyframe.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseRotationKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseRotationKeyframe : BaseKeyframe - { - private Rotation _valueRotation; - - public BaseRotationKeyframe() => this._valueRotation = Rotation.Default; - - protected override void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args) - { - Rotation effectiveValue = this.GetEffectiveValue(targetObject, this._valueRotation, ref args); - animation.AddRotationKeyframe(this, effectiveValue); - } - - public Rotation Value - { - get => this._valueRotation; - set => this._valueRotation = value; - } - - public override object ObjectValue => Value; - - public virtual Rotation GetEffectiveValue( - IAnimatable targetObject, - Rotation baseValueRotation, - ref AnimationArgs args) - { - return baseValueRotation; - } - - public override void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args) - { - Rotation effectiveValue = this.GetEffectiveValue(animationTarget.AnimationTarget, this._valueRotation, ref args); - this.Apply(animationTarget, effectiveValue); - } - - public abstract void Apply(IAnimatableOwner animationTarget, Rotation valueRotation); - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseVector2Keyframe.cs b/UIX/Microsoft/Iris/Animations/BaseVector2Keyframe.cs deleted file mode 100644 index cac5120..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseVector2Keyframe.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseVector2Keyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseVector2Keyframe : BaseKeyframe - { - private Vector2 _valueVector; - - protected override void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args) - { - Vector2 effectiveValue = this.GetEffectiveValue(targetObject, this._valueVector, ref args); - animation.AddVector2Keyframe(this, effectiveValue); - } - - public Vector2 Value - { - get => this._valueVector; - set => this._valueVector = value; - } - - public override object ObjectValue => Value; - - public virtual Vector2 GetEffectiveValue( - IAnimatable targetObject, - Vector2 baseValueVector, - ref AnimationArgs args) - { - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args) - { - Vector2 effectiveValue = this.GetEffectiveValue(animationTarget.AnimationTarget, this._valueVector, ref args); - this.Apply(animationTarget, effectiveValue); - } - - public abstract void Apply(IAnimatableOwner animationTarget, Vector2 valueVector); - - public override void MagnifyValue(float magnifyValue) => this.Value *= magnifyValue; - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseVector3Keyframe.cs b/UIX/Microsoft/Iris/Animations/BaseVector3Keyframe.cs deleted file mode 100644 index 12c4e87..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseVector3Keyframe.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseVector3Keyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseVector3Keyframe : BaseKeyframe - { - private Vector3 _valueVector; - - protected override void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args) - { - Vector3 effectiveValue = this.GetEffectiveValue(targetObject, this._valueVector, ref args); - animation.AddVector3Keyframe(this, effectiveValue); - } - - public Vector3 Value - { - get => this._valueVector; - set => this._valueVector = value; - } - - public override object ObjectValue => Value; - - public virtual Vector3 GetEffectiveValue( - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args) - { - Vector3 effectiveValue = this.GetEffectiveValue(animationTarget.AnimationTarget, this._valueVector, ref args); - this.Apply(animationTarget, effectiveValue); - } - - public abstract void Apply(IAnimatableOwner animationTarget, Vector3 valueVector); - - public override void MagnifyValue(float magnifyValue) => this.Value *= magnifyValue; - } -} diff --git a/UIX/Microsoft/Iris/Animations/BaseVector4Keyframe.cs b/UIX/Microsoft/Iris/Animations/BaseVector4Keyframe.cs deleted file mode 100644 index 6e19ef1..0000000 --- a/UIX/Microsoft/Iris/Animations/BaseVector4Keyframe.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.BaseVector4Keyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public abstract class BaseVector4Keyframe : BaseKeyframe - { - private Vector4 _valueVector; - - protected override void PopulateAnimationWorker( - IAnimatable targetObject, - AnimationProxy animation, - ref AnimationArgs args) - { - Vector4 effectiveValue = this.GetEffectiveValue(targetObject, this._valueVector, ref args); - animation.AddVector4Keyframe(this, effectiveValue); - } - - public Vector4 Value - { - get => this._valueVector; - set => this._valueVector = value; - } - - public override object ObjectValue => Value; - - public virtual Vector4 GetEffectiveValue( - IAnimatable targetObject, - Vector4 baseValueVector, - ref AnimationArgs args) - { - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, ref AnimationArgs args) - { - Vector4 effectiveValue = this.GetEffectiveValue(animationTarget.AnimationTarget, this._valueVector, ref args); - this.Apply(animationTarget, effectiveValue); - } - - public abstract void Apply(IAnimatableOwner animationTarget, Vector4 valueVector); - - public override void MagnifyValue(float magnifyValue) => this.Value *= magnifyValue; - } -} diff --git a/UIX/Microsoft/Iris/Animations/CameraAtKeyframe.cs b/UIX/Microsoft/Iris/Animations/CameraAtKeyframe.cs deleted file mode 100644 index 5fb2157..0000000 --- a/UIX/Microsoft/Iris/Animations/CameraAtKeyframe.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.CameraAtKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class CameraAtKeyframe : BaseMultiplyVector3Keyframe - { - public override AnimationType Type => AnimationType.CameraAt; - - public override void Apply(IAnimatableOwner animationTarget, Vector3 value) => ((Camera)animationTarget).CameraAt = value; - - public override Vector3 GetRelativeToFinalValue( - IAnimatable targetObject, - ref AnimationArgs args) - { - return args.NewAt; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/CameraEyeKeyframe.cs b/UIX/Microsoft/Iris/Animations/CameraEyeKeyframe.cs deleted file mode 100644 index 2bb4471..0000000 --- a/UIX/Microsoft/Iris/Animations/CameraEyeKeyframe.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.CameraEyeKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class CameraEyeKeyframe : BaseMultiplyVector3Keyframe - { - public override AnimationType Type => AnimationType.CameraEye; - - public override void Apply(IAnimatableOwner animationTarget, Vector3 value) => ((Camera)animationTarget).CameraEye = value; - - public override Vector3 GetRelativeToFinalValue( - IAnimatable targetObject, - ref AnimationArgs args) - { - return args.NewEye; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/CameraUpKeyframe.cs b/UIX/Microsoft/Iris/Animations/CameraUpKeyframe.cs deleted file mode 100644 index 2a881e7..0000000 --- a/UIX/Microsoft/Iris/Animations/CameraUpKeyframe.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.CameraUpKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class CameraUpKeyframe : BaseMultiplyVector3Keyframe - { - public override AnimationType Type => AnimationType.CameraUp; - - public override void Apply(IAnimatableOwner animationTarget, Vector3 value) => ((Camera)animationTarget).CameraUp = value; - - public override Vector3 GetRelativeToFinalValue( - IAnimatable targetObject, - ref AnimationArgs args) - { - return args.NewUp; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/CameraZnKeyframe.cs b/UIX/Microsoft/Iris/Animations/CameraZnKeyframe.cs deleted file mode 100644 index 0fbbf32..0000000 --- a/UIX/Microsoft/Iris/Animations/CameraZnKeyframe.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.CameraZnKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class CameraZnKeyframe : BaseMultiplyFloatKeyframe - { - public override AnimationType Type => AnimationType.CameraZn; - - public override void Apply(IAnimatableOwner animationTarget, float value) => ((Camera)animationTarget).CameraZn = value; - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - if (this.RelativeTo == RelativeTo.Final) - baseValue *= args.NewZn; - return baseValue; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/EffectAnimation.cs b/UIX/Microsoft/Iris/Animations/EffectAnimation.cs deleted file mode 100644 index e9e1c91..0000000 --- a/UIX/Microsoft/Iris/Animations/EffectAnimation.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.EffectAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public class EffectAnimation : AnimationTemplate, IAnimationProvider - { - AnimationEventType IAnimationProvider.Type => AnimationEventType.Idle; - - AnimationTemplate IAnimationProvider.Build( - ref AnimationArgs args) - { - return this; - } - - public bool CanCache => true; - } -} diff --git a/UIX/Microsoft/Iris/Animations/EffectColorKeyframe.cs b/UIX/Microsoft/Iris/Animations/EffectColorKeyframe.cs deleted file mode 100644 index c6f9cd4..0000000 --- a/UIX/Microsoft/Iris/Animations/EffectColorKeyframe.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.EffectColorKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class EffectColorKeyframe : BaseVector4Keyframe - { - public override void Apply(IAnimatableOwner animationTarget, Vector4 value) - { - } - - public override AnimationType Type => AnimationType.Vector4; - - public Color Color - { - get => new Color(this.Value.W, this.Value.X, this.Value.Y, this.Value.Z); - set => this.Value = value.RenderConvert().ToVector4(); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/EffectFloatKeyframe.cs b/UIX/Microsoft/Iris/Animations/EffectFloatKeyframe.cs deleted file mode 100644 index 2eab66a..0000000 --- a/UIX/Microsoft/Iris/Animations/EffectFloatKeyframe.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.EffectFloatKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public class EffectFloatKeyframe : BaseFloatKeyframe - { - public override void Apply(IAnimatableOwner animationTarget, float value) - { - } - - public override AnimationType Type => AnimationType.Float; - } -} diff --git a/UIX/Microsoft/Iris/Animations/EffectVector3Keyframe.cs b/UIX/Microsoft/Iris/Animations/EffectVector3Keyframe.cs deleted file mode 100644 index 4dc7bfe..0000000 --- a/UIX/Microsoft/Iris/Animations/EffectVector3Keyframe.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.EffectVector3Keyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class EffectVector3Keyframe : BaseVector3Keyframe - { - public override void Apply(IAnimatableOwner animationTarget, Vector3 value) - { - } - - public override AnimationType Type => AnimationType.Vector3; - } -} diff --git a/UIX/Microsoft/Iris/Animations/IAnimatableOwner.cs b/UIX/Microsoft/Iris/Animations/IAnimatableOwner.cs deleted file mode 100644 index d2b031c..0000000 --- a/UIX/Microsoft/Iris/Animations/IAnimatableOwner.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.IAnimatableOwner -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public interface IAnimatableOwner - { - IAnimatable AnimationTarget { get; } - } -} diff --git a/UIX/Microsoft/Iris/Animations/IAnimationProvider.cs b/UIX/Microsoft/Iris/Animations/IAnimationProvider.cs deleted file mode 100644 index 89f033f..0000000 --- a/UIX/Microsoft/Iris/Animations/IAnimationProvider.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.IAnimationProvider -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public interface IAnimationProvider - { - AnimationTemplate Build(ref AnimationArgs args); - - AnimationEventType Type { get; } - - bool CanCache { get; } - } -} diff --git a/UIX/Microsoft/Iris/Animations/Interpolation.cs b/UIX/Microsoft/Iris/Animations/Interpolation.cs deleted file mode 100644 index a971258..0000000 --- a/UIX/Microsoft/Iris/Animations/Interpolation.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.Interpolation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public class Interpolation - { - public static readonly Interpolation Default = new Interpolation(InterpolationType.Linear); - private InterpolationType _type; - private float _weight = 1f; - private float _bezierHandle1; - private float _bezierHandle2 = 1f; - private float _easePercent = 0.5f; - - public Interpolation() - : this(InterpolationType.Linear) - { - } - - public Interpolation(InterpolationType type) => this._type = type; - - public InterpolationType Type - { - get => this._type; - set => this._type = value; - } - - public float Weight - { - get => this._weight; - set => this._weight = value; - } - - public float BezierHandle1 - { - get => this._bezierHandle1; - set => this._bezierHandle1 = value; - } - - public float BezierHandle2 - { - get => this._bezierHandle2; - set => this._bezierHandle2 = value; - } - - public float EasePercent - { - get => this._easePercent; - set => this._easePercent = value; - } - - public override string ToString() - { - string str; - switch (this.Type) - { - case InterpolationType.SCurve: - str = "SCurve"; - break; - case InterpolationType.Exp: - str = "Exp"; - break; - case InterpolationType.Log: - str = "Log"; - break; - case InterpolationType.Sine: - str = "Sine"; - break; - case InterpolationType.Cosine: - str = "Cosine"; - break; - case InterpolationType.Bezier: - str = "Bezier, " + BezierHandle1 + ", " + BezierHandle2; - break; - case InterpolationType.EaseIn: - str = "EaseIn, " + Weight + ", " + EasePercent; - break; - case InterpolationType.EaseOut: - str = "EaseOut, " + Weight + ", " + EasePercent; - break; - default: - str = "Linear"; - break; - } - if (Weight != 1.0) - str = str + ", " + Weight; - return str; - } - - public override bool Equals(object obj) - { - bool flag = false; - if (obj is Interpolation) - { - Interpolation interpolation = (Interpolation)obj; - flag = this._type == interpolation._type && _weight == (double)interpolation._weight && (_bezierHandle1 == (double)interpolation._bezierHandle1 && _bezierHandle2 == (double)interpolation._bezierHandle2) && _easePercent == (double)interpolation._easePercent; - } - return flag; - } - - public override int GetHashCode() => this._type.GetHashCode() ^ this._weight.GetHashCode() ^ this._bezierHandle1.GetHashCode() ^ this._bezierHandle2.GetHashCode() ^ this._easePercent.GetHashCode(); - } -} diff --git a/UIX/Microsoft/Iris/Animations/InterpolationType.cs b/UIX/Microsoft/Iris/Animations/InterpolationType.cs deleted file mode 100644 index 730a9ec..0000000 --- a/UIX/Microsoft/Iris/Animations/InterpolationType.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.InterpolationType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum InterpolationType - { - Linear, - SCurve, - Exp, - Log, - Sine, - Cosine, - Bezier, - EaseIn, - EaseOut, - } -} diff --git a/UIX/Microsoft/Iris/Animations/KeyframeFilter.cs b/UIX/Microsoft/Iris/Animations/KeyframeFilter.cs deleted file mode 100644 index 4abf8b1..0000000 --- a/UIX/Microsoft/Iris/Animations/KeyframeFilter.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.KeyframeFilter -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum KeyframeFilter - { - All, - Position, - Size, - Scale, - Rotate, - Alpha, - } -} diff --git a/UIX/Microsoft/Iris/Animations/MergeAnimation.cs b/UIX/Microsoft/Iris/Animations/MergeAnimation.cs deleted file mode 100644 index f9b2ef1..0000000 --- a/UIX/Microsoft/Iris/Animations/MergeAnimation.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.MergeAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections.Generic; - -namespace Microsoft.Iris.Animations -{ - public class MergeAnimation : IAnimationProvider - { - private List _sourcesList; - private AnimationEventType _type; - private Animation _cacheAnimation; - - public List Sources - { - get - { - if (this._sourcesList == null) - this._sourcesList = new List(); - return this._sourcesList; - } - set - { - this._sourcesList = value; - this.ClearCache(); - } - } - - public AnimationEventType Type - { - get => this._type; - set - { - this._type = value; - this.ClearCache(); - } - } - - public AnimationTemplate Build(ref AnimationArgs args) - { - if (this._cacheAnimation != null) - return _cacheAnimation; - Animation animation = new Animation(); - animation.Type = this._type; - animation.DebugID = "Merge("; - bool flag1 = true; - foreach (IAnimationProvider sources in this._sourcesList) - { - AnimationTemplate anim = sources.Build(ref args); - if (anim != null) - { - TransformAnimation.DumpAnimation(anim, "Source"); - string str = anim.DebugID; - if (!flag1) - str = ", " + str; - animation.DebugID += str; - flag1 = false; - if (animation.Loop != anim.Loop) - { - bool flag2 = false; - if (anim.Loop < 0) - flag2 = true; - else if (anim.Loop > animation.Loop) - flag2 = true; - if (flag2) - animation.Loop = anim.Loop; - } - foreach (BaseKeyframe keyframe in anim.Keyframes) - animation.AddKeyframe(keyframe); - } - } - animation.DebugID += ")"; - TransformAnimation.DumpAnimation(animation, "Result"); - if (this.CanCache) - this._cacheAnimation = animation; - return animation; - } - - protected void ClearCache() => this._cacheAnimation = null; - - public bool CanCache - { - get - { - foreach (IAnimationProvider sources in this._sourcesList) - { - if (!sources.CanCache) - return false; - } - return true; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/NonIntensiveAnimation.cs b/UIX/Microsoft/Iris/Animations/NonIntensiveAnimation.cs deleted file mode 100644 index e6c9448..0000000 --- a/UIX/Microsoft/Iris/Animations/NonIntensiveAnimation.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.NonIntensiveAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public class NonIntensiveAnimation : ReferenceAnimation - { - } -} diff --git a/UIX/Microsoft/Iris/Animations/OrientationKeyframe.cs b/UIX/Microsoft/Iris/Animations/OrientationKeyframe.cs deleted file mode 100644 index 3fe86bc..0000000 --- a/UIX/Microsoft/Iris/Animations/OrientationKeyframe.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.OrientationKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public class OrientationKeyframe : RotateKeyframe - { - public override AnimationType Type => AnimationType.Orientation; - } -} diff --git a/UIX/Microsoft/Iris/Animations/OrphanedVisualCollection.cs b/UIX/Microsoft/Iris/Animations/OrphanedVisualCollection.cs deleted file mode 100644 index 367c354..0000000 --- a/UIX/Microsoft/Iris/Animations/OrphanedVisualCollection.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.OrphanedVisualCollection -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; - -namespace Microsoft.Iris.Animations -{ - public class OrphanedVisualCollection : DisposableObject - { - private int _countEventsRemaining; - private Vector _orphansList; - private Vector _sequenceList; - private AnimationManager _animationManager; - - public OrphanedVisualCollection(AnimationManager aniManager) - { - this.DeclareOwner(aniManager); - this._orphansList = new Vector(); - this._sequenceList = new Vector(); - this._animationManager = aniManager; - this._countEventsRemaining = 1; - this._animationManager.RegisterAnimatedOrphans(this); - } - - protected override void OnDispose() - { - foreach (ActiveSequence sequence in this._sequenceList) - { - sequence.Stop(); - sequence.Dispose(this); - } - this._sequenceList.Clear(); - foreach (IVisual orphans in this._orphansList) - { - orphans.Remove(); - orphans.UnregisterUsage(this); - } - this._orphansList.Clear(); - this._animationManager = null; - base.OnDispose(); - } - - public void AddOrphan(IVisual visual) - { - visual.RegisterUsage(this); - this._orphansList.Add(visual); - } - - public void RegisterWaitForAnimation(ActiveSequence aseq, bool transfer) - { - aseq.AnimationCompleted += new EventHandler(this.OnDestroyAnimationComplete); - ++this._countEventsRemaining; - this.RegisterAnimation(aseq, transfer); - } - - public void RegisterAnimation(ActiveSequence aseq, bool transfer) - { - if (transfer) - aseq.TransferOwnership(this); - else - aseq.DeclareOwner(this); - this._sequenceList.Add(aseq); - } - - public void OnLayoutApplyComplete() => this.OnEventComplete(null, EventArgs.Empty); - - private void OnDestroyAnimationComplete(object sender, EventArgs args) - { - ActiveSequence activeSequence = sender as ActiveSequence; - activeSequence.AnimationCompleted -= new EventHandler(this.OnDestroyAnimationComplete); - this._sequenceList.Remove(activeSequence); - activeSequence.Dispose(this); - this.OnEventComplete(sender, args); - } - - private void OnEventComplete(object sender, EventArgs args) - { - --this._countEventsRemaining; - if (this.Waiting) - return; - if (this._animationManager != null) - this._animationManager.UnregisterAnimatedOrphans(this); - this.Dispose(_animationManager); - } - - public bool Waiting => this._countEventsRemaining > 0; - - public override string ToString() => InvariantString.Format("Orphans(WaitCount={0}, OrphanCount={1})", this._sequenceList != null ? this._sequenceList.Count.ToString() : "None", _orphansList.Count); - } -} diff --git a/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs b/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs deleted file mode 100644 index a4ba842..0000000 --- a/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.PositionKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class PositionKeyframe : BaseVector3Keyframe - { - public override AnimationType Type => AnimationType.Position; - - public override Vector3 GetEffectiveValue( - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - return GetEffectivePositionValue(this.RelativeTo, targetObject, baseValueVector, ref args); - } - - public static Vector3 GetEffectivePositionValue( - RelativeTo relativeTo, - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - if (UISession.Default.IsRtl) - baseValueVector.X = -baseValueVector.X; - if (relativeTo == RelativeTo.Final) - baseValueVector += args.NewPosition; - else if (relativeTo == RelativeTo.Absolute) - { - if (UISession.Default.IsRtl) - { - Vector2 vector2 = new Vector2(0.0f, 0.0f); - IVisualContainer visualContainer1 = null; - if (targetObject is IVisualContainer visualContainer) - { - vector2 = visualContainer.Size; - visualContainer1 = visualContainer.Parent; - } - else if (targetObject is ISprite sprite) - { - vector2 = sprite.Size; - visualContainer1 = sprite.Parent; - } - if (visualContainer1 != null) - baseValueVector.X = visualContainer1.Size.X - vector2.X + baseValueVector.X; - } - } - else if (relativeTo is SnapshotRelativeTo snapshotRelativeTo) - { - RectangleF rectangleF = args.ViewItem.TransformFromAncestor(null, snapshotRelativeTo.Bounds); - baseValueVector = baseValueVector + args.NewPosition + new Vector3(rectangleF.X, rectangleF.Y, 0.0f) * args.NewScale; - } - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, Vector3 valueVector) => ((ViewItem)animationTarget).VisualPosition = valueVector; - } -} diff --git a/UIX/Microsoft/Iris/Animations/PositionXKeyframe.cs b/UIX/Microsoft/Iris/Animations/PositionXKeyframe.cs deleted file mode 100644 index 1a234a5..0000000 --- a/UIX/Microsoft/Iris/Animations/PositionXKeyframe.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.PositionXKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class PositionXKeyframe : BaseFloatKeyframe - { - public override AnimationType Type => AnimationType.PositionX; - - public override void Apply(IAnimatableOwner animationTarget, float value) - { - Vector3 visualPosition = ((ViewItem)animationTarget).VisualPosition; - visualPosition.X = value; - ((ViewItem)animationTarget).VisualPosition = visualPosition; - } - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return PositionKeyframe.GetEffectivePositionValue(this.RelativeTo, targetObject, new Vector3(baseValue, 0.0f, 0.0f), ref args).X; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/PositionYKeyframe.cs b/UIX/Microsoft/Iris/Animations/PositionYKeyframe.cs deleted file mode 100644 index d75d875..0000000 --- a/UIX/Microsoft/Iris/Animations/PositionYKeyframe.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.PositionYKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class PositionYKeyframe : BaseFloatKeyframe - { - public override AnimationType Type => AnimationType.PositionY; - - public override void Apply(IAnimatableOwner animationTarget, float value) - { - Vector3 visualPosition = ((ViewItem)animationTarget).VisualPosition; - visualPosition.Y = value; - ((ViewItem)animationTarget).VisualPosition = visualPosition; - } - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return PositionKeyframe.GetEffectivePositionValue(this.RelativeTo, targetObject, new Vector3(0.0f, baseValue, 0.0f), ref args).Y; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/ReferenceAnimation.cs b/UIX/Microsoft/Iris/Animations/ReferenceAnimation.cs deleted file mode 100644 index 99eab0e..0000000 --- a/UIX/Microsoft/Iris/Animations/ReferenceAnimation.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ReferenceAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Animations -{ - public abstract class ReferenceAnimation : IAnimationProvider - { - private IAnimationProvider _sourceAnimation; - - public IAnimationProvider Source - { - get => this._sourceAnimation; - set - { - if (this._sourceAnimation == value) - return; - this._sourceAnimation = value; - this.OnSourceChanged(); - } - } - - protected virtual void OnSourceChanged() - { - } - - public AnimationEventType Type => this._sourceAnimation != null ? this._sourceAnimation.Type : AnimationEventType.Idle; - - public AnimationTemplate Build(ref AnimationArgs args) => this.BuildWorker(ref args); - - protected virtual AnimationTemplate BuildWorker(ref AnimationArgs args) => this._sourceAnimation.Build(ref args); - - public override string ToString() => InvariantString.Format("{0}({1})", this.GetType().Name, Source); - - public virtual bool CanCache => this._sourceAnimation == null || this._sourceAnimation.CanCache; - } -} diff --git a/UIX/Microsoft/Iris/Animations/RelativeTo.cs b/UIX/Microsoft/Iris/Animations/RelativeTo.cs deleted file mode 100644 index 5a9591b..0000000 --- a/UIX/Microsoft/Iris/Animations/RelativeTo.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.RelativeTo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Animations -{ - public class RelativeTo - { - private IAnimatable _sourceObject; - private int _sourceId; - private string _sourceProperty; - private SnapshotPolicy _snapshot; - private int _power = 1; - private float _multiply = 1f; - private float _add; - private static RelativeTo s_absolute = new RelativeTo(); - private static RelativeTo s_current = new RelativeTo(SnapshotPolicy.Once); - private static RelativeTo s_currentSnapshotOnLoop = new RelativeTo(SnapshotPolicy.OnLoop); - private static RelativeTo s_final = new RelativeTo(); - - public RelativeTo() => this._snapshot = SnapshotPolicy.Continuous; - - public RelativeTo(SnapshotPolicy snapshot) => this._snapshot = snapshot; - - public bool IsRelativeToObject => this._sourceObject != null || this._sourceId != 0 || this == s_current || this == s_currentSnapshotOnLoop; - - public IAnimatable Source - { - get => this._sourceObject; - set => this._sourceObject = value; - } - - public int SourceId - { - get => this._sourceId; - set => this._sourceId = value; - } - - public string Property - { - get => this._sourceProperty; - set => this._sourceProperty = value; - } - - public SnapshotPolicy Snapshot - { - get => this._snapshot; - set => this._snapshot = value; - } - - public int Power - { - get => this._power; - set => this._power = value; - } - - public float Multiply - { - get => this._multiply; - set => this._multiply = value; - } - - public float Add - { - get => this._add; - set => this._add = value; - } - - public static RelativeTo Absolute => s_absolute; - - public static RelativeTo Current => s_current; - - public static RelativeTo CurrentSnapshotOnLoop => s_currentSnapshotOnLoop; - - public static RelativeTo Final => s_final; - - public AnimationInput CreateAnimationInput( - IAnimatable defaultSource, - string defaultSourceProperty, - string defaultSourcePropertyMask) - { - IAnimatable sourceObject = null; - string sourcePropertyName = null; - string sourceMaskSpec = null; - bool flag = true; - if (this._sourceProperty != null) - { - sourceObject = this._sourceId == 0 ? this._sourceObject : Application.MapExternalAnimationInput(this._sourceId); - if (sourceObject != null) - { - sourcePropertyName = this._sourceProperty; - flag = false; - } - } - if (flag) - { - sourceObject = defaultSource; - sourcePropertyName = defaultSourceProperty; - sourceMaskSpec = defaultSourcePropertyMask; - } - AnimationInput animationInput1; - if (this.Snapshot == SnapshotPolicy.Continuous) - { - animationInput1 = new ContinuousAnimationInput(sourceObject, sourcePropertyName, sourceMaskSpec); - } - else - { - CapturedAnimationInput capturedAnimationInput = new CapturedAnimationInput(sourceObject, sourcePropertyName, sourceMaskSpec); - if (this.Snapshot == SnapshotPolicy.OnLoop) - capturedAnimationInput.RefreshOnRepeat = true; - animationInput1 = capturedAnimationInput; - } - AnimationInput animationInput2 = animationInput1; - for (int index = 1; index < this._power; ++index) - animationInput2 *= animationInput1; - if (_multiply != 1.0) - animationInput2 *= new ConstantAnimationInput(this._multiply); - if (_add != 0.0) - animationInput2 += new ConstantAnimationInput(this._add); - return animationInput2; - } - - public override string ToString() - { - if (this == s_absolute) - return "Absolute"; - if (this == s_current) - return "Current"; - if (this == s_currentSnapshotOnLoop) - return "CurrentSnapshotOnLoop"; - return this == s_final ? "Final" : string.Format("[Object = {0}, Property = {1}]", this._sourceObject != null ? _sourceObject : (object)this._sourceId, _sourceProperty); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/RendererProperty.cs b/UIX/Microsoft/Iris/Animations/RendererProperty.cs deleted file mode 100644 index e50ec4f..0000000 --- a/UIX/Microsoft/Iris/Animations/RendererProperty.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.RendererProperty -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public struct RendererProperty - { - private string _property; - private string _sourceMask; - private string _targetMask; - - public RendererProperty(string property) - { - this._property = property; - this._sourceMask = null; - this._targetMask = null; - } - - public RendererProperty(string property, string sourceMask, string targetMask) - { - this._property = property; - this._sourceMask = sourceMask; - this._targetMask = targetMask; - } - - public string Property => this._property; - - public string SourceMask => this._sourceMask; - - public string TargetMask => this._targetMask; - } -} diff --git a/UIX/Microsoft/Iris/Animations/RotateKeyframe.cs b/UIX/Microsoft/Iris/Animations/RotateKeyframe.cs deleted file mode 100644 index 31fd42c..0000000 --- a/UIX/Microsoft/Iris/Animations/RotateKeyframe.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.RotateKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class RotateKeyframe : BaseRotationKeyframe - { - public override AnimationType Type => AnimationType.Rotate; - - public override Rotation GetEffectiveValue( - IAnimatable targetObject, - Rotation baseValueRotation, - ref AnimationArgs args) - { - if (this.RelativeTo == RelativeTo.Final) - baseValueRotation.AngleRadians += args.NewRotation.AngleRadians; - if (UISession.Default.IsRtl && baseValueRotation.Axis.Y <= 0.0 && baseValueRotation.Axis.X <= 0.0) - baseValueRotation.AngleRadians = -baseValueRotation.AngleRadians; - return baseValueRotation; - } - - public override void Apply(IAnimatableOwner animationTarget, Rotation valueRotation) => ((ViewItem)animationTarget).VisualRotation = valueRotation; - - public override void MagnifyValue(float magnifyValue) => this.Value = new Rotation(this.Value.AngleRadians * magnifyValue, this.Value.Axis); - } -} diff --git a/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs b/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs deleted file mode 100644 index 1df8439..0000000 --- a/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ScaleKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class ScaleKeyframe : BaseVector3Keyframe - { - public ScaleKeyframe() => this.Value = Vector3.UnitVector; - - public override bool Multiply => true; - - public override AnimationType Type => AnimationType.Scale; - - public override Vector3 GetEffectiveValue( - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - return GetEffectiveScaleValue(this.RelativeTo, targetObject, baseValueVector, ref args); - } - - public static Vector3 GetEffectiveScaleValue( - RelativeTo relativeTo, - IAnimatable targetObject, - Vector3 baseValueVector, - ref AnimationArgs args) - { - if (relativeTo == RelativeTo.Final) - baseValueVector *= args.NewScale; - else if (relativeTo is SnapshotRelativeTo snapshotRelativeTo) - { - RectangleF rectangleF = args.ViewItem.TransformFromAncestor(null, snapshotRelativeTo.Bounds); - baseValueVector = baseValueVector * args.NewScale * new Vector3(rectangleF.Width / args.NewSize.X, rectangleF.Height / args.NewSize.Y, 0.0f); - } - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, Vector3 valueVector) => ((ViewItem)animationTarget).VisualScale = valueVector; - - public override void MagnifyValue(float magnifyValue) - { - Vector3 vector3 = this.Value; - this.Value = new Vector3(this.MagnifyDimension(vector3.X, magnifyValue), this.MagnifyDimension(vector3.Y, magnifyValue), this.MagnifyDimension(vector3.Z, magnifyValue)); - } - - private float MagnifyDimension(float dimensionValue, float magnifyValue) - { - if (dimensionValue != 1.0) - dimensionValue *= magnifyValue; - return dimensionValue; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/ScaleXKeyframe.cs b/UIX/Microsoft/Iris/Animations/ScaleXKeyframe.cs deleted file mode 100644 index 0f7b0e7..0000000 --- a/UIX/Microsoft/Iris/Animations/ScaleXKeyframe.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ScaleXKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class ScaleXKeyframe : BaseMultiplyFloatKeyframe - { - public override AnimationType Type => AnimationType.ScaleX; - - public override void Apply(IAnimatableOwner animationTarget, float value) - { - Vector3 visualScale = ((ViewItem)animationTarget).VisualScale; - visualScale.X = value; - ((ViewItem)animationTarget).VisualScale = visualScale; - } - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return ScaleKeyframe.GetEffectiveScaleValue(this.RelativeTo, targetObject, new Vector3(baseValue, 0.0f, 0.0f), ref args).X; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/ScaleYKeyframe.cs b/UIX/Microsoft/Iris/Animations/ScaleYKeyframe.cs deleted file mode 100644 index d362314..0000000 --- a/UIX/Microsoft/Iris/Animations/ScaleYKeyframe.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ScaleYKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class ScaleYKeyframe : BaseMultiplyFloatKeyframe - { - public override AnimationType Type => AnimationType.ScaleY; - - public override void Apply(IAnimatableOwner animationTarget, float value) - { - Vector3 visualScale = ((ViewItem)animationTarget).VisualScale; - visualScale.Y = value; - ((ViewItem)animationTarget).VisualScale = visualScale; - } - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return ScaleKeyframe.GetEffectiveScaleValue(this.RelativeTo, targetObject, new Vector3(0.0f, baseValue, 0.0f), ref args).Y; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/SizeKeyframe.cs b/UIX/Microsoft/Iris/Animations/SizeKeyframe.cs deleted file mode 100644 index 8ca96d6..0000000 --- a/UIX/Microsoft/Iris/Animations/SizeKeyframe.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SizeKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class SizeKeyframe : BaseVector2Keyframe - { - public override AnimationType Type => AnimationType.Size; - - public override Vector2 GetEffectiveValue( - IAnimatable targetObject, - Vector2 baseValueVector, - ref AnimationArgs args) - { - if (this.RelativeTo == RelativeTo.Final) - baseValueVector += args.NewSize; - return baseValueVector; - } - - public override void Apply(IAnimatableOwner animationTarget, Vector2 valueVector) => ((ViewItem)animationTarget).VisualSize = valueVector; - } -} diff --git a/UIX/Microsoft/Iris/Animations/SizeXKeyframe.cs b/UIX/Microsoft/Iris/Animations/SizeXKeyframe.cs deleted file mode 100644 index 822d9ba..0000000 --- a/UIX/Microsoft/Iris/Animations/SizeXKeyframe.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SizeXKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class SizeXKeyframe : BaseFloatKeyframe - { - public override AnimationType Type => AnimationType.SizeX; - - public override void Apply(IAnimatableOwner animationTarget, float value) => ((ViewItem)animationTarget).VisualSize = new Vector2(value, ((ViewItem)animationTarget).VisualSize.Y); - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return this.RelativeTo == RelativeTo.Final ? baseValue + args.NewSize.X : baseValue; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/SizeYKeyframe.cs b/UIX/Microsoft/Iris/Animations/SizeYKeyframe.cs deleted file mode 100644 index 8414343..0000000 --- a/UIX/Microsoft/Iris/Animations/SizeYKeyframe.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SizeYKeyframe -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Animations -{ - public class SizeYKeyframe : BaseFloatKeyframe - { - public override AnimationType Type => AnimationType.SizeY; - - public override void Apply(IAnimatableOwner animationTarget, float value) => ((ViewItem)animationTarget).VisualSize = new Vector2(((ViewItem)animationTarget).VisualSize.X, value); - - public override float GetEffectiveValue( - IAnimatable targetObject, - float baseValue, - ref AnimationArgs args) - { - return this.RelativeTo == RelativeTo.Final ? baseValue + args.NewSize.Y : baseValue; - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/SnapshotPolicy.cs b/UIX/Microsoft/Iris/Animations/SnapshotPolicy.cs deleted file mode 100644 index d383aa3..0000000 --- a/UIX/Microsoft/Iris/Animations/SnapshotPolicy.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SnapshotPolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum SnapshotPolicy - { - Continuous, - Once, - OnLoop, - } -} diff --git a/UIX/Microsoft/Iris/Animations/SnapshotRelativeTo.cs b/UIX/Microsoft/Iris/Animations/SnapshotRelativeTo.cs deleted file mode 100644 index c8125d3..0000000 --- a/UIX/Microsoft/Iris/Animations/SnapshotRelativeTo.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SnapshotRelativeTo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.RenderAPI.Drawing; - -namespace Microsoft.Iris.Animations -{ - public class SnapshotRelativeTo : RelativeTo - { - private RectangleF _bounds; - - public SnapshotRelativeTo(RectangleF bounds) - : base(SnapshotPolicy.Once) - => this._bounds = bounds; - - public RectangleF Bounds => this._bounds; - } -} diff --git a/UIX/Microsoft/Iris/Animations/StopCommand.cs b/UIX/Microsoft/Iris/Animations/StopCommand.cs deleted file mode 100644 index 6971316..0000000 --- a/UIX/Microsoft/Iris/Animations/StopCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.StopCommand -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum StopCommand - { - LeaveCurrent, - MoveToBegin, - MoveToEnd, - } -} diff --git a/UIX/Microsoft/Iris/Animations/StopCommandSet.cs b/UIX/Microsoft/Iris/Animations/StopCommandSet.cs deleted file mode 100644 index b399583..0000000 --- a/UIX/Microsoft/Iris/Animations/StopCommandSet.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.StopCommandSet -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Text; - -namespace Microsoft.Iris.Animations -{ - public class StopCommandSet - { - private StopCommand[] _stopCommandsList; - - public StopCommandSet(StopCommand defaultCommand) - { - _stopCommandsList = new StopCommand[20]; - for (uint index = 0; index < _stopCommandsList.Length; ++index) - _stopCommandsList[index] = defaultCommand; - } - - public StopCommand this[AnimationType type] - { - get => _stopCommandsList[(uint)type]; - set => _stopCommandsList[(uint)type] = value; - } - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("StopCommandSet("); - int num = 0; - for (uint index = 0; index < _stopCommandsList.Length; ++index) - { - StopCommand stopCommands = _stopCommandsList[index]; - if (num > 0) - stringBuilder.Append(", "); - ++num; - stringBuilder.Append((AnimationType)index); - stringBuilder.Append(":"); - stringBuilder.Append(stopCommands); - } - stringBuilder.Append(")"); - return stringBuilder.ToString(); - } - } -} diff --git a/UIX/Microsoft/Iris/Animations/SwitchAnimation.cs b/UIX/Microsoft/Iris/Animations/SwitchAnimation.cs deleted file mode 100644 index 9eb6fa1..0000000 --- a/UIX/Microsoft/Iris/Animations/SwitchAnimation.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.SwitchAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using System.Collections.Generic; - -namespace Microsoft.Iris.Animations -{ - public class SwitchAnimation : IAnimationProvider - { - private IUIValueRange _expressionObject; - private Dictionary _optionsList; - private AnimationEventType _type; - - public IUIValueRange Expression - { - get => this._expressionObject; - set => this._expressionObject = value; - } - - public Dictionary Options - { - get - { - if (this._optionsList == null) - this._optionsList = new Dictionary(); - return this._optionsList; - } - set => this._optionsList = value; - } - - public AnimationEventType Type - { - get => this._type; - set => this._type = value; - } - - public AnimationTemplate Build(ref AnimationArgs args) - { - AnimationTemplate animationTemplate = null; - if (this._optionsList != null) - { - object obj = null; - if (this._expressionObject != null) - obj = this._expressionObject.ObjectValue; - string key = null; - if (obj != null) - key = obj.ToString(); - IAnimationProvider animationProvider = null; - if (key != null && this._optionsList.ContainsKey(key)) - animationProvider = this._optionsList[key]; - if (animationProvider != null) - animationTemplate = animationProvider.Build(ref args); - } - return animationTemplate; - } - - public bool CanCache => false; - } -} diff --git a/UIX/Microsoft/Iris/Animations/TransformAnimation.cs b/UIX/Microsoft/Iris/Animations/TransformAnimation.cs deleted file mode 100644 index bb930df..0000000 --- a/UIX/Microsoft/Iris/Animations/TransformAnimation.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.TransformAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Animations -{ - public class TransformAnimation : ReferenceAnimation - { - private float _timeScaleValue; - private float _timeOffsetValue; - private float _magnitudeValue; - private KeyframeFilter _filter; - private AnimationTemplate _cacheAnimation; - - public TransformAnimation() - { - this._timeScaleValue = 1f; - this._magnitudeValue = 1f; - this._filter = KeyframeFilter.All; - } - - public float TimeScale - { - get => this._timeScaleValue; - set - { - if (_timeScaleValue == (double)value) - return; - this._timeScaleValue = value; - this.ClearCache(); - } - } - - public float Delay - { - get => this._timeOffsetValue; - set - { - if (_timeOffsetValue == (double)value) - return; - this._timeOffsetValue = value; - this.ClearCache(); - } - } - - public float Magnitude - { - get => this._magnitudeValue; - set - { - if (_magnitudeValue == (double)value) - return; - this._magnitudeValue = value; - this.ClearCache(); - } - } - - public KeyframeFilter Filter - { - get => this._filter; - set - { - if (this._filter == value) - return; - this._filter = value; - this.ClearCache(); - } - } - - protected override AnimationTemplate BuildWorker(ref AnimationArgs args) - { - if (this._cacheAnimation != null) - return this._cacheAnimation; - float timeScale = this.GetTimeScale(ref args); - float delayTime = this.GetDelayTime(ref args); - float magnitude = this.GetMagnitude(ref args); - bool flag1 = timeScale != 1.0; - bool flag2 = delayTime != 0.0; - bool flag3 = magnitude != 1.0; - int filter = (int)this._filter; - AnimationTemplate anim1 = base.BuildWorker(ref args); - DumpAnimation(anim1, "Source"); - if (!flag1 && !flag2 && !flag3) - return anim1; - AnimationTemplate anim2 = (AnimationTemplate)anim1.Clone(); - anim2.DebugID += "'"; - if (flag1) - this.ApplyTimeScale(anim2, timeScale); - if (flag2) - this.ApplyTimeOffset(anim2, delayTime); - if (flag3) - this.ApplyMagnitude(anim2, magnitude); - if (this.CanCache) - this._cacheAnimation = anim2; - return anim2; - } - - public static void DumpAnimation(AnimationTemplate anim, string descriptionName) - { - foreach (BaseKeyframe keyframe in anim.Keyframes) - ; - } - - protected virtual float GetTimeScale(ref AnimationArgs args) => this._timeScaleValue; - - protected virtual float GetDelayTime(ref AnimationArgs args) => this._timeOffsetValue; - - protected virtual float GetMagnitude(ref AnimationArgs args) => this._magnitudeValue; - - private void ApplyTimeScale(AnimationTemplate anim, float timeScaleValue) - { - foreach (BaseKeyframe keyframe in anim.Keyframes) - { - if (this.ShouldApplyTransform(keyframe)) - keyframe.Time *= timeScaleValue; - } - DumpAnimation(anim, "Result"); - } - - private void ApplyTimeOffset(AnimationTemplate anim, float timeOffsetValue) - { - ArrayList arrayList = new ArrayList(); - foreach (BaseKeyframe keyframe in anim.Keyframes) - { - if (this.ShouldApplyTransform(keyframe)) - { - if (keyframe.Time == 0.0) - arrayList.Add(keyframe.Clone()); - keyframe.Time += timeOffsetValue; - } - } - foreach (BaseKeyframe key in arrayList) - anim.AddKeyframe(key); - DumpAnimation(anim, "Result"); - } - - private void ApplyMagnitude(AnimationTemplate anim, float magnitudeValue) - { - foreach (BaseKeyframe keyframe in anim.Keyframes) - { - if (this.ShouldApplyTransform(keyframe)) - keyframe.MagnifyValue(magnitudeValue); - } - DumpAnimation(anim, "Result"); - } - - private KeyframeFilter GetKeyframeFilter(BaseKeyframe key) - { - switch (key.Type) - { - case AnimationType.Position: - return KeyframeFilter.Position; - case AnimationType.Size: - return KeyframeFilter.Size; - case AnimationType.Alpha: - return KeyframeFilter.Alpha; - case AnimationType.Scale: - return KeyframeFilter.Scale; - case AnimationType.Rotate: - return KeyframeFilter.Rotate; - default: - return KeyframeFilter.All; - } - } - - private bool ShouldApplyTransform(BaseKeyframe key) => this._filter == KeyframeFilter.All || this.GetKeyframeFilter(key) == this._filter; - - protected override void OnSourceChanged() => this.ClearCache(); - - protected void ClearCache() => this._cacheAnimation = null; - } -} diff --git a/UIX/Microsoft/Iris/Animations/TransformAttribute.cs b/UIX/Microsoft/Iris/Animations/TransformAttribute.cs deleted file mode 100644 index 0088901..0000000 --- a/UIX/Microsoft/Iris/Animations/TransformAttribute.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.TransformAttribute -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Animations -{ - public enum TransformAttribute - { - Index, - Width, - Height, - X, - Y, - } -} diff --git a/UIX/Microsoft/Iris/Animations/TransformByAttributeAnimation.cs b/UIX/Microsoft/Iris/Animations/TransformByAttributeAnimation.cs deleted file mode 100644 index 31a2089..0000000 --- a/UIX/Microsoft/Iris/Animations/TransformByAttributeAnimation.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.TransformByAttributeAnimation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Animations -{ - public class TransformByAttributeAnimation : TransformAnimation - { - private TransformAttribute _attrib; - private float _maxTimeScaleValue; - private float _maxTimeOffsetValue; - private float _maxMagnitudeValue; - private float _overrideValue; - private bool _haveOverrideFlag; - private ValueTransformer _valueTransformer; - - public TransformByAttributeAnimation() - { - this.Delay = 0.0f; - this.Magnitude = 0.0f; - this.TimeScale = 0.0f; - this.Attribute = TransformAttribute.Index; - } - - public TransformAttribute Attribute - { - get => this._attrib; - set => this._attrib = value; - } - - public float MaxTimeScale - { - get => this._maxTimeScaleValue; - set - { - if (_maxTimeScaleValue == (double)value) - return; - this._maxTimeScaleValue = value; - this.ClearCache(); - } - } - - public float MaxDelay - { - get => this._maxTimeOffsetValue; - set - { - if (_maxTimeOffsetValue == (double)value) - return; - this._maxTimeOffsetValue = value; - this.ClearCache(); - } - } - - public float MaxMagnitude - { - get => this._maxMagnitudeValue; - set - { - if (_maxMagnitudeValue == (double)value) - return; - this._maxMagnitudeValue = value; - this.ClearCache(); - } - } - - public float Override - { - get => this._overrideValue; - set - { - if (this._haveOverrideFlag && _overrideValue == (double)value) - return; - this._overrideValue = value; - this._haveOverrideFlag = true; - this.ClearCache(); - } - } - - public ValueTransformer ValueTransformer - { - get => this._valueTransformer; - set - { - if (this._valueTransformer == value) - return; - this._valueTransformer = value; - this.ClearCache(); - } - } - - protected override float GetTimeScale(ref AnimationArgs args) - { - float timeScale = base.GetTimeScale(ref args); - if (timeScale == 0.0) - return 1f; - float val1 = 1f + this.GetValue(ref args) * timeScale; - if (_maxTimeScaleValue != 0.0) - val1 = Math.Min(val1, this._maxTimeScaleValue); - if (val1 < 0.0) - val1 = 0.0f; - return val1; - } - - protected override float GetDelayTime(ref AnimationArgs args) - { - float delayTime = base.GetDelayTime(ref args); - if (delayTime == 0.0) - return 0.0f; - float val1 = this.GetValue(ref args) * delayTime; - if (_maxTimeOffsetValue != 0.0) - val1 = Math.Min(val1, this._maxTimeOffsetValue); - if (val1 < 0.0) - val1 = 0.0f; - return val1; - } - - protected override float GetMagnitude(ref AnimationArgs args) - { - float magnitude = base.GetMagnitude(ref args); - if (magnitude == 0.0) - return 1f; - float val1 = 1f + this.GetValue(ref args) * magnitude; - if (_maxMagnitudeValue != 0.0) - val1 = Math.Min(val1, this._maxMagnitudeValue); - return val1; - } - - private float GetValue(ref AnimationArgs args) - { - float num = this.GetValueWorker(ref args); - if (this._valueTransformer != null) - num = this._valueTransformer.Transform(num); - return num; - } - - protected virtual float GetValueWorker(ref AnimationArgs args) - { - if (this._haveOverrideFlag) - return this._overrideValue; - switch (this._attrib) - { - case TransformAttribute.Index: - return this.GetIndex(ref args); - case TransformAttribute.Width: - return args.NewSize.X; - case TransformAttribute.Height: - return args.NewSize.Y; - case TransformAttribute.X: - return args.NewPosition.X; - case TransformAttribute.Y: - return args.NewPosition.Y; - default: - return 0.0f; - } - } - - private int GetIndex(ref AnimationArgs args) - { - int num = 0; - ViewItem viewItem = args.ViewItem; - if (viewItem != null && viewItem.Parent != null) - num = viewItem.Parent.Children.IndexOf(viewItem); - return num; - } - - public override bool CanCache => false; - } -} diff --git a/UIX/Microsoft/Iris/Animations/ValueTransformer.cs b/UIX/Microsoft/Iris/Animations/ValueTransformer.cs deleted file mode 100644 index 148b233..0000000 --- a/UIX/Microsoft/Iris/Animations/ValueTransformer.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Animations.ValueTransformer -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Animations -{ - public class ValueTransformer - { - private float _add; - private float _subtract; - private float _multiply; - private float _divide; - private float _mod; - private bool _absolute; - - public ValueTransformer() - { - this._multiply = 1f; - this._divide = 1f; - this._mod = float.MaxValue; - } - - public float Transform(float value) - { - value *= this._multiply; - value /= this._divide; - value += this._add; - value -= this._subtract; - if (_mod != 3.40282346638529E+38) - value %= this._mod; - if (this._absolute) - value = Math.Abs(value); - return value; - } - - public float Add - { - get => this._add; - set => this._add = value; - } - - public float Subtract - { - get => this._subtract; - set => this._subtract = value; - } - - public float Multiply - { - get => this._multiply; - set => this._multiply = value; - } - - public float Divide - { - get => this._divide; - set => this._divide = value; - } - - public float Mod - { - get => this._mod; - set => this._mod = value; - } - - public bool Absolute - { - get => this._absolute; - set => this._absolute = value; - } - } -} diff --git a/UIX/Microsoft/Iris/Application.cs b/UIX/Microsoft/Iris/Application.cs deleted file mode 100644 index 8abfb1d..0000000 --- a/UIX/Microsoft/Iris/Application.cs +++ /dev/null @@ -1,517 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Application -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Data; -using Microsoft.Iris.Input; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Reflection; -using System.Security; -using System.Threading; - -namespace Microsoft.Iris -{ - public static class Application - { - private static Application.InitializationState s_initializationState = InitializationState.NotInitialized; - private static UISession s_session; - private static Window s_mainWindow; - private static bool s_isShuttingDown; - private static RenderingType s_renderType = RenderingType.Default; - private static SoundType s_soundType = SoundType.None; - private static RenderingQuality s_renderingQuality = RenderingQuality.MaxQuality; - private static bool s_EnableAnimations = true; - private static bool s_IsRTL = false; - private static Dictionary s_idToExternalAnimationInput; - private static Dictionary s_animationProviders; - - public static string Name - { - get => UIApplication.ApplicationName; - set => UIApplication.ApplicationName = value; - } - - public static Window Window - { - get - { - if (s_initializationState != InitializationState.FullyInitialized) - throw new InvalidOperationException("Application.Initialize must be called prior Window query"); - if (s_mainWindow == null) - s_mainWindow = new Window((UIForm)s_session.Form); - return s_mainWindow; - } - } - - public static RenderingType RenderingType - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - s_renderType = value; - } - get => s_renderType; - } - - public static SoundType SoundType - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - s_soundType = value; - } - get => s_soundType; - } - - public static RenderingQuality RenderingQuality - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - s_renderingQuality = value; - } - get => s_renderingQuality; - } - - public static bool AnimationsEnabled - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - s_EnableAnimations = value; - } - get => s_EnableAnimations; - } - - public static bool IsRTL - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - s_IsRTL = value; - } - get => s_IsRTL; - } - - public static bool IsDx9AccelerationAvailable - { - get - { - if (s_initializationState != InitializationState.FullyInitialized) - throw new InvalidOperationException("Application.Initialize must be called prior to DX9 check"); - return s_session.IsGraphicsDeviceAvailable(GraphicsDeviceType.Direct3D9); - } - } - - private static bool IsInitialized => s_initializationState != InitializationState.NotInitialized; - - public static bool StaticDllResourcesOnly - { - set - { - if (IsInitialized) - throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - DllResources.StaticDllResourcesOnly = value; - } - get => DllResources.StaticDllResourcesOnly; - } - - public static void Initialize() - { - if (IsInitialized) - throw new InvalidOperationException("Application already initialized"); - VerifyTrustedEnvironment(); - s_session = new UISession(); - s_session.IsRtl = s_IsRTL; - s_session.InputManager.KeyCoalescePolicy = new KeyCoalesceFilter(QueryKeyCoalesce); - GraphicsDeviceType graphicsType = ChooseRenderingGraphicsDevice(s_renderType); - switch (graphicsType) - { - case GraphicsDeviceType.Gdi: - s_renderType = RenderingType.GDI; - break; - case GraphicsDeviceType.Direct3D9: - s_renderType = RenderingType.DX9; - break; - default: - throw new ArgumentException(InvariantString.Format("Unknown graphics type {0}", graphicsType)); - } - if (graphicsType == GraphicsDeviceType.Gdi) - s_EnableAnimations = false; - SoundDeviceType soundType = ChooseRendererSoundDevice(s_soundType); - switch (soundType) - { - case SoundDeviceType.None: - s_soundType = SoundType.None; - break; - case SoundDeviceType.DirectSound8: - s_soundType = SoundType.DirectSound; - break; - default: - throw new ArgumentException(InvariantString.Format("Unknown sound type {0}", soundType)); - } - s_session.InitializeRenderingDevices(graphicsType, (GraphicsRenderingQuality)s_renderingQuality, soundType); - s_renderingQuality = (RenderingQuality)s_session.RenderSession.GraphicsDevice.RenderingQuality; - InitializeCommon(true); - if (!s_EnableAnimations) - AnimationSystem.OverrideAnimationState(true); - UIForm uiForm = new UIForm(s_session); - s_initializationState = InitializationState.FullyInitialized; - } - - private static void InitializeCommon(bool fullInitialization) - { - ErrorManager.OnErrors += new NotifyErrorBatch(NotifyErrorBatchHandler); - Debug.Trace.Initialize(); - MarkupSystem.Startup(!fullInitialization); - StaticServices.Initialize(); - } - - public static void InitializeForToolOnly() - { - if (IsInitialized) - throw new InvalidOperationException("Application has already been initialized"); - RenderApi.InitializeForToolOnly(); - UIDispatcher uiDispatcher = new UIDispatcher(true); - InitializeCommon(false); - s_initializationState = InitializationState.InitializedWithoutUI; - } - - public static bool IsApplicationThread => UIDispatcher.IsUIThread; - - public static bool LoadMarkup(string uri) - { - UIDispatcher.VerifyOnApplicationThread(); - if (uri == null) - throw new ArgumentNullException(nameof(uri)); - return MarkupSystem.Load(uri, MarkupSystem.RootIslandId) != null; - } - - public static bool CompileMarkup(CompilerInput[] compilands, CompilerInput dataTableCompiland) - { - UIDispatcher.VerifyOnApplicationThread(); - if (compilands == null) - throw new ArgumentNullException(nameof(compilands)); - foreach (CompilerInput compiland in compilands) - { - if (compiland.SourceFileName == null) - throw new ArgumentNullException("SourceFileName"); - if (compiland.OutputFileName == null) - throw new ArgumentNullException("OutputFileName"); - } - if (dataTableCompiland.SourceFileName == null && dataTableCompiland.OutputFileName != null || dataTableCompiland.SourceFileName != null && dataTableCompiland.OutputFileName == null) - throw new ArgumentException(nameof(dataTableCompiland)); - return MarkupCompiler.Compile(compilands, dataTableCompiland); - } - - public static void UnloadAllMarkup() - { - UIDispatcher.VerifyOnApplicationThread(); - MarkupSystem.UnloadAll(); - } - - public static void AddMarkupRedirect(string fromPrefix, string toPrefix) - { - UIDispatcher.VerifyOnApplicationThread(); - if (fromPrefix == null) - throw new ArgumentNullException(nameof(fromPrefix)); - if (toPrefix == null) - throw new ArgumentNullException(nameof(toPrefix)); - ResourceManager.Instance.AddUriRedirect(fromPrefix, toPrefix); - } - - public static void AddImportRedirect(string fromPrefix, string toPrefix) - { - UIDispatcher.VerifyOnApplicationThread(); - if (fromPrefix == null) - throw new ArgumentNullException(nameof(fromPrefix)); - if (toPrefix == null) - throw new ArgumentNullException(nameof(toPrefix)); - MarkupSystem.AddImportRedirect(fromPrefix, toPrefix); - } - - public static void RegisterDataProvider(string name, DataProviderQueryFactory factory) - { - UIDispatcher.VerifyOnApplicationThread(); - if (factory == null) - throw new ArgumentNullException(nameof(factory)); - if (name == null) - throw new ArgumentNullException(nameof(name)); - if (MarkupDataProvider.GetDataProvider(name) != null) - throw new ArgumentException("Provider is already registered"); - MarkupDataProvider.RegisterDataProvider(new AssemblyDataProviderWrapper(name, factory)); - } - - public static void Run(DeferredInvokeHandler initialLoadComplete) - { - UIDispatcher.VerifyOnApplicationThread(); - if (s_initializationState != InitializationState.FullyInitialized) - throw new InvalidOperationException("Application not initialized for displaying UI"); - if (initialLoadComplete != null) - ((UIForm)s_session.Form).SetInitialLoadCompleteCallback(DeferredInvokeProxy.Thunk(initialLoadComplete)); - UIApplication.Run(); - } - - public static void Run() => Run(null); - - public static event EventHandler ShuttingDown; - - public static bool IsShuttingDown => s_isShuttingDown; - - public static void Shutdown() - { - UIDispatcher.VerifyOnApplicationThread(); - s_isShuttingDown = true; - if (ShuttingDown != null) - ShuttingDown(null, EventArgs.Empty); - MarkupSystem.Shutdown(); - if (s_initializationState == InitializationState.FullyInitialized) - { - s_session.Dispose(); - s_session = null; - } - if (s_initializationState == InitializationState.InitializedWithoutUI) - RenderApi.ShutdownForToolOnly(); - StaticServices.Uninitialize(); - Debug.Trace.Shutdown(); - ErrorManager.OnErrors -= new NotifyErrorBatch(NotifyErrorBatchHandler); - s_initializationState = InitializationState.NotInitialized; - } - - public static void DeferredInvoke(DeferredInvokeHandler method, DeferredInvokePriority priority) => DeferredInvoke(method, null, priority); - - public static void DeferredInvoke(DeferredInvokeHandler method, object args) => DeferredInvoke(method, args, DeferredInvokePriority.Normal); - - public static void DeferredInvoke( - DeferredInvokeHandler method, - object args, - DeferredInvokePriority priority) - { - if (method == null) - throw new ArgumentNullException(nameof(method)); - DispatchPriority priority1; - switch (priority) - { - case DeferredInvokePriority.Normal: - priority1 = DispatchPriority.AppEvent; - break; - case DeferredInvokePriority.Low: - priority1 = DispatchPriority.Idle; - break; - default: - throw new ArgumentException(InvariantString.Format("Unknown DeferredInvokePriority {0}", priority)); - } - DeferredCall.Post(priority1, DeferredInvokeProxy.Thunk(method), args); - } - - public static void DeferredInvoke(DeferredInvokeHandler method, TimeSpan delay) => DeferredInvoke(method, null, delay); - - public static void DeferredInvoke(DeferredInvokeHandler method, object args, TimeSpan delay) - { - if (method == null) - throw new ArgumentNullException(nameof(method)); - DeferredCall.Post(delay, DeferredInvokeProxy.Thunk(method), args); - } - - public static void DeferredInvoke(Thread thread, DeferredInvokeHandler method) => DeferredInvoke(thread, method, null); - - public static void DeferredInvoke(Thread thread, DeferredInvokeHandler method, object args) - { - if (thread == null) - throw new ArgumentNullException(nameof(thread)); - if (method == null) - throw new ArgumentNullException(nameof(method)); - DeferredCall.Post(thread, DispatchPriority.AppEvent, DeferredInvokeProxy.Thunk(method), args); - } - - public static void DeferredInvokeOnWorkerThread( - DeferredInvokeHandler workerMethod, - DeferredInvokeHandler notifyMethod, - object args) - { - if (workerMethod == null) - throw new ArgumentNullException(nameof(workerMethod)); - if (notifyMethod == null) - throw new ArgumentNullException(nameof(notifyMethod)); - UIApplication.DeferredInvokeOnWorkerThread(DeferredInvokeProxy.Thunk(workerMethod), DeferredInvokeProxy.Thunk(notifyMethod), args); - } - - public static void RunWorkerMessagePump( - DeferredInvokeHandler initialWork, - object initialWorkArgs) - { - if (UIDispatcher.CurrentDispatcher != null) - throw new InvalidOperationException("Thread already has a dispatcher running"); - if (initialWork == null) - throw new ArgumentNullException(nameof(initialWork)); - UIApplication.StartArgs startArgs = null; - if (initialWork != null) - startArgs = new UIApplication.StartArgs(DeferredInvokeProxy.Thunk(initialWork), initialWorkArgs); - UIApplication.StartDispatcher(startArgs); - } - - public static Thread StartWorkerThreadWithMessagePump(string threadName) => UIApplication.StartThreadWithDispatcher(threadName); - - public static void ShutdownWorkerMessagePump(Thread thread) - { - if (thread == UIDispatcher.MainUIThread) - throw new InvalidOperationException("Use Application.Shutdown to shut down the application dispatcher"); - UIDispatcher.StopCurrentMessageLoop(thread); - } - - public static int CreateExternalAnimationInput(IDictionary propertyNameToId) - { - UIDispatcher.VerifyOnApplicationThread(); - if (s_idToExternalAnimationInput == null) - s_idToExternalAnimationInput = new Dictionary(); - SimpleAnimationPropertyMap animationPropertyMap = new SimpleAnimationPropertyMap(propertyNameToId); - IExternalAnimationInput externalAnimationInput = s_session.RenderSession.AnimationSystem.CreateExternalAnimationInput(s_idToExternalAnimationInput, animationPropertyMap); - s_idToExternalAnimationInput.Add((int)externalAnimationInput.UniqueId, externalAnimationInput); - return (int)externalAnimationInput.UniqueId; - } - - public static void DisposeExternalAnimationInput(int animationId) - { - UIDispatcher.VerifyOnApplicationThread(); - IExternalAnimationInput externalAnimationInput; - if (s_idToExternalAnimationInput == null || !s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput)) - return; - s_idToExternalAnimationInput.Remove(animationId); - externalAnimationInput.UnregisterUsage(s_idToExternalAnimationInput); - IAnimationInputProvider animationInputProvider; - if (s_animationProviders == null || !s_animationProviders.TryGetValue(animationId, out animationInputProvider)) - return; - s_animationProviders.Remove(animationId); - animationInputProvider.UnregisterUsage(s_idToExternalAnimationInput); - } - - public static IExternalAnimationInput MapExternalAnimationInput( - int animationId) - { - UIDispatcher.VerifyOnApplicationThread(); - IExternalAnimationInput externalAnimationInput = null; - if (s_idToExternalAnimationInput != null) - s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput); - return externalAnimationInput; - } - - public static void SetExternalAnimationInputProperty( - int animationId, - string property, - float value) - { - UIDispatcher.VerifyOnApplicationThread(); - IAnimationInputProvider provider; - if (s_animationProviders == null || !s_animationProviders.TryGetValue(animationId, out provider)) - { - provider = MapExternalAnimationInput(animationId).CreateProvider(s_idToExternalAnimationInput); - if (s_animationProviders == null) - s_animationProviders = new Dictionary(); - s_animationProviders.Add(animationId, provider); - } - provider.PublishFloat(property, value); - } - - public static event ErrorReportHandler ErrorReport; - - private static void NotifyErrorBatchHandler(IList records) - { - if (ErrorReport == null) - return; - Error[] errors = new Error[records.Count]; - for (int index = 0; index < records.Count; ++index) - { - ErrorRecord record = (ErrorRecord)records[index]; - errors[index] = new Error() - { - Context = record.Context, - Message = record.Message, - Warning = record.Warning, - Line = record.Line, - Column = record.Column - }; - } - ErrorReport(errors); - } - - private static GraphicsDeviceType ChooseRenderingGraphicsDevice( - RenderingType type) - { - GraphicsDeviceType graphicsType; - switch (type) - { - case RenderingType.GDI: - graphicsType = GraphicsDeviceType.Gdi; - break; - case RenderingType.DX9: - case RenderingType.Default: - graphicsType = GraphicsDeviceType.Direct3D9; - break; - default: - throw new ArgumentException(InvariantString.Format("Unknown rendering type {0}", type)); - } - if (type == RenderingType.Default && !s_session.IsGraphicsDeviceRecommended(graphicsType) || !s_session.IsGraphicsDeviceAvailable(graphicsType)) - graphicsType = GraphicsDeviceType.Gdi; - return graphicsType; - } - - private static SoundDeviceType ChooseRendererSoundDevice(SoundType typeRequested) - { - if (typeRequested == SoundType.None) - return SoundDeviceType.None; - if (typeRequested != SoundType.DirectSound) - throw new ArgumentException(InvariantString.Format("Unknown sound type {0}", typeRequested)); - return s_session.IsSoundDeviceAvailable(SoundDeviceType.DirectSound8) ? SoundDeviceType.DirectSound8 : SoundDeviceType.None; - } - - private static bool QueryKeyCoalesce(Keys key) => true; - - private static void VerifyTrustedEnvironment() - { - Assembly assembly1 = new StackTrace().GetFrame(2).GetMethod().DeclaringType.Assembly; - Assembly assembly2 = typeof(Application).Assembly; - byte[] publicKey1 = assembly1.GetName().GetPublicKey(); - byte[] publicKey2 = assembly2.GetName().GetPublicKey(); - bool flag = true; - if (publicKey1.Length == publicKey2.Length) - { - for (int index = 0; index < publicKey2.Length; ++index) - { - if (publicKey1[index] != publicKey2[index]) - { - flag = false; - break; - } - } - } - else - flag = false; - //if (!flag) - // throw new SecurityException("Attempt to activate system within an untrusted environment"); - } - - private enum InitializationState - { - NotInitialized, - FullyInitialized, - InitializedWithoutUI, - } - } -} diff --git a/UIX/Microsoft/Iris/ArrayListDataSet.cs b/UIX/Microsoft/Iris/ArrayListDataSet.cs deleted file mode 100644 index 3ddac70..0000000 --- a/UIX/Microsoft/Iris/ArrayListDataSet.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ArrayListDataSet -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris -{ - public class ArrayListDataSet : ListDataSet - { - public ArrayListDataSet() - : this(null) - { - } - - public ArrayListDataSet(IModelItemOwner owner) - : base(owner, new ArrayList()) - { - } - } -} diff --git a/UIX/Microsoft/Iris/AssemblyDataProviderWrapper.cs b/UIX/Microsoft/Iris/AssemblyDataProviderWrapper.cs deleted file mode 100644 index f5464c8..0000000 --- a/UIX/Microsoft/Iris/AssemblyDataProviderWrapper.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.AssemblyDataProviderWrapper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris -{ - public class AssemblyDataProviderWrapper : IDataProvider - { - private string _name; - private DataProviderQueryFactory _factory; - - public AssemblyDataProviderWrapper(string name, DataProviderQueryFactory factory) - { - this._name = name; - this._factory = factory; - } - - public string Name => this._name; - - public MarkupDataQuery Build(MarkupDataQuerySchema querySchema) => new AssemblyMarkupDataQuery(querySchema, this); - - public IDataProviderQuery ConstructQuery(object queryTypeCookie) => this._factory(queryTypeCookie); - - public override string ToString() => string.Format("{0} ({1})", _name, _factory); - } -} diff --git a/UIX/Microsoft/Iris/Audio/Sound.cs b/UIX/Microsoft/Iris/Audio/Sound.cs deleted file mode 100644 index 285e4b7..0000000 --- a/UIX/Microsoft/Iris/Audio/Sound.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Audio.Sound -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Audio; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Audio -{ - public class Sound - { - private string _source; - private SystemSoundEvent _systemSoundEvent; - - public Sound() - { - } - - public string Source - { - get => this._source; - set - { - this._source = value; - this._systemSoundEvent = SystemSoundEvent.None; - } - } - - public SystemSoundEvent SystemSoundEvent - { - get => this._systemSoundEvent; - set - { - this._systemSoundEvent = value; - this._source = null; - } - } - - public void Play() - { - if (!Environment.Instance.SoundEffectsEnabled) - return; - SoundManager soundManager = UISession.Default.SoundManager; - ISoundBuffer soundBuffer = null; - string source = null; - if (this._source != null) - source = this._source; - else if (this._systemSoundEvent != SystemSoundEvent.None) - source = soundManager.GetSystemSoundEventSource(this._systemSoundEvent); - if (source != null) - soundBuffer = soundManager.GetSoundBuffer(source); - if (soundBuffer == null) - return; - ISound sound = soundBuffer.CreateSound(this); - sound.Play(); - sound.UnregisterUsage(this); - } - } -} diff --git a/UIX/Microsoft/Iris/BooleanChoice.cs b/UIX/Microsoft/Iris/BooleanChoice.cs deleted file mode 100644 index d2b06d6..0000000 --- a/UIX/Microsoft/Iris/BooleanChoice.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.BooleanChoice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using System.Collections; - -namespace Microsoft.Iris -{ - public class BooleanChoice : - Choice, - IUIBooleanChoice, - IUIChoice, - IUIValueRange, - IDisposableObject, - INotifyObject - { - public BooleanChoice(IModelItemOwner owner, string description, IList options) - : base(owner, description) - { - if (options == null) - return; - this.Options = options; - } - - public BooleanChoice(IModelItemOwner owner, string description) - : this(owner, description, null) - { - } - - public BooleanChoice(IModelItemOwner owner) - : this(owner, null, null) - { - } - - public BooleanChoice() - : this(null) - { - } - - public override Microsoft.Iris.ModelItems.Choice CreateInternalChoice() => new Microsoft.Iris.ModelItems.BooleanChoice(); - - public bool Value - { - get - { - using (this.ThreadValidator) - return this.ChosenIndex == 1; - } - set - { - using (this.ThreadValidator) - { - if (value == this.Value) - return; - if (value) - this.ChosenIndex = 1; - else - this.ChosenIndex = 0; - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/ByteRangedValue.cs b/UIX/Microsoft/Iris/ByteRangedValue.cs deleted file mode 100644 index affa173..0000000 --- a/UIX/Microsoft/Iris/ByteRangedValue.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ByteRangedValue -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris -{ - public class ByteRangedValue : RangedValue, IUIByteRangedValue, IUIRangedValue, IUIValueRange, INotifyObject - { - public ByteRangedValue(IModelItemOwner owner, string description) : base(owner, description) - { - } - - public ByteRangedValue(IModelItemOwner owner) : this(owner, null) - { - } - - public ByteRangedValue() : this(null) - { - } - - public byte Value - { - get => (byte)base.Value; - set => base.Value = value; - } - - public byte MinValue - { - get => (byte)base.MinValue; - set => base.MinValue = value; - } - - public byte MaxValue - { - get => (byte)base.MaxValue; - set => base.MaxValue = value; - } - - public byte Step - { - get => (byte)base.Step; - set => base.Step = value; - } - - public override ModelItems.RangedValue CreateInternalRangedValue() => new ModelItems.ByteRangedValue(); - } -} diff --git a/UIX/Microsoft/Iris/Choice.cs b/UIX/Microsoft/Iris/Choice.cs deleted file mode 100644 index 29d00e5..0000000 --- a/UIX/Microsoft/Iris/Choice.cs +++ /dev/null @@ -1,342 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Choice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using System; -using System.Collections; -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public class Choice : - ModelItem, - IValueRange, - IModelItem, - INotifyPropertyChanged, - IModelItemOwner, - IUIChoice, - IUIValueRange, - IDisposableObject, - INotifyObject, - AssemblyObjectProxyHelper.IFrameworkProxyObject, - AssemblyObjectProxyHelper.IAssemblyProxyObject - { - private NotifyService _notifier = new NotifyService(); - private static readonly EventCookie s_chosenChangedEvent = EventCookie.ReserveSlot(); - private Microsoft.Iris.ModelItems.Choice _choice; - private CodeListeners _listeners; - private ModelItem _lastChosen; - - public Choice(IModelItemOwner owner, string description, IList options) - : base(owner, description) - { - this.Initialize(); - this.Options = options; - } - - public Choice(IModelItemOwner owner, string description) - : base(owner, description) - => this.Initialize(); - - public Choice(IModelItemOwner owner) - : this(owner, null) - { - } - - public Choice() - : this(null) - { - } - - protected override void OnDispose(bool disposing) - { - base.OnDispose(disposing); - if (disposing) - { - this._notifier.ClearListeners(); - this._choice.Dispose(this); - this._listeners.Dispose(this); - } - this._choice = null; - } - - object AssemblyObjectProxyHelper.IFrameworkProxyObject.FrameworkObject => this; - - object AssemblyObjectProxyHelper.IAssemblyProxyObject.AssemblyObject => this; - - public IList Options - { - get - { - using (this.ThreadValidator) - return (IList)AssemblyLoadResult.UnwrapObject(_choice.Options); - } - set - { - using (this.ThreadValidator) - { - IList potentialOptionsWrapped = (IList)AssemblyLoadResult.WrapObject(value); - this.ValidateOptionsList(potentialOptionsWrapped, value); - this._choice.Options = potentialOptionsWrapped; - } - } - } - - public object ChosenValue - { - get - { - using (this.ThreadValidator) - return AssemblyLoadResult.UnwrapObject(this._choice.ChosenValue); - } - set - { - using (this.ThreadValidator) - { - int index; - string error; - if (!this._choice.ValidateOption(AssemblyLoadResult.WrapObject(value), out index, out error)) - throw new ArgumentException(error); - this._choice.ChosenIndex = index; - } - } - } - - public int ChosenIndex - { - get - { - using (this.ThreadValidator) - return this._choice.ChosenIndex; - } - set - { - using (this.ThreadValidator) - { - string error; - this._choice.ChosenIndex = this._choice.ValidateIndex(value, out error) ? value : throw new ArgumentException(error); - } - } - } - - public int DefaultIndex - { - get - { - using (this.ThreadValidator) - return this._choice.DefaultIndex; - } - set - { - using (this.ThreadValidator) - this._choice.DefaultIndex = value; - } - } - - object IValueRange.Value - { - get - { - using (this.ThreadValidator) - return AssemblyLoadResult.UnwrapObject(((IUIValueRange)this._choice).ObjectValue); - } - } - - object IUIValueRange.ObjectValue => ((IUIValueRange)this._choice).ObjectValue; - - IList IUIChoice.Options - { - get => this._choice.Options; - set => this._choice.Options = value; - } - - object IUIChoice.ChosenValue => this._choice.ChosenValue; - - bool IUIChoice.ValidateIndex(int index, out string error) => this._choice.ValidateIndex(index, out error); - - bool IUIChoice.ValidateOption(object value, out int index, out string error) => this._choice.ValidateOption(value, out index, out error); - - bool IUIChoice.ValidateOptionsList(IList value, out string error) => this._choice.ValidateOptionsList(value, out error); - - public bool HasNextValue - { - get - { - using (this.ThreadValidator) - return this._choice.HasNextValue; - } - } - - public bool HasSelection - { - get - { - using (this.ThreadValidator) - return this._choice.HasSelection; - } - } - - public bool HasPreviousValue - { - get - { - using (this.ThreadValidator) - return this._choice.HasPreviousValue; - } - } - - public bool Wrap - { - get - { - using (this.ThreadValidator) - return this._choice.Wrap; - } - set - { - using (this.ThreadValidator) - this._choice.Wrap = value; - } - } - - public void PreviousValue() - { - using (this.ThreadValidator) - this._choice.PreviousValue(); - } - - public void PreviousValue(bool wrap) - { - using (this.ThreadValidator) - this._choice.PreviousValue(wrap); - } - - public void NextValue() - { - using (this.ThreadValidator) - this._choice.NextValue(); - } - - public void NextValue(bool wrap) - { - using (this.ThreadValidator) - this._choice.NextValue(wrap); - } - - public void Clear() - { - using (this.ThreadValidator) - this._choice.Clear(); - } - - public void DefaultValue() - { - using (this.ThreadValidator) - this._choice.DefaultValue(); - } - - protected virtual void OnChosenChanged() - { - } - - public event EventHandler ChosenChanged - { - add - { - using (this.ThreadValidator) - this.AddEventHandler(s_chosenChangedEvent, value); - } - remove - { - using (this.ThreadValidator) - this.RemoveEventHandler(s_chosenChangedEvent, value); - } - } - - private void Initialize() - { - this._choice = this.CreateInternalChoice(); - this._choice.DeclareOwner(this); - Vector listeners = new Vector(9); - DelegateListener.OnNotifyCallback callback = new DelegateListener.OnNotifyCallback(this.OnInternalChoicePropertyChanged); - listeners.Add(new DelegateListener(_choice, NotificationID.Options, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.DefaultIndex, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.ChosenIndex, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.ChosenValue, new DelegateListener.OnNotifyCallback(this.OnChosenValueChanged))); - listeners.Add(new DelegateListener(_choice, NotificationID.Value, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.HasSelection, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.Wrap, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.HasPreviousValue, callback)); - listeners.Add(new DelegateListener(_choice, NotificationID.HasNextValue, callback)); - this._listeners = new CodeListeners(listeners); - this._listeners.DeclareOwner(this); - } - - protected override void OnPropertyChanged(string property) - { - base.OnPropertyChanged(property); - this._notifier.FireThreadSafe(property); - } - - private void OnInternalChoicePropertyChanged(DelegateListener listener) => this.FirePropertyChanged(listener.Watch); - - private void OnChosenValueChanged(DelegateListener listener) - { - if (this._lastChosen != null) - this._lastChosen.Selected = false; - this._lastChosen = this.ChosenValue as ModelItem; - if (this._lastChosen != null) - this._lastChosen.Selected = true; - this.FireChangedChosenEvent(); - this.OnInternalChoicePropertyChanged(listener); - } - - public virtual Microsoft.Iris.ModelItems.Choice CreateInternalChoice() => new Microsoft.Iris.ModelItems.Choice(); - - private void ValidateOptionsList(IList potentialOptionsWrapped, IList potentialOptions) - { - using (this.ThreadValidator) - { - string error; - if (!this._choice.ValidateOptionsList(potentialOptionsWrapped, out error)) - throw new ArgumentException(error); - this.ValidateOptionsListWorker(potentialOptions); - } - } - - protected virtual void ValidateOptionsListWorker(IList potentialOptions) - { - } - - private void FireChangedChosenEvent() - { - if (this.GetEventHandler(s_chosenChangedEvent) is EventHandler eventHandler) - eventHandler(this, EventArgs.Empty); - this.OnChosenChanged(); - } - - private void SetChosenSelected(bool selectedFlag) - { - if (!(this.ChosenValue is ModelItem chosenValue)) - return; - chosenValue.Selected = selectedFlag; - } - - void IDisposableObject.DeclareOwner(object owner) - { - } - - void IDisposableObject.TransferOwnership(object owner) - { - } - - void IDisposableObject.Dispose(object owner) => this.Dispose(); - - void INotifyObject.AddListener(Listener listener) => this._notifier.AddListener(listener); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllConstructorSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllConstructorSchema.cs deleted file mode 100644 index feec982..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllConstructorSchema.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllConstructorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllConstructorSchema : ConstructorSchema - { - private TypeSchema[] _parameterTypes; - private uint _id; - - public DllConstructorSchema(DllTypeSchema owner, uint ID) - : base(owner) - => this._id = ID; - - public bool Load(IntPtr constructor) => this.QueryForParameterTypes(constructor); - - [Conditional("DEBUG")] - public void DEBUG_Dump() - { - string str1 = string.Empty; - if (this._parameterTypes != null) - { - for (int index = 0; index < this._parameterTypes.Length; ++index) - { - string str2 = ""; - if (this._parameterTypes[index] != null) - str2 = this._parameterTypes[index].Name; - str1 = string.Format("{0}{1}{2}", str1, index > 0 ? ", " : string.Empty, str2); - } - } - string.Format("0x{0:x8} {1}({2})", _id, Owner.Name, str1); - } - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - private DllLoadResult OwnerLoadResult => (DllLoadResult)this.Owner.Owner; - - private bool QueryForParameterTypes(IntPtr constructor) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryConstructorParameterCount(constructor, out count))) - { - uint[] IDs = new uint[count]; - if (this.CheckNativeReturn(NativeApi.SpGetConstructorParameterTypes(constructor, IDs, count))) - { - if (count > 0U) - { - this._parameterTypes = new TypeSchema[count]; - bool flag2 = false; - for (int index = 0; index < count; ++index) - { - TypeSchema typeSchema = DllLoadResult.MapType(IDs[index]); - if (typeSchema != null) - this._parameterTypes[index] = typeSchema; - else - flag2 = true; - } - flag1 = !flag2; - } - else - { - this._parameterTypes = TypeSchema.EmptyList; - flag1 = true; - } - } - } - return flag1; - } - - public override object Construct(object[] parameters) => ((DllTypeSchema)this.Owner).Construct(this._id, parameters); - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXConstructor"); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumProxy.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumProxy.cs deleted file mode 100644 index 7dc46ac..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumProxy.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllEnumProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllEnumProxy - { - private int _value; - private DllEnumSchema _schema; - - public DllEnumProxy(DllEnumSchema schema, int value) - { - this._value = value; - this._schema = schema; - } - - public int Value => this._value; - - public DllEnumSchema Type => this._schema; - - public override string ToString() => this._schema.InvokeToString(this); - - public override int GetHashCode() => this._value.GetHashCode(); - - public override bool Equals(object other) - { - bool flag = false; - if (other is DllEnumProxy dllEnumProxy) - flag = this._schema == dllEnumProxy._schema && this._value == dllEnumProxy._value; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumSchema.cs deleted file mode 100644 index 559ae55..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEnumSchema.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllEnumSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllEnumSchema : EnumSchema - { - private uint _id; - private IntPtr _nativeSchema; - - public DllEnumSchema(LoadResult owner, uint id, IntPtr nativeSchema) - : base(owner) - { - this._id = id; - this._nativeSchema = nativeSchema; - } - - [Conditional("DEBUG")] - public void DEBUG_DumpEnum() - { - int val1 = 0; - foreach (KeyValueEntry nameToValue in this.NameToValueMap) - { - if (nameToValue.Key != null) - val1 = Math.Max(val1, nameToValue.Key.Length); - } - string.Format("{{0,{0}}} = 0x{{1:x8}}", val1); - foreach (KeyValueEntry nameToValue in this.NameToValueMap) - ; - } - - public uint ID => this._id; - - public bool Load() - { - string name; - bool flag = this.QueryName(out name); - if (flag) - { - bool isFlags; - flag = this.QueryIsFlags(out isFlags); - if (flag) - { - string[] names; - int[] values; - flag = this.QueryNamesAndValues(out names, out values); - if (flag) - { - this.Initialize(name, typeof(DllEnumProxy), isFlags, names, values); - flag = true; - } - } - } - return flag; - } - - private unsafe bool QueryName(out string name) - { - char* name1; - bool flag = this.CheckNativeReturn(NativeApi.SpQueryEnumName(this._nativeSchema, out name1)); - name = !flag ? null : new string(name1); - return flag; - } - - private bool QueryIsFlags(out bool isFlags) => this.CheckNativeReturn(NativeApi.SpQueryEnumIsFlags(this._nativeSchema, out isFlags)); - - private unsafe bool QueryNamesAndValues(out string[] names, out int[] values) - { - bool flag1 = false; - names = null; - values = null; - uint valueCount; - if (this.CheckNativeReturn(NativeApi.SpQueryEnumValueCount(this._nativeSchema, out valueCount))) - { - bool flag2 = false; - if (valueCount > 0U) - { - names = new string[valueCount]; - values = new int[valueCount]; - for (uint index = 0; index < valueCount; ++index) - { - char* name; - int num; - if (this.CheckNativeReturn(NativeApi.SpGetEnumNameValue(this._nativeSchema, index, out name, out num))) - { - if ((IntPtr)name != IntPtr.Zero) - { - names[index] = new string(name); - values[index] = num; - } - else - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "Name"); - } - else - { - flag2 = true; - break; - } - } - } - flag1 = !flag2; - } - return flag1; - } - - protected override void OnDispose() - { - base.OnDispose(); - NativeApi.SpReleaseExternalObject(this._nativeSchema); - this._nativeSchema = IntPtr.Zero; - } - - public object GetBoxedValue(int value) => this.EnumValueToObject(value); - - protected override object EnumValueToObject(int value) => new DllEnumProxy(this, value); - - protected override int ValueFromObject(object obj) => ((DllEnumProxy)obj).Value; - - public string InvokeToString(DllEnumProxy proxy) - { - string str = null; - IntPtr result; - if (this.CheckNativeReturn(NativeApi.SpInvokeEnumToString(this._nativeSchema, proxy.Value, out result))) - str = DllProxyServices.GetString(result); - return str; - } - - private DllLoadResult OwnerLoadResult => (DllLoadResult)this.Owner; - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXEnum"); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEventSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllEventSchema.cs deleted file mode 100644 index 474fa5f..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllEventSchema.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllEventSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllEventSchema : EventSchema - { - private string _name; - private bool _isStatic; - - public DllEventSchema(DllTypeSchema owner, uint ID) - : base(owner) - { - } - - public bool Load(IntPtr eventSchema) => this.QueryEventName(eventSchema) && this.QueryIsStatic(eventSchema); - - [Conditional("DEBUG")] - public void DEBUG_Dump() - { - } - - public override string Name => this._name; - - public bool IsStatic => this._isStatic; - - private unsafe bool QueryEventName(IntPtr eventSchema) - { - bool flag = false; - char* name; - if (this.CheckNativeReturn(NativeApi.SpQueryEventName(eventSchema, out name))) - { - this._name = NotifyService.CanonicalizeString(new string(name)); - flag = true; - } - return flag; - } - - private bool QueryIsStatic(IntPtr eventSchema) => this.CheckNativeReturn(NativeApi.SpQueryEventIsStatic(eventSchema, out this._isStatic)); - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXEvent"); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs deleted file mode 100644 index a149feb..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllInterfaceProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public abstract class DllInterfaceProxy : DllProxyObject - { - protected IntPtr _interface; - - ~DllInterfaceProxy() => RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._interface)); - - protected override void OnDispose() => new DllProxyObject.AppThreadReleaseEntry(this._interface).Release(); - - protected override void LoadWorker(IntPtr nativeObject, IntPtr nativeMarshalAs) - { - this._interface = nativeMarshalAs; - base.LoadWorker(nativeObject, nativeMarshalAs); - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs deleted file mode 100644 index e847ff8..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllIntrinsicTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Markup.UIX; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllIntrinsicTypeSchema : DllTypeSchemaBase - { - public DllIntrinsicTypeSchema(DllLoadResult owner, uint ID, TypeSchema equivalentType) - : base(owner, ID) - { - this._baseType = ObjectSchema.Type; - this._name = InvariantString.Format(" {0}", equivalentType.Name); - this._marshalAs = ID; - RegisterOneWayEquivalence(this, equivalentType); - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs deleted file mode 100644 index f0ef4a0..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs +++ /dev/null @@ -1,337 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllLoadResult : LoadResult - { - private DllLoadResultFactory _source; - private LoadResultStatus _status; - private LoadPass _loadPass; - private IntPtr _schema; - private Map _userDefinedTypes; - private Map _intrinsicTypes; - private static Map s_intrinsicData; - private ushort _component; - private static ushort s_nextID = 1; - private static LoadResult s_objectContext; - - public static void Startup() - { - DllLoadResultFactory.Startup(); - DllProxyServices.Startup(); - LoadIntrinsicTypeData(); - } - - private static void LoadIntrinsicTypeData() - { - s_intrinsicData = new Map(); - s_intrinsicData[4294967294U] = new DllLoadResult.IntrinsicTypeData(BooleanSchema.Type); - s_intrinsicData[4294967293U] = new DllLoadResult.IntrinsicTypeData(ByteSchema.Type); - s_intrinsicData[4294967292U] = new DllLoadResult.IntrinsicTypeData(DoubleSchema.Type); - s_intrinsicData[4294967285U] = new DllLoadResult.IntrinsicTypeData(ListSchema.Type, typeof(DllProxyList)); - s_intrinsicData[4294967284U] = new DllLoadResult.IntrinsicTypeData(ImageSchema.Type); - s_intrinsicData[4294967283U] = new DllLoadResult.IntrinsicTypeData(Int32Schema.Type); - s_intrinsicData[4294967282U] = new DllLoadResult.IntrinsicTypeData(Int64Schema.Type); - s_intrinsicData[4294967280U] = new DllLoadResult.IntrinsicTypeData(ObjectSchema.Type); - s_intrinsicData[4294967279U] = new DllLoadResult.IntrinsicTypeData(SingleSchema.Type); - s_intrinsicData[4294967278U] = new DllLoadResult.IntrinsicTypeData(StringSchema.Type); - s_intrinsicData[4294967277U] = new DllLoadResult.IntrinsicTypeData(VoidSchema.Type); - } - - public static void Shutdown() => DllProxyServices.Shutdown(); - - public static bool CheckNativeReturn(uint hr, string interfaceName) - { - if ((int)hr >= 0) - return true; - ErrorManager.ReportError("Schema API failure: A method on '{0}' failed with code '0x{1:X8}'", interfaceName, hr); - return false; - } - - private bool CheckNativeReturn(uint hr) => CheckNativeReturn(hr, "IUIXTypeSchema"); - - public static void PushContext(LoadResult newContext) => s_objectContext = newContext; - - public static LoadResult CurrentContext => s_objectContext; - - public static void PopContext() => s_objectContext = null; - - public static TypeSchema MapType(uint typeID) - { - uint schemaComponent = UIXID.GetSchemaComponent(typeID); - TypeSchema typeSchema = null; - DllLoadResult dllLoadResult = null; - if (schemaComponent != ushort.MaxValue) - { - dllLoadResult = DllLoadResultFactory.GetLoadResultByID(schemaComponent); - if (dllLoadResult != null) - typeSchema = dllLoadResult.MapLocalType(typeID); - } - else if (CurrentContext is DllLoadResult currentContext) - typeSchema = currentContext.MapIntrinsicType(typeID); - if (typeSchema == null) - ErrorManager.ReportError("Unable to find type with ID '0x{0:X8}' in '{1}'", typeID, dllLoadResult != null ? dllLoadResult.Uri : string.Empty); - return typeSchema; - } - - private TypeSchema MapIntrinsicType(uint typeID) - { - if (this._intrinsicTypes == null) - this._intrinsicTypes = new Map(); - TypeSchema typeSchema; - DllLoadResult.IntrinsicTypeData intrinsicTypeData; - if (!this._intrinsicTypes.TryGetValue(typeID, out typeSchema) && s_intrinsicData.TryGetValue(typeID, out intrinsicTypeData)) - { - typeSchema = !intrinsicTypeData.DemandCreateTypeSchema ? intrinsicTypeData.FrameworkEquivalent : new DllIntrinsicTypeSchema(this, typeID, intrinsicTypeData.FrameworkEquivalent); - this._intrinsicTypes[typeID] = typeSchema; - } - return typeSchema; - } - - private TypeSchema MapLocalType(uint typeID) - { - TypeSchema typeSchema = null; - this._userDefinedTypes.TryGetValue(typeID, out typeSchema); - return typeSchema; - } - - public DllLoadResult(DllLoadResultFactory sourceFactory, IntPtr nativeSchema, string uri) - : base(uri) - { - this._source = sourceFactory; - this._status = LoadResultStatus.Loading; - this._schema = nativeSchema; - this._loadPass = LoadPass.Invalid; - this._component = s_nextID++; - } - - public override void Load(LoadPass pass) - { - if (pass <= this._loadPass || pass != LoadPass.DeclareTypes) - return; - this._status = !this.SetSchemaID() || !this.LoadTypes() ? LoadResultStatus.Error : LoadResultStatus.Success; - this._loadPass = LoadPass.Done; - } - - public ushort SchemaComponent => this._component; - - private bool SetSchemaID() => this.CheckNativeReturn(NativeApi.SpSetSchemaID(this._schema, this.SchemaComponent)); - - private bool LoadTypes() - { - bool flag = false; - UIXIDVerifier idVerifier = new UIXIDVerifier(this); - uint typeCount; - uint enumCount; - if (this.CheckNativeReturn(NativeApi.SpQueryTypeCount(this._schema, out typeCount)) && this.CheckNativeReturn(NativeApi.SpQueryEnumCount(this._schema, out enumCount))) - { - int capacity = (int)typeCount + (int)enumCount; - if (capacity > 0) - { - this._userDefinedTypes = new Map(capacity); - if (!this.LoadClasses(typeCount, idVerifier) || !this.LoadEnums(enumCount, idVerifier) || !this.ResolveTypes(idVerifier)) - goto label_4; - } - flag = true; - } - label_4: - return flag; - } - - private bool LoadClasses(uint numClasses, UIXIDVerifier idVerifier) - { - bool flag = false; - if (numClasses > 0U) - { - for (uint index = 0; index < numClasses; ++index) - { - if (!this.GetTypeSchema(index, idVerifier)) - flag = true; - } - } - return !flag; - } - - private bool GetTypeSchema(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr type; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetTypeSchema(this._schema, index, out type, out ID))) - { - if (type != IntPtr.Zero) - { - this.StoreType(new DllTypeSchema(this, ID, type), ID, true, idVerifier); - flag = idVerifier.RegisterID(ID); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXSchema::GetType"); - } - return flag; - } - - private void StoreType(TypeSchema schema, uint ID, bool isClass, UIXIDVerifier idVerifier) => this._userDefinedTypes[ID] = schema; - - private static void DEBUG_DumpType(object param) - { - } - - private bool LoadEnums(uint numEnums, UIXIDVerifier idVerifier) - { - bool flag = false; - if (numEnums > 0U) - { - for (uint index = 0; index < numEnums; ++index) - { - if (!this.GetEnumSchema(index, idVerifier)) - flag = true; - } - } - return !flag; - } - - private bool GetEnumSchema(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr enumType; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetEnumSchema(this._schema, index, out enumType, out ID))) - { - if (enumType != IntPtr.Zero) - { - this.StoreType(new DllEnumSchema(this, ID, enumType), ID, false, idVerifier); - flag = idVerifier.RegisterID(ID); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXSchema::GetEnum"); - } - return flag; - } - - private bool ResolveTypes(UIXIDVerifier idVerifier) - { - bool flag = false; - if (this._userDefinedTypes != null && this._userDefinedTypes.Count > 0) - { - foreach (TypeSchema typeSchema in this._userDefinedTypes.Values) - { - switch (typeSchema) - { - case DllTypeSchema dllTypeSchema: - if (!dllTypeSchema.Load(idVerifier)) - { - flag = true; - continue; - } - continue; - case DllEnumSchema dllEnumSchema: - if (!dllEnumSchema.Load()) - { - flag = true; - continue; - } - continue; - default: - flag = true; - continue; - } - } - } - return !flag; - } - - private static void DEBUG_DumpEnum(object param) - { - } - - protected override void OnDispose() - { - base.OnDispose(); - if (this._userDefinedTypes != null && this._userDefinedTypes.Count > 0) - { - foreach (DisposableObject disposableObject in this._userDefinedTypes.Values) - disposableObject.Dispose(this); - } - if (this._intrinsicTypes != null && this._intrinsicTypes.Count > 0) - { - foreach (TypeSchema typeSchema in this._intrinsicTypes.Values) - { - if (typeSchema is DllIntrinsicTypeSchema intrinsicTypeSchema) - intrinsicTypeSchema.Dispose(this); - } - } - NativeApi.SpReleaseExternalObject(this._schema); - this._schema = IntPtr.Zero; - this._source.NotifyLoadResultDisposed(this); - } - - public override TypeSchema FindType(string name) - { - if (this._userDefinedTypes != null && this._userDefinedTypes.Count > 0) - { - foreach (TypeSchema typeSchema in this._userDefinedTypes.Values) - { - if (typeSchema.Name == name) - return typeSchema; - } - } - return null; - } - - public override LoadResultStatus Status => this._status; - - public override LoadResult[] Dependencies => EmptyList; - - public override bool Cachable => true; - - public static Type RuntimeTypeForMarshalAs(uint marshalAs) - { - Type type = null; - if (marshalAs == uint.MaxValue) - { - type = typeof(DllProxyObject); - } - else - { - DllLoadResult.IntrinsicTypeData intrinsicTypeData; - if (s_intrinsicData.TryGetValue(marshalAs, out intrinsicTypeData)) - type = intrinsicTypeData.MarshalAsRuntimeType; - } - return type; - } - - private class IntrinsicTypeData - { - private TypeSchema _frameworkType; - private Type _runtimeType; - - public IntrinsicTypeData(TypeSchema frameworkEquivalent) - : this(frameworkEquivalent, null) - { - } - - public IntrinsicTypeData(TypeSchema frameworkEquivalent, Type runtimeMarshalAsType) - { - this._frameworkType = frameworkEquivalent; - this._runtimeType = runtimeMarshalAsType; - } - - public TypeSchema FrameworkEquivalent => this._frameworkType; - - public Type MarshalAsRuntimeType => this._runtimeType; - - public bool DemandCreateTypeSchema => this.MarshalAsRuntimeType != null; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs deleted file mode 100644 index be77abb..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllLoadResultFactory -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllLoadResultFactory : SharedDisposableObject - { - private const string c_DllProtocol = "dll://"; - private string _dllName; - private IntPtr _module; - private IntPtr _schemaFactory; - private static Map s_loadResultCache = new Map(); - private static Map s_loadResultIDCache = new Map(); - private static Map s_dllFactoriesCache = new Map(); - - public static void Startup() => MarkupSystem.RegisterFactoryByProtocol("dll://", new CreateLoadResultHandler(GetLoadResult)); - - public static DllLoadResult GetLoadResultByID(uint id) - { - DllLoadResult dllLoadResult; - s_loadResultIDCache.TryGetValue(id, out dllLoadResult); - return dllLoadResult; - } - - private static LoadResult GetLoadResult(string uri) - { - DllLoadResult dllLoadResult; - if (s_loadResultCache.TryGetValue(uri, out dllLoadResult)) - return dllLoadResult; - int length = uri.IndexOf('!'); - string str; - string qualifier; - if (length != -1) - { - str = uri.Substring("dll://".Length, length); - qualifier = uri.Substring(length + 1); - } - else - { - str = uri.Substring("dll://".Length); - qualifier = null; - } - DllLoadResultFactory loadResultFactory; - if (!s_dllFactoriesCache.TryGetValue(str, out loadResultFactory)) - { - loadResultFactory = new DllLoadResultFactory(str); - s_dllFactoriesCache[str] = loadResultFactory; - } - DllLoadResult loadResult = loadResultFactory.GetLoadResult(uri, qualifier); - if (loadResult != null) - { - s_loadResultCache[uri] = loadResult; - s_loadResultIDCache[loadResult.SchemaComponent] = loadResult; - } - return loadResult; - } - - private DllLoadResultFactory(string dllName) - { - this._dllName = dllName; - int num = (int)NativeApi.SpLoadDll(this._dllName, out this._module); - if ((int)NativeApi.SpCreateDllLoadResultFactory(this._module, out this._schemaFactory) >= 0) - return; - ErrorManager.ReportError("Unable to create IUIXSchemaFactory from '{0}'", dllName); - } - - protected override void OnDispose() - { - base.OnDispose(); - s_dllFactoriesCache.Remove(this._dllName); - if (this._schemaFactory != IntPtr.Zero) - { - NativeApi.SpReleaseExternalObject(this._schemaFactory); - this._schemaFactory = IntPtr.Zero; - } - if (!(this._module != IntPtr.Zero)) - return; - NativeApi.SpSendDllSchemaUnloadNotification(this._module); - NativeApi.SpFreeDll(this._module); - this._module = IntPtr.Zero; - } - - private DllLoadResult GetLoadResult(string fullUri, string qualifier) - { - DllLoadResult dllLoadResult = null; - IntPtr loadResult = IntPtr.Zero; - if (this._schemaFactory != IntPtr.Zero) - { - if ((int)NativeApi.SpCreateDllLoadResult(this._schemaFactory, qualifier, out loadResult) < 0) - ErrorManager.ReportError("Unable to create IUIXSchema from '{0}'", fullUri); - else if (loadResult != IntPtr.Zero) - { - dllLoadResult = new DllLoadResult(this, loadResult, fullUri); - this.RegisterUsage(dllLoadResult); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXSchemaFactory::GetSchema"); - } - return dllLoadResult; - } - - public void NotifyLoadResultDisposed(DllLoadResult loadResult) - { - s_loadResultCache.Remove(loadResult.Uri); - s_loadResultIDCache.Remove(loadResult.SchemaComponent); - this.UnregisterUsage(loadResult); - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllMethodSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllMethodSchema.cs deleted file mode 100644 index 640c7c0..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllMethodSchema.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllMethodSchema : MethodSchema - { - private bool _isStatic; - private TypeSchema _returnType; - private TypeSchema[] _parameterTypes; - private string _name; - private uint _id; - - public DllMethodSchema(DllTypeSchema owner, uint ID) - : base(owner) - => this._id = ID; - - public bool Load(IntPtr method) => this.QueryMethodName(method) && this.QueryForParameterTypes(method) && this.QueryReturnType(method) && this.QueryIsStatic(method); - - public uint ID => this._id; - - [Conditional("DEBUG")] - public void DEBUG_Dump() - { - string str1 = string.Empty; - if (this.IsStatic) - str1 = "static "; - string str2 = "void"; - if (this.ReturnType != null) - str2 = this.ReturnType.Name; - string str3 = string.Empty; - if (this._parameterTypes != null) - { - for (int index = 0; index < this._parameterTypes.Length; ++index) - { - string str4 = ""; - if (this._parameterTypes[index] != null) - str4 = this._parameterTypes[index].Name; - str3 = string.Format("{0}{1}{2}", str3, index > 0 ? ", " : string.Empty, str4); - } - } - string.Format("0x{0:x8} {1}{2} {3}({4})", _id, str1, str2, Name, str3); - } - - public override string Name => this._name; - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public override TypeSchema ReturnType => this._returnType; - - public override bool IsStatic => this._isStatic; - - private DllTypeSchema OwnerTypeSchema => (DllTypeSchema)this.Owner; - - public override object Invoke(object instance, object[] parameters) => this.OwnerTypeSchema.InvokeMethod(instance, this, parameters); - - private DllLoadResult OwnerLoadResult => (DllLoadResult)this.Owner.Owner; - - private unsafe bool QueryMethodName(IntPtr method) - { - bool flag = false; - char* name; - if (this.CheckNativeReturn(NativeApi.SpQueryMethodName(method, out name))) - { - this._name = new string(name); - flag = true; - } - return flag; - } - - private bool QueryForParameterTypes(IntPtr method) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryMethodParameterCount(method, out count))) - { - if (count > 0U) - { - uint[] IDs = new uint[(int)count]; - if (this.CheckNativeReturn(NativeApi.SpGetMethodParameterTypes(method, IDs, count))) - { - this._parameterTypes = new TypeSchema[(int)count]; - bool flag2 = false; - for (uint index = 0; index < count; ++index) - { - TypeSchema typeSchema = DllLoadResult.MapType(IDs[index]); - if (typeSchema != null) - this._parameterTypes[index] = typeSchema; - else - flag2 = true; - } - flag1 = !flag2; - } - } - else - { - this._parameterTypes = TypeSchema.EmptyList; - flag1 = true; - } - } - return flag1; - } - - private bool QueryReturnType(IntPtr method) - { - bool flag = false; - uint type; - if (this.CheckNativeReturn(NativeApi.SpQueryMethodReturnType(method, out type))) - { - this._returnType = DllLoadResult.MapType(type); - flag = this._returnType != null; - } - return flag; - } - - private bool QueryIsStatic(IntPtr method) => this.CheckNativeReturn(NativeApi.SpQueryMethodIsStatic(method, out this._isStatic)); - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXMethod"); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs deleted file mode 100644 index 81f9c36..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; -using System.Collections.Specialized; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllPropertySchema : PropertySchema - { - private BitVector32 _bits; - private string _name; - private TypeSchema _type; - private uint _id; - - public DllPropertySchema(DllTypeSchema owner, uint ID) - : base(owner) - => this._id = ID; - - public bool Load(IntPtr property) => this.QueryPropertyName(property) && this.QueryPropertyType(property) && (this.QueryCanRead(property) && this.QueryCanWrite(property)) && this.QueryIsStatic(property) && this.QueryNotifiesOnChange(property); - - public uint ID => this._id; - - [Conditional("DEBUG")] - public void DEBUG_Dump() - { - string str1 = string.Empty; - if (this.IsStatic) - str1 = "static "; - string str2 = ""; - if (this.PropertyType != null) - str2 = this.PropertyType.Name; - string str3 = string.Empty; - if (this.CanRead) - str3 = "get;"; - string str4 = string.Empty; - if (this.CanWrite) - str4 = string.Format("{0}set;", this.CanRead ? " " : string.Empty); - string str5 = ""; - if (!this.NotifiesOnChange) - str5 = ""; - string.Format("0x{0:x8} {1}{2} {3} {{{4}{5}}} {6}", _id, str1, str2, Name, str3, str4, str5); - } - - public override string Name => this._name; - - public override TypeSchema PropertyType => this._type; - - public override TypeSchema AlternateType => (TypeSchema)null; - - public override bool CanRead => this.GetBit(Bits.CanRead); - - public override bool CanWrite => this.GetBit(Bits.CanWrite); - - public override bool IsStatic => this.GetBit(Bits.IsStatic); - - public override ExpressionRestriction ExpressionRestriction => ExpressionRestriction.None; - - public override bool RequiredForCreation => false; - - public override RangeValidator RangeValidator => (RangeValidator)null; - - public override bool NotifiesOnChange => this.GetBit(Bits.NotifiesOnChange); - - private DllTypeSchema OwnerTypeSchema => (DllTypeSchema)this.Owner; - - public override object GetValue(object instance) => this.OwnerTypeSchema.GetPropertyValue(instance, this); - - public override void SetValue(ref object instance, object value) => this.OwnerTypeSchema.SetPropertyValue(instance, this, value); - - private DllLoadResult OwnerLoadResult => (DllLoadResult)this.Owner.Owner; - - private unsafe bool QueryPropertyName(IntPtr property) - { - bool flag = false; - char* name; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyName(property, out name))) - { - this._name = NotifyService.CanonicalizeString(new string(name)); - flag = true; - } - return flag; - } - - private bool QueryPropertyType(IntPtr property) - { - bool flag = false; - uint type; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyType(property, out type))) - { - this._type = DllLoadResult.MapType(type); - flag = true; - } - return flag; - } - - private bool QueryCanRead(IntPtr property) - { - bool flag = false; - bool canRead; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyCanRead(property, out canRead))) - { - this.SetBit(Bits.CanRead, canRead); - flag = true; - } - return flag; - } - - private bool QueryCanWrite(IntPtr property) - { - bool flag = false; - bool canWrite; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyCanWrite(property, out canWrite))) - { - this.SetBit(Bits.CanWrite, canWrite); - flag = true; - } - return flag; - } - - private bool QueryIsStatic(IntPtr property) - { - bool flag = false; - bool isStatic; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyIsStatic(property, out isStatic))) - { - this.SetBit(Bits.IsStatic, isStatic); - flag = true; - } - return flag; - } - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXProperty"); - - private bool QueryNotifiesOnChange(IntPtr property) - { - bool flag = false; - bool notifiesOnChange; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyNotifiesOnChange(property, out notifiesOnChange))) - { - this.SetBit(Bits.NotifiesOnChange, notifiesOnChange); - flag = true; - } - return flag; - } - - private bool GetBit(DllPropertySchema.Bits lookupBit) => this._bits[(int)lookupBit]; - - private void SetBit(DllPropertySchema.Bits changeBit, bool value) => this._bits[(int)changeBit] = value; - - private enum Bits : uint - { - CanRead = 1, - CanWrite = 2, - IsStatic = 4, - NotifiesOnChange = 8, - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyHandleTable.cs deleted file mode 100644 index 8941bf9..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyHandleTable.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllProxyHandleTable : ProxyHandleTable - { - public DllProxyHandleTable.DllProxyHandleTableEnumerator GetEnumerator() => new DllProxyHandleTable.DllProxyHandleTableEnumerator(this.GetTableEnumerator()); - - public ulong RegisterProxy(object d) => this.AllocateHandle(new DllProxyObjectReference() - { - Value = d - }); - - public void ReleaseProxy(ulong handle) - { - DllProxyObjectReference oldValue; - this.ReleaseHandle(handle, out oldValue); - oldValue.Value = null; - } - - protected bool LookupByHandleWorker(ulong handle, out object obj) - { - DllProxyObjectReference proxyObjectReference; - bool flag = this.InternalLookupByHandle(handle, out proxyObjectReference); - obj = !flag ? null : proxyObjectReference.Value; - return flag; - } - - public struct DllProxyHandleTableEnumerator : IEnumerator - { - private ProxyHandleTable.ProxyHandleTableEnumerator _enumerator; - - public DllProxyHandleTableEnumerator( - ProxyHandleTable.ProxyHandleTableEnumerator enumerator) - { - this._enumerator = enumerator; - } - - public bool MoveNext() - { - bool flag; - do - { - flag = this._enumerator.MoveNext(); - } - while ((!flag || this._enumerator.Current.Value == null) && flag); - return flag; - } - - public object Current => this._enumerator.Current.Value; - - public void Reset() => this._enumerator.Reset(); - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyList.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyList.cs deleted file mode 100644 index 05e10c6..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyList.cs +++ /dev/null @@ -1,319 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.ViewItems; -using System; -using System.Collections; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllProxyList : - DllInterfaceProxy, - IVirtualList, - INotifyList, - IList, - ICollection, - IEnumerable, - IUIXListCallbacks - { - private UpdateHelper _updater; - private Repeater _repeater; - private bool _wantSlowDataRequests; - private bool _callbacksRegistered; - private SlowDataAcquireCompleteHandler _slowDataAcquireCompleteHandler; - private UIListContentsChangedHandler _contentsChanged; - - protected override void LoadWorker(IntPtr nativeObject, IntPtr nativeMarshalAs) - { - base.LoadWorker(nativeObject, nativeMarshalAs); - NativeApi.SUCCEEDED(NativeApi.SpUIXListWantSlowDataRequests(this._interface, out this._wantSlowDataRequests)); - if (!this._wantSlowDataRequests) - return; - this._updater = new UpdateHelper(this); - } - - protected override void OnDispose() - { - this.UpdateCallbackRegistration(true); - base.OnDispose(); - } - - public unsafe int Add(object value) - { - int count = 0; - UIXVariant uixVariant; - UIXVariant.MarshalObject(value, &uixVariant); - NativeApi.SUCCEEDED(NativeApi.SpUIXListAdd(this._interface, &uixVariant, out count)); - UIXVariant.CleanupMarshalledObject(&uixVariant); - return count; - } - - public bool Contains(object value) => this.IndexOf(value) >= 0; - - public unsafe int IndexOf(object value) - { - int index = -1; - UIXVariant uixVariant; - UIXVariant.MarshalObject(value, &uixVariant); - NativeApi.SUCCEEDED(NativeApi.SpUIXListIndexOf(this._interface, &uixVariant, out index)); - UIXVariant.CleanupMarshalledObject(&uixVariant); - return index; - } - - public void Clear() => NativeApi.SUCCEEDED(NativeApi.SpUIXListClear(this._interface)); - - public unsafe void Insert(int index, object value) - { - UIXVariant uixVariant; - UIXVariant.MarshalObject(value, &uixVariant); - NativeApi.SUCCEEDED(NativeApi.SpUIXListInsert(this._interface, index, &uixVariant)); - UIXVariant.CleanupMarshalledObject(&uixVariant); - } - - public unsafe void Remove(object value) - { - UIXVariant uixVariant; - UIXVariant.MarshalObject(value, &uixVariant); - NativeApi.SUCCEEDED(NativeApi.SpUIXListRemove(this._interface, &uixVariant)); - UIXVariant.CleanupMarshalledObject(&uixVariant); - } - - public void RemoveAt(int index) => NativeApi.SUCCEEDED(NativeApi.SpUIXListRemoveAt(this._interface, index)); - - public void CopyTo(Array array, int index) => throw new NotImplementedException(); - - public int Count - { - get - { - int count = 0; - NativeApi.SUCCEEDED(NativeApi.SpUIXListGetCount(this._interface, out count)); - return count; - } - } - - public bool IsFixedSize => false; - - public bool IsReadOnly => false; - - public bool IsSynchronized => false; - - bool IVirtualList.IsItemAvailable(int index) - { - bool isAvailable; - NativeApi.SUCCEEDED(NativeApi.SpUIXListIsItemAvailable(this._interface, index, out isAvailable)); - return isAvailable; - } - - public void RequestItem(int index, ItemRequestCallback callback) - { - object obj = this[index]; - callback(this, index, obj); - } - - public unsafe object this[int index] - { - get - { - object obj = null; - UIXVariant inboundObject; - if (NativeApi.SUCCEEDED(NativeApi.SpUIXListGetItem(this._interface, index, out inboundObject))) - obj = UIXVariant.GetValue(inboundObject, OwningLoadResult); - return obj; - } - set - { - UIXVariant uixVariant; - UIXVariant.MarshalObject(value, &uixVariant); - NativeApi.SUCCEEDED(NativeApi.SpUIXListSetItem(this._interface, index, &uixVariant)); - UIXVariant.CleanupMarshalledObject(&uixVariant); - } - } - - public object SyncRoot => (object)null; - - IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - - public StackIListEnumerator GetEnumerator() => new StackIListEnumerator(this); - - public event UIListContentsChangedHandler ContentsChanged - { - add - { - if (this._contentsChanged == null) - this.UpdateCallbackRegistration(); - this._contentsChanged += value; - } - remove - { - this._contentsChanged -= value; - if (this._contentsChanged != null) - return; - this.UpdateCallbackRegistration(); - } - } - - public void Move(int oldIndex, int newIndex) - { - int num = (int)NativeApi.SpUIXListMove(this._interface, oldIndex, newIndex); - } - - public void ListChanged(int nativeType, int oldIndex, int newIndex, int count) - { - bool flag1 = true; - bool flag2 = true; - UIListContentsChangeType type = (UIListContentsChangeType)nativeType; - switch (type) - { - case UIListContentsChangeType.Add: - case UIListContentsChangeType.AddRange: - case UIListContentsChangeType.Remove: - case UIListContentsChangeType.Insert: - case UIListContentsChangeType.InsertRange: - case UIListContentsChangeType.Clear: - case UIListContentsChangeType.Reset: - if (!flag1) - break; - if (this._contentsChanged != null) - this._contentsChanged(this, new UIListContentsChangedArgs(type, oldIndex, newIndex, count)); - if (flag2) - this.FireNotification(NotificationID.Count); - if (this._updater == null) - break; - this.ForwardListChangeToUpdater(type, oldIndex, newIndex, count); - break; - case UIListContentsChangeType.Move: - case UIListContentsChangeType.Modified: - flag2 = false; - goto case UIListContentsChangeType.Add; - default: - flag1 = false; - goto case UIListContentsChangeType.Add; - } - } - - private void ForwardListChangeToUpdater( - UIListContentsChangeType type, - int oldIndex, - int newIndex, - int count) - { - switch (type) - { - case UIListContentsChangeType.Remove: - this._updater.RemoveIndex(oldIndex); - this._updater.AdjustIndices(oldIndex, -1); - break; - case UIListContentsChangeType.Move: - int lowThreshold; - int highThreshold; - int amt; - if (oldIndex < newIndex) - { - lowThreshold = oldIndex; - highThreshold = newIndex; - amt = -1; - } - else - { - lowThreshold = newIndex; - highThreshold = oldIndex; - amt = 1; - } - this._updater.RemoveIndex(oldIndex); - this._updater.AdjustIndices(lowThreshold, highThreshold, amt); - this._updater.AddIndex(newIndex); - break; - case UIListContentsChangeType.Insert: - this._updater.AdjustIndices(newIndex, 1); - break; - case UIListContentsChangeType.InsertRange: - this._updater.AdjustIndices(newIndex, count); - break; - case UIListContentsChangeType.Clear: - case UIListContentsChangeType.Reset: - this._updater.Clear(); - break; - } - } - - public bool SlowDataRequestsEnabled => this._wantSlowDataRequests; - - public void NotifyRequestSlowData(int index) => NativeApi.SUCCEEDED(NativeApi.SpUIXListFetchSlowData(this._interface, index)); - - public void SlowDataAcquireComplete(int index) - { - bool flag = false; - if (this._slowDataAcquireCompleteHandler != null) - flag = this._slowDataAcquireCompleteHandler(this, index); - if (flag) - return; - this._updater.NotifySlowDataAcquireComplete(index); - } - - public SlowDataAcquireCompleteHandler SlowDataAcquireCompleteHandler - { - get => this._slowDataAcquireCompleteHandler; - set - { - if (!(value != this._slowDataAcquireCompleteHandler)) - return; - this._slowDataAcquireCompleteHandler = value; - this.UpdateCallbackRegistration(); - } - } - - public void NotifyVisualsCreated(int index) - { - if (this._updater != null) - this._updater.AddIndex(index); - NativeApi.SUCCEEDED(NativeApi.SpUIXListNotifyVisualsCreated(this._interface, index)); - } - - public void NotifyVisualsReleased(int index) - { - if (this._updater != null) - this._updater.RemoveIndex(index); - NativeApi.SUCCEEDED(NativeApi.SpUIXListNotifyVisualsReleased(this._interface, index)); - } - - public Repeater RepeaterHost - { - get => this._repeater; - set - { - if (value == this._repeater) - return; - this._repeater = value; - this.UpdateCallbackRegistration(); - } - } - - private void UpdateCallbackRegistration() => this.UpdateCallbackRegistration(false); - - private void UpdateCallbackRegistration(bool inDispose) - { - bool flag = (this._slowDataAcquireCompleteHandler != null || this._contentsChanged != null || this._repeater != null) & !inDispose; - if (flag == this._callbacksRegistered) - return; - if (flag) - { - int num1 = (int)NativeApi.SpUIXListRegisterCallbacks(this._interface, this); - } - else - { - int num2 = (int)NativeApi.SpUIXListUnregisterCallbacks(this._interface, this); - if (this._updater != null) - this._updater.Clear(); - } - this._callbacksRegistered = flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs deleted file mode 100644 index b882cab..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs +++ /dev/null @@ -1,272 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllProxyObject : NotifyObjectBase, ISchemaInfo, IDisposableObject - { - private IntPtr _nativeObject; - private ulong _handle; - private DllTypeSchemaBase _type; - private static object s_finalizeLock = new object(); - private static bool s_pendingAppThreadRelease = false; - private static Vector s_pendingReleases; - private static SimpleCallback s_releaseOnAppThread = new SimpleCallback(ReleaseFinalizedObjects); - private static DllProxyObjectHandleTable s_handleTable; - - public static void CreateHandleTable() => s_handleTable = new DllProxyObjectHandleTable(); - - public static void ReleaseOutstandingProxies() - { - s_pendingAppThreadRelease = true; - GC.Collect(); - GC.WaitForPendingFinalizers(); - foreach (IDisposableObject disposableObject in s_handleTable) - disposableObject.Dispose(disposableObject); - ReleaseFinalizedObjects(); - } - - public static DllProxyObject Wrap(IntPtr nativeObject) - { - DllProxyObject dllProxyObject = null; - uint typeID; - if (!NativeApi.SUCCEEDED(NativeApi.SpGetTypeID(nativeObject, out typeID))) - return null; - TypeSchema type = DllLoadResult.MapType(typeID); - if (type != null) - { - dllProxyObject = GetExistingProxy(nativeObject) ?? WrapNewObject(nativeObject, type); - NativeApi.SpReleaseExternalObject(nativeObject); - } - return dllProxyObject; - } - - private static DllProxyObject GetExistingProxy(IntPtr nativeObject) - { - DllProxyObject dllProxyObject = null; - ulong state; - NativeApi.SpGetStateCache(nativeObject, out state); - if (state != 0UL && !s_handleTable.LookupByHandle(state, out dllProxyObject)) - ErrorManager.ReportError("IUIXObject::GetStateCache retrieved unexpected value"); - return dllProxyObject; - } - - private static DllProxyObject WrapNewObject(IntPtr nativeObject, TypeSchema type) - { - DllProxyObject dllProxyObject = null; - uint marshalAs; - IntPtr nativeImpl; - if (DetermineProxyInterfaceForObject(nativeObject, type, out marshalAs, out nativeImpl)) - { - switch (marshalAs) - { - case 4294967281: - case 4294967286: - case 4294967287: - case 4294967288: - case 4294967289: - case 4294967290: - case 4294967291: - dllProxyObject = new DllProxyObject(); - break; - case 4294967285: - dllProxyObject = new DllProxyList(); - break; - case uint.MaxValue: - dllProxyObject = new DllProxyObject(); - break; - default: - dllProxyObject = new DllProxyObject(); - break; - } - dllProxyObject.Load(nativeObject, nativeImpl, (DllTypeSchemaBase)type); - } - return dllProxyObject; - } - - private static bool DetermineProxyInterfaceForObject( - IntPtr nativeObject, - TypeSchema type, - out uint marshalAs, - out IntPtr nativeImpl) - { - bool flag = false; - DllTypeSchemaBase dllTypeSchemaBase = (DllTypeSchemaBase)type; - marshalAs = dllTypeSchemaBase.MarshalAs; - if (marshalAs == uint.MaxValue) - { - flag = true; - nativeImpl = IntPtr.Zero; - } - else if (CheckNativeReturn(NativeApi.SpQueryForMarshalAsInterface(nativeObject, marshalAs, out nativeImpl)) && nativeImpl != IntPtr.Zero) - flag = true; - else - ErrorManager.ReportError("Object didn't implement expected interface '{0}'", marshalAs); - return flag; - } - - protected DllProxyObject() => this._handle = 0UL; - - ~DllProxyObject() => RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._nativeObject, this._handle, this.OwningLoadResult)); - - protected static void RegisterAppThreadRelease(DllProxyObject.AppThreadReleaseEntry entry) - { - lock (s_finalizeLock) - { - if (s_pendingReleases == null) - s_pendingReleases = new Vector(); - s_pendingReleases.Add(entry); - if (s_pendingAppThreadRelease) - return; - s_pendingAppThreadRelease = true; - DeferredCall.Post(DispatchPriority.Idle, s_releaseOnAppThread); - } - } - - private void Load(IntPtr nativeObject, IntPtr marshalAs, DllTypeSchemaBase type) - { - this._type = type; - this._nativeObject = nativeObject; - this.OwningLoadResult.RegisterProxyUsage(); - this._handle = s_handleTable.RegisterProxy(this); - NativeApi.SpSetStateCache(this._nativeObject, this._handle); - NativeApi.SpAddRefExternalObject(this._nativeObject); - this.LoadWorker(nativeObject, marshalAs); - } - - protected virtual void LoadWorker(IntPtr nativeObject, IntPtr nativeMarshalAs) - { - } - - public static HRESULT OnChangeNotification(IntPtr nativeObject, uint id) - { - HRESULT hresult = new HRESULT(0); - DllProxyObject existingProxy = GetExistingProxy(nativeObject); - if (existingProxy != null) - { - string id1 = null; - if (existingProxy._type is DllTypeSchema type) - id1 = type.MapChangeID(id); - if (id1 != null) - { - existingProxy.FireNotification(id1); - } - else - { - ErrorManager.ReportError("Invalid UIXID '0x{0:X8}' passed to NotifyChange", id); - hresult = new HRESULT(-2147024809); - } - } - return hresult; - } - - public ulong Handle => this._handle; - - public IntPtr NativeObject => this._nativeObject; - - public TypeSchema TypeSchema => _type; - - protected DllLoadResult OwningLoadResult => this._type.Owner as DllLoadResult; - - private static bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXObject"); - - bool IDisposableObject.IsDisposed => this._nativeObject == IntPtr.Zero; - - void IDisposableObject.DeclareOwner(object owner) - { - } - - void IDisposableObject.TransferOwnership(object owner) - { - } - - void IDisposableObject.Dispose(object owner) - { - this.OnDispose(); - new DllProxyObject.AppThreadReleaseEntry(this._nativeObject, this._handle, this.OwningLoadResult).Release(); - GC.SuppressFinalize(this); - } - - protected virtual void OnDispose() - { - } - - private static void ReleaseFinalizedObjects() - { - Vector pendingReleases; - lock (s_finalizeLock) - { - pendingReleases = s_pendingReleases; - s_pendingReleases = null; - s_pendingAppThreadRelease = false; - } - if (pendingReleases == null || pendingReleases.Count == 0) - return; - foreach (DllProxyObject.AppThreadReleaseEntry threadReleaseEntry in pendingReleases) - threadReleaseEntry.Release(); - lock (s_finalizeLock) - { - if (s_pendingAppThreadRelease) - return; - pendingReleases.Clear(); - s_pendingReleases = pendingReleases; - } - } - - private static string DEBUG_FormatIntPtr(IntPtr ptr) => (string)null; - - public string DEBUG_Description() => string.Empty; - - public override string ToString() => this._type is DllTypeSchema type ? type.InvokeToString(this) : this.GetType().Name; - - public struct AppThreadReleaseEntry - { - private bool _releaseHandle; - public IntPtr _nativeObject; - public ulong _handle; - public DllLoadResult _loadResult; - - public AppThreadReleaseEntry(IntPtr nativeObject, ulong handle, DllLoadResult loadResult) - { - this._nativeObject = nativeObject; - this._handle = handle; - this._loadResult = loadResult; - this._releaseHandle = true; - } - - public AppThreadReleaseEntry(IntPtr nativeObject) - { - this._nativeObject = nativeObject; - this._releaseHandle = false; - this._handle = 0UL; - this._loadResult = null; - } - - public void Release() - { - if (this._releaseHandle) - { - s_handleTable.ReleaseProxy(this._handle); - ulong state; - NativeApi.SpGetStateCache(this._nativeObject, out state); - if ((long)this._handle == (long)state) - NativeApi.SpSetStateCache(this._nativeObject, 0UL); - } - NativeApi.SpReleaseExternalObject(this._nativeObject); - if (!this._releaseHandle) - return; - this._loadResult.UnregisterProxyUsage(); - } - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectHandleTable.cs deleted file mode 100644 index 6b6b27e..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectHandleTable.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyObjectHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllProxyObjectHandleTable : DllProxyHandleTable - { - public bool LookupByHandle(ulong handle, out DllProxyObject obj) - { - object obj1; - bool flag = this.LookupByHandleWorker(handle, out obj1); - obj = (DllProxyObject)obj1; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectReference.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectReference.cs deleted file mode 100644 index d381512..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObjectReference.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyObjectReference -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public struct DllProxyObjectReference - { - private GCHandle _reference; - - public object Value - { - get - { - object obj = null; - if (this._reference.IsAllocated) - obj = this._reference.Target; - return obj; - } - set - { - if (value != null) - { - if (this._reference.IsAllocated) - this._reference.Target = value; - else - this._reference = GCHandle.Alloc(value, GCHandleType.Weak); - } - else - { - if (!this._reference.IsAllocated) - return; - this._reference.Free(); - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs deleted file mode 100644 index 7384fa6..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs +++ /dev/null @@ -1,311 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllProxyServices -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.Session; -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllProxyServices : IRawUIXServices - { - private static StringProxyHandleTable s_stringTable; - - public static void Startup() - { - DllProxyObject.CreateHandleTable(); - s_stringTable = new StringProxyHandleTable(); - int num = (int)NativeApi.SpRegisterNativeServicesCallbacks(new DllProxyServices()); - } - - public static void Shutdown() - { - DllProxyObject.ReleaseOutstandingProxies(); - NativeMarkupDataType.ReleaseOutstandingProxies(); - NativeApi.SpUnregisterNativeServicesCallbacks(); - s_stringTable = null; - } - - HRESULT IRawUIXServices.NotifyChangeForObject( - IntPtr nativeObject, - uint changedID) - { - return DllProxyObject.OnChangeNotification(nativeObject, changedID); - } - - private static void Crash(string message) => throw new Exception(message); - - void IRawUIXServices.Crash(string message) => Crash(message); - - public static string GetString(IntPtr nativeStringObject) - { - string str = null; - if (nativeStringObject != IntPtr.Zero) - { - ulong handle; - NativeApi.SpGetStringHandle(nativeStringObject, out handle); - if (handle == 0UL) - NativeApi.SpConvertStringToManaged(nativeStringObject, out handle); - s_stringTable.LookupByHandle(handle, out str); - NativeApi.SpReleaseExternalObject(nativeStringObject); - } - return str; - } - - public static void CreateNativeString(string value, out IntPtr nativeObject) - { - nativeObject = IntPtr.Zero; - if (value == null || NativeApi.SpCreateNativeString(AllocateStringHandle(value), value.Length, out nativeObject)) - return; - Crash("Unable to allocate string"); - } - - unsafe ulong IRawUIXServices.AllocateString(char* value, out int length) - { - string str = new string(value); - length = str.Length; - return AllocateStringHandle(str); - } - - private static ulong AllocateStringHandle(string value) - { - ulong handle; - s_stringTable.GetStringHandle(value, out handle); - return handle; - } - - unsafe void IRawUIXServices.CopyString( - ulong handle, - char* target, - uint targetSize) - { - string source; - s_stringTable.LookupByHandle(handle, out source); - NativeApi.SpCopyString(source, target, targetSize); - } - - unsafe char* IRawUIXServices.PinString(ulong handle) - { - char* chPtr; - s_stringTable.PinString(handle, out chPtr); - return chPtr; - } - - void IRawUIXServices.UnpinString(ulong handle) => s_stringTable.UnpinString(handle); - - void IRawUIXServices.ReleaseString(ulong handle) => s_stringTable.ReleaseStringHandle(handle, out string _); - - public static UIImage GetImage(IntPtr nativeImageObject) - { - UIImage uiImage = null; - if (nativeImageObject != IntPtr.Zero) - { - ulong handle; - NativeApi.SpGetImageHandle(nativeImageObject, out handle); - if (handle == 0UL) - NativeApi.SpConvertImageToManaged(nativeImageObject, out handle); - uiImage = (UIImage)GCHandle.FromIntPtr(new IntPtr((long)handle)).Target; - NativeApi.SpReleaseExternalObject(nativeImageObject); - } - return uiImage; - } - - public static MarkupDataQuery GetDataQuery(IntPtr nativeQuery) - { - MarkupDataQuery markupDataQuery = null; - if (nativeQuery != IntPtr.Zero) - { - ulong frameworkQuery; - int internalHandle = (int)NativeApi.SpDataBaseObjectGetInternalHandle(nativeQuery, out frameworkQuery); - markupDataQuery = NativeMarkupDataQuery.LookupByHandle(frameworkQuery); - NativeApi.SpReleaseExternalObject(nativeQuery); - } - return markupDataQuery; - } - - public static MarkupDataType GetDataType(IntPtr nativeObject) - { - NativeMarkupDataType nativeMarkupDataType = null; - if (nativeObject != IntPtr.Zero) - { - ulong frameworkQuery; - int internalHandle = (int)NativeApi.SpDataBaseObjectGetInternalHandle(nativeObject, out frameworkQuery); - if (frameworkQuery != 0UL) - nativeMarkupDataType = NativeMarkupDataType.LookupByHandle(frameworkQuery); - if (nativeMarkupDataType == null) - { - ulong typeHandle; - NativeApi.SpDataBaseObjectGetTypeHandle(nativeObject, out typeHandle); - nativeMarkupDataType = NativeMarkupDataType.Create(typeHandle, nativeObject); - } - NativeApi.SpReleaseExternalObject(nativeObject); - } - return nativeMarkupDataType; - } - - public static void CreateNativeImage(UIImage image, out IntPtr nativeObject) - { - nativeObject = IntPtr.Zero; - if (image == null || !NativeApi.SpCreateNativeImage(GetImageHandle(image, image.Source), image.Source, out nativeObject).IsError()) - return; - Crash("Unable to allocate native image object"); - } - - private static ulong GetImageHandle(UIImage image, string source) => (ulong)GCHandle.ToIntPtr(GCHandle.Alloc(image)).ToInt64(); - - unsafe ulong IRawUIXServices.AllocateImageFromUri( - string uri, - NativeApi.IMAGE_DECODE_PARAMS* decodeParams) - { - Size maximumSize; - bool flippable; - bool antialiasEdges; - CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); - return GetImageHandle(new UriImage(uri, Inset.Zero, maximumSize, flippable, antialiasEdges), uri); - } - - unsafe ulong IRawUIXServices.AllocateImageFromBits( - string ID, - NativeApi.UIX_RAW_IMAGE_INFO* imageInfo, - NativeApi.IMAGE_DECODE_PARAMS* decodeParams) - { - SurfaceFormat surfaceFormat; - ImageFormatUtils.RawImageFormatToSurfaceFormat(imageInfo->format, out surfaceFormat); - Size maximumSize; - bool flippable; - bool antialiasEdges; - CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); - Size imageSize = new Size(imageInfo->width, imageInfo->height); - return GetImageHandle(new RawImage(ID, imageSize, imageInfo->stride, surfaceFormat, imageInfo->bits, true, Inset.Zero, maximumSize, flippable, antialiasEdges), ID); - } - - unsafe void IRawUIXServices.RemoveCachedImage( - string ID, - NativeApi.IMAGE_DECODE_PARAMS* decodeParams) - { - Size maximumSize; - bool flippable; - bool antialiasEdges; - CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); - UriImage.RemoveCache(ID, maximumSize, flippable, antialiasEdges); - } - - private static unsafe void CrackDecodeParams( - NativeApi.IMAGE_DECODE_PARAMS* decodeParams, - out Size maximumSize, - out bool flippable, - out bool antialiasEdges) - { - if ((IntPtr)decodeParams != IntPtr.Zero) - { - maximumSize = new Size(decodeParams->maximumWidth, decodeParams->maximumHeight); - flippable = decodeParams->Flippable; - antialiasEdges = decodeParams->AntialiasEdges; - } - else - { - maximumSize = Size.Zero; - flippable = false; - antialiasEdges = false; - } - } - - void IRawUIXServices.ReleaseImage(ulong handle) => GCHandle.FromIntPtr(new IntPtr((long)handle)).Free(); - - void IRawUIXServices.RegisterDataProvider( - string providerName, - IntPtr nativeFactoryCallback) - { - MarkupDataProvider.RegisterDataProvider(new NativeDataProviderWrapper(providerName, nativeFactoryCallback)); - } - - unsafe void IRawUIXServices.GetDataMapping( - string providerName, - ulong typeHandle, - IntPtr nativeCallback) - { - if (!(TypeSchema.LookupById(typeHandle) is MarkupDataTypeSchema typeSchema)) - return; - MarkupDataMapping dataMapping = MarkupDataProvider.FindDataMapping(providerName, typeSchema); - NativeApi.NativeDataMappingEntry[] entries = new NativeApi.NativeDataMappingEntry[dataMapping.Mappings.Length]; - for (int index = 0; index < entries.Length; ++index) - { - MarkupDataMappingEntry mapping = dataMapping.Mappings[index]; - entries[index].Source = mapping.Source; - entries[index].Target = mapping.Target; - entries[index].PropertyName = mapping.Property.Name; - entries[index].PropertyTypeName = mapping.Property.PropertyType.Name; - entries[index].PropertyTypeHandle = mapping.Property.PropertyType.UniqueId; - if (mapping.Property.AlternateType != null) - { - entries[index].UnderlyingCollectionTypeName = mapping.Property.AlternateType.Name; - entries[index].UnderlyingCollectionTypeHandle = mapping.Property.AlternateType.UniqueId; - } - // ISSUE: untyped stack allocation - UIXVariant* destination = stackalloc UIXVariant[sizeof(UIXVariant)]; - UIXVariant.MarshalObject(mapping.DefaultValue, destination); - entries[index].DefaultValue = *destination; - } - int num = (int)NativeApi.SpDataProviderReportDataMapping(nativeCallback, providerName, typeHandle, (uint)entries.Length, entries); - } - - void IRawUIXServices.NotifyChangeForDataObject( - ulong frameworkObjectHandle, - string propertyName, - UIXVariant.VariantType variantType) - { - MarkupDataTypeBaseObject dataTypeBaseObject = null; - switch (variantType) - { - case UIXVariant.VariantType.UIXDataQuery: - dataTypeBaseObject = NativeMarkupDataQuery.LookupByHandle(frameworkObjectHandle); - break; - case UIXVariant.VariantType.UIXDataType: - dataTypeBaseObject = NativeMarkupDataType.LookupByHandle(frameworkObjectHandle); - break; - } - if (dataTypeBaseObject == null) - return; - propertyName = NotifyService.CanonicalizeString(propertyName); - dataTypeBaseObject.FireNotificationThreadSafe(propertyName); - } - - IntPtr IRawUIXServices.GetAppWindowHandle() - { - IntPtr num = IntPtr.Zero; - if (UISession.Default != null && UISession.Default.Form != null) - num = UISession.Default.Form.__WindowHandle; - return num; - } - - void IRawUIXServices.ReportError(bool isWarning, string message) - { - if (isWarning) - ErrorManager.ReportWarning(message); - else - ErrorManager.ReportError(message); - } - - void IRawUIXServices.LowPriorityDeferredInvoke(IntPtr callback, IntPtr data) => DeferredCall.Post(DispatchPriority.Idle, new SimpleCallback(new DllProxyServices.DeferredInvokeState() - { - _callback = callback, - _data = data - }.Thunk)); - - public class DeferredInvokeState - { - public IntPtr _callback; - public IntPtr _data; - - public void Thunk() => NativeApi.SpCallDeferredInvokeProc(this._callback, this._data); - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs deleted file mode 100644 index 4c65357..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs +++ /dev/null @@ -1,548 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllTypeSchema : DllTypeSchemaBase - { - private const uint UIX_E_SCHEMA_ERRORS_REPORTED = 2147774470; - private IntPtr _type; - private uint _defaultConstructorID; - - public DllTypeSchema(DllLoadResult owner, uint ID, IntPtr typeSchema) - : base(owner, ID) - => this._type = typeSchema; - - public bool Load(UIXIDVerifier idVerifier) - { - DllLoadResult.PushContext(OwnerLoadResult); - bool flag = this.QueryTypeName() && this.QueryIsRuntimeImmutable() && (this.QueryBaseType() && this.QueryConstructors(idVerifier)) && (this.QueryProperties(idVerifier) && this.QueryMethods(idVerifier) && this.QueryEvents(idVerifier)) && this.QueryMarshalAs(); - DllLoadResult.PopContext(); - return flag; - } - - [Conditional("DEBUG")] - public void DEBUG_DumpType() - { - } - - [Conditional("DEBUG")] - private void DEBUG_DumpConstructors() - { - bool flag = false; - if (this.HasDefaultConstructor) - flag = true; - if (this._constructors != null) - { - foreach (DllConstructorSchema constructorSchema in this._constructors.Values) - ; - flag = true; - } - int num = flag ? 1 : 0; - } - - [Conditional("DEBUG")] - private void DEBUG_DumpProperties() - { - if (this._properties == null) - return; - foreach (DllPropertySchema dllPropertySchema in this._properties.Values) - ; - } - - [Conditional("DEBUG")] - private void DEBUG_DumpMethods() - { - if (this._methods == null) - return; - foreach (DllMethodSchema dllMethodSchema in this._methods.Values) - ; - } - - [Conditional("DEBUG")] - private void DEBUG_DumpEvents() - { - if (this._events == null) - return; - foreach (DllEventSchema dllEventSchema in this._events.Values) - ; - } - - private unsafe bool QueryTypeName() - { - bool flag = false; - char* name; - if (this.CheckNativeReturn(NativeApi.SpQueryTypeName(this._type, out name))) - { - this._name = new string(name); - flag = true; - } - return flag; - } - - private bool QueryIsRuntimeImmutable() - { - bool flag = false; - bool isRuntimeImmutable; - if (this.CheckNativeReturn(NativeApi.SpIsRuntimeImmutable(this._type, out isRuntimeImmutable))) - { - this.SetBit(Bits.IsRuntimeImmutable, isRuntimeImmutable); - flag = true; - } - return flag; - } - - private bool QueryBaseType() - { - bool flag = false; - uint baseTypeID; - if (this.CheckNativeReturn(NativeApi.SpQueryBaseType(this._type, out baseTypeID))) - { - this._baseType = DllLoadResult.MapType(baseTypeID); - flag = true; - } - return flag; - } - - private bool QueryConstructors(UIXIDVerifier idVerifier) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryConstructorCount(this._type, out count))) - { - bool flag2 = false; - this._constructors = new Map((int)count); - for (uint index = 0; index < count; ++index) - { - if (!this.LoadConstructor(index, idVerifier)) - flag2 = true; - } - flag1 = !flag2; - } - return flag1; - } - - private bool LoadConstructor(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr constructor; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetConstructorSchema(this._type, index, out constructor, out ID))) - { - if (constructor != IntPtr.Zero) - { - DllConstructorSchema constructorSchema = new DllConstructorSchema(this, ID); - flag = constructorSchema.Load(constructor); - if (flag) - { - this._constructors[new MethodSignatureKey(constructorSchema.ParameterTypes)] = constructorSchema; - if (constructorSchema.ParameterTypes.Length == 0) - { - this.SetBit(Bits.HasDefaultConstructor, true); - this._defaultConstructorID = ID; - } - flag = idVerifier.RegisterID(ID); - } - else - constructorSchema.Dispose(this); - NativeApi.SpReleaseExternalObject(constructor); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXType::GetConstructor"); - } - return flag; - } - - private bool QueryProperties(UIXIDVerifier idVerifier) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryPropertyCount(this._type, out count))) - { - bool flag2 = false; - this._properties = new Map((int)count); - for (uint index = 0; index < count; ++index) - { - if (!this.LoadProperty(index, idVerifier)) - flag2 = true; - } - flag1 = !flag2; - } - return flag1; - } - - private bool LoadProperty(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr property; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetPropertySchema(this._type, index, out property, out ID))) - { - if (property != IntPtr.Zero) - { - DllPropertySchema dllPropertySchema = new DllPropertySchema(this, ID); - flag = dllPropertySchema.Load(property); - if (flag) - { - this._properties[ID] = dllPropertySchema; - flag = idVerifier.RegisterID(ID); - } - NativeApi.SpReleaseExternalObject(property); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXType::GetProperty"); - } - return flag; - } - - private bool QueryMethods(UIXIDVerifier idVerifier) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryMethodCount(this._type, out count))) - { - bool flag2 = false; - this._methods = new Map((int)count); - for (uint index = 0; index < count; ++index) - { - if (!this.LoadMethod(index, idVerifier)) - flag2 = true; - } - flag1 = !flag2; - } - return flag1; - } - - private bool LoadMethod(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr method; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetMethodSchema(this._type, index, out method, out ID))) - { - if (method != IntPtr.Zero) - { - DllMethodSchema dllMethodSchema = new DllMethodSchema(this, ID); - flag = dllMethodSchema.Load(method); - if (flag) - { - this._methods[new MethodSignatureKey(dllMethodSchema.Name, dllMethodSchema.ParameterTypes)] = dllMethodSchema; - flag = idVerifier.RegisterID(ID); - } - else - dllMethodSchema.Dispose(this); - NativeApi.SpReleaseExternalObject(method); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXType::GetMethod"); - } - return flag; - } - - private bool QueryEvents(UIXIDVerifier idVerifier) - { - bool flag1 = false; - uint count; - if (this.CheckNativeReturn(NativeApi.SpQueryEventCount(this._type, out count))) - { - bool flag2 = false; - this._events = new Map((int)count); - for (uint index = 0; index < count; ++index) - { - if (!this.LoadEvent(index, idVerifier)) - flag2 = true; - } - flag1 = !flag2; - } - return flag1; - } - - private bool QueryMarshalAs() - { - uint interopEquivalent; - bool flag = this.CheckNativeReturn(NativeApi.SpGetMarshalAs(this._type, out interopEquivalent)); - if (flag) - flag = this.ValidateMarshalAs(interopEquivalent); - if (flag) - flag = this.RegisterMarshalAsEquivalents(interopEquivalent); - return flag; - } - - private bool RegisterMarshalAsEquivalents(uint declaredMarshalAs) - { - bool flag = true; - switch (declaredMarshalAs) - { - case 4294967281: - case 4294967286: - case 4294967287: - case 4294967288: - case 4294967289: - case 4294967290: - case 4294967291: - case uint.MaxValue: - return flag; - case 4294967285: - RegisterOneWayEquivalence(this, ListSchema.Type); - goto case 4294967281; - default: - ErrorManager.ReportError("Invalid MarshalAs '{0}' returned from IUIXType::MarshalAs", _marshalAs); - flag = false; - goto case 4294967281; - } - } - - private bool ValidateMarshalAs(uint declaredMarshalAs) - { - bool flag = true; - uint num = uint.MaxValue; - TypeSchema typeSchema = this.Base; - DllTypeSchemaBase dllTypeSchemaBase; - for (dllTypeSchemaBase = typeSchema as DllTypeSchemaBase; typeSchema != null && dllTypeSchemaBase == null; dllTypeSchemaBase = typeSchema as DllTypeSchemaBase) - typeSchema = typeSchema.Base; - if (dllTypeSchemaBase != null) - num = dllTypeSchemaBase.MarshalAs; - if (num != uint.MaxValue) - { - if (declaredMarshalAs != uint.MaxValue) - { - ErrorManager.ReportError("Invalid MarshalAs '{0}' on type '{1}'. Only a single MarshalAs value is permitted through a type heirarchy, and '{2}' was already declared.", declaredMarshalAs, Name, num); - flag = false; - } - else - declaredMarshalAs = num; - } - this._marshalAs = declaredMarshalAs; - return flag; - } - - private bool LoadEvent(uint index, UIXIDVerifier idVerifier) - { - bool flag = false; - IntPtr eventObj; - uint ID; - if (this.CheckNativeReturn(NativeApi.SpGetEventSchema(this._type, index, out eventObj, out ID))) - { - if (eventObj != IntPtr.Zero) - { - DllEventSchema dllEventSchema = new DllEventSchema(this, ID); - flag = dllEventSchema.Load(eventObj); - if (flag) - { - this._events[ID] = dllEventSchema; - flag = idVerifier.RegisterID(ID); - } - else - dllEventSchema.Dispose(this); - NativeApi.SpReleaseExternalObject(eventObj); - } - else - ErrorManager.ReportError("NULL object returned from {0}", "IUIXType::GetEvent"); - } - return flag; - } - - protected override void OnDispose() - { - base.OnDispose(); - NativeApi.SpReleaseExternalObject(this._type); - this._type = IntPtr.Zero; - } - - public string MapChangeID(uint id) - { - string name = null; - DllTypeSchema dllTypeSchema = this; - while (dllTypeSchema != null && !dllTypeSchema.MapChangeIDWorker(id, out name)) - dllTypeSchema = dllTypeSchema._baseType as DllTypeSchema; - if (name == null) - ErrorManager.ReportError("ChangeNotification received for ID '0x{0:X8}' which isn't a property or event on '{1}'", id, Name); - return name; - } - - private bool MapChangeIDWorker(uint id, out string name) - { - bool flag = false; - name = null; - if ((int)UIXID.GetSchemaComponent(id) == OwnerLoadResult.SchemaComponent) - { - DllPropertySchema dllPropertySchema; - if (this._properties != null && this._properties.TryGetValue(id, out dllPropertySchema)) - { - name = dllPropertySchema.Name; - flag = true; - } - else - { - DllEventSchema dllEventSchema; - if (this._events != null && this._events.TryGetValue(id, out dllEventSchema)) - { - name = dllEventSchema.Name; - flag = true; - } - } - } - return flag; - } - - public override object ConstructDefault() => this.Construct(this._defaultConstructorID, null); - - public unsafe object Construct(uint constructorID, object[] parameters) - { - DllProxyObject dllProxyObject = null; - UIXVariant* uixVariantPtr = null; - int count = 0; - if (parameters != null) - { - count = parameters.Length; - // ISSUE: untyped stack allocation - var uixVariantStack = stackalloc UIXVariant[sizeof(UIXVariant) * count]; - uixVariantPtr = uixVariantStack; - UIXVariant.MarshalObjectArray(parameters, uixVariantPtr); - } - ErrorWatermark watermark = ErrorManager.Watermark; - IntPtr nativeObject; - uint hr = NativeApi.SpInvokeConstructor(this._type, constructorID, uixVariantPtr, (uint)count, out nativeObject); - if (NativeApi.SUCCEEDED(hr)) - dllProxyObject = DllProxyObject.Wrap(nativeObject); - else - this.ReportError(hr, ErrorContext.Construct, this, watermark); - if ((IntPtr)uixVariantPtr != IntPtr.Zero) - UIXVariant.CleanupMarshalledObjects(uixVariantPtr, count); - return dllProxyObject; - } - - public object GetPropertyValue(object instance, DllPropertySchema property) - { - IntPtr nativeObject = IntPtr.Zero; - if (!property.IsStatic) - nativeObject = ((DllProxyObject)instance).NativeObject; - ErrorWatermark watermark = ErrorManager.Watermark; - object obj = null; - UIXVariant propertyValue1; - uint propertyValue2 = NativeApi.SpGetPropertyValue(this._type, nativeObject, property.ID, out propertyValue1); - if (NativeApi.SUCCEEDED(propertyValue2)) - obj = UIXVariant.GetValue(propertyValue1, this.Owner); - else - this.ReportError(propertyValue2, ErrorContext.PropertyGet, property, watermark); - return obj; - } - - public unsafe void SetPropertyValue(object instance, DllPropertySchema property, object value) - { - // ISSUE: untyped stack allocation - UIXVariant* uixVariantPtr = stackalloc UIXVariant[sizeof(UIXVariant)]; - UIXVariant.MarshalObject(value, uixVariantPtr); - IntPtr nativeObject = IntPtr.Zero; - if (!property.IsStatic) - nativeObject = ((DllProxyObject)instance).NativeObject; - ErrorWatermark watermark = ErrorManager.Watermark; - uint hr = NativeApi.SpSetPropertyValue(this._type, nativeObject, property.ID, uixVariantPtr); - if (NativeApi.FAILED(hr)) - this.ReportError(hr, ErrorContext.PropertySet, property, watermark); - UIXVariant.CleanupMarshalledObject(uixVariantPtr); - } - - public unsafe object InvokeMethod(object instance, DllMethodSchema method, object[] parameters) - { - object obj = null; - UIXVariant* uixVariantPtr = null; - int count = 0; - if (parameters != null && parameters.Length > 0) - { - count = parameters.Length; - // ISSUE: untyped stack allocation - var uixVariantStack = stackalloc UIXVariant[sizeof(UIXVariant) * count]; - uixVariantPtr = uixVariantStack; - UIXVariant.MarshalObjectArray(parameters, uixVariantPtr); - } - IntPtr nativeObject = IntPtr.Zero; - if (!method.IsStatic) - nativeObject = ((DllProxyObject)instance).NativeObject; - ErrorWatermark watermark = ErrorManager.Watermark; - UIXVariant returnValue; - uint hr = NativeApi.SpInvokeMethod(this._type, nativeObject, method.ID, uixVariantPtr, (uint)count, out returnValue); - if (NativeApi.SUCCEEDED(hr)) - obj = UIXVariant.GetValue(returnValue, this.Owner); - else - this.ReportError(hr, ErrorContext.MethodInvoke, method, watermark); - if ((IntPtr)uixVariantPtr != IntPtr.Zero) - UIXVariant.CleanupMarshalledObjects(uixVariantPtr, count); - return obj; - } - - public string InvokeToString(DllProxyObject proxy) - { - string str = null; - ErrorWatermark watermark = ErrorManager.Watermark; - IntPtr nativeStringObject; - uint hr = NativeApi.SpInvokeToString(this._type, proxy.NativeObject, out nativeStringObject); - if (NativeApi.SUCCEEDED(hr)) - str = DllProxyServices.GetString(nativeStringObject); - else - this.ReportError(hr, ErrorContext.ToString, this, watermark); - return str; - } - - private DllLoadResult OwnerLoadResult => (DllLoadResult)this.Owner; - - private void ReportError( - uint hr, - DllTypeSchema.ErrorContext contextType, - object context, - ErrorWatermark watermark) - { - if (hr == 2147774470U && watermark.ErrorsDetected) - return; - string message; - switch (contextType) - { - case ErrorContext.MethodInvoke: - DllMethodSchema dllMethodSchema = (DllMethodSchema)context; - message = string.Format("Error 0x{0:X8} occurred invoking method {1}.{2} from {3}.", hr, dllMethodSchema.Owner.Name, dllMethodSchema.Name, dllMethodSchema.Owner.Owner.Uri); - break; - case ErrorContext.ToString: - DllTypeSchema dllTypeSchema1 = (DllTypeSchema)context; - message = string.Format("Error 0x{0:X8} occurred invoking ToString on type {1} from {2}.", hr, dllTypeSchema1.Name, dllTypeSchema1.Owner.Uri); - break; - case ErrorContext.PropertyGet: - DllPropertySchema dllPropertySchema1 = (DllPropertySchema)context; - message = string.Format("Error 0x{0:X8} occurred reading property {1}.{2} from {3}.", hr, dllPropertySchema1.Owner.Name, dllPropertySchema1.Name, dllPropertySchema1.Owner.Owner.Uri); - break; - case ErrorContext.PropertySet: - DllPropertySchema dllPropertySchema2 = (DllPropertySchema)context; - message = string.Format("Error 0x{0:X8} occurred writing property {1}.{2} from {3}.", hr, dllPropertySchema2.Owner.Name, dllPropertySchema2.Name, dllPropertySchema2.Owner.Owner.Uri); - break; - case ErrorContext.Construct: - DllTypeSchema dllTypeSchema2 = (DllTypeSchema)context; - message = string.Format("Error 0x{0:X8} occurred constructing object of type {1} from {2}.", hr, dllTypeSchema2.Name, dllTypeSchema2.Owner.Uri); - break; - default: - message = "public error"; - break; - } - ErrorManager.ReportError(message); - } - - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXType"); - - private enum ErrorContext - { - MethodInvoke, - ToString, - PropertyGet, - PropertySet, - Construct, - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs deleted file mode 100644 index be698fb..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs +++ /dev/null @@ -1,215 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.DllTypeSchemaBase -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using System; -using System.Collections.Specialized; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class DllTypeSchemaBase : TypeSchema - { - private BitVector32 _bits; - protected uint _typeID; - protected Map _constructors; - protected Map _properties; - protected Map _methods; - protected Map _events; - protected string _name; - protected TypeSchema _baseType; - protected uint _marshalAs; - - protected DllTypeSchemaBase(DllLoadResult owner, uint ID) - : base(owner) - => this._typeID = ID; - - protected override void OnDispose() - { - base.OnDispose(); - if (this._constructors != null) - { - foreach (KeyValueEntry constructor in this._constructors) - { - if (constructor.Value != null) - constructor.Value.Dispose(this); - } - this._constructors = null; - } - if (this._properties != null) - { - foreach (DllPropertySchema dllPropertySchema in this._properties.Values) - dllPropertySchema?.Dispose(this); - this._properties = null; - } - if (this._methods != null) - { - foreach (KeyValueEntry method in this._methods) - { - if (method.Value != null) - method.Value.Dispose(this); - } - this._methods = null; - } - if (this._events == null) - return; - foreach (DllEventSchema dllEventSchema in this._events.Values) - dllEventSchema?.Dispose(this); - } - - public override object ConstructDefault() => (object)null; - - public override int FindTypeHint => (int)this._typeID; - - public override bool HasDefaultConstructor => this.GetBit(Bits.HasDefaultConstructor); - - public override bool IsRuntimeImmutable => this.GetBit(Bits.IsRuntimeImmutable); - - public override ConstructorSchema FindConstructor(TypeSchema[] parameters) - { - DllConstructorSchema constructorSchema = null; - if (this._constructors != null) - this._constructors.TryGetValue(new MethodSignatureKey(parameters), out constructorSchema); - return constructorSchema; - } - - public override PropertySchema FindProperty(string name) - { - if (this._properties != null) - { - foreach (DllPropertySchema dllPropertySchema in this._properties.Values) - { - if (dllPropertySchema != null && dllPropertySchema.Name == name) - return dllPropertySchema; - } - } - if (this.Equivalents != null) - { - foreach (TypeSchema equivalent in this.Equivalents) - { - PropertySchema property = equivalent.FindProperty(name); - if (property != null) - return property; - } - } - return null; - } - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) - { - if (this._methods != null) - { - DllMethodSchema dllMethodSchema = null; - if (this._methods.TryGetValue(new MethodSignatureKey(name, parameters), out dllMethodSchema)) - return dllMethodSchema; - } - if (this.Equivalents != null) - { - foreach (TypeSchema equivalent in this.Equivalents) - { - MethodSchema method = equivalent.FindMethod(name, parameters); - if (method != null) - return method; - } - } - return null; - } - - public override EventSchema FindEvent(string name) - { - DllEventSchema dllEventSchema1 = null; - if (this._events != null) - { - foreach (DllEventSchema dllEventSchema2 in this._events.Values) - { - if (dllEventSchema2 != null && dllEventSchema2.Name == name) - { - dllEventSchema1 = dllEventSchema2; - break; - } - } - } - return dllEventSchema1; - } - - public override PropertySchema[] Properties - { - get - { - PropertySchema[] propertySchemaArray = PropertySchema.EmptyList; - if (this._properties != null && this._properties.Count > 0) - { - propertySchemaArray = new PropertySchema[this._properties.Count]; - int num = 0; - foreach (PropertySchema propertySchema in this._properties.Values) - propertySchemaArray[num++] = propertySchema; - } - return propertySchemaArray; - } - } - - public uint MarshalAs => this._marshalAs; - - public override string Name => this._name; - - public override string AlternateName => (string)null; - - public override TypeSchema Base => this._baseType; - - public override Type RuntimeType => DllLoadResult.RuntimeTypeForMarshalAs(this._marshalAs); - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - instance = null; - return Result.Fail("Not implemented"); - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => false; - - public override void EncodeBinary(ByteCodeWriter writer, object instance) - { - } - - public override object DecodeBinary(ByteCodeReader reader) => (object)null; - - public override bool SupportsBinaryEncoding => false; - - public override object PerformOperation(object left, object right, OperationType op) => (object)null; - - public override bool SupportsOperation(OperationType op) => false; - - public override bool IsNullAssignable => true; - - public override object FindCanonicalInstance(string name) => (object)null; - - public override void InitializeInstance(ref object instance) - { - } - - public override bool HasInitializer => false; - - public override bool Contractual => false; - - public override bool IsNativeAssignableFrom(object check) => false; - - public override bool IsNativeAssignableFrom(TypeSchema check) => false; - - public override bool Disposable => true; - - protected bool GetBit(DllTypeSchemaBase.Bits lookupBit) => this._bits[(int)lookupBit]; - - protected void SetBit(DllTypeSchemaBase.Bits changeBit, bool value) => this._bits[(int)changeBit] = value; - - protected enum Bits : uint - { - HasDefaultConstructor = 1, - IsRuntimeImmutable = 2, - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataQueryHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataQueryHandleTable.cs deleted file mode 100644 index d6add5a..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataQueryHandleTable.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.MarkupDataQueryHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class MarkupDataQueryHandleTable : DllProxyHandleTable - { - public bool LookupByHandle(ulong handle, out MarkupDataQuery obj) - { - object obj1; - bool flag = this.LookupByHandleWorker(handle, out obj1); - obj = (MarkupDataQuery)obj1; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataTypeHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataTypeHandleTable.cs deleted file mode 100644 index dd12560..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/MarkupDataTypeHandleTable.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.MarkupDataTypeHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class MarkupDataTypeHandleTable : DllProxyHandleTable - { - public bool LookupByHandle(ulong handle, out MarkupDataType obj) - { - object obj1; - bool flag = this.LookupByHandleWorker(handle, out obj1); - obj = (MarkupDataType)obj1; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/NativeDataProviderWrapper.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/NativeDataProviderWrapper.cs deleted file mode 100644 index 78482f8..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/NativeDataProviderWrapper.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.NativeDataProviderWrapper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class NativeDataProviderWrapper : IDataProvider - { - private string _name; - private IntPtr _factory; - - public NativeDataProviderWrapper(string name, IntPtr factory) - { - this._name = name; - this._factory = factory; - } - - public string Name => this._name; - - public MarkupDataQuery Build(MarkupDataQuerySchema querySchema) => new NativeMarkupDataQuery(querySchema, this); - - public IntPtr ConstructQuery( - string providerName, - ulong queryTypeHandle, - ulong resultTypeHandle, - ulong queryHandle) - { - IntPtr query; - int num = (int)NativeApi.SpDataProviderConstructQuery(this._factory, providerName, queryTypeHandle, resultTypeHandle, queryHandle, out query); - return query; - } - - public override string ToString() => string.Format("{0} ({1})", _name, _factory); - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/NativeTraceCategories.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/NativeTraceCategories.cs deleted file mode 100644 index 9c766e9..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/NativeTraceCategories.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.NativeTraceCategories -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - [StructLayout(LayoutKind.Sequential, Size = 1)] - public struct NativeTraceCategories - { - public const byte TypeLoading = 1; - public const byte Handles = 2; - public const byte PropertyChanges = 4; - public const byte Invocations = 8; - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs deleted file mode 100644 index dddf4a0..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.ProxyHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class ProxyHandleTable - { - public const ulong c_InvalidHandle = 0; - private uint _tableIndex; - private static uint s_tableCount; - - protected ProxyHandleTable() => this._tableIndex = s_tableCount++; - - protected uint TableIndex => this._tableIndex; - - [Conditional("DEBUG")] - public static void DEBUG_AssertValidHandle(ulong handle) - { - } - - public static string DEBUG_FormatHandle(ulong handle) => string.Empty; - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable`1.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable`1.cs deleted file mode 100644 index bb17e0b..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable`1.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.ProxyHandleTable`1 -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class ProxyHandleTable : ProxyHandleTable - { - private const int c_uninitialized = 0; - private const int c_invalidFreeListValue = -1; - private const int c_slotInUse = -2; - private const int c_tableShift = 30; - private const int c_lifetimeCountMask = 1073741823; - private const ulong c_uniquenessMask = 4294967295; - private const ulong c_indexMask = 4294967295; - private const int c_uniquenessShift = 32; - private ProxyHandleTable.ListEntry[] _entries; - private int _oldestFreeIndex; - private int _newestFreeIndex; - private int _filledBoundary; - private uint _lifetimeCount; - - public ProxyHandleTable() - { - this._oldestFreeIndex = -1; - this._newestFreeIndex = -1; - this._filledBoundary = 0; - } - - protected bool InternalLookupByHandle(ulong handle, out T obj) - { - bool flag = false; - obj = default(T); - int index; - uint uniquenessBits; - this.DecodeHandle(handle, out index, out uniquenessBits); - ProxyHandleTable.ListEntry entry = this._entries[index]; - if ((int)uniquenessBits == (int)entry.Uniquifier) - { - flag = true; - obj = entry.Value; - } - return flag; - } - - protected ulong AllocateHandle(T obj) - { - this.EnsureSpaceForNewEntry(); - int index = this.ReserveIndexForNewEntry(); - return this.StoreNewEntry(obj, index); - } - - private void EnsureSpaceForNewEntry() - { - if (this._entries != null && (this._oldestFreeIndex != -1 || this._filledBoundary != this._entries.Length)) - return; - this.EnlargeList(); - } - - private int ReserveIndexForNewEntry() - { - int index; - if (this._oldestFreeIndex != -1) - { - index = this.FreeListIndexToRealIndex(this._oldestFreeIndex); - this._oldestFreeIndex = this._entries[index].FreeIndex; - if (this._oldestFreeIndex == -1) - this._newestFreeIndex = -1; - } - else - index = this._filledBoundary++; - return index; - } - - private ulong StoreNewEntry(T obj, int index) - { - ulong handle; - uint uniquifier; - this.GenerateHandle(index, out handle, out uniquifier); - int index1 = -2; - this.AddRef(ref index1); - this._entries[index].Uniquifier = uniquifier; - this._entries[index].Value = obj; - this._entries[index].FreeIndex = index1; - return handle; - } - - private int FreeListIndexToRealIndex(int index) => index - 1; - - private int RealIndexToFreeListIndex(int index) => index + 1; - - private void GenerateHandle(int insertIndex, out ulong handle, out uint uniquifier) - { - ++this._lifetimeCount; - uniquifier = this.TableIndex << 30; - uniquifier |= this._lifetimeCount & 1073741823U; - handle = (ulong)uniquifier << 32; - uint num = (uint)insertIndex; - handle |= num; - } - - private void DecodeHandle(ulong handle, out int index, out uint uniquenessBits) - { - index = (int)((long)handle & uint.MaxValue); - ulong num = 18446744069414584320; - uniquenessBits = (uint)((handle & num) >> 32); - } - - private void EnlargeList() - { - if (this._entries == null) - { - this._entries = new ProxyHandleTable.ListEntry[4]; - } - else - { - ProxyHandleTable.ListEntry[] listEntryArray = new ProxyHandleTable.ListEntry[this._entries.Length * 2]; - Array.Copy(_entries, listEntryArray, this._entries.Length); - this._entries = listEntryArray; - } - } - - protected void AddRefHandle(ulong handle) - { - int index; - this.DecodeHandle(handle, out index, out uint _); - this.AddRef(ref this._entries[index].FreeIndex); - } - - private void AddRef(ref int index) => --index; - - private void Release(ref int index) => ++index; - - protected bool ReleaseHandle(ulong handle, out T oldValue) - { - bool flag = false; - int index; - this.DecodeHandle(handle, out index, out uint _); - this.Release(ref this._entries[index].FreeIndex); - oldValue = this._entries[index].Value; - if (this._entries[index].FreeIndex == -2) - { - flag = true; - this.RemoveEntry(index); - } - return flag; - } - - private void RemoveEntry(int index) - { - this._entries[index].Value = default(T); - int freeListIndex = this.RealIndexToFreeListIndex(index); - if (this._newestFreeIndex != -1) - this._entries[this.FreeListIndexToRealIndex(this._newestFreeIndex)].FreeIndex = freeListIndex; - else - this._oldestFreeIndex = freeListIndex; - this._newestFreeIndex = freeListIndex; - this._entries[index].FreeIndex = -1; - } - - protected ProxyHandleTable.ProxyHandleTableEnumerator GetTableEnumerator() => new ProxyHandleTable.ProxyHandleTableEnumerator(this); - - [Conditional("DEBUG")] - public void ValidateList() - { - } - - private struct ListEntry - { - public T Value; - public int FreeIndex; - public uint Uniquifier; - } - - public struct ProxyHandleTableEnumerator - { - private const int START_INVALID_INDEX = -1; - private ProxyHandleTable _table; - private int _index; - - public ProxyHandleTableEnumerator(ProxyHandleTable table) - { - this._table = table; - this._index = -1; - } - - public bool MoveNext() - { - do - { - ++this._index; - } - while (this._index < this._table._filledBoundary && this._table._entries[this._index].FreeIndex > -2); - return this._index < this._table._filledBoundary; - } - - public T Current => this._table._entries[this._index].Value; - - public void Reset() => this._index = -1; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/StringPinState.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/StringPinState.cs deleted file mode 100644 index 5b140fc..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/StringPinState.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.StringPinState -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public struct StringPinState - { - public GCHandle _gcHandle; - public int _pinCount; - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs deleted file mode 100644 index 190e6c3..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.StringProxyHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class StringProxyHandleTable : ProxyHandleTable - { - private static Map s_stringToHandleLookup; - private static Map s_pinnedStrings; - - public bool GetStringHandle(string value, out ulong handle) - { - if (s_stringToHandleLookup == null) - s_stringToHandleLookup = new Map(); - bool flag = s_stringToHandleLookup.TryGetValue(value, out handle); - if (flag) - { - this.AddRefHandle(handle); - } - else - { - handle = this.AllocateHandle(value); - s_stringToHandleLookup[value] = handle; - } - return !flag; - } - - public bool ReleaseStringHandle(ulong handle, out string value) - { - bool flag = this.ReleaseHandle(handle, out value); - if (flag) - s_stringToHandleLookup.Remove(value); - return flag; - } - - public bool LookupByHandle(ulong handle, out string obj) => this.InternalLookupByHandle(handle, out obj); - - public unsafe int PinString(ulong handle, out char* value) - { - if (s_pinnedStrings == null) - s_pinnedStrings = new Map(); - StringPinState stringPinState; - if (s_pinnedStrings.TryGetValue(handle, out stringPinState)) - { - ++stringPinState._pinCount; - } - else - { - string str; - this.LookupByHandle(handle, out str); - stringPinState._gcHandle = GCHandle.Alloc(str, GCHandleType.Pinned); - stringPinState._pinCount = 1; - } - s_pinnedStrings[handle] = stringPinState; - value = (char*)stringPinState._gcHandle.AddrOfPinnedObject().ToPointer(); - return stringPinState._pinCount; - } - - public int UnpinString(ulong handle) - { - StringPinState pinnedString = s_pinnedStrings[handle]; - --pinnedString._pinCount; - if (pinnedString._pinCount == 0) - { - pinnedString._gcHandle.Free(); - s_pinnedStrings.Remove(handle); - } - return pinnedString._pinCount; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/TypeSchemaHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/TypeSchemaHandleTable.cs deleted file mode 100644 index 76a248e..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/TypeSchemaHandleTable.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.TypeSchemaHandleTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class TypeSchemaHandleTable : DllProxyHandleTable - { - public bool LookupByHandle(ulong handle, out TypeSchema obj) - { - object obj1; - bool flag = this.LookupByHandleWorker(handle, out obj1); - obj = (TypeSchema)obj1; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXID.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/UIXID.cs deleted file mode 100644 index c785f55..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXID.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.UIXID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public static class UIXID - { - public const uint IntrinsicSchemaComponent = 65535; - public const uint IntrinsicSchemaID = 4294901760; - public const uint Invalid = 4294967295; - public const uint Bool = 4294967294; - public const uint Byte = 4294967293; - public const uint Double = 4294967292; - public const uint IBooleanChoice = 4294967291; - public const uint IByteRangedValue = 4294967290; - public const uint IChoice = 4294967289; - public const uint ICommand = 4294967288; - public const uint IDictionary = 4294967287; - public const uint IIntRangedValue = 4294967286; - public const uint IList = 4294967285; - public const uint Image = 4294967284; - public const uint Int32 = 4294967283; - public const uint Int64 = 4294967282; - public const uint IRangedValue = 4294967281; - public const uint Object = 4294967280; - public const uint Single = 4294967279; - public const uint String = 4294967278; - public const uint Void = 4294967277; - public const uint DataQuery = 4294967276; - public const uint DataType = 4294967275; - private const int SCHEMA_SHIFT = 16; - private const uint SCHEMA_MASK = 4294901760; - private const uint LOCAL_MASK = 65535; - - public static uint GetSchemaID(uint ID) => ID & 4294901760U; - - public static uint GetSchemaComponent(uint ID) => (ID & 4294901760U) >> 16; - - public static uint GetLocalComponent(uint ID) => ID & ushort.MaxValue; - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXIDVerifier.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/UIXIDVerifier.cs deleted file mode 100644 index b929ee1..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXIDVerifier.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.UIXIDVerifier -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public class UIXIDVerifier - { - private Map _uniqueIDs; - private DllLoadResult _loadResult; - - public UIXIDVerifier(DllLoadResult loadResult) - { - this._loadResult = loadResult; - this._uniqueIDs = new Map(); - } - - public bool RegisterID(uint ID) => this.CheckForSchemaMatch(ID) && this.CheckForDuplicate(ID); - - private bool CheckForSchemaMatch(uint ID) - { - bool flag = (int)UIXID.GetSchemaComponent(ID) == _loadResult.SchemaComponent; - if (!flag) - ErrorManager.ReportError("Schema component on ID '0x{0:X8}' doesn't match schema's ID '0x{1:X8}' on '{2}'", ID, _loadResult.SchemaComponent, _loadResult.Uri); - return flag; - } - - private bool CheckForDuplicate(uint ID) - { - uint num = 0; - bool flag = this._uniqueIDs.TryGetValue(ID, out num); - if (flag && num == 0U) - { - ErrorManager.ReportError("Duplicate ID '0x{0:X8}' found in schema from '{1}'", ID, _loadResult.Uri); - ++num; - } - this._uniqueIDs[ID] = num; - return !flag; - } - } -} diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs deleted file mode 100644 index 3cf3a5a..0000000 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs +++ /dev/null @@ -1,267 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CodeModel.Cpp.UIXVariant -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using System; - -namespace Microsoft.Iris.CodeModel.Cpp -{ - public struct UIXVariant - { - private UIXVariant.VariantType _type; - private long _union; - - public static object GetValue(UIXVariant inboundObject, LoadResult context) - { - switch (inboundObject._type) - { - case VariantType.Empty: - return null; - case VariantType.Bool: - return inboundObject._integer != 0L; - case VariantType.Byte: - return (byte)inboundObject._integer; - case VariantType.Int32: - return (int)inboundObject._integer; - case VariantType.Int64: - return inboundObject._integer; - case VariantType.Single: - return inboundObject._float; - case VariantType.Double: - return inboundObject._double; - case VariantType.Enum: - return GetEnumValue(inboundObject._enum._value, inboundObject._enum._type); - case VariantType.UIXObject: - return GetObjectValue(inboundObject._pointer, context); - case VariantType.UIXString: - return DllProxyServices.GetString(inboundObject._pointer); - case VariantType.UIXImage: - return DllProxyServices.GetImage(inboundObject._pointer); - case VariantType.UIXDataQuery: - return DllProxyServices.GetDataQuery(inboundObject._pointer); - case VariantType.UIXDataType: - return DllProxyServices.GetDataType(inboundObject._pointer); - default: - return null; - } - } - - private static object GetEnumValue(int enumValue, uint typeID) => DllLoadResult.MapType(typeID) is DllEnumSchema dllEnumSchema ? dllEnumSchema.GetBoxedValue(enumValue) : null; - - private static object GetObjectValue(IntPtr value, LoadResult context) - { - object obj = null; - DllLoadResult.PushContext(context); - if (value != IntPtr.Zero) - obj = DllProxyObject.Wrap(value); - DllLoadResult.PopContext(); - return obj; - } - - public static unsafe void MarshalObjectArray(object[] objects, UIXVariant* destination) - { - for (int index = 0; index < objects.Length; ++index) - MarshalObject(objects[index], destination + index); - } - - public static unsafe void MarshalObject(object o, UIXVariant* destination) - { - switch (o) - { - case null: - destination->SetToNull(); - break; - case bool flag: - destination->SetIntegerValue(flag ? 1L : 0L, VariantType.Bool); - break; - case byte num: - destination->SetIntegerValue(num, VariantType.Byte); - break; - case int num: - destination->SetIntegerValue(num, VariantType.Int32); - break; - case long num: - destination->SetIntegerValue(num, VariantType.Int64); - break; - case float num: - destination->SetFloatValue(num, VariantType.Single); - break; - case double num: - destination->SetDoubleValue(num, VariantType.Double); - break; - case string _: - IntPtr nativeObject1; - DllProxyServices.CreateNativeString((string)o, out nativeObject1); - destination->SetPointerValue(nativeObject1, VariantType.UIXString); - break; - case DllProxyObject _: - destination->SetPointerValue(((DllProxyObject)o).NativeObject, VariantType.UIXObject); - NativeApi.SpAddRefExternalObject(destination->_pointer); - break; - case DllEnumProxy _: - DllEnumProxy dllEnumProxy = (DllEnumProxy)o; - UIXVariant.EnumValue enumValue; - enumValue._value = dllEnumProxy.Value; - enumValue._type = dllEnumProxy.Type.ID; - destination->SetEnumValue(enumValue); - break; - case UIImage _: - IntPtr nativeObject2; - DllProxyServices.CreateNativeImage((UIImage)o, out nativeObject2); - destination->SetPointerValue(nativeObject2, VariantType.UIXImage); - break; - case MarkupDataQuery _: - MarkupDataQuery markupDataQuery = (MarkupDataQuery)o; - destination->SetPointerValue(markupDataQuery.ExternalNativeObject, VariantType.UIXDataQuery); - break; - case MarkupDataType _: - MarkupDataType markupDataType = (MarkupDataType)o; - destination->SetPointerValue(markupDataType.ExternalNativeObject, VariantType.UIXDataType); - break; - } - } - - public static unsafe void CleanupMarshalledObjects(UIXVariant* source, int count) - { - for (int index = 0; index < count; ++index) - CleanupMarshalledObject(source + index); - } - - public static unsafe void CleanupMarshalledObject(UIXVariant* source) - { - if (source->_type != VariantType.UIXObject || !(source->_pointer != IntPtr.Zero)) - return; - NativeApi.SpReleaseExternalObject(source->_pointer); - } - - private void SetToNull() - { - this._pointer = IntPtr.Zero; - this._type = VariantType.UIXObject; - } - - private void SetPointerValue(IntPtr value, UIXVariant.VariantType type) - { - this._pointer = value; - this._type = type; - } - - private void SetIntegerValue(long value, UIXVariant.VariantType type) - { - this._integer = value; - this._type = type; - } - - private void SetFloatValue(float value, UIXVariant.VariantType type) - { - this._float = value; - this._type = type; - } - - private void SetDoubleValue(double value, UIXVariant.VariantType type) - { - this._double = value; - this._type = type; - } - - private void SetEnumValue(UIXVariant.EnumValue value) - { - this._enum = value; - this._type = VariantType.Enum; - } - - private unsafe IntPtr _pointer - { - get - { - var value = this._union; - return *(IntPtr*)&value; - } - set - { - long num; - *(IntPtr*)&num = value; - this._union = num; - } - } - - private unsafe UIXVariant.EnumValue _enum - { - get - { - var value = this._union; - return *(UIXVariant.EnumValue*)&value; - } - set - { - long num; - *(UIXVariant.EnumValue*)&num = value; - this._union = num; - } - } - - private long _integer - { - get => this._union; - set => this._union = value; - } - - private unsafe float _float - { - get - { - var value = this._union; - return *(float*)&value; - } - set - { - long num; - *(float*)&num = value; - this._union = num; - } - } - - private unsafe double _double - { - get - { - var value = this._union; - return *(double*)&value; - } - set - { - long num; - *(double*)&num = value; - this._union = num; - } - } - - public enum VariantType - { - Empty = 0, - Bool = 1, - Byte = 2, - Int32 = 3, - Int64 = 4, - Single = 5, - Double = 6, - Enum = 7, - UIXObject = 128, // 0x00000080 - UIXString = 129, // 0x00000081 - UIXImage = 130, // 0x00000082 - UIXDataQuery = 131, // 0x00000083 - UIXDataType = 132, // 0x00000084 - } - - private struct EnumValue - { - public int _value; - public uint _type; - } - } -} diff --git a/UIX/Microsoft/Iris/Command.cs b/UIX/Microsoft/Iris/Command.cs deleted file mode 100644 index 014c46a..0000000 --- a/UIX/Microsoft/Iris/Command.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Command -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using System; -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public class Command : ModelItem, ICommand, INotifyPropertyChanged - { - private static readonly EventCookie s_invokedEvent = EventCookie.ReserveSlot(); - private bool _availableFlag = true; - private InvokePolicy _priority = InvokePolicy.AsynchronousNormal; - - public Command(IModelItemOwner owner, string description, EventHandler invokedHandler) - : base(owner, description) - { - if (invokedHandler == null) - return; - this.Invoked += invokedHandler; - } - - public Command(IModelItemOwner owner, EventHandler invokedHandler) - : this(owner, null, invokedHandler) - { - } - - public Command(IModelItemOwner owner) - : this(owner, null, null) - { - } - - public Command() - : this(null) - { - } - - public virtual bool Available - { - get - { - using (this.ThreadValidator) - return this._availableFlag; - } - set - { - using (this.ThreadValidator) - { - if (this._availableFlag == value) - return; - this._availableFlag = value; - this.FirePropertyChanged(nameof(Available)); - } - } - } - - public InvokePolicy Priority - { - get - { - using (this.ThreadValidator) - return this._priority; - } - set - { - using (this.ThreadValidator) - { - if (this._priority == value) - return; - this._priority = value; - this.FirePropertyChanged(nameof(Priority)); - } - } - } - - public void Invoke() => this.Invoke(this.Priority); - - public void Invoke(InvokePolicy invokePolicy) - { - using (this.ThreadValidator) - { - if (invokePolicy != InvokePolicy.Synchronous) - { - DispatchPriority priority = DispatchPriority.AppEvent; - if (invokePolicy == InvokePolicy.AsynchronousLowPri) - priority = DispatchPriority.Idle; - DeferredCall.Post(priority, new SimpleCallback(this.InvokeWorker)); - } - else - this.InvokeWorker(); - } - } - - private void InvokeWorker() - { - if (this.IsDisposed) - return; - this.FirePropertyChanged("Invoked"); - if (this.GetEventHandler(s_invokedEvent) is EventHandler eventHandler) - eventHandler(this, EventArgs.Empty); - this.OnInvoked(); - } - - public event EventHandler Invoked - { - add - { - using (this.ThreadValidator) - this.AddEventHandler(s_invokedEvent, value); - } - remove - { - using (this.ThreadValidator) - this.RemoveEventHandler(s_invokedEvent, value); - } - } - - protected virtual void OnInvoked() - { - } - } -} diff --git a/UIX/Microsoft/Iris/CompilerInput.cs b/UIX/Microsoft/Iris/CompilerInput.cs deleted file mode 100644 index 85db6df..0000000 --- a/UIX/Microsoft/Iris/CompilerInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.CompilerInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public struct CompilerInput - { - public string SourceFileName; - public string OutputFileName; - public string IdentityUri; - } -} diff --git a/UIX/Microsoft/Iris/Data/INotifyList.cs b/UIX/Microsoft/Iris/Data/INotifyList.cs deleted file mode 100644 index 33a9d0b..0000000 --- a/UIX/Microsoft/Iris/Data/INotifyList.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.INotifyList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Data -{ - public interface INotifyList : IList, ICollection, IEnumerable - { - void Move(int oldIndex, int newIndex); - - event UIListContentsChangedHandler ContentsChanged; - } -} diff --git a/UIX/Microsoft/Iris/Data/IResourceProvider.cs b/UIX/Microsoft/Iris/Data/IResourceProvider.cs deleted file mode 100644 index 5c5c2c8..0000000 --- a/UIX/Microsoft/Iris/Data/IResourceProvider.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.IResourceProvider -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public interface IResourceProvider - { - Resource GetResource(string hierarchicalPart, string uri, bool forceSynchronous); - } -} diff --git a/UIX/Microsoft/Iris/Data/IVirtualList.cs b/UIX/Microsoft/Iris/Data/IVirtualList.cs deleted file mode 100644 index 295e015..0000000 --- a/UIX/Microsoft/Iris/Data/IVirtualList.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.IVirtualList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; -using System.Collections; - -namespace Microsoft.Iris.Data -{ - public interface IVirtualList : INotifyList, IList, ICollection, IEnumerable - { - void RequestItem(int idx, ItemRequestCallback callback); - - bool IsItemAvailable(int idx); - - void NotifyVisualsCreated(int idx); - - void NotifyVisualsReleased(int idx); - - Repeater RepeaterHost { get; set; } - - bool SlowDataRequestsEnabled { get; } - - void NotifyRequestSlowData(int index); - - SlowDataAcquireCompleteHandler SlowDataAcquireCompleteHandler { get; set; } - } -} diff --git a/UIX/Microsoft/Iris/Data/IntListUtility.cs b/UIX/Microsoft/Iris/Data/IntListUtility.cs deleted file mode 100644 index f20d1c0..0000000 --- a/UIX/Microsoft/Iris/Data/IntListUtility.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.IntListUtility -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections.Generic; - -namespace Microsoft.Iris.Data -{ - public static class IntListUtility - { - public static int IndexOf(List list, int item) - { - for (int index = 0; index < list.Count; ++index) - { - if (list[index] == item) - return index; - } - return -1; - } - - public static int IndexOf(Vector list, int item) - { - for (int index = 0; index < list.Count; ++index) - { - if (list[index] == item) - return index; - } - return -1; - } - - public static bool Contains(List list, int item) => IndexOf(list, item) != -1; - - public static bool Contains(Vector list, int item) => IndexOf(list, item) != -1; - } -} diff --git a/UIX/Microsoft/Iris/Data/ItemRequestCallback.cs b/UIX/Microsoft/Iris/Data/ItemRequestCallback.cs deleted file mode 100644 index 8a78301..0000000 --- a/UIX/Microsoft/Iris/Data/ItemRequestCallback.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.ItemRequestCallback -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public delegate void ItemRequestCallback(object sender, int index, object item); -} diff --git a/UIX/Microsoft/Iris/Data/ListUtility.cs b/UIX/Microsoft/Iris/Data/ListUtility.cs deleted file mode 100644 index 241fb96..0000000 --- a/UIX/Microsoft/Iris/Data/ListUtility.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.ListUtility -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Data -{ - public static class ListUtility - { - public static bool IsNullOrEmpty(IList list) => list == null || list.Count <= 0; - - public static bool IsNullOrEmpty(IVector list) => list == null || list.Count <= 0; - - public static bool IsValidIndex(IList list, int idx) => IsValidIndex(idx, list.Count); - - public static bool IsValidIndex(IVector list, int idx) => IsValidIndex(idx, list.Count); - - public static bool IsValidIndex(int idx, int itemsCount) - { - int num = itemsCount - 1; - return idx >= 0 && idx <= num; - } - - public static bool AreContentsEqual(IVector a, IVector b) - { - int num1 = 0; - if (a != null) - num1 = a.Count; - int num2 = 0; - if (b != null) - num2 = b.Count; - if (num1 != num2) - return false; - for (int index = 0; index < num1; ++index) - { - if (!IsEqual(a[index], b[index])) - return false; - } - return true; - } - - private static bool IsEqual(object a, object b) => a == null ? b == null : a.Equals(b); - - public static void GetWrappedIndex( - int idx, - int itemsCount, - out int dataIndex, - out int generationValue) - { - if (itemsCount == 0) - { - dataIndex = 0; - generationValue = 0; - } - else - { - dataIndex = idx % itemsCount; - if (dataIndex < 0) - dataIndex = itemsCount + dataIndex; - generationValue = idx / itemsCount; - if (idx >= 0 || dataIndex == 0) - return; - --generationValue; - } - } - - public static int GetUnwrappedIndex(int dataIndex, int generationValue, int itemsCount) - { - int num = dataIndex + generationValue * itemsCount; - if (num < 0 && generationValue > 0) - num = int.MaxValue; - else if (num > 0 && generationValue < 0) - num = int.MinValue; - return num; - } - } -} diff --git a/UIX/Microsoft/Iris/Data/Resource.cs b/UIX/Microsoft/Iris/Data/Resource.cs deleted file mode 100644 index b64f35e..0000000 --- a/UIX/Microsoft/Iris/Data/Resource.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.Resource -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using System; - -namespace Microsoft.Iris.Data -{ - public abstract class Resource - { - protected string _uri; - private bool _forceSynchronous; - private IntPtr _buffer; - private uint _length; - private bool _requiresMemoryFree; - private ResourceStatus _status; - private string _errorDetails; - private int _acquisitions; - private ResourceAcquisitionCompleteHandler _completeHandlers; - - public Resource(string uri, bool forceSynchronous) - { - this._uri = uri; - this._forceSynchronous = forceSynchronous; - this._status = ResourceStatus.NeedsAcquire; - } - - public string Uri => this._uri; - - public abstract string Identifier { get; } - - public void Acquire() => this.Acquire(null); - - public void Acquire(ResourceAcquisitionCompleteHandler completeHandler) - { - ++this._acquisitions; - if (completeHandler != null) - this._completeHandlers += completeHandler; - if (this._status == ResourceStatus.Acquiring) - return; - if (this._status != ResourceStatus.Available) - { - this._status = ResourceStatus.Acquiring; - this._errorDetails = null; - this.StartAcquisition(this._forceSynchronous); - } - else - { - if (completeHandler == null) - return; - completeHandler(this); - } - } - - public void Free() => this.Free(null); - - public void Free(ResourceAcquisitionCompleteHandler completeHandler) - { - --this._acquisitions; - if (completeHandler != null) - this._completeHandlers -= completeHandler; - if (this._acquisitions != 0) - return; - if (this._status == ResourceStatus.Acquiring) - this.CancelAcquisition(); - else if (this._buffer != IntPtr.Zero) - { - if (this._requiresMemoryFree) - FreeNativeBuffer(this._buffer); - this._buffer = IntPtr.Zero; - } - this._status = ResourceStatus.NeedsAcquire; - } - - public ResourceStatus Status - { - get => this._status; - set => this._status = value; - } - - public string ErrorDetails => this._errorDetails; - - public IntPtr Buffer => this._buffer; - - public uint Length => this._length; - - public bool ForceSynchronous => this._forceSynchronous; - - protected abstract void StartAcquisition(bool forceSynchronous); - - protected abstract void CancelAcquisition(); - - protected void NotifyAcquisitionComplete( - IntPtr buffer, - uint length, - bool requiresMemoryFree, - string errorDetails) - { - this._buffer = buffer; - this._length = length; - this._requiresMemoryFree = requiresMemoryFree; - if (buffer != IntPtr.Zero) - { - this._status = ResourceStatus.Available; - } - else - { - this._status = ResourceStatus.Error; - if (errorDetails == null) - errorDetails = string.Format("Failed to acquire resource '{0}'", Identifier); - this._errorDetails = errorDetails; - } - if (this._completeHandlers == null) - return; - this._completeHandlers(this); - } - - protected static IntPtr AllocNativeBuffer(uint length) => NativeApi.MemAlloc(length, false); - - protected static void FreeNativeBuffer(IntPtr buffer) => NativeApi.MemFree(buffer); - - private void FireAcquisitionCompleteHandlers() - { - if (this._completeHandlers == null) - return; - this._completeHandlers(this); - this._completeHandlers = null; - } - - public override string ToString() => this._uri; - } -} diff --git a/UIX/Microsoft/Iris/Data/ResourceAcquisitionCompleteHandler.cs b/UIX/Microsoft/Iris/Data/ResourceAcquisitionCompleteHandler.cs deleted file mode 100644 index 18139e2..0000000 --- a/UIX/Microsoft/Iris/Data/ResourceAcquisitionCompleteHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.ResourceAcquisitionCompleteHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public delegate void ResourceAcquisitionCompleteHandler(Resource resource); -} diff --git a/UIX/Microsoft/Iris/Data/ResourceManager.cs b/UIX/Microsoft/Iris/Data/ResourceManager.cs deleted file mode 100644 index 3cdfa37..0000000 --- a/UIX/Microsoft/Iris/Data/ResourceManager.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.ResourceManager -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Data -{ - public sealed class ResourceManager - { - public const string ProtocolSeparator = "://"; - private Vector _redirects; - private Map _sourcesTable; - private static ResourceManager s_instance = new ResourceManager(); - - private ResourceManager() => this._sourcesTable = new Map(); - - public static ResourceManager Instance => s_instance; - - public void RegisterSource(string scheme, IResourceProvider source) => this._sourcesTable[scheme] = source; - - public void UnregisterSource(string scheme) => this._sourcesTable.Remove(scheme); - - public bool IsRegisteredSource(string scheme) => this._sourcesTable.ContainsKey(scheme); - - public Resource GetResource(string uri) => this.GetResource(uri, false); - - public Resource GetResource(string uri, bool forceSynchronous) - { - Resource resource = null; - if (this._redirects != null) - { - foreach (ResourceManager.UriRedirect redirect in this._redirects) - { - if (uri.StartsWith(redirect.fromPrefix, StringComparison.OrdinalIgnoreCase)) - { - if (redirect.toPrefix.Equals("{ERROR}", StringComparison.OrdinalIgnoreCase)) - { - ErrorManager.ReportError("Resource {0} not found, but should have been located by a markup redirect", uri); - return null; - } - resource = this.GetResourceWorker(redirect.toPrefix + uri.Substring(redirect.fromPrefix.Length), true); - if (resource != null) - { - resource.Acquire(); - bool flag = resource.Status == ResourceStatus.Available; - resource.Free(); - if (!flag) - resource = null; - } - } - if (resource != null) - break; - } - } - if (resource == null) - resource = this.GetResourceWorker(uri, forceSynchronous); - return resource; - } - - private Resource GetResourceWorker(string uri, bool forceSynchronous) - { - Resource resource = null; - string scheme; - string hierarchicalPart; - ParseUri(uri, out scheme, out hierarchicalPart); - if (string.IsNullOrEmpty(scheme) || string.IsNullOrEmpty(hierarchicalPart)) - { - ErrorManager.ReportWarning("Invalid resource uri: '{0}'", uri); - return null; - } - IResourceProvider resourceProvider; - if (this._sourcesTable.TryGetValue(scheme, out resourceProvider)) - resource = resourceProvider.GetResource(hierarchicalPart, uri, forceSynchronous); - else - ErrorManager.ReportWarning("Invalid resource protocol: '{0}'", scheme); - return resource; - } - - public static void ParseUri(string uri, out string scheme, out string hierarchicalPart) - { - int length = uri.IndexOf("://", StringComparison.Ordinal); - if (length > 0) - { - scheme = uri.Substring(0, length); - hierarchicalPart = uri.Substring(length + "://".Length); - } - else - { - scheme = null; - hierarchicalPart = uri; - } - } - - public void AddUriRedirect(string fromPrefix, string toPrefix) - { - ResourceManager.UriRedirect uriRedirect = new ResourceManager.UriRedirect(); - uriRedirect.fromPrefix = fromPrefix; - uriRedirect.toPrefix = toPrefix; - if (this._redirects == null) - this._redirects = new Vector(); - this._redirects.Add(uriRedirect); - } - - public static Resource AcquireResource(string uri) - { - ErrorWatermark watermark = ErrorManager.Watermark; - Resource resource = Instance.GetResource(uri, true); - if (resource == null) - return null; - resource.Acquire(); - if (resource.Status == ResourceStatus.Error) - { - if (resource.ErrorDetails != null) - ErrorManager.ReportError(resource.ErrorDetails); - else - ErrorManager.ReportError("Failed to acquire resource '{0}'", uri); - } - else if (resource.Status != ResourceStatus.Available) - ErrorManager.ReportError("Failed to acquire resource '{0}'. Resources that cannot be fetched synchronously are not valid in this context", uri); - if (watermark.ErrorsDetected) - { - resource.Free(); - resource = null; - } - return resource; - } - - public struct UriRedirect - { - public string fromPrefix; - public string toPrefix; - } - } -} diff --git a/UIX/Microsoft/Iris/Data/ResourceStatus.cs b/UIX/Microsoft/Iris/Data/ResourceStatus.cs deleted file mode 100644 index 2da8335..0000000 --- a/UIX/Microsoft/Iris/Data/ResourceStatus.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.ResourceStatus -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public enum ResourceStatus - { - NeedsAcquire, - Acquiring, - Available, - Error, - } -} diff --git a/UIX/Microsoft/Iris/Data/SingleArrayListCache.cs b/UIX/Microsoft/Iris/Data/SingleArrayListCache.cs deleted file mode 100644 index 63275b5..0000000 --- a/UIX/Microsoft/Iris/Data/SingleArrayListCache.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.SingleArrayListCache -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Data -{ - public struct SingleArrayListCache - { - private ArrayList _list; - - public ArrayList Acquire() - { - ArrayList arrayList = this._list; - this._list = null; - if (arrayList == null) - arrayList = new ArrayList(); - return arrayList; - } - - public void Release(ArrayList list) - { - list.Clear(); - this._list = list; - } - } -} diff --git a/UIX/Microsoft/Iris/Data/SlowDataAcquireCompleteHandler.cs b/UIX/Microsoft/Iris/Data/SlowDataAcquireCompleteHandler.cs deleted file mode 100644 index 04b6300..0000000 --- a/UIX/Microsoft/Iris/Data/SlowDataAcquireCompleteHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.SlowDataAcquireCompleteHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public delegate bool SlowDataAcquireCompleteHandler(IVirtualList list, int index); -} diff --git a/UIX/Microsoft/Iris/Data/StringUtility.cs b/UIX/Microsoft/Iris/Data/StringUtility.cs deleted file mode 100644 index 0007ea8..0000000 --- a/UIX/Microsoft/Iris/Data/StringUtility.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.StringUtility -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Text; - -namespace Microsoft.Iris.Data -{ - public static class StringUtility - { - public static string[] SplitAndTrim(char separator, string splitee) - { - string[] strArray = splitee.Split(separator); - for (int index = 0; index < strArray.Length; ++index) - strArray[index] = strArray[index].Trim(); - return strArray; - } - - public static string Unescape(string source, out int errorIndex, out string invalidSequence) - { - invalidSequence = null; - errorIndex = -1; - if (source.IndexOf('\\') == -1) - return source; - StringBuilder stringBuilder = new StringBuilder(source.Length); - int index = 0; - int startIndex = 0; - int length = source.Length; - bool flag = true; - while (flag && index < length) - { - startIndex = index; - char ch1 = source[index++]; - if (ch1 != '\\') - { - stringBuilder.Append(ch1); - } - else - { - if (index == length) - { - flag = false; - break; - } - char mode = source[index++]; - char ch2 = char.MinValue; - char ch3 = char.MinValue; - switch (mode) - { - case '"': - ch2 = '"'; - break; - case '\'': - ch2 = '\''; - break; - case '0': - ch2 = char.MinValue; - break; - case 'U': - case 'u': - case 'x': - uint result; - flag = ReadHexSequence(mode, source, ref index, length, out result); - if (flag) - { - if (result <= ushort.MaxValue) - { - ch2 = (char)result; - break; - } - if (result <= 1114111U) - { - ch2 = (char)((result - 65536U) / 1024U + 55296U); - ch3 = (char)((result - 65536U) % 1024U + 56320U); - break; - } - flag = false; - break; - } - break; - case '\\': - ch2 = '\\'; - break; - case 'a': - ch2 = '\a'; - break; - case 'b': - ch2 = '\b'; - break; - case 'f': - ch2 = '\f'; - break; - case 'n': - ch2 = '\n'; - break; - case 'r': - ch2 = '\r'; - break; - case 't': - ch2 = '\t'; - break; - case 'v': - ch2 = '\v'; - break; - default: - flag = false; - break; - } - if (flag) - { - stringBuilder.Append(ch2); - if (ch3 != char.MinValue) - stringBuilder.Append(ch3); - } - } - } - string str; - if (!flag) - { - str = null; - errorIndex = startIndex; - invalidSequence = source.Substring(startIndex, index - startIndex); - } - else - { - str = stringBuilder.ToString(); - errorIndex = -1; - } - return str; - } - - private static bool ReadHexSequence( - char mode, - string source, - ref int index, - int indexLast, - out uint result) - { - int num1; - int num2; - switch (mode) - { - case 'u': - num1 = 4; - num2 = 4; - break; - case 'x': - num1 = 1; - num2 = 4; - break; - default: - num1 = 8; - num2 = 8; - break; - } - int num3 = 0; - uint num4 = 0; - for (; index < indexLast && num3 < num2; ++num3) - { - char ch = source[index]; - uint num5; - if (ch >= '0' && ch <= '9') - num5 = ch - 48U; - else if (ch >= 'a' && ch <= 'f') - num5 = (uint)(10 + (ch - 97)); - else if (ch >= 'A' && ch <= 'F') - num5 = (uint)(10 + (ch - 65)); - else - break; - num4 = (num4 << 4) + num5; - ++index; - } - bool flag = num3 >= num1; - result = flag ? num4 : 0U; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/Data/UIListContentsChangeType.cs b/UIX/Microsoft/Iris/Data/UIListContentsChangeType.cs deleted file mode 100644 index 176710c..0000000 --- a/UIX/Microsoft/Iris/Data/UIListContentsChangeType.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.UIListContentsChangeType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Data -{ - public enum UIListContentsChangeType - { - Add, - AddRange, - Remove, - Move, - Insert, - InsertRange, - Clear, - Modified, - Reset, - } -} diff --git a/UIX/Microsoft/Iris/Data/UIListContentsChangedArgs.cs b/UIX/Microsoft/Iris/Data/UIListContentsChangedArgs.cs deleted file mode 100644 index 38fd640..0000000 --- a/UIX/Microsoft/Iris/Data/UIListContentsChangedArgs.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.UIListContentsChangedArgs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Data -{ - public class UIListContentsChangedArgs : EventArgs - { - private UIListContentsChangeType _type; - private int _oldIndex; - private int _newIndex; - private int _count; - - public UIListContentsChangedArgs( - UIListContentsChangeType type, - int oldIndex, - int newIndex, - int count) - { - this._count = count; - this._type = type; - this._oldIndex = oldIndex; - this._newIndex = newIndex; - } - - public UIListContentsChangedArgs(UIListContentsChangeType type, int oldIndex, int newIndex) - : this(type, oldIndex, newIndex, 1) - { - } - - public UIListContentsChangeType Type => this._type; - - public int OldIndex => this._oldIndex; - - public int NewIndex => this._newIndex; - - public int Count => this._count; - - public override string ToString() => string.Format("{0} type: {1}, old: {2}, new: {3}, count: {4}", base.ToString(), Type, OldIndex, NewIndex, Count); - } -} diff --git a/UIX/Microsoft/Iris/Data/UIListContentsChangedHandler.cs b/UIX/Microsoft/Iris/Data/UIListContentsChangedHandler.cs deleted file mode 100644 index 806b8a6..0000000 --- a/UIX/Microsoft/Iris/Data/UIListContentsChangedHandler.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.UIListContentsChangedHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Data -{ - public delegate void UIListContentsChangedHandler( - IList senderList, - UIListContentsChangedArgs args); -} diff --git a/UIX/Microsoft/Iris/Data/UpdateHelper.cs b/UIX/Microsoft/Iris/Data/UpdateHelper.cs deleted file mode 100644 index 9d36a6e..0000000 --- a/UIX/Microsoft/Iris/Data/UpdateHelper.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Data.UpdateHelper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace Microsoft.Iris.Data -{ - public class UpdateHelper - { - private const int c_millisecondsBetweenUpdates = 100; - private const int c_millisecondsAllowedPerUpdate = 10; - private UpdateHelper.ItemDistanceComparer _itemDistanceComparer; - private IVirtualList _virtualList; - private List _itemsToUpdate; - private int _lastInterestIndex; - private DispatcherTimer _timer; - private bool _listIsDirty; - private List _outstandingUpdates; - private int _throttle; - - public UpdateHelper(IVirtualList virtualList) - { - this._virtualList = virtualList; - this._itemsToUpdate = new List(); - this._throttle = Environment.ProcessorCount * 2; - this._outstandingUpdates = new List(); - } - - public void AddIndex(int index) - { - this._itemsToUpdate.Add(index); - this._listIsDirty = true; - this.TriggerNextUpdate(); - } - - public void AdjustIndices(int lowThreshold, int amount) => this.AdjustIndices(lowThreshold, int.MaxValue, amount); - - public void AdjustIndices(int lowThreshold, int highThreshold, int amt) - { - for (int index = 0; index < this._itemsToUpdate.Count; ++index) - { - int num = this._itemsToUpdate[index]; - if (num >= lowThreshold && num <= highThreshold) - this._itemsToUpdate[index] = num + amt; - } - if (this._lastInterestIndex < lowThreshold || this._lastInterestIndex > highThreshold) - return; - this._lastInterestIndex += amt; - } - - public void Clear() => this._itemsToUpdate.Clear(); - - public void RemoveIndex(int index) - { - int count = this._itemsToUpdate.Count; - int index1 = 0; - while (index1 < count && this._itemsToUpdate[index1] != index) - ++index1; - if (index1 >= count) - return; - int index2 = index1; - for (int index3 = index1 + 1; index3 < count; ++index3) - { - int num = this._itemsToUpdate[index3]; - if (num != index) - { - this._itemsToUpdate[index2] = num; - ++index2; - } - } - this._itemsToUpdate.RemoveRange(index2, count - index2); - } - - public void Dispose() - { - if (this._timer == null) - return; - this._timer.Enabled = false; - } - - private void TriggerNextUpdate() - { - this.EnsureTimer(); - this._timer.Enabled = true; - } - - private void DeliverNextUpdate(object senderObject, EventArgs unusedArgs) - { - if (this._itemsToUpdate.Count == 0) - return; - if (this._outstandingUpdates.Count == this._throttle) - { - this.TriggerNextUpdate(); - } - else - { - Repeater repeaterHost = this._virtualList.RepeaterHost; - if (repeaterHost == null) - return; - int index1 = -1; - repeaterHost.GetFocusedIndex(ref index1); - if (repeaterHost.GetExtendedLayoutOutput(VisibleIndexRangeLayoutOutput.DataCookie) is VisibleIndexRangeLayoutOutput extendedLayoutOutput) - { - if (index1 != -1 && (index1 < extendedLayoutOutput.BeginVisible || index1 > extendedLayoutOutput.EndVisible)) - index1 = -1; - if (index1 == -1) - index1 = extendedLayoutOutput.BeginVisible; - } - if (index1 != -1) - { - int dataIndex; - ListUtility.GetWrappedIndex(index1, this._virtualList.Count, out dataIndex, out int _); - if (this._lastInterestIndex != dataIndex) - this._listIsDirty = true; - this._lastInterestIndex = dataIndex; - } - if (this._listIsDirty) - { - if (this._itemDistanceComparer == null) - this._itemDistanceComparer = new UpdateHelper.ItemDistanceComparer(); - this._itemDistanceComparer.Initialize(this._lastInterestIndex, this._virtualList.Count); - this._itemsToUpdate.Sort(_itemDistanceComparer); - this._listIsDirty = false; - } - Stopwatch stopwatch = new Stopwatch(); - stopwatch.Start(); - int count = 0; - do - { - ++count; - int index2 = this._itemsToUpdate[this._itemsToUpdate.Count - count]; - this._outstandingUpdates.Add(index2); - this._virtualList.NotifyRequestSlowData(index2); - } - while (stopwatch.ElapsedMilliseconds < 10L && this._itemsToUpdate.Count != count && this._outstandingUpdates.Count < this._throttle); - this._itemsToUpdate.RemoveRange(this._itemsToUpdate.Count - count, count); - if (this._itemsToUpdate.Count == 0) - return; - this.TriggerNextUpdate(); - } - } - - public int Throttle - { - get => this._throttle; - set => this._throttle = value; - } - - public bool NotifySlowDataAcquireComplete(int index) => this._outstandingUpdates.Remove(index); - - private void EnsureTimer() - { - if (this._timer != null) - return; - this._timer = new DispatcherTimer(); - this._timer.AutoRepeat = false; - this._timer.Interval = 100; - this._timer.Tick += new EventHandler(this.DeliverNextUpdate); - } - - private class ItemDistanceComparer : IComparer - { - private int _focusedIndex; - private int _totalCount; - private int _midPoint; - - public void Initialize(int focusedIndex, int totalCount) - { - this._focusedIndex = focusedIndex; - this._totalCount = totalCount; - this._midPoint = totalCount / 2; - } - - public int Compare(int left, int right) => this.GetDistance(right) - this.GetDistance(left); - - private int GetDistance(int potential) - { - int num = Math.Abs(potential - this._focusedIndex); - if (num > this._midPoint) - num = this._totalCount - num + 1; - return num; - } - } - } -} diff --git a/UIX/Microsoft/Iris/DataProviderMapping.cs b/UIX/Microsoft/Iris/DataProviderMapping.cs deleted file mode 100644 index fa65655..0000000 --- a/UIX/Microsoft/Iris/DataProviderMapping.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderMapping -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.Markup.UIX; -using System; - -namespace Microsoft.Iris -{ - public class DataProviderMapping - { - private string _source; - private string _target; - private object _defaultValue; - private PropertySchema _propertySchema; - private Type _assemblyPropertyType; - private Type _assemblyAlternateType; - - public object PropertyTypeCookie => _propertySchema.PropertyType; - - public object UnderlyingCollectionTypeCookie => _propertySchema.AlternateType; - - public string PropertyName => this._propertySchema.Name; - - public string PropertyTypeName => GetCanonicalTypeName(this._propertySchema.PropertyType); - - public Type PropertyType => this._assemblyPropertyType; - - public string UnderlyingCollectionTypeName => GetCanonicalTypeName(this._propertySchema.AlternateType); - - public Type UnderlyingCollectionType => this._assemblyAlternateType; - - public string Source => this._source; - - public string Target => this._target; - - public object DefaultValue => this._defaultValue; - - public DataProviderMapping(PropertySchema propertySchema, object defaultValue) - : this(propertySchema, null, null, defaultValue) - { - } - - public DataProviderMapping( - PropertySchema propertySchema, - string source, - string target, - object defaultValue) - { - this._propertySchema = propertySchema; - this._source = source; - this._target = target; - this._defaultValue = defaultValue; - this._assemblyPropertyType = AssemblyLoadResult.MapType(this._propertySchema.PropertyType); - if (this._propertySchema.AlternateType == null) - return; - this._assemblyAlternateType = AssemblyLoadResult.MapType(this._propertySchema.AlternateType); - } - - public static string GetCanonicalTypeName(TypeSchema typeSchema) - { - if (typeSchema == null) - return null; - return typeSchema == ListSchema.Type ? "List" : typeSchema.Name; - } - } -} diff --git a/UIX/Microsoft/Iris/DataProviderObject.cs b/UIX/Microsoft/Iris/DataProviderObject.cs deleted file mode 100644 index 94cb78f..0000000 --- a/UIX/Microsoft/Iris/DataProviderObject.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using System; -using System.Collections.Generic; - -namespace Microsoft.Iris -{ - public abstract class DataProviderObject : - IDataProviderObject, - IDataProviderBaseObject, - AssemblyObjectProxyHelper.IFrameworkProxyObject - { - private DataProviderQuery _owner; - private MarkupDataTypeSchema _typeSchema; - private MarkupDataType _internalObject; - private Dictionary _mappings; - private static object SynchronizedFindDataMappings = new object(); - - public abstract object GetProperty(string propertyName); - - public abstract void SetProperty(string propertyName, object value); - - protected DataProviderObject(DataProviderQuery owner, object typeCookie) - { - this._owner = owner != null ? owner : throw new ArgumentNullException(nameof(owner)); - this._typeSchema = typeCookie as MarkupDataTypeSchema; - if (this._typeSchema != null) - return; - if (typeCookie is TypeSchema) - throw new ArgumentException(((TypeSchema)typeCookie).Name + " is not a valid type for a DataProviderObject", nameof(typeCookie)); - if (typeCookie == null) - throw new ArgumentNullException(nameof(typeCookie)); - throw new ArgumentException("typeCookie must be a TypeCookie from a DataProviderMapping", nameof(typeCookie)); - } - - public DataProviderObject(MarkupDataTypeSchema typeSchema) => this._typeSchema = typeSchema; - - public DataProviderQuery Owner => this._owner; - - public string TypeName => this._typeSchema.Name; - - protected IDictionary Mappings - { - get - { - if (this._mappings == null) - { - lock (SynchronizedFindDataMappings) - { - MarkupDataMapping dataMapping = MarkupDataProvider.FindDataMapping(this._owner != null ? this._owner.ProviderName : string.Empty, this._typeSchema); - if (dataMapping.AssemblyDataProviderCookie == null) - { - Dictionary dictionary = new Dictionary(dataMapping.Mappings.Length); - foreach (MarkupDataMappingEntry mapping in dataMapping.Mappings) - dictionary[mapping.Property.Name] = new DataProviderMapping(mapping.Property, mapping.Source, mapping.Target, AssemblyLoadResult.UnwrapObject(mapping.DefaultValue)); - dataMapping.AssemblyDataProviderCookie = dictionary; - } - this._mappings = (Dictionary)dataMapping.AssemblyDataProviderCookie; - } - } - return _mappings; - } - } - - protected void FirePropertyChanged(string propertyName) - { - this.OnPropertyChanged(propertyName); - if (this._internalObject == null) - return; - this._internalObject.FireNotificationThreadSafe(propertyName); - } - - protected virtual void OnPropertyChanged(string propertyName) - { - } - - object AssemblyObjectProxyHelper.IFrameworkProxyObject.FrameworkObject - { - get - { - if (this._internalObject == null) - this._internalObject = new AssemblyMarkupDataType(this._typeSchema, this); - return _internalObject; - } - } - - public override string ToString() => this._typeSchema == null ? base.ToString() : this._typeSchema.Name; - } -} diff --git a/UIX/Microsoft/Iris/DataProviderPropertyChangedEventArgs.cs b/UIX/Microsoft/Iris/DataProviderPropertyChangedEventArgs.cs deleted file mode 100644 index 9909912..0000000 --- a/UIX/Microsoft/Iris/DataProviderPropertyChangedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderPropertyChangedEventArgs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public class DataProviderPropertyChangedEventArgs : PropertyChangedEventArgs - { - private bool _invalidatesQuery; - - public DataProviderPropertyChangedEventArgs(string name, bool invalidatesQuery) - : base(name) - => this._invalidatesQuery = invalidatesQuery; - - public bool InvalidatesQuery => this._invalidatesQuery; - } -} diff --git a/UIX/Microsoft/Iris/DataProviderQuery.cs b/UIX/Microsoft/Iris/DataProviderQuery.cs deleted file mode 100644 index 85dc6b9..0000000 --- a/UIX/Microsoft/Iris/DataProviderQuery.cs +++ /dev/null @@ -1,204 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderQuery -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using System; -using System.Collections.Generic; -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public abstract class DataProviderQuery : - IDataProviderQuery, - IDataProviderBaseObject, - AssemblyObjectProxyHelper.IFrameworkProxyObject, - IDisposableObject, - INotifyPropertyChanged - { - private MarkupDataQuerySchema _typeSchema; - private MarkupDataQuery _internalQuery; - private Dictionary _propertyValues; - private object _result; - private DataProviderQueryStatus _status; - private bool _isDisposed; - private bool _isInvalid; - private bool _enabled = true; - private bool _initialized; - - protected abstract void BeginExecute(); - - public object ResultTypeCookie => _typeSchema.ResultType; - - public object Result - { - get => this._result; - set - { - if (Equals(this._result, value)) - return; - this._result = value; - this.FirePropertyChanged(nameof(Result)); - } - } - - public DataProviderQueryStatus Status - { - get => this._status; - set - { - if (this._status == value) - return; - this._status = value; - this.FirePropertyChanged(nameof(Status)); - } - } - - public bool Enabled - { - get => this._enabled; - set - { - if (this._enabled == value) - return; - this._enabled = value; - this.FirePropertyChanged(nameof(Enabled)); - if (!this._enabled || !this._isInvalid) - return; - this.DeferredBeginExecute(null); - } - } - - protected bool Initialized => this._initialized; - - public void Refresh() => this.BeginExecute(); - - public virtual object GetProperty(string propertyName) - { - lock (this.SynchronizedPropertyStorage) - { - if (this._propertyValues != null) - { - object obj; - if (this._propertyValues.TryGetValue(propertyName, out obj)) - return obj; - } - } - return null; - } - - public virtual void SetProperty(string propertyName, object value) - { - bool flag1 = false; - lock (this.SynchronizedPropertyStorage) - { - bool flag2 = false; - if (this._propertyValues == null) - { - this._propertyValues = new Dictionary(); - flag2 = true; - } - if (!flag2 && this._propertyValues.ContainsKey(propertyName)) - { - if (Equals(this._propertyValues[propertyName], value)) - goto label_8; - } - this._propertyValues[propertyName] = value; - flag1 = true; - } - label_8: - if (!flag1) - return; - this.FirePropertyChanged(propertyName); - } - - protected void FirePropertyChanged(string propertyName) - { - this.OnPropertyChanged(propertyName); - if (this._internalQuery != null) - this._internalQuery.FireNotificationThreadSafe(propertyName); - bool invalidatesQuery = this._typeSchema.InvalidatesQuery(propertyName); - if (this.PropertyChanged != null) - this.PropertyChanged(this, new DataProviderPropertyChangedEventArgs(propertyName, invalidatesQuery)); - if (this._isInvalid || !invalidatesQuery) - return; - this._isInvalid = true; - if (!this._enabled) - return; - Application.DeferredInvoke(new DeferredInvokeHandler(this.DeferredBeginExecute), DeferredInvokePriority.Low); - } - - public event PropertyChangedEventHandler PropertyChanged; - - private void DeferredBeginExecute(object args) - { - if (!this._isInvalid) - return; - this._isInvalid = false; - this.BeginExecute(); - } - - protected virtual void OnPropertyChanged(string propertyName) - { - } - - protected virtual void OnDispose() - { - } - - public bool IsDisposed => this._isDisposed; - - void IDisposableObject.DeclareOwner(object owner) => this.DeclareOwnerWorker(owner); - - void IDataProviderQuery.DeclareOwner(object owner) => this.DeclareOwnerWorker(owner); - - private void DeclareOwnerWorker(object owner) - { - } - - void IDisposableObject.TransferOwnership(object owner) - { - } - - void IDisposableObject.Dispose(object owner) => this.DisposeWorker(owner); - - void IDataProviderQuery.Dispose(object owner) => this.DisposeWorker(owner); - - private void DisposeWorker(object owner) - { - if (this._isDisposed) - return; - this.OnDispose(); - this._isDisposed = true; - } - - protected DataProviderQuery(object typeCookie) - { - this._typeSchema = typeCookie as MarkupDataQuerySchema; - if (this._typeSchema == null) - throw new ArgumentException(nameof(typeCookie), "typeCookie must be the queryTypeCookie passed to ConstructQuery"); - this._isInvalid = true; - } - - object AssemblyObjectProxyHelper.IFrameworkProxyObject.FrameworkObject => _internalQuery; - - public string ProviderName => this._typeSchema.ProviderName; - - void IDataProviderQuery.SetInternalObject(MarkupDataQuery internalQuery) => this._internalQuery = internalQuery; - - void IDataProviderQuery.OnInitialize() - { - this._initialized = true; - if (!this._enabled) - return; - this.DeferredBeginExecute(null); - } - - public override string ToString() => this._typeSchema.Name; - - private object SynchronizedPropertyStorage => _internalQuery; - } -} diff --git a/UIX/Microsoft/Iris/DataProviderQueryFactory.cs b/UIX/Microsoft/Iris/DataProviderQueryFactory.cs deleted file mode 100644 index 900cd5c..0000000 --- a/UIX/Microsoft/Iris/DataProviderQueryFactory.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderQueryFactory -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public delegate DataProviderQuery DataProviderQueryFactory(object queryTypeCookie); -} diff --git a/UIX/Microsoft/Iris/DataProviderQueryStatus.cs b/UIX/Microsoft/Iris/DataProviderQueryStatus.cs deleted file mode 100644 index 2df76dc..0000000 --- a/UIX/Microsoft/Iris/DataProviderQueryStatus.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DataProviderQueryStatus -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public enum DataProviderQueryStatus - { - Idle, - RequestingData, - ProcessingData, - Complete, - Error, - } -} diff --git a/UIX/Microsoft/Iris/DeferredInvokeHandler.cs b/UIX/Microsoft/Iris/DeferredInvokeHandler.cs deleted file mode 100644 index 30efbc1..0000000 --- a/UIX/Microsoft/Iris/DeferredInvokeHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DeferredInvokeHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public delegate void DeferredInvokeHandler(object args); -} diff --git a/UIX/Microsoft/Iris/DeferredInvokePriority.cs b/UIX/Microsoft/Iris/DeferredInvokePriority.cs deleted file mode 100644 index 66a2144..0000000 --- a/UIX/Microsoft/Iris/DeferredInvokePriority.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DeferredInvokePriority -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public enum DeferredInvokePriority - { - Normal, - Low, - } -} diff --git a/UIX/Microsoft/Iris/DeferredInvokeProxy.cs b/UIX/Microsoft/Iris/DeferredInvokeProxy.cs deleted file mode 100644 index d34a1f0..0000000 --- a/UIX/Microsoft/Iris/DeferredInvokeProxy.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.DeferredInvokeProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; - -namespace Microsoft.Iris -{ - public class DeferredInvokeProxy - { - private DeferredInvokeHandler _method; - - public static DeferredHandler Thunk(DeferredInvokeHandler method) => new DeferredHandler(new DeferredInvokeProxy() - { - _method = method - }.Thunk); - - private void Thunk(object args) => this._method(args); - } -} diff --git a/UIX/Microsoft/Iris/Drawing/Camera.cs b/UIX/Microsoft/Iris/Drawing/Camera.cs deleted file mode 100644 index e710d8a..0000000 --- a/UIX/Microsoft/Iris/Drawing/Camera.cs +++ /dev/null @@ -1,448 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.Camera -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; -using System.Diagnostics; - -namespace Microsoft.Iris.Drawing -{ - public class Camera : SharedDisposableObject, INotifyObject, IAnimatableOwner - { - private ICamera _camera; - private Vector3 _vEyeNoSend; - private Vector3 _vAtNoSend; - private Vector3 _vUpNoSend; - private float _flZnNoSend; - private bool _hasEyeNoSend; - private bool _hasAtNoSend; - private bool _hasUpNoSend; - private bool _hasZnNoSend; - private Vector _activeAnimations; - private IAnimationProvider _eyeAnimation; - private IAnimationProvider _atAnimation; - private IAnimationProvider _upAnimation; - private IAnimationProvider _znAnimation; - private NotifyService _notifier = new NotifyService(); - private IList _listeners = new ArrayList(); - - public Camera() => this._camera = UISession.Default.RenderSession.CreateCamera(this); - - protected override void OnDispose() - { - base.OnDispose(); - Vector activeAnimations = this.GetActiveAnimations(false); - if (activeAnimations != null) - { - foreach (DisposableObject disposableObject in activeAnimations) - disposableObject.Dispose(this); - } - this._camera.UnregisterUsage(this); - this._camera = null; - } - - public void AddListener(Listener listener) => this._notifier.AddListener(listener); - - protected void FireNotification(string id) - { - this._notifier.Fire(id); - foreach (object listener in _listeners) - { - if (listener is ViewItem viewItem) - viewItem.MarkPaintInvalid(); - } - } - - public override void RegisterUsage(object consumer) - { - base.RegisterUsage(consumer); - this._listeners.Add(consumer); - } - - public override void UnregisterUsage(object consumer) - { - this._listeners.Remove(consumer); - base.UnregisterUsage(consumer); - } - - public bool Perspective - { - get => this._camera.Perspective; - set - { - if (this._camera.Perspective == value) - return; - this._camera.Perspective = value; - this.FireNotification(NotificationID.Perspective); - } - } - - public Vector3 Eye - { - get => this._hasEyeNoSend ? this._vEyeNoSend : this._camera.Eye; - set - { - if (!(this._camera.Eye != value)) - return; - this.CameraEyeNoSend = value; - if (this._eyeAnimation == null || !this.PlayAnimation(this._eyeAnimation, null)) - this.CameraEye = value; - this.FireNotification(NotificationID.Eye); - } - } - - private Vector3 CameraEyeNoSend - { - set - { - this._hasEyeNoSend = true; - this._vEyeNoSend = value; - } - } - - public Vector3 CameraEye - { - set - { - this._camera.Eye = value; - this._hasEyeNoSend = false; - } - } - - public Vector3 At - { - get => this._hasAtNoSend ? this._vAtNoSend : this._camera.At; - set - { - if (!(this._camera.At != value)) - return; - this.CameraAtNoSend = value; - if (this._atAnimation == null || !this.PlayAnimation(this._atAnimation, null)) - this.CameraAt = value; - this.FireNotification(NotificationID.At); - } - } - - private Vector3 CameraAtNoSend - { - set - { - this._hasAtNoSend = true; - this._vAtNoSend = value; - } - } - - public Vector3 CameraAt - { - set - { - this._camera.At = value; - this._hasAtNoSend = false; - } - } - - public Vector3 Up - { - get => this._hasUpNoSend ? this._vUpNoSend : this._camera.Up; - set - { - if (!(this._camera.Up != value)) - return; - this.CameraUpNoSend = value; - if (this._upAnimation == null || !this.PlayAnimation(this._upAnimation, null)) - this.CameraUp = value; - this.FireNotification(NotificationID.Up); - } - } - - private Vector3 CameraUpNoSend - { - set - { - this._hasUpNoSend = true; - this._vUpNoSend = value; - } - } - - public Vector3 CameraUp - { - set - { - this._camera.Up = value; - this._hasUpNoSend = false; - } - } - - public float Zn - { - get => this._hasZnNoSend ? this._flZnNoSend : this._camera.Zn; - set - { - if (_camera.Zn == (double)value) - return; - this.CameraZnNoSend = value; - if (this._znAnimation == null || !this.PlayAnimation(this._znAnimation, null)) - this.CameraZn = value; - this.FireNotification(NotificationID.Zn); - } - } - - private float CameraZnNoSend - { - set - { - this._hasZnNoSend = true; - this._flZnNoSend = value; - } - } - - public float CameraZn - { - set - { - this._camera.Zn = value; - this._hasZnNoSend = false; - } - } - - public ICamera APICamera => this._camera; - - IAnimatable IAnimatableOwner.AnimationTarget => _camera; - - public IAnimationProvider EyeAnimation - { - get => this._eyeAnimation; - set - { - if (this._eyeAnimation == value) - return; - this._eyeAnimation = value; - this.FireNotification(NotificationID.EyeAnimation); - } - } - - public IAnimationProvider AtAnimation - { - get => this._atAnimation; - set - { - if (this._atAnimation == value) - return; - this._atAnimation = value; - this.FireNotification(NotificationID.AtAnimation); - } - } - - public IAnimationProvider UpAnimation - { - get => this._upAnimation; - set - { - if (this._upAnimation == value) - return; - this._upAnimation = value; - this.FireNotification(NotificationID.UpAnimation); - } - } - - public IAnimationProvider ZnAnimation - { - get => this._znAnimation; - set - { - if (this._znAnimation == value) - return; - this._znAnimation = value; - this.FireNotification(NotificationID.ZnAnimation); - } - } - - public bool PlayAnimation(IAnimationProvider ab, AnimationHandle animationHandle) - { - AnimationArgs args = new AnimationArgs(this); - return this.PlayAnimation(ab, ref args, UIClass.ShouldPlayAnimation(ab), animationHandle); - } - - private bool PlayAnimation( - IAnimationProvider ab, - ref AnimationArgs args, - bool shouldPlayAnimation, - AnimationHandle animationHandle) - { - AnimationTemplate anim = this.BuildAnimation(ab, ref args); - if (anim == null) - return false; - if (shouldPlayAnimation) - { - this.PlayAnimation(anim, ref args, null, animationHandle); - } - else - { - this.ApplyFinalAnimationState(anim, ref args); - animationHandle?.FireCompleted(); - } - return true; - } - - private void PlayAnimation( - AnimationTemplate anim, - ref AnimationArgs args, - EventHandler onCompleteHandler, - AnimationHandle animationHandle) - { - ActiveSequence instance = anim.CreateInstance(APICamera, ref args); - if (instance == null) - return; - instance.DeclareOwner(this); - if (onCompleteHandler != null) - instance.AnimationCompleted += onCompleteHandler; - animationHandle?.AssociateWithAnimationInstance(instance); - instance.AnimationCompleted += new EventHandler(this.OnAnimationComplete); - this.GetActiveAnimations(true).Add(instance); - this.OnAnimationListChanged(); - this.PlayAnimationWorker(instance); - if (!(anim is Animation animation)) - return; - int num = animation.DisableMouseInput ? 1 : 0; - } - - private void PlayAnimationWorker(ActiveSequence newSequence) - { - this.StopOverlappingAnimations(newSequence); - newSequence.Play(); - } - - private AnimationTemplate BuildAnimation( - IAnimationProvider ab, - ref AnimationArgs args) - { - return ab.Build(ref args); - } - - private void StopOverlappingAnimations(ActiveSequence newSequence) - { - Vector activeAnimations = this.GetActiveAnimations(false); - if (activeAnimations == null) - return; - ActiveTransitions activeTransitions = newSequence.GetActiveTransitions(); - StopCommandSet stopCommand = null; - foreach (ActiveSequence playingSequence in activeAnimations) - this.StopAnimationIfOverlapping(playingSequence, newSequence, activeTransitions, ref stopCommand); - } - - private bool StopAnimationIfOverlapping( - ActiveSequence playingSequence, - ActiveSequence newSequence, - ActiveTransitions newTransitions, - ref StopCommandSet stopCommand) - { - if (playingSequence.Target == newSequence.Target) - { - ActiveTransitions activeTransitions = playingSequence.GetActiveTransitions(); - if ((newTransitions & activeTransitions) != ActiveTransitions.None) - { - if (stopCommand == null) - { - stopCommand = newSequence.GetStopCommandSet(); - StopCommandSet stopCommandSet = stopCommand; - } - playingSequence.Stop(stopCommand); - return true; - } - } - return false; - } - - private void OnAnimationComplete(object sender, EventArgs args) - { - ActiveSequence activeSequence = sender as ActiveSequence; - activeSequence.AnimationCompleted -= new EventHandler(this.OnAnimationComplete); - Vector activeAnimations = this.GetActiveAnimations(false); - activeAnimations.Remove(activeSequence); - this.OnAnimationListChanged(); - if (activeAnimations.Count == 0) - this._activeAnimations = null; - if (activeSequence.Template is Animation template) - { - int num = template.DisableMouseInput ? 1 : 0; - } - activeSequence.Dispose(this); - } - - private void StopActiveAnimations() - { - if (this._activeAnimations == null) - return; - foreach (ActiveSequence activeAnimation in this.GetActiveAnimations(true)) - activeAnimation.Stop(); - } - - public void ApplyFinalAnimationState(AnimationTemplate anim, ref AnimationArgs args) - { - BaseKeyframe[] baseKeyframeArray = new BaseKeyframe[20]; - foreach (BaseKeyframe keyframe in anim.Keyframes) - { - BaseKeyframe baseKeyframe = baseKeyframeArray[(uint)keyframe.Type]; - if (baseKeyframe == null || baseKeyframe.Time <= (double)keyframe.Time) - baseKeyframeArray[(uint)keyframe.Type] = keyframe; - } - foreach (BaseKeyframe baseKeyframe in baseKeyframeArray) - baseKeyframe?.Apply(this, ref args); - } - - private Vector GetActiveAnimations(bool createIfNone) => this.GetAnimationSequence(ref this._activeAnimations, createIfNone); - - private Vector GetAnimationSequence( - ref Vector currentAnimationsList, - bool createIfNone) - { - Vector vector = null; - if (currentAnimationsList == null) - { - if (createIfNone) - { - vector = new Vector(); - currentAnimationsList = vector; - } - } - else - vector = currentAnimationsList; - return vector; - } - - private void OnAnimationListChanged() - { - } - - private static bool DoesAnimationListContainAnimationType( - Vector animationList, - ActiveTransitions type) - { - if (animationList != null) - { - foreach (ActiveSequence animation in animationList) - { - if ((animation.GetActiveTransitions() & type) == type) - return true; - } - } - return false; - } - - [Conditional("DEBUG")] - private void DEBUG_DumpAnimation(ActiveSequence aseq) - { - foreach (BaseKeyframe keyframe in aseq.Template.Keyframes) - ; - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/Color.cs b/UIX/Microsoft/Iris/Drawing/Color.cs deleted file mode 100644 index 4b93924..0000000 --- a/UIX/Microsoft/Iris/Drawing/Color.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.Color -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using System; -using System.Text; - -namespace Microsoft.Iris.Drawing -{ - public struct Color - { - private const int ARGBAlphaShift = 24; - private const int ARGBRedShift = 16; - private const int ARGBGreenShift = 8; - private const int ARGBBlueShift = 0; - private readonly uint value; - - public Color(int red, int green, int blue) => this = FromArgb(byte.MaxValue, red, green, blue); - - public Color(float red, float green, float blue) => this = FromArgb(1f, red, green, blue); - - public Color(int alpha, int red, int green, int blue) => this = FromArgb(alpha, red, green, blue); - - public Color(float alpha, float red, float green, float blue) => this = FromArgb(alpha, red, green, blue); - - public Color(uint value) => this.value = value; - - public byte R - { - get => (byte)(this.Value >> 16 & byte.MaxValue); - set => this = FromArgb(A, value, G, B); - } - - public byte G - { - get => (byte)(this.Value >> 8 & byte.MaxValue); - set => this = FromArgb(A, R, value, B); - } - - public byte B - { - get => (byte)(this.Value & byte.MaxValue); - set => this = FromArgb(A, R, G, value); - } - - public byte A - { - get => (byte)(this.Value >> 24 & byte.MaxValue); - set => this = FromArgb(value, R, G, B); - } - - public void GetArgb(out float a, out float r, out float g, out float b) - { - a = A / (float)byte.MaxValue; - r = R / (float)byte.MaxValue; - g = G / (float)byte.MaxValue; - b = B / (float)byte.MaxValue; - } - - public uint Value => this.value; - - private static void CheckByte(int value, string name) - { - } - - private static int ChannelFromFloat(float value) => (int)(value * (double)byte.MaxValue); - - private static uint MakeArgb(byte alpha, byte red, byte green, byte blue) => (uint)(red << 16 | green << 8 | blue | alpha << 24); - - public static Color FromArgb(uint argb) => new Color(argb); - - public static Color FromArgb(int alpha, int red, int green, int blue) - { - CheckByte(alpha, nameof(alpha)); - CheckByte(red, nameof(red)); - CheckByte(green, nameof(green)); - CheckByte(blue, nameof(blue)); - return new Color(MakeArgb((byte)alpha, (byte)red, (byte)green, (byte)blue)); - } - - public static Color FromArgb(float alpha, float red, float green, float blue) => FromArgb(ChannelFromFloat(alpha), ChannelFromFloat(red), ChannelFromFloat(green), ChannelFromFloat(blue)); - - public static Color FromArgb(int alpha, Color baseColor) - { - CheckByte(alpha, nameof(alpha)); - return new Color(MakeArgb((byte)alpha, baseColor.R, baseColor.G, baseColor.B)); - } - - public static Color FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue); - - public float GetValue() - { - float num1 = R / (float)byte.MaxValue; - float num2 = G / (float)byte.MaxValue; - float num3 = B / (float)byte.MaxValue; - float num4 = num1; - float num5 = num1; - if (num2 > (double)num4) - num4 = num2; - if (num3 > (double)num4) - num4 = num3; - if (num2 < (double)num5) - num5 = num2; - if (num3 < (double)num5) - num5 = num3; - return (float)((num4 + (double)num5) / 2.0); - } - - public float GetHue() - { - if (R == G && G == B) - return 0.0f; - float num1 = R / (float)byte.MaxValue; - float num2 = G / (float)byte.MaxValue; - float num3 = B / (float)byte.MaxValue; - float num4 = 0.0f; - float num5 = num1; - float num6 = num1; - if (num2 > (double)num5) - num5 = num2; - if (num3 > (double)num5) - num5 = num3; - if (num2 < (double)num6) - num6 = num2; - if (num3 < (double)num6) - num6 = num3; - float num7 = num5 - num6; - if (num1 == (double)num5) - num4 = (num2 - num3) / num7; - else if (num2 == (double)num5) - num4 = (float)(2.0 + (num3 - (double)num1) / num7); - else if (num3 == (double)num5) - num4 = (float)(4.0 + (num1 - (double)num2) / num7); - float num8 = num4 * 60f; - if (num8 < 0.0) - num8 += 360f; - return num8; - } - - public float GetSaturation() - { - float num1 = R / (float)byte.MaxValue; - float num2 = G / (float)byte.MaxValue; - float num3 = B / (float)byte.MaxValue; - float num4 = 0.0f; - float num5 = num1; - float num6 = num1; - if (num2 > (double)num5) - num5 = num2; - if (num3 > (double)num5) - num5 = num3; - if (num2 < (double)num6) - num6 = num2; - if (num3 < (double)num6) - num6 = num3; - if (num5 != (double)num6) - num4 = (num5 + (double)num6) / 2.0 > 0.5 ? (float)((num5 - (double)num6) / (2.0 - num5 - num6)) : (float)((num5 - (double)num6) / (num5 + (double)num6)); - return num4; - } - - public static Color FromHSV(int nAlpha, float flHue, float flSaturation, float flValue) - { - if (flSaturation == 0.0) - return new Color(nAlpha, (int)(flValue * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue)); - float num1 = flHue / 60f; - int num2 = (int)Math.Floor(num1) % 6; - float num3 = num1 - num2; - float num4 = flValue * (1f - flSaturation); - float num5 = flValue * (float)(1.0 - num3 * (double)flSaturation); - float num6 = flValue * (float)(1.0 - (1.0 - num3) * flSaturation); - switch (num2) - { - case 0: - return new Color(nAlpha, (int)(flValue * (double)byte.MaxValue), (int)(num6 * (double)byte.MaxValue), (int)(num4 * (double)byte.MaxValue)); - case 1: - return new Color(nAlpha, (int)(num5 * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue), (int)(num4 * (double)byte.MaxValue)); - case 2: - return new Color(nAlpha, (int)(num4 * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue), (int)(num6 * (double)byte.MaxValue)); - case 3: - return new Color(nAlpha, (int)(num4 * (double)byte.MaxValue), (int)(num5 * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue)); - case 4: - return new Color(nAlpha, (int)(num6 * (double)byte.MaxValue), (int)(num4 * (double)byte.MaxValue), (int)(flValue * (double)byte.MaxValue)); - case 5: - return new Color(nAlpha, (int)(flValue * (double)byte.MaxValue), (int)(num4 * (double)byte.MaxValue), (int)(num5 * (double)byte.MaxValue)); - default: - return new Color(nAlpha, 0, 0, 0); - } - } - - public int ToArgb() => (int)this.Value; - - public ColorF RenderConvert() => new ColorF(A, R, G, B); - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(32); - stringBuilder.Append("A="); - stringBuilder.Append(this.A); - stringBuilder.Append(", R="); - stringBuilder.Append(this.R); - stringBuilder.Append(", G="); - stringBuilder.Append(this.G); - stringBuilder.Append(", B="); - stringBuilder.Append(this.B); - return stringBuilder.ToString(); - } - - public static bool operator ==(Color left, Color right) => (int)left.value == (int)right.value; - - public static bool operator !=(Color left, Color right) => !(left == right); - - public override bool Equals(object obj) => obj is Color color && (int)this.value == (int)color.value; - - public bool Equals(Color right) => (int)this.value == (int)right.value; - - public override int GetHashCode() => this.value.GetHashCode(); - - public static Color Transparent => new Color(0U); - - public static Color Black => new Color(4278190080U); - - public static Color White => new Color(uint.MaxValue); - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ContentLoadCompleteHandler.cs b/UIX/Microsoft/Iris/Drawing/ContentLoadCompleteHandler.cs deleted file mode 100644 index 9952124..0000000 --- a/UIX/Microsoft/Iris/Drawing/ContentLoadCompleteHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ContentLoadCompleteHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Drawing -{ - public delegate void ContentLoadCompleteHandler(object owner, ImageStatus status); -} diff --git a/UIX/Microsoft/Iris/Drawing/EditCursorType.cs b/UIX/Microsoft/Iris/Drawing/EditCursorType.cs deleted file mode 100644 index 120537a..0000000 --- a/UIX/Microsoft/Iris/Drawing/EditCursorType.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.EditCursorType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Drawing -{ - public enum EditCursorType - { - Default, - IBeam, - } -} diff --git a/UIX/Microsoft/Iris/Drawing/Font.cs b/UIX/Microsoft/Iris/Drawing/Font.cs deleted file mode 100644 index 2fe9eb6..0000000 --- a/UIX/Microsoft/Iris/Drawing/Font.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.Font -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Text; - -namespace Microsoft.Iris.Drawing -{ - public sealed class Font - { - private string _fontName; - private float _fontHeight; - private float _altFontHeight; - private FontStyles _fontStyle; - - public Font() - : this("Arial", 12f, 0.0f, FontStyles.None) - { - } - - public Font(string fontName) - : this(fontName, 12f, 0.0f, FontStyles.None) - { - } - - public Font(string fontName, float fontHeight) - : this(fontName, fontHeight, 0.0f, FontStyles.None) - { - } - - public Font(string fontName, float fontHeight, float altFontHeight) - : this(fontName, fontHeight, altFontHeight, FontStyles.None) - { - } - - public Font(string fontName, float fontHeight, FontStyles fontStyles) - : this(fontName, fontHeight, 0.0f, fontStyles) - { - } - - public Font(string fontName, float fontHeight, float altFontHeight, FontStyles fontStyles) - { - this._fontName = fontName; - this._fontHeight = fontHeight; - this._altFontHeight = altFontHeight; - this._fontStyle = fontStyles; - } - - public float FontSize - { - get => this._fontHeight; - set => this._fontHeight = value; - } - - public float AltFontSize - { - get => _altFontHeight == 0.0 ? this._fontHeight : this._altFontHeight; - set => this._altFontHeight = value; - } - - public FontStyles FontStyle - { - get => this._fontStyle; - set => this._fontStyle = value; - } - - public string FontName - { - get => this._fontName; - set => this._fontName = value; - } - - public override bool Equals(object obj) => obj is Font font && this._fontName == font._fontName && (_fontHeight == (double)font._fontHeight && _altFontHeight == (double)font._altFontHeight) && this._fontStyle == font._fontStyle; - - public override int GetHashCode() => this._fontName.GetHashCode() ^ this._fontHeight.GetHashCode() ^ this._altFontHeight.GetHashCode() ^ this._fontStyle.GetHashCode(); - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("{Font \""); - stringBuilder.Append(this._fontName); - stringBuilder.Append("\" "); - stringBuilder.Append(this._fontHeight); - stringBuilder.Append("pt "); - stringBuilder.Append(_fontStyle); - stringBuilder.Append("}"); - return stringBuilder.ToString(); - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/FontStyles.cs b/UIX/Microsoft/Iris/Drawing/FontStyles.cs deleted file mode 100644 index 2aa0700..0000000 --- a/UIX/Microsoft/Iris/Drawing/FontStyles.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.FontStyles -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Drawing -{ - [Flags] - public enum FontStyles - { - None = 0, - Bold = 1, - Italic = 2, - Underline = 4, - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ImageStatus.cs b/UIX/Microsoft/Iris/Drawing/ImageStatus.cs deleted file mode 100644 index af2beff..0000000 --- a/UIX/Microsoft/Iris/Drawing/ImageStatus.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ImageStatus -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Drawing -{ - public enum ImageStatus - { - PendingLoad, - Loading, - Complete, - Error, - } -} diff --git a/UIX/Microsoft/Iris/Drawing/RawImage.cs b/UIX/Microsoft/Iris/Drawing/RawImage.cs deleted file mode 100644 index 5b68460..0000000 --- a/UIX/Microsoft/Iris/Drawing/RawImage.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.RawImage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Drawing -{ - public class RawImage : UIImage - { - private string _uniqueID; - private Size _imageSize; - private int _stride; - private SurfaceFormat _format; - private IntPtr _data; - private uint _length; - private RawImageItemKey _cacheItemKey; - - public RawImage( - string uniqueID, - Size imageSize, - int stride, - SurfaceFormat format, - IntPtr data, - bool takeOwnership, - Inset nineGrid, - Size maximumSize, - bool flippable, - bool antialiasEdges) - : base(nineGrid, maximumSize, flippable, antialiasEdges) - { - this.Source = uniqueID; - this._uniqueID = uniqueID; - this._imageSize = imageSize; - this._stride = stride; - this._format = format; - this._contentSize = imageSize; - int cbCopy = this._imageSize.Height * Math.Abs(stride); - this._length = (uint)cbCopy; - if (!takeOwnership) - { - this._data = NativeApi.MemAlloc(this._length, false); - Memory.Copy(this._data, data, cbCopy); - } - else - this._data = data; - } - - ~RawImage() - { - FreeBuffer(this._data); - this._data = IntPtr.Zero; - } - - public static void FreeBuffer(IntPtr data) - { - if (!(data != IntPtr.Zero)) - return; - NativeApi.MemFree(data); - } - - protected override ImageCacheItem GetCacheItem(out bool needAsyncLoad) - { - ImageCache instance = ScavengeImageCache.Instance; - ImageCacheItem imageCacheItem = null; - string str = this.GetHashCode().ToString(); - if (this._cacheItemKey == null) - this._cacheItemKey = new RawImageItemKey(str); - else - imageCacheItem = instance.Lookup(_cacheItemKey); - if (imageCacheItem == null) - { - Size maxSize = ClampSize(this._maximumSize); - imageCacheItem = new RawImageItem(UISession.Default.RenderSession, this, str, this._data, this._length, this._imageSize, this._stride, this._format, maxSize, this.IsFlipped, this._antialiasEdges); - instance.Add(_cacheItemKey, imageCacheItem); - } - needAsyncLoad = false; - return imageCacheItem; - } - - protected override void EnsureSizeMetrics() - { - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/RawImageItem.cs b/UIX/Microsoft/Iris/Drawing/RawImageItem.cs deleted file mode 100644 index 3c12009..0000000 --- a/UIX/Microsoft/Iris/Drawing/RawImageItem.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.RawImageItem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using System; - -namespace Microsoft.Iris.Drawing -{ - public class RawImageItem : ImageCacheItem - { - private int _stride; - private SurfaceFormat _format; - private object _oKeepAlive; - - public RawImageItem( - IRenderSession renderSession, - RawImage rawImage, - string source, - IntPtr data, - uint length, - Size imageSize, - int stride, - SurfaceFormat format, - Size maxSize, - bool flippable, - bool antialiasEdges) - : base(renderSession, source, maxSize, flippable, antialiasEdges) - { - this._oKeepAlive = rawImage; - this.SetSize(imageSize); - this.SetBuffer(data, length); - this._stride = stride; - this._format = format; - } - - protected override void OnDispose() - { - this._oKeepAlive = null; - this.m_buffer = IntPtr.Zero; - base.OnDispose(); - } - - protected override bool DoImageLoad() => ImageLoader.FromRaw(this.RenderImage, this.m_buffer, (int)this.m_length, this.m_size, this._stride, this._format, this.m_req.MaximumSize, this.m_req.Flippable, this.m_req.AntialiasEdges, this.m_req.BorderWidth, this.m_req.BorderColor, out this.m_info); - } -} diff --git a/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs b/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs deleted file mode 100644 index f7b16d3..0000000 --- a/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.RawImageItemKey -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render.Extensions; - -namespace Microsoft.Iris.Drawing -{ - public class RawImageItemKey : ImageCacheKey - { - private static int s_uniqueId; - private int _uniqueId; - - public RawImageItemKey(string id) - : base(id) - => this._uniqueId = ++s_uniqueId; - - public override bool Equals(object obj) - { - if (ReferenceEquals(this, obj)) - return true; - return obj is RawImageItemKey rawImageItemKey && this._uniqueId == rawImageItemKey._uniqueId; - } - - public override int GetHashCode() => this._uniqueId; - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs b/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs deleted file mode 100644 index d08f103..0000000 --- a/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ResourceImageItem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; - -namespace Microsoft.Iris.Drawing -{ - public class ResourceImageItem : ImageCacheItem - { - private string _source; - private Resource _resource; - private bool _acquireCalled; - private ResourceAcquisitionCompleteHandler _resourceAcquisitionHandler; - - public ResourceImageItem( - IRenderSession renderSession, - string source, - Size maxSize, - bool flippable, - bool antialiasEdges) - : base(renderSession, source, maxSize, flippable, antialiasEdges) - { - this._source = source; - this._resource = ResourceManager.Instance.GetResource(this._source); - } - - protected override void OnDispose() - { - if (this._resource != null) - { - this.FreeResource(); - this._resource = null; - } - base.OnDispose(); - } - - public Resource Resource - { - get - { - this.EnsureResource(); - return this._resource; - } - } - - public ImageStatus Status - { - get - { - switch (this._resource.Status) - { - case ResourceStatus.NeedsAcquire: - return ImageStatus.PendingLoad; - case ResourceStatus.Acquiring: - return ImageStatus.Loading; - case ResourceStatus.Available: - return ImageStatus.Complete; - case ResourceStatus.Error: - return ImageStatus.Error; - default: - return ImageStatus.Error; - } - } - } - - protected override bool EnsureBuffer() - { - if (this.EnsureResource()) - { - if (this.IsResourceAvailable()) - this.OnResourceLoadComplete(this._resource); - else if (!this._acquireCalled) - { - this._resourceAcquisitionHandler = new ResourceAcquisitionCompleteHandler(this.OnResourceLoadComplete); - this._resource.Acquire(this._resourceAcquisitionHandler); - this._acquireCalled = true; - } - } - return false; - } - - protected override void OnImageLoadComplete() - { - ImageStatus status = this.Status; - if (this.LoadCompleteHandler == null) - return; - this.LoadCompleteHandler(this, status); - } - - private bool IsResourceAvailable() => this._resource.Status == ResourceStatus.Available; - - public bool EnsureResource() - { - if (this._resource == null) - this._resource = ResourceManager.Instance.GetResource(this._source); - return this._resource != null; - } - - private void OnResourceLoadComplete(Resource resource) - { - if (resource != this._resource) - return; - if (!IsSuccessfulResourceLoad(this._resource) || Application.IsShuttingDown) - { - this.OnImageLoadComplete(); - this.FreeResource(); - } - else - { - this.SetBuffer(this._resource.Buffer, this._resource.Length); - if (this._resource.Length <= 0U) - return; - if (!this.ProcessBuffer()) - this._resource.Status = ResourceStatus.Error; - this.OnImageLoadComplete(); - } - } - - private static bool IsSuccessfulResourceLoad(Resource resource) => resource.Status != ResourceStatus.Error; - - private void FreeResource() - { - if (this._acquireCalled) - { - this._resource.Free(this._resourceAcquisitionHandler); - this._resourceAcquisitionHandler = null; - } - this._acquireCalled = false; - } - - public override void StartLoad() => this.EnsureBuffer(); - - public override string ToString() => this._source; - - public override void ReleaseImage() - { - this.LoadCompleteHandler = null; - base.ReleaseImage(); - } - - public override void RemoveData() - { - this.FreeResource(); - base.RemoveData(); - } - - public event ContentLoadCompleteHandler LoadCompleteHandler; - } -} diff --git a/UIX/Microsoft/Iris/Drawing/RichText.cs b/UIX/Microsoft/Iris/Drawing/RichText.cs deleted file mode 100644 index de2dc3f..0000000 --- a/UIX/Microsoft/Iris/Drawing/RichText.cs +++ /dev/null @@ -1,463 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.RichText -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; - -namespace Microsoft.Iris.Drawing -{ - public sealed class RichText : IDisposable - { - public const float MaxWidthConstraint = 4095f; - public const float MaxHeightConstraint = 8191f; - private Win32Api.HANDLE _rtoHandle; - private NativeApi.ReportRunCallback _rrcb; - private string _currentlyMeasuringText; - private bool _oversampled; - private bool _hosted; - private bool _inImeCompositionMode; - private ArrayList _timers; - private EventHandler _timerTickHandler; - private object _lock; - - public RichText(bool richTextMode) - : this(richTextMode, null) - { - } - - public unsafe RichText(bool richTextMode, IRichTextCallbacks callbacks) - { - Size sizeMaximumSurface = Size.Zero; - if (UISession.Default != null) - sizeMaximumSurface = UIImage.MaximumSurfaceSize(UISession.Default); - if (callbacks != null) - { - this._hosted = true; - this._timers = new ArrayList(6); - this._timerTickHandler = new EventHandler(this.OnTimerTick); - } - RendererApi.IFC(NativeApi.SpRichTextBuildObject(richTextMode, sizeMaximumSurface, callbacks, out this._rtoHandle)); - this._oversampled = false; - this._lock = new object(); - this._rrcb = new NativeApi.ReportRunCallback(this.OnReportRun); - } - - public void Dispose() => this.Dispose(true); - - private void Dispose(bool inDispose) - { - if (!inDispose) - return; - GC.SuppressFinalize(this); - lock (this._lock) - { - NativeApi.SpRichTextDestroyObject(this._rtoHandle); - this._rtoHandle.h = IntPtr.Zero; - } - if (this._timers == null) - return; - for (int index = 0; index < this._timers.Count; ++index) - this.DisposeTimer((DispatcherTimer)this._timers[index]); - this._timers.Clear(); - } - - ~RichText() => this.Dispose(false); - - public string Content - { - set - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetContent(this._rtoHandle, value)); - } - } - - public string SimpleContent - { - get - { - string str = null; - int textLength = 0; - lock (this._lock) - { - RendererApi.IFC(NativeApi.SpRichTextGetSimpleContentLength(this._rtoHandle, out textLength)); - if (textLength != 0) - { - StringBuilder textBuffer = new StringBuilder(textLength); - RendererApi.IFC(NativeApi.SpRichTextGetSimpleContent(this._rtoHandle, textBuffer, textBuffer.Capacity)); - str = textBuffer.ToString(); - } - } - return str; - } - } - - public bool Oversample - { - set - { - if (this._oversampled == value) - return; - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetOversampleMode(this._rtoHandle, value)); - this._oversampled = value; - } - get => this._oversampled; - } - - public int MaxLength - { - set - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetMaximumLength(this._rtoHandle, value)); - } - } - - public bool DetectUrls - { - set - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetDetectUrls(this._rtoHandle, value)); - } - } - - public bool HasCallbacks => this._hosted; - - public bool ReadOnly - { - set - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetReadOnly(this._rtoHandle, value)); - } - } - - public void SetWordWrap(bool wordWrap) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetWordWrap(this._rtoHandle, wordWrap)); - } - - public Size GetNaturalBounds() - { - int cWidth; - int cHeight; - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextGetNaturalBounds(this._rtoHandle, out cWidth, out cHeight)); - return new Size(cWidth, cHeight); - } - - public void SetSelectionRange(int selectionStart, int selectionEnd) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetSelectionRange(this._rtoHandle, selectionStart, selectionEnd)); - } - - public unsafe TextFlow Measure(string content, ref TextMeasureParams measureParams) - { - TextFlow textFlow = new TextFlow(); - GCHandle gcHandle = GCHandle.Alloc(textFlow); - this._currentlyMeasuringText = content != null ? content : string.Empty; - fixed (char* content1 = this._currentlyMeasuringText) - fixed (char* chPtr = measureParams._textStyle.FontFace) - { - var style = new TextStyle.MarshalledData(measureParams._textStyle) - { - _fontFace = chPtr - }; - measureParams.SetContent(content1); - measureParams._data._pTextStyle = &style; - fixed (TextMeasureParams.FormattedRange* formattedRangePtr = measureParams._formattedRanges) - { - measureParams._data._pFormattedRanges = formattedRangePtr; - fixed (TextStyle.MarshalledData* marshalledDataPtr = measureParams._formattedRangeStyles) - { - measureParams._data._pFormattedRangeStyles = marshalledDataPtr; - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextMeasure(this._rtoHandle, ref measureParams._data, this._rrcb, GCHandle.ToIntPtr(gcHandle))); - } - } - } - gcHandle.Free(); - this._currentlyMeasuringText = null; - return textFlow; - } - - public void NotifyOfFocusChange(bool gainingFocus) - { - lock (this._lock) - { - RendererApi.IFC(NativeApi.SpRichTextSetFocus(this._rtoHandle, gainingFocus)); - if (gainingFocus) - return; - this._inImeCompositionMode = false; - } - } - - public void ScrollUp(ScrollbarType whichBar) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextScroll(this._rtoHandle, (int)whichBar, 0)); - } - - public void ScrollDown(ScrollbarType whichBar) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextScroll(this._rtoHandle, (int)whichBar, 1)); - } - - public void PageUp(ScrollbarType whichBar) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextScroll(this._rtoHandle, (int)whichBar, 2)); - } - - public void PageDown(ScrollbarType whichBar) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextScroll(this._rtoHandle, (int)whichBar, 3)); - } - - public void ScrollToPosition(ScrollbarType whichBar, int whereTo) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextScrollToPosition(this._rtoHandle, (int)whichBar, whereTo)); - } - - public void SetScrollbars(bool horizontalScrollbar, bool verticalScrollbar) - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextSetScrollbars(this._rtoHandle, horizontalScrollbar, verticalScrollbar)); - } - - public bool ForwardKeyStateNotification( - uint message, - int virtualKey, - int scanCode, - int repeatCount, - uint modifierState, - ushort flags) - { - bool handled = true; - lock (this._lock) - { - if (!this._inImeCompositionMode) - RendererApi.IFC(NativeApi.SpRichTextForwardKeyState(this._rtoHandle, message, virtualKey, scanCode, repeatCount, modifierState, flags, out handled)); - } - return handled; - } - - public bool ForwardKeyCharacterNotification( - uint message, - int character, - int scanCode, - int repeatCount, - uint modifierState, - ushort flags) - { - bool handled = true; - lock (this._lock) - { - if (!this._inImeCompositionMode) - RendererApi.IFC(NativeApi.SpRichTextForwardKeyCharacter(this._rtoHandle, message, character, scanCode, repeatCount, modifierState, flags, out handled)); - } - return handled; - } - - public bool ForwardMouseInput( - uint message, - uint modifierState, - int mouseButton, - int x, - int y, - int mouseWheelDelta) - { - bool handled = true; - lock (this._lock) - { - if (!this._inImeCompositionMode) - RendererApi.IFC(NativeApi.SpRichTextForwardMouseInput(this._rtoHandle, message, modifierState, mouseButton, x, y, mouseWheelDelta, out handled)); - } - return handled; - } - - public HRESULT ForwardImeMessage(uint message, UIntPtr wParam, UIntPtr lParam) - { - lock (this._lock) - { - switch (message) - { - case 269: - this._inImeCompositionMode = true; - break; - case 270: - this._inImeCompositionMode = false; - break; - } - RendererApi.IFC(NativeApi.SpRichTextForwardImeMessage(this._rtoHandle, message, wParam, lParam)); - } - return new HRESULT(0); - } - - public bool CanUndo - { - get - { - bool canUndo; - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextCanUndo(this._rtoHandle, out canUndo)); - return canUndo; - } - } - - public void Undo() - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextUndo(this._rtoHandle)); - } - - public void Cut() - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextCut(this._rtoHandle)); - } - - public void Copy() - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextCopy(this._rtoHandle)); - } - - public void Paste() - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextPaste(this._rtoHandle)); - } - - public void Delete() - { - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextDelete(this._rtoHandle)); - } - - public static LineAlignment ReverseAlignment( - LineAlignment alignment, - bool condition) - { - if (condition) - { - switch (alignment) - { - case LineAlignment.Near: - alignment = LineAlignment.Far; - break; - case LineAlignment.Far: - alignment = LineAlignment.Near; - break; - } - } - return alignment; - } - - public static Dib Rasterize( - IntPtr hGlyphRunInfo, - bool outlineMode, - Color textColor, - bool shadowMode) - { - IntPtr phTextBitmap = IntPtr.Zero; - IntPtr ppvBits; - Size psizeBitmap; - RendererApi.IFC(NativeApi.SpRichTextRasterize(hGlyphRunInfo, outlineMode ? 1 : 0, textColor, shadowMode ? 1 : 0, out phTextBitmap, out ppvBits, out psizeBitmap)); - return new Dib(phTextBitmap, ppvBits, psizeBitmap); - } - - public void SetTimer(uint id, uint timeout) - { - DispatcherTimer dispatcherTimer = this.FindTimer(id); - if (dispatcherTimer == null) - { - dispatcherTimer = new DispatcherTimer(); - this._timers.Add(dispatcherTimer); - } - dispatcherTimer.UserData = id; - dispatcherTimer.Interval = (int)timeout; - dispatcherTimer.Tick += this._timerTickHandler; - dispatcherTimer.Start(); - } - - public void KillTimer(uint id) - { - DispatcherTimer timer = this.FindTimer(id); - if (timer == null) - return; - this.DisposeTimer(timer); - this._timers.Remove(timer); - } - - private DispatcherTimer FindTimer(uint id) - { - for (int index = 0; index < this._timers.Count; ++index) - { - DispatcherTimer timer = (DispatcherTimer)this._timers[index]; - if ((int)(uint)timer.UserData == (int)id) - return timer; - } - return null; - } - - private void DisposeTimer(DispatcherTimer timer) - { - timer.Tick -= this._timerTickHandler; - timer.Stop(); - } - - private void OnTimerTick(object sender, EventArgs ea) - { - DispatcherTimer dispatcherTimer = (DispatcherTimer)sender; - lock (this._lock) - RendererApi.IFC(NativeApi.SpRichTextOnTimerTick(this._rtoHandle, (uint)dispatcherTimer.UserData)); - } - - private unsafe HRESULT OnReportRun( - IntPtr hGlyphRunInfo, - NativeApi.RasterizeRunPacket* runPacketPtr, - IntPtr lpString, - uint nChars, - IntPtr dataPtr) - { - bool flag = false; - if (this._currentlyMeasuringText != null && _currentlyMeasuringText.Length == nChars) - { - flag = true; - char* pointer = (char*)lpString.ToPointer(); - for (int index = 0; index < nChars; ++index) - { - if (this._currentlyMeasuringText[index] != pointer[index]) - { - flag = false; - break; - } - } - } - string content = flag ? this._currentlyMeasuringText : Marshal.PtrToStringUni(lpString, (int)nChars); - TextRun run = TextRun.FromRunPacket(hGlyphRunInfo, runPacketPtr, content); - if (run != null) - ((TextFlow)GCHandle.FromIntPtr(dataPtr).Target).Add(run); - return new HRESULT(0); - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs b/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs deleted file mode 100644 index a42cee9..0000000 --- a/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.RichTextInfoKey -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.RenderAPI.Drawing; - -namespace Microsoft.Iris.Drawing -{ - public class RichTextInfoKey : ImageCacheKey - { - private const int FLAGS_IS_ITALIC = 1; - private const int FLAGS_IS_UNDERLINE = 2; - private const int FLAGS_IS_OUTLINE = 4; - private const int FLAGS_IS_THICK_UNDERLINE = 8; - private const int FLAGS_IS_DOTTED_UNDERLINE = 16; - private string _samplingMode; - private string _content; - private SizeF _srcSizeF; - private Size _naturalSize; - private Point _rasterizedOffset; - private int _fontFaceUniqueId; - private int _fontSize; - private int _fontWeight; - private byte _rasterizerConfig; - private Color _textColor; - private int _flags; - private int _hashCode; - - public RichTextInfoKey(TextRun run, string samplingMode, bool outline, Color textColor) - : base(run.Content) - { - this._samplingMode = samplingMode; - this._content = run.Content; - this._srcSizeF = run.RenderBounds.Size; - this._naturalSize = run.NaturalExtent; - this._rasterizedOffset = run.RasterizedOffset; - this._fontFaceUniqueId = run.FontFaceUniqueId; - this._fontSize = run.FontSize; - this._fontWeight = run.FontWeight; - this._rasterizerConfig = run.RasterizerConfig; - this._textColor = textColor; - this._flags = 0; - if (run.Italic) - this._flags |= 1; - if (outline) - this._flags |= 4; - switch (run.UnderlineStyle) - { - case NativeApi.UnderlineStyle.Solid: - this._flags |= 2; - break; - case NativeApi.UnderlineStyle.Thick: - this._flags |= 8; - break; - case NativeApi.UnderlineStyle.Dotted: - case NativeApi.UnderlineStyle.Dash: - case NativeApi.UnderlineStyle.DashDot: - case NativeApi.UnderlineStyle.DashDotDot: - this._flags |= 16; - break; - } - this._hashCode = this._samplingMode.GetHashCode() ^ this._content.GetHashCode() ^ this._srcSizeF.GetHashCode() ^ this._naturalSize.GetHashCode() ^ this._rasterizedOffset.GetHashCode() ^ this._fontFaceUniqueId.GetHashCode() ^ this._fontSize ^ this._fontWeight ^ this._flags ^ _rasterizerConfig ^ this._textColor.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(this, obj)) - return true; - return obj is RichTextInfoKey richTextInfoKey && this._hashCode == richTextInfoKey._hashCode && (this._fontFaceUniqueId == richTextInfoKey._fontFaceUniqueId && this._fontSize == richTextInfoKey._fontSize) && (this._fontWeight == richTextInfoKey._fontWeight && this._flags == richTextInfoKey._flags && (_rasterizerConfig == richTextInfoKey._rasterizerConfig && this._samplingMode.Equals(richTextInfoKey._samplingMode))) && (this._srcSizeF.Equals(richTextInfoKey._srcSizeF) && this._naturalSize.Equals(richTextInfoKey._naturalSize) && (this._rasterizedOffset.Equals(richTextInfoKey._rasterizedOffset) && this._textColor.Equals(richTextInfoKey._textColor))) && this._content.Equals(richTextInfoKey._content); - } - - public override int GetHashCode() => this._hashCode; - } -} diff --git a/UIX/Microsoft/Iris/Drawing/Rotation.cs b/UIX/Microsoft/Iris/Drawing/Rotation.cs deleted file mode 100644 index 0289a75..0000000 --- a/UIX/Microsoft/Iris/Drawing/Rotation.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.Rotation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using System.Text; - -namespace Microsoft.Iris.Drawing -{ - public struct Rotation - { - private Vector3 _axis; - private float _angleRad; - public static readonly Rotation Default = new Rotation(0.0f, new Vector3(0.0f, 0.0f, 1f)); - - public Rotation(float angleRadians) - : this(angleRadians, new Vector3(0.0f, 0.0f, 1f)) - { - } - - public Rotation(float angleRadians, Vector3 axis) - { - this._axis = axis; - this._angleRad = angleRadians; - } - - public Vector3 Axis - { - get => this._axis; - set => this._axis = value; - } - - public float AngleRadians - { - get => this._angleRad; - set => this._angleRad = value; - } - - public int AngleDegrees - { - get => (int)(_angleRad * 180.0 / 3.14159274101257); - set => this._angleRad = (float)(value * 3.14159274101257 / 180.0); - } - - public override bool Equals(object obj) => obj is Rotation rotation && this == rotation; - - public static bool operator ==(Rotation left, Rotation right) => left.Axis == right.Axis && left.AngleRadians == (double)right.AngleRadians; - - public static bool operator !=(Rotation left, Rotation right) => left.Axis != right.Axis || left.AngleRadians != (double)right.AngleRadians; - - public override int GetHashCode() => this.Axis.GetHashCode() ^ this.AngleRadians.GetHashCode(); - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(128); - stringBuilder.Append("(Axis="); - stringBuilder.Append(Axis); - stringBuilder.Append(", Angle="); - stringBuilder.Append(this.AngleRadians); - stringBuilder.Append(")"); - return stringBuilder.ToString(); - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs b/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs deleted file mode 100644 index 5974876..0000000 --- a/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ScavengeImageCache -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Queues; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Drawing -{ - public sealed class ScavengeImageCache : ImageCache - { - private static ScavengeImageCache s_theOnlyCache; - private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(Reschedule); - private UISession _session; - private ScavengeImageCache.ScavengeCallback _callback; - - public static void Initialize(UISession session) - { - s_theOnlyCache = new ScavengeImageCache(session); - s_theOnlyCache.NumItemsToKeep = 200; - s_theOnlyCache.ItemRetainTime = new TimeSpan(0, 2, 0); - } - - public static void Uninitialize(UISession session) - { - if (s_theOnlyCache == null) - return; - s_theOnlyCache.Dispose(); - } - - public static ScavengeImageCache Instance => s_theOnlyCache; - - private ScavengeImageCache(UISession session) - : base(session.RenderSession, "GraphicImageCache") - => this._session = session; - - protected override void OnDispose() - { - TimeoutManager timeoutManager = this._session.Dispatcher.TimeoutManager; - ScavengeImageCache.ScavengeCallback callback = this._callback; - if (callback != null) - timeoutManager.CancelTimeout(callback); - this._callback = null; - base.OnDispose(); - } - - protected override void ScheduleScavenge() - { - if (!this.CleanupPending) - DeferredCall.Post(DispatchPriority.Idle, s_dhReschedule, this); - base.ScheduleScavenge(); - } - - private static void Reschedule(object arg) - { - ScavengeImageCache cache = arg as ScavengeImageCache; - if (!cache.CleanupPending) - return; - TimeoutManager timeoutManager = cache._session.Dispatcher.TimeoutManager; - ScavengeImageCache.ScavengeCallback callback = cache._callback; - cache._callback = null; - if (callback != null) - timeoutManager.CancelTimeout(callback); - ScavengeImageCache.ScavengeCallback scavengeCallback = new ScavengeImageCache.ScavengeCallback(cache); - timeoutManager.SetTimeoutRelative(scavengeCallback, TimeSpan.FromSeconds(5.0)); - cache._callback = scavengeCallback; - } - - private class ScavengeCallback : QueueItem - { - private ScavengeImageCache _cache; - - public ScavengeCallback(ScavengeImageCache cache) => this._cache = cache; - - public override void Dispatch() - { - if (this._cache._callback != this) - return; - this._cache._callback = null; - this._cache.CullObjects(); - } - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ScrollbarEnableFlags.cs b/UIX/Microsoft/Iris/Drawing/ScrollbarEnableFlags.cs deleted file mode 100644 index 240a194..0000000 --- a/UIX/Microsoft/Iris/Drawing/ScrollbarEnableFlags.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ScrollbarEnableFlags -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Drawing -{ - public enum ScrollbarEnableFlags - { - EnableBoth, - DisableNear, - DisableFar, - DisableBoth, - } -} diff --git a/UIX/Microsoft/Iris/Drawing/ScrollbarType.cs b/UIX/Microsoft/Iris/Drawing/ScrollbarType.cs deleted file mode 100644 index 37fe4a2..0000000 --- a/UIX/Microsoft/Iris/Drawing/ScrollbarType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.ScrollbarType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Drawing -{ - public enum ScrollbarType - { - Horizontal = 0, - Vertical = 1, - Both = 3, - } -} diff --git a/UIX/Microsoft/Iris/Drawing/SimpleText.cs b/UIX/Microsoft/Iris/Drawing/SimpleText.cs deleted file mode 100644 index e34b268..0000000 --- a/UIX/Microsoft/Iris/Drawing/SimpleText.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.SimpleText -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.Drawing -{ - public class SimpleText : IDisposable - { - private Win32Api.HANDLE _stoHandle; - - public SimpleText() - { - Size sizeMaximumSurface = Size.Zero; - if (UISession.Default != null) - sizeMaximumSurface = UIImage.MaximumSurfaceSize(UISession.Default); - RendererApi.IFC(NativeApi.SpSimpleTextBuildObject(sizeMaximumSurface, out this._stoHandle)); - } - - public void Dispose() - { - GC.SuppressFinalize(this); - NativeApi.SpSimpleTextDestroyObject(this._stoHandle); - this._stoHandle = Win32Api.HANDLE.NULL; - } - - public unsafe bool CanMeasure(string content, TextStyle textStyle) - { - bool fPossible; - fixed (char* chPtr = textStyle.FontFace) - { - var style = new TextStyle.MarshalledData(textStyle) - { - _fontFace = chPtr - }; - RendererApi.IFC(NativeApi.SpSimpleTextMeasurePossible(this._stoHandle, content, &style, out fPossible)); - } - return fPossible; - } - - public unsafe TextFlow Measure( - string content, - LineAlignment alignment, - TextStyle textStyle, - Size constraint) - { - TextFlow textFlow = new TextFlow(); - if (content == null) - content = string.Empty; - short wAlignment = 0; - switch (alignment) - { - case LineAlignment.Near: - wAlignment = 1; - break; - case LineAlignment.Center: - wAlignment = 3; - break; - case LineAlignment.Far: - wAlignment = 2; - break; - } - IntPtr hGlyphRunInfo; - NativeApi.RasterizeRunPacket rasterizeRunPacket; - fixed (char* chPtr = textStyle.FontFace) - { - var style = new TextStyle.MarshalledData(textStyle) - { - _fontFace = chPtr - }; - RendererApi.IFC(NativeApi.SpSimpleTextMeasure(this._stoHandle, content, wAlignment, - &style, constraint, out hGlyphRunInfo, &rasterizeRunPacket)); - } - TextRun run = TextRun.FromRunPacket(hGlyphRunInfo, &rasterizeRunPacket, content); - textFlow.Add(run); - return textFlow; - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextFlow.cs b/UIX/Microsoft/Iris/Drawing/TextFlow.cs deleted file mode 100644 index 471efec..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextFlow.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextFlow -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; - -namespace Microsoft.Iris.Drawing -{ - public sealed class TextFlow : DisposableObject - { - private object _runsList; - private Vector _lineBounds; - private Rectangle _bounds; - private Rectangle _fitBounds; - private TextRun _lastFitRun; - private TextRun _firstFitOnFinalLineRun; - private int _firstVisibleIndex; - private int _lastVisibleIndex; - - public TextFlow() - { - this._bounds = new Rectangle(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue); - this.ResetFitTracking(); - this.ResetVisibleTracking(); - } - - protected override void OnDispose() - { - if (this._runsList != null) - { - if (this._runsList is TextRun runsList) - { - runsList.UnregisterUsage(this); - } - else - { - foreach (SharedDisposableObject runs in (Vector)this._runsList) - runs.UnregisterUsage(this); - } - } - base.OnDispose(); - } - - public TextRun this[int index] => this._runsList is TextRun runsList ? runsList : (TextRun)((Vector)this._runsList)[index]; - - public int Count - { - get - { - if (this._runsList is Vector runsList) - return runsList.Count; - return this._runsList == null ? 0 : 1; - } - } - - public Vector LineBounds => this._lineBounds; - - public Rectangle GetLastLineBounds(int lineAlignmentOffset) - { - Rectangle left = Rectangle.Zero; - for (int index = this.Count - 1; index >= 0; --index) - { - TextRun run = this[index]; - if (this.IsOnLastLine(run)) - { - Point position = run.Position; - Size size = run.Size; - int x = position.X + lineAlignmentOffset; - int y = position.Y; - int num1 = x + size.Width; - int num2 = y + size.Height; - Rectangle right = new Rectangle(x, y, num1 - x, num2 - y); - left = !left.IsZero ? Rectangle.Union(left, right) : right; - } - else - break; - } - return left; - } - - public bool IsOnLastLine(TextRun run) => run.Line == this.LastFitRun.Line; - - public Rectangle Bounds => this._bounds; - - public Rectangle FitBounds => this._fitBounds; - - public TextRun LastFitRun => this._lastFitRun; - - public TextRun FirstFitRunOnFinalLine => this._firstFitOnFinalLineRun; - - public int FirstVisibleIndex => this._firstVisibleIndex; - - public int LastVisibleIndex => this._lastVisibleIndex; - - public bool HasVisibleRuns => this._firstVisibleIndex != -1; - - public void Add(TextRun run) - { - this._bounds = Rectangle.Union(this._bounds, run.LayoutBounds); - if (this._runsList == null) - { - this._runsList = run; - this._lineBounds = new Vector(); - this._lineBounds.Add(run.RenderBounds); - } - else - { - if (!(this._runsList is Vector vector)) - { - object runsList = this._runsList; - vector = new Vector(); - vector.Add(runsList); - this._runsList = vector; - } - if (run.UnderlineStyle != NativeApi.UnderlineStyle.None) - { - Rectangle underlineBounds = run.UnderlineBounds; - int line1 = run.Line; - for (int index = vector.Count - 1; index > 0; --index) - { - Point position = ((TextRun)vector[index]).Position; - int line2 = ((TextRun)vector[index]).Line; - if (position.X >= underlineBounds.Left && line1 == line2) - ((TextRun)vector[index]).UnderlineStyle = run.UnderlineStyle; - else - break; - } - } - if (this._lineBounds.Count < run.Line) - { - this._lineBounds.Add(run.RenderBounds); - } - else - { - RectangleF lineBound = (RectangleF)this._lineBounds[run.Line - 1]; - if ((int)lineBound.Y > (int)run.RenderBounds.Y || lineBound.IsEmpty) - this._lineBounds[run.Line - 1] = run.RenderBounds; - } - vector.Add(run); - } - run.RegisterUsage(this); - } - - public void AddFit(TextRun run) - { - this._fitBounds = Rectangle.Union(this._fitBounds, run.LayoutBounds); - if (run.LayoutBounds.IsEmpty) - return; - if (this._firstFitOnFinalLineRun == null || run.Line > this._firstFitOnFinalLineRun.Line) - this._firstFitOnFinalLineRun = run; - this._lastFitRun = run; - } - - public void AddVisible(int runIndex) - { - this[runIndex].Visible = true; - if (this._firstVisibleIndex == -1) - this._firstVisibleIndex = runIndex; - this._lastVisibleIndex = runIndex; - } - - public void ResetFitTracking() - { - this._lastFitRun = null; - this._fitBounds = new Rectangle(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue); - } - - public void ResetVisibleTracking() - { - this._firstVisibleIndex = -1; - this._lastVisibleIndex = int.MinValue; - } - - public void ClearSprites() - { - if (this._runsList == null) - return; - if (this._runsList is TextRun runsList) - { - runsList.TextSprite = null; - runsList.HighlightSprite = null; - } - else - { - foreach (TextRun runs in (Vector)this._runsList) - { - runs.TextSprite = null; - runs.HighlightSprite = null; - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextImageCache.cs b/UIX/Microsoft/Iris/Drawing/TextImageCache.cs deleted file mode 100644 index b267283..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextImageCache.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextImageCache -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Queues; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Drawing -{ - public sealed class TextImageCache : ImageCache - { - private static TextImageCache s_theOnlyCache; - private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(Reschedule); - private UISession _session; - private TextImageCache.ScavengeCallback _callback; - - public static void Initialize(UISession session) - { - s_theOnlyCache = new TextImageCache(session); - s_theOnlyCache.NumItemsToKeep = 500; - s_theOnlyCache.ItemRetainTime = TimeSpan.Zero; - } - - public static void Uninitialize(UISession session) - { - if (s_theOnlyCache == null) - return; - s_theOnlyCache.Dispose(); - } - - public static TextImageCache Instance => s_theOnlyCache; - - private TextImageCache(UISession session) - : base(session.RenderSession, nameof(TextImageCache)) - => this._session = session; - - protected override void OnDispose() - { - TimeoutManager timeoutManager = this._session.Dispatcher.TimeoutManager; - TextImageCache.ScavengeCallback callback = this._callback; - if (callback != null) - timeoutManager.CancelTimeout(callback); - this._callback = null; - base.OnDispose(); - } - - protected override void ScheduleScavenge() - { - if (!this.CleanupPending) - DeferredCall.Post(DispatchPriority.Idle, s_dhReschedule, this); - base.ScheduleScavenge(); - } - - private static void Reschedule(object arg) - { - TextImageCache cache = arg as TextImageCache; - if (!cache.CleanupPending) - return; - TimeoutManager timeoutManager = cache._session.Dispatcher.TimeoutManager; - TextImageCache.ScavengeCallback callback = cache._callback; - cache._callback = null; - if (callback != null) - timeoutManager.CancelTimeout(callback); - TextImageCache.ScavengeCallback scavengeCallback = new TextImageCache.ScavengeCallback(cache); - timeoutManager.SetTimeoutRelative(scavengeCallback, TimeSpan.FromSeconds(5.0)); - cache._callback = scavengeCallback; - } - - private class ScavengeCallback : QueueItem - { - private TextImageCache _cache; - - public ScavengeCallback(TextImageCache cache) => this._cache = cache; - - public override void Dispatch() - { - if (this._cache._callback != this) - return; - this._cache._callback = null; - this._cache.CullObjects(); - } - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextImageItem.cs b/UIX/Microsoft/Iris/Drawing/TextImageItem.cs deleted file mode 100644 index 295eedf..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextImageItem.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextImageItem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.RenderAPI.Drawing; - -namespace Microsoft.Iris.Drawing -{ - public class TextImageItem : ImageCacheItem - { - private TextRun _run; - private Dib _dib; - private string _samplingModeName; - private Color _textColor; - private bool _outlineFlag; - - public TextImageItem( - IRenderSession renderSession, - TextRun run, - string samplingModeName, - bool outlineFlag, - Color textColor) - : base(renderSession, run.Content) - { - this._run = run; - this._run.RegisterUsage(this); - this._dib = null; - this._samplingModeName = samplingModeName; - this._outlineFlag = outlineFlag; - this._textColor = textColor; - } - - protected override void OnDispose() - { - this._run.UnregisterUsage(this); - this.ReleaseDib(); - base.OnDispose(); - } - - public TextRun Run => this._run; - - protected override bool EnsureBuffer() - { - if (this._dib == null) - this._dib = this._run.Rasterize(this._samplingModeName, this._textColor, this._outlineFlag); - return true; - } - - protected override bool DoImageLoad() => this.RenderImage.LoadContent(this._dib.ImageFormat, this._dib.ContentSize, this._dib.Stride, this._dib.Data); - - protected override void OnImageLoadComplete() - { - if (this.HasLoadsInProgress) - return; - this.ReleaseDib(); - } - - public override string ToString() => this._run.Content; - - private void ReleaseDib() - { - if (this._dib == null) - return; - this._dib.Dispose(); - this._dib = null; - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs b/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs deleted file mode 100644 index b32208f..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextMeasureParams -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Drawing -{ - public struct TextMeasureParams - { - public TextMeasureParams.MarshalledData _data; - public TextStyle _textStyle; - public TextMeasureParams.FormattedRange[] _formattedRanges; - public TextStyle.MarshalledData[] _formattedRangeStyles; - private GCHandle[] _formattedRangeStyleFontFaces; - - public void Initialize() - { - if (!UISession.Default.IsRtl) - return; - this._data._flags |= MeasureFlags.IsRtl; - } - - public void Dispose() - { - if (this._formattedRangeStyleFontFaces == null) - return; - foreach (GCHandle rangeStyleFontFace in this._formattedRangeStyleFontFaces) - { - if (rangeStyleFontFace.IsAllocated) - rangeStyleFontFace.Free(); - } - this._formattedRangeStyleFontFaces = null; - } - - public unsafe void SetContent(char* content) - { - this._data._flags |= MeasureFlags.Content; - this._data._content = content; - } - - public void SetFormat(LineAlignment lineAlignment, TextStyle style) - { - switch (lineAlignment) - { - case LineAlignment.Near: - this._data._alignment = 1; - break; - case LineAlignment.Center: - this._data._alignment = 3; - break; - case LineAlignment.Far: - this._data._alignment = 2; - break; - } - this._textStyle = style; - } - - public void TrimLeftSideBearing() => this._data._flags |= MeasureFlags.TrimLeftSideBearing; - - public void SetEditMode(bool inEditMode) - { - if (inEditMode) - this._data._flags |= MeasureFlags.FormatOnly; - else - this._data._flags &= ~MeasureFlags.FormatOnly; - } - - public void SetScale(float scale) => this._data._scale = scale; - - public void SetWordWrap(bool wordWrap) - { - this._data._flags |= MeasureFlags.WordWrap; - if (wordWrap) - this._data._flags |= MeasureFlags.WordWrapValue; - else - this._data._flags &= ~MeasureFlags.WordWrapValue; - } - - public void SetPasswordChar(char passwordChar) - { - this._data._flags |= MeasureFlags.PasswordMasked; - this._data._passwordChar = passwordChar; - } - - public void SetConstraint(SizeF constraint) => this._data._constraint = constraint; - - public void AllocateFormattedRanges(int formattedRangeCount, int formattedRangeStylesCount) - { - this._formattedRanges = new TextMeasureParams.FormattedRange[formattedRangeCount]; - this._formattedRangeStyles = new TextStyle.MarshalledData[formattedRangeStylesCount]; - this._formattedRangeStyleFontFaces = new GCHandle[formattedRangeStylesCount]; - this._data._formattedRangeCount = formattedRangeCount; - this._data._formattedRangeStylesCount = formattedRangeStylesCount; - } - - public TextMeasureParams.FormattedRange[] FormattedRanges => this._formattedRanges; - - public unsafe void SetFormattedRangeStyle(int index, TextStyle style) - { - this._formattedRangeStyles[index] = new TextStyle.MarshalledData(style); - string fontFace = style.FontFace; - if (fontFace == null) - return; - GCHandle gcHandle = GCHandle.Alloc(fontFace, GCHandleType.Pinned); - this._formattedRangeStyles[index]._fontFace = (char*)gcHandle.AddrOfPinnedObject().ToPointer(); - this._formattedRangeStyleFontFaces[index] = gcHandle; - } - - public struct MarshalledData - { - public TextMeasureParams.MeasureFlags _flags; - public byte _alignment; - [MarshalAs(UnmanagedType.U2)] - public char _passwordChar; - public unsafe char* _content; - public float _scale; - public SizeF _constraint; - public unsafe TextStyle.MarshalledData* _pTextStyle; - public int _formattedRangeCount; - public unsafe TextMeasureParams.FormattedRange* _pFormattedRanges; - public int _formattedRangeStylesCount; - public unsafe TextStyle.MarshalledData* _pFormattedRangeStyles; - } - - [Flags] - public enum MeasureFlags : byte - { - None = 0, - Content = 1, - IsRtl = 2, - WordWrap = 4, - WordWrapValue = 8, - PasswordMasked = 16, // 0x10 - TrimLeftSideBearing = 32, // 0x20 - FormatOnly = 64, // 0x40 - } - - public struct FormattedRange - { - public int FirstCharacter; - public int LastCharacter; - public Color Color; - public int StyleIndex; - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextRun.cs b/UIX/Microsoft/Iris/Drawing/TextRun.cs deleted file mode 100644 index aab9cdd..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextRun.cs +++ /dev/null @@ -1,211 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextRun -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using System; - -namespace Microsoft.Iris.Drawing -{ - public sealed class TextRun : SharedDisposableObject - { - private const int CFE_LINK = 32; - private IntPtr _hGlyphRunInfo; - private IntPtr _hRasterizeRunPacket; - private Rectangle _layoutBounds; - private RectangleF _renderBounds; - private Point _offsetPoint; - private int _naturalX; - private int _naturalY; - private int _rasterizeX; - private int _rasterizeY; - private byte _rasterizerConfig; - private byte _bits; - private string _content; - private Color _runColor; - private Color _overrideColor; - private Color _highlightColor; - private int _fontFaceUniqueId; - public int _lfHeight; - public int _lfWeight; - private Size _naturalRunExtent; - private int _lineNumber; - private int _ascenderInset; - private int _baselineInset; - private Rectangle _underlineBounds; - public ISprite TextSprite; - public ISprite HighlightSprite; - - private unsafe TextRun( - IntPtr hGlyphRunInfo, - NativeApi.RasterizeRunPacket* runPacketPtr, - string content) - { - this._hGlyphRunInfo = hGlyphRunInfo; - this._hRasterizeRunPacket = new IntPtr(runPacketPtr); - this._layoutBounds = runPacketPtr->rcLayoutBounds; - this._renderBounds = runPacketPtr->rcfRenderBounds; - this._naturalX = runPacketPtr->naturalX; - this._naturalY = runPacketPtr->naturalY; - this._rasterizeX = runPacketPtr->rasterizeX; - this._rasterizeY = runPacketPtr->rasterizeY; - this._rasterizerConfig = runPacketPtr->AAConfig; - this._runColor = runPacketPtr->clrText; - this._overrideColor = Color.Transparent; - this._highlightColor = runPacketPtr->clrBackground; - this._fontFaceUniqueId = runPacketPtr->fontFaceUniqueId; - this._lfHeight = runPacketPtr->lf.lfHeight; - this._lfWeight = runPacketPtr->lf.lfWeight; - this.SetBit(Bits.Italic, runPacketPtr->lf.lfItalic != 0); - this.SetBit(Bits.Underline, runPacketPtr->lf.lfUnderline != 0); - this.SetBit(Bits.Link, (runPacketPtr->dwEffects & 32) != 0); - this._underlineBounds = runPacketPtr->rcUnderlineBounds; - this._lineNumber = runPacketPtr->nLineNumber; - this._naturalRunExtent = runPacketPtr->sizeNatural; - this._ascenderInset = runPacketPtr->ascenderInset; - this._baselineInset = runPacketPtr->baselineInset; - this._content = content; - } - - protected override void OnDispose() - { - NativeApi.SpRichTextDestroyGlyphRunInfo(this._hGlyphRunInfo); - base.OnDispose(); - } - - public string Content => this._content; - - public RectangleF RenderBounds => this._renderBounds; - - public Rectangle LayoutBounds => this._layoutBounds; - - public Size NaturalExtent => this._naturalRunExtent; - - public Color RunColor => this._runColor; - - public Color OverrideColor - { - get => this._overrideColor; - set => this._overrideColor = value; - } - - public Color Color => this._overrideColor != Color.Transparent ? this._overrideColor : this._runColor; - - public bool Highlighted => this._highlightColor.A != 0; - - public Color HighlightColor => this._highlightColor; - - public int FontFaceUniqueId => this._fontFaceUniqueId; - - public int FontSize => this._lfHeight; - - public int FontWeight => this._lfWeight; - - public bool Italic => this.GetBit(Bits.Italic); - - public bool Underline => this.GetBit(Bits.Underline); - - public Point RasterizedOffset => new Point(this._rasterizeX - this._naturalX, this._rasterizeY - this._naturalY); - - public int AscenderInset => this._ascenderInset; - - public int BaselineInset => this._baselineInset; - - public int Line => this._lineNumber; - - public bool Visible - { - get => this.GetBit(Bits.Visible); - set => this.SetBit(Bits.Visible, value); - } - - public bool IsFragment - { - get => this.GetBit(Bits.Fragment); - set => this.SetBit(Bits.Fragment, value); - } - - public Point Position => new Point(this._layoutBounds.X, this._layoutBounds.Y); - - public Size Size => new Size(this._layoutBounds.Width, this._layoutBounds.Height); - - public byte RasterizerConfig => this._rasterizerConfig; - - public bool Link => this.GetBit(Bits.Link); - - public unsafe NativeApi.UnderlineStyle UnderlineStyle - { - get => this._hRasterizeRunPacket == IntPtr.Zero ? NativeApi.UnderlineStyle.None : ((NativeApi.RasterizeRunPacket*)(void*)this._hRasterizeRunPacket)->usUnderlineStyle; - set - { - if (!(this._hRasterizeRunPacket != IntPtr.Zero)) - return; - ((NativeApi.RasterizeRunPacket*)(void*)this._hRasterizeRunPacket)->usUnderlineStyle = value; - } - } - - public Rectangle UnderlineBounds => this._underlineBounds; - - public void ApplyOffset(Point offsetPoint) - { - if (!(this._offsetPoint != offsetPoint)) - return; - this._renderBounds.X -= _offsetPoint.X; - this._renderBounds.Y -= _offsetPoint.Y; - this._layoutBounds.X -= this._offsetPoint.X; - this._layoutBounds.Y -= this._offsetPoint.Y; - this._renderBounds.X += offsetPoint.X; - this._renderBounds.Y += offsetPoint.Y; - this._layoutBounds.X += offsetPoint.X; - this._layoutBounds.Y += offsetPoint.Y; - this._offsetPoint = offsetPoint; - } - - public Dib Rasterize(string samplingMode, Color textColor, bool outlineFlag) - { - bool shadowMode = false; - if (samplingMode == "sdw") - shadowMode = true; - return RichText.Rasterize(this._hGlyphRunInfo, outlineFlag, textColor, shadowMode); - } - - public static unsafe TextRun FromRunPacket( - IntPtr hGlyphRunInfo, - NativeApi.RasterizeRunPacket* runPacketPtr, - string content) - { - return new TextRun(hGlyphRunInfo, runPacketPtr, content); - } - - public void RemoveSprites(IVisualContainer container) - { - if (this.TextSprite != null) - { - container.RemoveChild(TextSprite); - this.TextSprite = null; - } - if (this.HighlightSprite == null) - return; - container.RemoveChild(HighlightSprite); - this.HighlightSprite = null; - } - - private bool GetBit(TextRun.Bits lookupBit) => ((TextRun.Bits)this._bits & lookupBit) != 0; - - private void SetBit(TextRun.Bits changeBit, bool value) => this._bits = value ? (byte)((TextRun.Bits)this._bits | changeBit) : (byte)((TextRun.Bits)this._bits & ~changeBit); - - private enum Bits : byte - { - Visible = 1, - Fragment = 2, - Italic = 4, - Underline = 8, - Link = 16, // 0x10 - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/TextStyle.cs b/UIX/Microsoft/Iris/Drawing/TextStyle.cs deleted file mode 100644 index 921f76f..0000000 --- a/UIX/Microsoft/Iris/Drawing/TextStyle.cs +++ /dev/null @@ -1,246 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.TextStyle -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.Collections.Specialized; -using System.Text; - -namespace Microsoft.Iris.Drawing -{ - public class TextStyle - { - private BitVector32 _flags; - private string _fontFace; - private float _fontHeightPts; - private float _altFontHeightPts; - private float _lineSpacing; - private float _characterSpacing; - private Color _textColor; - private bool _fragment; - - public bool IsInitialized() => this._flags.Data != 0; - - public string FontFace - { - get => this._fontFace; - set - { - this._flags[1] = !string.IsNullOrEmpty(value); - this._fontFace = value; - } - } - - public float FontSize - { - get => this._fontHeightPts; - set - { - this._flags[2] = true; - this._fontHeightPts = value; - } - } - - public float AltFontSize - { - get => _altFontHeightPts == 0.0 ? this._fontHeightPts : this._altFontHeightPts; - set - { - this._flags[512] = true; - this._altFontHeightPts = value; - } - } - - public bool Bold - { - get => this._flags[65536]; - set - { - this._flags[4] = true; - this._flags[65536] = value; - } - } - - public bool Italic - { - get => this._flags[131072]; - set - { - this._flags[8] = true; - this._flags[131072] = value; - } - } - - public bool Underline - { - get => this._flags[262144]; - set - { - this._flags[16] = true; - this._flags[262144] = value; - } - } - - public Color Color - { - get => this._textColor; - set - { - this._flags[64] = true; - this._textColor = value; - } - } - - public float LineSpacing - { - get => this._lineSpacing; - set - { - this._flags[32] = true; - this._lineSpacing = value; - } - } - - public bool EnableKerning - { - get => this._flags[524288]; - set - { - this._flags[128] = true; - this._flags[524288] = value; - } - } - - public float CharacterSpacing - { - get => this._characterSpacing; - set - { - this._flags[256] = true; - this._characterSpacing = value; - } - } - - public bool Fragment - { - get => this._fragment; - set => this._fragment = value; - } - - public void Add(TextStyle additional) - { - this._fragment = additional._fragment; - if (additional._flags[1]) - this.FontFace = additional.FontFace; - if (additional._flags[2]) - this.FontSize = additional.FontSize; - if (additional._flags[512]) - this.AltFontSize = additional._altFontHeightPts; - if (additional._flags[4]) - this.Bold = additional.Bold; - if (additional._flags[8]) - this.Italic = additional.Italic; - if (additional._flags[16]) - this.Underline = additional.Underline; - if (additional._flags[32]) - this.LineSpacing = additional.LineSpacing; - if (additional._flags[128]) - this.EnableKerning = additional.EnableKerning; - if (additional._flags[256]) - this.CharacterSpacing = additional.CharacterSpacing; - if (!additional._flags[64]) - return; - this.Color = additional.Color; - } - - public bool HasColor => this._flags[64]; - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("{TextStyle"); - if (this._flags[1]) - { - stringBuilder.Append(" Font = \""); - stringBuilder.Append(this.FontFace); - stringBuilder.Append("\""); - } - if (this._flags[2]) - { - stringBuilder.Append(" Pt = "); - stringBuilder.Append(this.FontSize); - } - if (this._flags[4]) - { - stringBuilder.Append(" Bold = "); - stringBuilder.Append(this.Bold); - } - if (this._flags[8]) - { - stringBuilder.Append(" Italic = "); - stringBuilder.Append(this.Italic); - } - if (this._flags[16]) - { - stringBuilder.Append(" Underline = "); - stringBuilder.Append(this.Underline); - } - if (this._flags[32]) - { - stringBuilder.Append(" LineSpacing = "); - stringBuilder.Append(this.LineSpacing); - } - if (this._flags[64]) - { - stringBuilder.Append(" Color = "); - stringBuilder.Append(Color); - } - stringBuilder.Append(" }"); - return stringBuilder.ToString(); - } - - [Flags] - public enum SetFlags - { - None = 0, - FontFace = 1, - FontHeight = 2, - Bold = 4, - Italic = 8, - Underline = 16, // 0x00000010 - LineSpacing = 32, // 0x00000020 - TextColor = 64, // 0x00000040 - EnableKerning = 128, // 0x00000080 - CharacterSpacing = 256, // 0x00000100 - AltFontHeight = 512, // 0x00000200 - BoldValue = 65536, // 0x00010000 - ItalicValue = 131072, // 0x00020000 - UnderlineValue = 262144, // 0x00040000 - EnableKerningValue = 524288, // 0x00080000 - } - - public struct MarshalledData - { - public int _flags; - public unsafe char* _fontFace; - public float _fontHeightPts; - public float _altFontHeightPts; - public float _lineSpacing; - public float _characterSpacing; - public Color _textColor; - - public unsafe MarshalledData(TextStyle from) - { - this._flags = from._flags.Data; - this._fontHeightPts = from._fontHeightPts; - this._altFontHeightPts = from._altFontHeightPts; - this._lineSpacing = from._lineSpacing; - this._characterSpacing = from._characterSpacing; - this._textColor = from._textColor; - this._fontFace = null; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Drawing/UIImage.cs b/UIX/Microsoft/Iris/Drawing/UIImage.cs deleted file mode 100644 index 3ebdb2c..0000000 --- a/UIX/Microsoft/Iris/Drawing/UIImage.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.UIImage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Drawing -{ - public abstract class UIImage : NotifyObjectBase - { - private static Size s_sizeMaximumSurface = new Size(-1, -1); - protected string _source; - private Inset _nineGrid; - protected Size _maximumSize; - protected bool _flippable; - protected bool _antialiasEdges; - private ImageStatus _status; - protected Size _contentSize; - - public UIImage(Inset nineGrid, Size maximumSize, bool flippable, bool antialiasEdges) - { - this._nineGrid = nineGrid; - this._maximumSize = maximumSize; - this._flippable = flippable; - this._antialiasEdges = antialiasEdges; - } - - public void Load() => this.Load(false); - - private void Load(bool inDraw) - { - if (this._status != ImageStatus.PendingLoad) - return; - bool needAsyncLoad; - ImageCacheItem cacheItem = this.GetCacheItem(out needAsyncLoad); - if (cacheItem == null) - this.SetStatus(ImageStatus.Error); - else if (needAsyncLoad) - { - this.SetStatus(ImageStatus.Loading); - cacheItem.StartLoad(); - } - else - this.SetStatus(ImageStatus.Complete); - } - - private ImageCacheItem GetCacheItem() => this.GetCacheItem(out bool _); - - protected abstract ImageCacheItem GetCacheItem(out bool needAsyncLoad); - - protected abstract void EnsureSizeMetrics(); - - protected void OnHeaderLoadComplete() - { - if (this.LoadComplete == null) - return; - this.LoadComplete(this, this.Status); - } - - protected void SetStatus(ImageStatus status) - { - this._status = status; - if ((this._status == ImageStatus.Error || this._status == ImageStatus.Complete) && this.LoadComplete != null) - this.LoadComplete(this, this._status); - this.FireNotification(NotificationID.Status); - } - - public IImage RenderImage => this.GetCacheItem()?.RenderImage; - - public ImageStatus Status => this._status; - - public string Source - { - get => this._source; - set - { - if (!(this._source != value)) - return; - this._source = value; - this.OnImageAttributeChanged(); - } - } - - public Inset NineGrid - { - get => this._nineGrid; - set - { - if (!(this._nineGrid != value)) - return; - this._nineGrid = value; - this.OnImageAttributeChanged(); - } - } - - public Size MaximumSize - { - get => this._maximumSize; - set - { - if (!(this._maximumSize != value)) - return; - this._maximumSize = value; - this.OnImageAttributeChanged(); - } - } - - public bool Flippable - { - get => this._flippable; - set - { - if (this._flippable == value) - return; - this._flippable = value; - this.OnImageAttributeChanged(); - } - } - - public bool IsFlipped => this._flippable && UISession.Default.IsRtl; - - public bool AntialiasEdges - { - get => this._antialiasEdges; - set - { - if (this._antialiasEdges == value) - return; - this._antialiasEdges = value; - this.OnImageAttributeChanged(); - } - } - - public Size Size - { - get - { - this.EnsureSizeMetrics(); - return this._contentSize; - } - } - - public int Width - { - get - { - this.EnsureSizeMetrics(); - return this._contentSize.Width; - } - } - - public int Height - { - get - { - this.EnsureSizeMetrics(); - return this._contentSize.Height; - } - } - - public void AddUser(object user) => this.GetCacheItem()?.RegisterUsage(user); - - public void RemoveUser(object user) => this.GetCacheItem()?.UnregisterUsage(user); - - public static Size MaximumSurfaceSize(UISession session) - { - if (s_sizeMaximumSurface.Width == -1) - s_sizeMaximumSurface = session.RenderSession.GraphicsDevice.MaximumImageSize; - return s_sizeMaximumSurface; - } - - public static Size ClampSize(Size maxSizeImage) - { - Size size = MaximumSurfaceSize(UISession.Default); - if (maxSizeImage.Width == 0 || maxSizeImage.Width > size.Width) - maxSizeImage.Width = size.Width; - if (maxSizeImage.Height == 0 || maxSizeImage.Height > size.Height) - maxSizeImage.Height = size.Height; - return maxSizeImage; - } - - protected virtual void OnImageAttributeChanged() - { - } - - public event ContentLoadCompleteHandler LoadComplete; - } -} diff --git a/UIX/Microsoft/Iris/Drawing/UriImage.cs b/UIX/Microsoft/Iris/Drawing/UriImage.cs deleted file mode 100644 index 629ee95..0000000 --- a/UIX/Microsoft/Iris/Drawing/UriImage.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Drawing.UriImage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Render; -using Microsoft.Iris.Render.Extensions; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Drawing -{ - public sealed class UriImage : UIImage - { - private ImageCacheKey _cacheKey; - - public UriImage() - : base(Inset.Zero, Size.Zero, false, false) - { - } - - public UriImage(string source, Inset nineGrid, Size maximumSize, bool flippable) - : this(source, nineGrid, maximumSize, flippable, false) - { - } - - public UriImage( - string source, - Inset nineGrid, - Size maximumSize, - bool flippable, - bool antialiasEdges) - : base(nineGrid, maximumSize, flippable, antialiasEdges) - { - this.Source = source; - } - - private ResourceImageItem FetchOrBuildItem() - { - ResourceImageItem resourceImageItem = this.GetResourceFromCache(); - if (resourceImageItem == null) - { - resourceImageItem = new ResourceImageItem(UISession.Default.RenderSession, this.Source, ClampSize(this._maximumSize), this.IsFlipped, this._antialiasEdges); - resourceImageItem.LoadCompleteHandler += new ContentLoadCompleteHandler(this.OnLoadComplete); - ScavengeImageCache.Instance.Add(this._cacheKey, resourceImageItem); - this.SetStatus(resourceImageItem.Status); - this._contentSize = new Size(0, 0); - } - else if (resourceImageItem.Resource.Status == ResourceStatus.NeedsAcquire || resourceImageItem.Resource.Status == ResourceStatus.Acquiring) - resourceImageItem.LoadCompleteHandler += new ContentLoadCompleteHandler(this.OnLoadComplete); - return resourceImageItem; - } - - private ResourceImageItem GetResourceFromCache() - { - Size maxSize = ClampSize(this._maximumSize); - if (this._cacheKey == null) - this._cacheKey = new ImageCacheKey(this.Source, maxSize, this.IsFlipped, this._antialiasEdges); - return (ResourceImageItem)ScavengeImageCache.Instance.Lookup(this._cacheKey); - } - - protected override void OnImageAttributeChanged() => this._cacheKey = null; - - private void OnLoadComplete(object owner, ImageStatus status) - { - ResourceImageItem resourceFromCache = this.GetResourceFromCache(); - if (resourceFromCache != null) - resourceFromCache.LoadCompleteHandler -= new ContentLoadCompleteHandler(this.OnLoadComplete); - this.SetStatus(status); - } - - protected override ImageCacheItem GetCacheItem(out bool needAsyncLoad) - { - ResourceImageItem resourceImageItem; - if (!string.IsNullOrEmpty(this.Source)) - { - resourceImageItem = this.FetchOrBuildItem(); - if (resourceImageItem != null) - { - needAsyncLoad = resourceImageItem.Resource.Status != ResourceStatus.Available; - } - else - { - resourceImageItem = null; - needAsyncLoad = false; - } - } - else - { - resourceImageItem = null; - needAsyncLoad = false; - } - return resourceImageItem; - } - - protected override void EnsureSizeMetrics() - { - ImageCacheItem cacheItem = this.GetCacheItem(out bool _); - if (cacheItem == null) - return; - this._contentSize = cacheItem.ImageSize; - } - - public static void RemoveCache( - string source, - Size maximumSize, - bool flippable, - bool antialiasEdges) - { - ScavengeImageCache.Instance.RemoveData(new ImageCacheKey(source, maximumSize, flippable, antialiasEdges)); - } - } -} diff --git a/UIX/Microsoft/Iris/Error.cs b/UIX/Microsoft/Iris/Error.cs deleted file mode 100644 index 477c149..0000000 --- a/UIX/Microsoft/Iris/Error.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Error -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris -{ - public class Error - { - public string Context; - public string Message; - public bool Warning; - public int Line; - public int Column; - - public override string ToString() - { - string str1 = this.Context; - if (str1 != null && str1.StartsWith("file://", StringComparison.Ordinal)) - str1 = str1.Substring(7); - string str2; - if (this.Line != -1) - str2 = string.Format("{0}({1},{2}) : {3} : {4}", str1, Line, Column, this.Warning ? "warning" : "error", Message); - else - str2 = this.Context == null ? string.Format("{0} : {1}", this.Warning ? "warning" : "error", Message) : string.Format("{0} : {1} : {2}", str1, this.Warning ? "warning" : "error", Message); - return str2; - } - } -} diff --git a/UIX/Microsoft/Iris/ErrorReportHandler.cs b/UIX/Microsoft/Iris/ErrorReportHandler.cs deleted file mode 100644 index 0b9d81b..0000000 --- a/UIX/Microsoft/Iris/ErrorReportHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ErrorReportHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public delegate void ErrorReportHandler(Error[] errors); -} diff --git a/UIX/Microsoft/Iris/Group.cs b/UIX/Microsoft/Iris/Group.cs deleted file mode 100644 index 2b18a9b..0000000 --- a/UIX/Microsoft/Iris/Group.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Group -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; - -namespace Microsoft.Iris -{ - public class Group : VirtualList - { - private GroupedList _groupedList; - private int _startIndex; - - public Group(GroupedList groupedList, int startIndex, int count) - : base(groupedList, true, null) - { - this._groupedList = groupedList; - this._startIndex = startIndex; - this.Count = count; - } - - public int StartIndex - { - get => this._startIndex; - internal set - { - if (this._startIndex == value) - return; - this._startIndex = value; - this.FirePropertyChanged(nameof(StartIndex)); - this.FirePropertyChanged("EndIndex"); - } - } - - public int EndIndex => this.StartIndex + this.Count - 1; - - public override void OnCountChanged() => this.FirePropertyChanged("EndIndex"); - - private int GetSourceIndex(int groupedIndex) => this.StartIndex + groupedIndex; - - public bool ContainsSourceIndex(int sourceIndex) => this.StartIndex <= sourceIndex && sourceIndex <= this.EndIndex; - - protected override object OnRequestItem(int index) => this._groupedList.Source[this.GetSourceIndex(index)]; - - protected override void OnRequestSlowData(int groupedIndex) - { - if (!(this._groupedList.Source is IVirtualList source) || !source.SlowDataRequestsEnabled) - return; - int sourceIndex = this.GetSourceIndex(groupedIndex); - if (sourceIndex >= source.Count) - return; - source.NotifyRequestSlowData(sourceIndex); - } - - public override string ToString() => "Group [" + StartIndex + "-" + EndIndex + "]"; - } -} diff --git a/UIX/Microsoft/Iris/GroupedList.cs b/UIX/Microsoft/Iris/GroupedList.cs deleted file mode 100644 index 517a47f..0000000 --- a/UIX/Microsoft/Iris/GroupedList.cs +++ /dev/null @@ -1,380 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.GroupedList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Session; -using System; -using System.Collections; - -namespace Microsoft.Iris -{ - public class GroupedList : VirtualList - { - private IList _source; - private IComparer _comparer; - private Vector _groups = new Vector(); - private bool _repairGroupsPending; - private bool _adjustCountPending; - - public GroupedList() - : base(true) - { - } - - public GroupedList(IList source, IComparer comparer, int count) - : base(true) - { - this.Comparer = comparer; - this.SetSource(source, count); - } - - public IList Source - { - get => this._source; - set => this.SetSource(value, 1, false); - } - - public void SetSource(IList source, int groupCount) => this.SetSource(source, groupCount, false); - - private void SetSource(IList value, int groupCount, bool disposing) - { - if (this._source == value) - return; - if (this._source is INotifyList sourceNotifyA) - sourceNotifyA.ContentsChanged -= new UIListContentsChangedHandler(this.SourceListModified); - if (this._source is IVirtualList sourceVirtual && sourceVirtual.SlowDataRequestsEnabled) - sourceVirtual.SlowDataAcquireCompleteHandler = null; - this._source = value; - if (this._source is INotifyList sourceNotifyB) - sourceNotifyB.ContentsChanged += new UIListContentsChangedHandler(this.SourceListModified); - if (this._source is IVirtualList sourceVirtualB && sourceVirtualB.SlowDataRequestsEnabled) - sourceVirtualB.SlowDataAcquireCompleteHandler = new SlowDataAcquireCompleteHandler(this.SourceSlowDataAcquired); - if (disposing) - return; - this.FirePropertyChanged("Source"); - this.Regroup(groupCount); - } - - public IComparer Comparer - { - get => this._comparer; - set - { - if (this._comparer == value) - return; - this._comparer = value; - this.Regroup(); - this.FirePropertyChanged(nameof(Comparer)); - } - } - - public void Regroup() => this.Regroup(1); - - public void Regroup(int groupCount) - { - foreach (ModelItem group in this._groups) - group.Dispose(); - this._groups.Clear(); - this.Clear(); - this.Count = this.Source == null || this.Source.Count <= 0 ? 0 : Math.Max(1, groupCount); - } - - protected override object OnRequestItem(int index) - { - if (this._repairGroupsPending && index >= this._groups.Count) - return null; - this.EnsureGroup(index); - return index >= this._groups.Count ? null : (object)this._groups[index]; - } - - private void ScheduleAdjustCount() - { - if (this._adjustCountPending || this.GetCountAdjustment() == 0) - return; - DeferredCall.Post(DispatchPriority.Housekeeping, new DeferredHandler(this.AdjustCount)); - } - - private int GetCountAdjustment() - { - int num1 = 0; - int num2 = this.Source != null ? this.Source.Count : 0; - Group lastGroup = this.GetLastGroup(); - int num3 = lastGroup != null ? lastGroup.EndIndex + 1 : 0; - int num4 = num2 - num3; - int num5 = this.Count - this._groups.Count; - if (this._groups.Count == this.Count && num4 > 0) - { - int num6 = num3 / this._groups.Count; - num1 = Math.Max(1, num4 / num6); - } - else if (lastGroup == null || num5 > num4) - num1 = num4 - num5; - return num1; - } - - private void AdjustCount(object args) - { - this._adjustCountPending = false; - int countAdjustment = this.GetCountAdjustment(); - if (countAdjustment > 0) - { - this.AddRange(countAdjustment); - } - else - { - if (countAdjustment >= 0) - return; - int num = -countAdjustment; - for (int index = 0; index < num; ++index) - this.RemoveAt(this.Count - 1); - } - } - - private bool SourceSlowDataAcquired(IVirtualList list, int sourceIndex) - { - Group groupForSourceIndex = this.GetGroupForSourceIndex(sourceIndex); - groupForSourceIndex?.NotifySlowDataAcquireComplete(sourceIndex - groupForSourceIndex.StartIndex); - return false; - } - - private void EnsureGroup(int maxGroup) - { - if (this.Comparer != null && this.Source != null && this.Source.Count > 0) - { - int previousGroupIndex = this._groups.Count - 1; - Group lastGroup = this.GetLastGroup(); - this.GroupItems(ref lastGroup, ref previousGroupIndex, this.Source.Count - 1, maxGroup, true, false); - } - this.ScheduleAdjustCount(); - } - - private void GroupItems( - ref Group previousGroup, - ref int previousGroupIndex, - int endIndex, - int maxGroup, - bool createGroups, - bool notify) - { - if (this._groups.Count > maxGroup) - return; - if (previousGroup == null) - { - ++previousGroupIndex; - previousGroup = this.InsertGroup(previousGroupIndex, 0, notify); - } - for (int index = previousGroup.EndIndex + 1; index <= endIndex; ++index) - { - if (!this.TryInsertItemIntoGroup(previousGroup, index)) - { - if (!createGroups || this._groups.Count > maxGroup) - break; - ++previousGroupIndex; - previousGroup = this.InsertGroup(previousGroupIndex, index, notify); - } - } - } - - protected override void OnDispose(bool disposing) - { - if (disposing) - this.SetSource(null, 0, true); - base.OnDispose(disposing); - } - - private void SourceListModified(IList listSender, UIListContentsChangedArgs args) - { - if (this.Comparer == null) - return; - bool flag = false; - switch (args.Type) - { - case UIListContentsChangeType.Add: - case UIListContentsChangeType.AddRange: - case UIListContentsChangeType.Insert: - case UIListContentsChangeType.InsertRange: - if (this.Count != 0) - { - Group lastGroup = this.GetLastGroup(); - if (lastGroup != null && args.NewIndex <= lastGroup.EndIndex + 1) - { - flag = true; - int newIndex = args.NewIndex; - int num = args.NewIndex + args.Count - 1; - int groupIndex; - Group groupForSourceIndex = this.GetGroupForSourceIndex(newIndex - 1, out groupIndex); - for (int index = groupIndex + 1; index < this._groups.Count; ++index) - this._groups[index].StartIndex += args.Count; - if (groupForSourceIndex != null && groupForSourceIndex.ContainsSourceIndex(newIndex)) - { - this.SplitGroup(groupForSourceIndex, groupIndex, newIndex - 1, num + 1); - break; - } - break; - } - break; - } - this.Count = 1; - break; - case UIListContentsChangeType.Remove: - int groupIndex1; - Group groupForSourceIndex1 = this.GetGroupForSourceIndex(args.OldIndex, out groupIndex1); - for (int index = groupIndex1 + 1; index < this._groups.Count; ++index) - --this._groups[index].StartIndex; - if (groupForSourceIndex1 != null) - { - if (groupForSourceIndex1.Count == 1) - { - this.RemoveGroup(groupIndex1); - flag = true; - break; - } - groupForSourceIndex1.RemoveAt(args.OldIndex - groupForSourceIndex1.StartIndex); - break; - } - break; - case UIListContentsChangeType.Move: - case UIListContentsChangeType.Modified: - throw new NotImplementedException(); - default: - this.Regroup(); - break; - } - if (!flag || this._repairGroupsPending) - return; - this._repairGroupsPending = true; - DeferredCall.Post(DispatchPriority.Housekeeping, new DeferredHandler(this.RepairGroups)); - } - - private void RepairGroups(object args) - { - this._repairGroupsPending = false; - for (int previousGroupIndex = -1; previousGroupIndex < this._groups.Count; ++previousGroupIndex) - { - Group previousGroup = previousGroupIndex > -1 ? this._groups[previousGroupIndex] : null; - Group group = previousGroupIndex + 1 < this._groups.Count ? this._groups[previousGroupIndex + 1] : null; - int num1 = previousGroup != null ? previousGroup.EndIndex + 1 : 0; - int num2 = group != null ? group.StartIndex - 1 : this.Source.Count - 1; - if (group != null) - { - while (num2 >= num1 && this.TryInsertItemIntoGroup(group, num2)) - --num2; - } - if (num1 <= num2) - this.GroupItems(ref previousGroup, ref previousGroupIndex, num2, int.MaxValue, group != null, true); - if (this.TryMergeWithNext(previousGroupIndex)) - --previousGroupIndex; - } - this.AdjustCount(null); - } - - private bool IsEqualToNext(int sourceIndex) => this.Comparer.Compare(this.Source[sourceIndex], this.Source[sourceIndex + 1]) == 0; - - private bool TryMergeWithNext(int i) - { - if (i >= 0 && i < this._groups.Count - 1) - { - Group group1 = this._groups[i]; - if (this.IsEqualToNext(group1.EndIndex)) - { - Group group2 = this._groups[i + 1]; - group1.AddRange(group2.Count); - this.RemoveGroup(i + 1); - return true; - } - } - return false; - } - - private void RemoveGroup(int groupIndex) - { - this._groups[groupIndex].Dispose(); - this._groups.RemoveAt(groupIndex); - this.RemoveAt(groupIndex); - } - - private bool TryInsertItemIntoGroup(Group group, int index) - { - int sourceIndex = index - 1; - if (index < group.StartIndex) - sourceIndex = index; - if (!this.IsEqualToNext(sourceIndex)) - return false; - group.StartIndex = Math.Min(group.StartIndex, index); - group.Insert(index - group.StartIndex); - return true; - } - - private Group SplitGroup( - Group group, - int groupIndex, - int firstGroupSourceEndIndex, - int secondGroupSourceStartIndex) - { - int count = group.EndIndex - firstGroupSourceEndIndex; - for (int index = 0; index < count; ++index) - group.RemoveAt(group.Count - 1); - return this.InsertGroup(groupIndex + 1, secondGroupSourceStartIndex, count, true); - } - - private Group InsertGroup(int groupInsertIndex, int sourceIndex, bool notify) => this.InsertGroup(groupInsertIndex, sourceIndex, 1, notify); - - private Group InsertGroup( - int groupInsertIndex, - int startSourceIndex, - int count, - bool notify) - { - Group group = new Group(this, startSourceIndex, count); - group.Count = count; - this._groups.Insert(groupInsertIndex, group); - if (notify) - this.Insert(groupInsertIndex); - return group; - } - - private Group GetLastGroup() => this._groups.Count <= 0 ? null : this._groups[this._groups.Count - 1]; - - private Group GetGroupForSourceIndex(int sourceIndex, out int groupIndex) - { - int num1 = 0; - int num2 = this._groups.Count - 1; - groupIndex = num1 + (num2 - num1) / 2; - while (num1 <= num2) - { - Group group = this._groups[groupIndex]; - if (group.StartIndex <= sourceIndex && sourceIndex <= group.EndIndex) - return group; - if (group.StartIndex < sourceIndex) - num1 = groupIndex + 1; - else - num2 = groupIndex - 1; - groupIndex = num1 + (num2 - num1) / 2; - } - --groupIndex; - return null; - } - - public Group GetGroupForSourceIndex(int sourceIndex) => this.GetGroupForSourceIndex(sourceIndex, out int _); - - public int GetGroupIndexForSourceIndex(int sourceIndex) - { - for (int index = 0; index < this.Count; ++index) - { - Group group = (Group)this[index]; - if (group != null) - { - if (sourceIndex < group.Count) - return index; - sourceIndex -= group.Count; - } - else - break; - } - return -1; - } - } -} diff --git a/UIX/Microsoft/Iris/ICommand.cs b/UIX/Microsoft/Iris/ICommand.cs deleted file mode 100644 index 3479644..0000000 --- a/UIX/Microsoft/Iris/ICommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ICommand -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public interface ICommand : INotifyPropertyChanged - { - bool Available { get; set; } - - InvokePolicy Priority { get; set; } - - void Invoke(); - - void Invoke(InvokePolicy invokePolicy); - - event EventHandler Invoked; - } -} diff --git a/UIX/Microsoft/Iris/IDataProvider.cs b/UIX/Microsoft/Iris/IDataProvider.cs deleted file mode 100644 index 763e6b0..0000000 --- a/UIX/Microsoft/Iris/IDataProvider.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IDataProvider -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris -{ - public interface IDataProvider - { - string Name { get; } - - MarkupDataQuery Build(MarkupDataQuerySchema querySchema); - } -} diff --git a/UIX/Microsoft/Iris/IDataProviderBaseObject.cs b/UIX/Microsoft/Iris/IDataProviderBaseObject.cs deleted file mode 100644 index 8692e61..0000000 --- a/UIX/Microsoft/Iris/IDataProviderBaseObject.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IDataProviderBaseObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public interface IDataProviderBaseObject - { - void SetProperty(string propertyName, object value); - - object GetProperty(string propertyName); - } -} diff --git a/UIX/Microsoft/Iris/IDataProviderObject.cs b/UIX/Microsoft/Iris/IDataProviderObject.cs deleted file mode 100644 index 51b4b9a..0000000 --- a/UIX/Microsoft/Iris/IDataProviderObject.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IDataProviderObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public interface IDataProviderObject : IDataProviderBaseObject - { - } -} diff --git a/UIX/Microsoft/Iris/IDataProviderQuery.cs b/UIX/Microsoft/Iris/IDataProviderQuery.cs deleted file mode 100644 index 322add1..0000000 --- a/UIX/Microsoft/Iris/IDataProviderQuery.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IDataProviderQuery -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris -{ - public interface IDataProviderQuery : IDataProviderBaseObject - { - void DeclareOwner(object owner); - - void Dispose(object owner); - - void SetInternalObject(MarkupDataQuery internalQuery); - - void OnInitialize(); - - object Result { get; set; } - - DataProviderQueryStatus Status { get; set; } - - bool Enabled { get; set; } - - void Refresh(); - } -} diff --git a/UIX/Microsoft/Iris/IModelItem.cs b/UIX/Microsoft/Iris/IModelItem.cs deleted file mode 100644 index a848881..0000000 --- a/UIX/Microsoft/Iris/IModelItem.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IModelItem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public interface IModelItem : INotifyPropertyChanged, IModelItemOwner - { - string Description { get; set; } - - bool Selected { get; set; } - - Guid UniqueId { get; set; } - } -} diff --git a/UIX/Microsoft/Iris/IModelItemOwner.cs b/UIX/Microsoft/Iris/IModelItemOwner.cs deleted file mode 100644 index 9993d61..0000000 --- a/UIX/Microsoft/Iris/IModelItemOwner.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IModelItemOwner -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public interface IModelItemOwner - { - void RegisterObject(ModelItem modelItem); - - void UnregisterObject(ModelItem modelItem); - } -} diff --git a/UIX/Microsoft/Iris/ISearchableList.cs b/UIX/Microsoft/Iris/ISearchableList.cs deleted file mode 100644 index becdab7..0000000 --- a/UIX/Microsoft/Iris/ISearchableList.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ISearchableList -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public interface ISearchableList - { - int SearchForString(string searchString); - } -} diff --git a/UIX/Microsoft/Iris/IThreadSafeObject.cs b/UIX/Microsoft/Iris/IThreadSafeObject.cs deleted file mode 100644 index 4629c6b..0000000 --- a/UIX/Microsoft/Iris/IThreadSafeObject.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IThreadSafeObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Threading; - -namespace Microsoft.Iris -{ - public interface IThreadSafeObject - { - Thread Affinity { get; set; } - } -} diff --git a/UIX/Microsoft/Iris/IValueRange.cs b/UIX/Microsoft/Iris/IValueRange.cs deleted file mode 100644 index a8a503b..0000000 --- a/UIX/Microsoft/Iris/IValueRange.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IValueRange -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.ComponentModel; - -namespace Microsoft.Iris -{ - public interface IValueRange : IModelItem, INotifyPropertyChanged, IModelItemOwner - { - object Value { get; } - - void NextValue(); - - void PreviousValue(); - - bool HasNextValue { get; } - - bool HasPreviousValue { get; } - } -} diff --git a/UIX/Microsoft/Iris/Image.cs b/UIX/Microsoft/Iris/Image.cs deleted file mode 100644 index 3e9eb63..0000000 --- a/UIX/Microsoft/Iris/Image.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Image -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris -{ - public class Image : AssemblyObjectProxyHelper.IFrameworkProxyObject - { - private UIImage _uiImage; - private ImageLoadCompleteHandler _completeHandlers; - - public Image(string source) - : this(source, 0, 0, false) - { - } - - public Image(string source, ImageInset imageInset) - : this(source, imageInset.ToInset(), 0, 0, false, false) - { - } - - public Image(string source, int maximumWidth, int maximumHeight) - : this(source, maximumWidth, maximumHeight, false) - { - } - - public Image(string source, int maximumWidth, int maximumHeight, bool flippable) - : this(source, maximumWidth, maximumHeight, flippable, false) - { - } - - public Image( - string source, - int maximumWidth, - int maximumHeight, - bool flippable, - bool antialiasEdges) - : this(source, Inset.Zero, maximumWidth, maximumHeight, flippable, antialiasEdges) - { - } - - public Image( - string source, - Inset inset, - int maximumWidth, - int maximumHeight, - bool flippable, - bool antialiasEdges) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - this._uiImage = new UriImage(source, inset, new Size(maximumWidth, maximumHeight), flippable, antialiasEdges); - } - - public Image( - string uniqueID, - int imageWidth, - int imageHeight, - int stride, - RawImageFormat format, - IntPtr data) - : this(uniqueID, imageWidth, imageHeight, stride, format, data, 0, 0, false) - { - } - - public Image( - string uniqueID, - int imageWidth, - int imageHeight, - int stride, - RawImageFormat format, - IntPtr data, - int maximumWidth, - int maximumHeight, - bool flippable) - : this(uniqueID, imageWidth, imageHeight, stride, format, data, maximumWidth, maximumHeight, flippable, false) - { - } - - public Image( - string uniqueID, - int imageWidth, - int imageHeight, - int stride, - RawImageFormat format, - IntPtr data, - int maximumWidth, - int maximumHeight, - bool flippable, - bool anitaliasEdges) - { - SurfaceFormat surfaceFormat; - if (!ImageFormatUtils.RawImageFormatToSurfaceFormat(format, out surfaceFormat)) - throw new ArgumentException(nameof(format)); - uniqueID = "RAW:" + uniqueID; - this._uiImage = new RawImage(uniqueID, new Size(imageWidth, imageHeight), stride, surfaceFormat, data, false, Inset.Zero, new Size(maximumWidth, maximumHeight), flippable, anitaliasEdges); - } - - public string Source => this._uiImage.Source; - - public bool Load() - { - UIDispatcher.VerifyOnApplicationThread(); - this._uiImage.Load(); - return this._uiImage.Status == ImageStatus.Loading; - } - - public event ImageLoadCompleteHandler ImageLoadComplete - { - add - { - UIDispatcher.VerifyOnApplicationThread(); - if (this._uiImage.Status == ImageStatus.PendingLoad) - throw new InvalidOperationException("Image Load event cannot be used before Load is called"); - if (this._completeHandlers == null) - this._uiImage.LoadComplete += new ContentLoadCompleteHandler(this.OnContentLoadComplete); - this._completeHandlers += value; - } - remove - { - UIDispatcher.VerifyOnApplicationThread(); - if (this._uiImage.Status == ImageStatus.PendingLoad) - throw new InvalidOperationException("Image Load event cannot be used before Load is called"); - this._completeHandlers -= value; - if (this._completeHandlers != null) - return; - this._uiImage.LoadComplete -= new ContentLoadCompleteHandler(this.OnContentLoadComplete); - } - } - - public int Width - { - get - { - UIDispatcher.VerifyOnApplicationThread(); - return this._uiImage.Width; - } - } - - public int Height - { - get - { - UIDispatcher.VerifyOnApplicationThread(); - return this._uiImage.Height; - } - } - - public static void RemoveCache(string source) => RemoveCache(source, 0, 0, false, false); - - public static void RemoveCache(string source, int maximumWidth, int maximumHeight) => RemoveCache(source, maximumWidth, maximumHeight, false, false); - - public static void RemoveCache( - string source, - int maximumWidth, - int maximumHeight, - bool flippable) - { - RemoveCache(source, maximumWidth, maximumHeight, flippable, false); - } - - public static void RemoveCache( - string source, - int maximumWidth, - int maximumHeight, - bool flippable, - bool antialiasEdges) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - UriImage.RemoveCache(source, new Size(maximumWidth, maximumHeight), flippable, antialiasEdges); - } - - private void OnContentLoadComplete(object owner, ImageStatus status) => this._completeHandlers(this); - - public UIImage UIImage - { - get - { - UIDispatcher.VerifyOnApplicationThread(); - return this._uiImage; - } - } - - object AssemblyObjectProxyHelper.IFrameworkProxyObject.FrameworkObject => _uiImage; - } -} diff --git a/UIX/Microsoft/Iris/ImageFormatUtils.cs b/UIX/Microsoft/Iris/ImageFormatUtils.cs deleted file mode 100644 index bd1329e..0000000 --- a/UIX/Microsoft/Iris/ImageFormatUtils.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ImageFormatUtils -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris -{ - public static class ImageFormatUtils - { - public static bool RawImageFormatToSurfaceFormat( - RawImageFormat rawFormat, - out SurfaceFormat surfaceFormat) - { - surfaceFormat = SurfaceFormat.None; - bool flag = true; - switch (rawFormat) - { - case RawImageFormat.A8R8G8B8: - surfaceFormat = SurfaceFormat.ARGB32; - break; - case RawImageFormat.X8R8G8B8: - surfaceFormat = SurfaceFormat.RGB32; - break; - case RawImageFormat.R8G8B8: - surfaceFormat = SurfaceFormat.RGB24; - break; - default: - flag = false; - break; - } - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/ImageInset.cs b/UIX/Microsoft/Iris/ImageInset.cs deleted file mode 100644 index ff370ec..0000000 --- a/UIX/Microsoft/Iris/ImageInset.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ImageInset -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris -{ - public struct ImageInset - { - private int _left; - private int _top; - private int _right; - private int _bottom; - - public ImageInset(int left, int top, int right, int bottom) - { - this._left = left; - this._top = top; - this._right = right; - this._bottom = bottom; - } - - public int Left => this._left; - - public int Top => this._top; - - public int Right => this._right; - - public int Bottom => this._bottom; - - public Inset ToInset() => new Inset(this._left, this._top, this._right, this._bottom); - } -} diff --git a/UIX/Microsoft/Iris/ImageLoadCompleteHandler.cs b/UIX/Microsoft/Iris/ImageLoadCompleteHandler.cs deleted file mode 100644 index e44bee7..0000000 --- a/UIX/Microsoft/Iris/ImageLoadCompleteHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ImageLoadCompleteHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public delegate void ImageLoadCompleteHandler(Image image); -} diff --git a/UIX/Microsoft/Iris/IndexedTree.cs b/UIX/Microsoft/Iris/IndexedTree.cs deleted file mode 100644 index 53ef5a8..0000000 --- a/UIX/Microsoft/Iris/IndexedTree.cs +++ /dev/null @@ -1,444 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IndexedTree -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris -{ - public class IndexedTree - { - private object _lockObj; - private IndexedTree.TreeNode _root; - private IndexedTree.TreeNode _poolHead; - private int _lastSearchedIndex; - - public IndexedTree() - { - this._lastSearchedIndex = -1; - this._lockObj = new object(); - } - - private void SetRoot(IndexedTree.TreeNode newValue) - { - if (this._root == newValue) - return; - this._root = newValue; - this._lastSearchedIndex = -1; - } - - private IndexedTree.TreeNode AcquireTreeNode() - { - IndexedTree.TreeNode treeNode = this._poolHead; - if (this._poolHead != null) - { - this._poolHead = this._poolHead.parent; - treeNode.parent = null; - } - else - treeNode = new IndexedTree.TreeNode(); - return treeNode; - } - - private void ReclaimTreeNode(IndexedTree.TreeNode node) - { - node.parent = this._poolHead; - node.left = null; - node.right = null; - this._poolHead = node; - } - - public void Store(int index, object data) - { - lock (this._lockObj) - { - IndexedTree.TreeNode newValue = this.Find(index); - if (newValue == null) - { - newValue = this.AcquireTreeNode(); - newValue.delta = index; - newValue.parent = null; - if (this._root != null) - { - this._root.parent = newValue; - if (this._root.delta < index) - { - newValue.left = this._root; - if (this._root.right != null && this._root.right.delta + this._root.delta > index) - { - this._root.right.parent = newValue; - newValue.right = this._root.right; - newValue.right.delta = this._root.right.delta + this._root.delta - index; - this._root.right = null; - } - } - else - { - newValue.right = this._root; - if (this._root.left != null && this._root.left.delta + this._root.delta < index) - { - this._root.left.parent = newValue; - newValue.left = this._root.left; - newValue.left.delta = this._root.left.delta + this._root.delta - index; - this._root.left = null; - } - } - this._root.delta -= index; - } - this.SetRoot(newValue); - } - newValue.data = data; - } - } - - public void Remove(int index) - { - lock (this._lockObj) - { - IndexedTree.TreeNode node = this.Find(index); - if (node == null) - return; - IndexedTree.TreeNode treeNode; - for (; node.left != null; node = treeNode) - { - if (node.right == null) - { - IndexedTree.TreeNode left = node.left; - if (node == this._root) - this.SetRoot(left); - else if (node.IsRightBranch) - node.parent.right = left; - else - node.parent.left = left; - left.delta += node.delta; - left.parent = node.parent; - this.ReclaimTreeNode(node); - return; - } - treeNode = node.left; - int num1 = index + treeNode.delta; - while (treeNode.right != null) - { - treeNode = treeNode.right; - num1 += treeNode.delta; - } - node.data = treeNode.data; - node.delta = num1; - if (node == this._root) - this._lastSearchedIndex = -1; - int num2 = num1 - index; - node.left.delta -= num2; - node.right.delta -= num2; - } - IndexedTree.TreeNode right = node.right; - if (node == this._root) - this.SetRoot(right); - else if (node.IsRightBranch) - node.parent.right = right; - else - node.parent.left = right; - if (right != null) - { - right.delta += node.delta; - right.parent = node.parent; - } - this.ReclaimTreeNode(node); - } - } - - public bool TryGetData(int index, out object data) - { - lock (this._lockObj) - { - IndexedTree.TreeNode treeNode = this.Find(index); - data = treeNode == null ? null : treeNode.data; - return treeNode != null; - } - } - - public void InsertRange(int index, int count) - { - lock (this._lockObj) - { - this.Find(index); - if (this._root == null) - return; - IndexedTree.TreeNode node = this._root; - if (this._root.delta < index) - node = this._root.right; - this.ChangeIndex(node, count); - } - } - - private void ChangeIndex(IndexedTree.TreeNode node, int amount) - { - if (node == null) - return; - node.delta += amount; - if (node.left == null) - return; - node.left.delta -= amount; - } - - public void Insert(int index, bool setValue, object data) - { - lock (this._lockObj) - { - this.InsertRange(index, 1); - if (!setValue) - return; - this.Store(index, data); - } - } - - public void RemoveIndex(int index) - { - lock (this._lockObj) - { - IndexedTree.TreeNode treeNode = this.Find(index); - if (treeNode != null) - { - if (treeNode.right != null) - --treeNode.right.delta; - this.Remove(index); - } - else - { - if (this._root == null) - return; - IndexedTree.TreeNode node = this._root; - if (this._root.delta < index) - node = this._root.right; - this.ChangeIndex(node, -1); - } - } - } - - public void Clear() - { - lock (this._lockObj) - this.SetRoot(null); - } - - public bool Contains(int index) - { - lock (this._lockObj) - return this.Find(index) != null; - } - - public object this[int index] - { - get - { - lock (this._lockObj) - { - object data; - this.TryGetData(index, out data); - return data; - } - } - set - { - lock (this._lockObj) - this.Store(index, value); - } - } - - private IndexedTree.TreeNode Find(int index) - { - if (this._lastSearchedIndex == index && this._root != null) - return this._root.delta != index ? null : this._root; - this._lastSearchedIndex = index; - IndexedTree.TreeNode treeNode = this._root; - IndexedTree.TreeNode node = null; - int num = 0; - bool flag = false; - while (!flag && treeNode != null) - { - num += treeNode.delta; - node = treeNode; - if (num == index) - flag = true; - else - treeNode = num <= index ? treeNode.right : treeNode.left; - } - if (node != null) - this.Splay(node); - this._lastSearchedIndex = index; - return !flag ? null : treeNode; - } - - private void Splay(IndexedTree.TreeNode node) - { - for (IndexedTree.TreeNode parent = node.parent; parent != null; parent = node.parent) - { - if (parent.parent == null) - this.Zig(node); - else if (node.IsLeftBranch == parent.IsLeftBranch) - this.ZigZig(node, parent); - else - this.ZigZag(node); - } - this.SetRoot(node); - } - - private void Zig(IndexedTree.TreeNode item) => this.Rotate(item); - - private void ZigZig(IndexedTree.TreeNode item, IndexedTree.TreeNode parent) - { - this.Rotate(parent); - this.Rotate(item); - } - - private void ZigZag(IndexedTree.TreeNode item) - { - this.Rotate(item); - this.Rotate(item); - } - - private void Rotate(IndexedTree.TreeNode child) - { - IndexedTree.TreeNode parent = child.parent; - int num1 = -child.delta; - int num2 = child.delta + parent.delta; - IndexedTree.TreeNode treeNode; - if (child.IsLeftBranch) - { - treeNode = child.right; - parent.left = treeNode; - child.parent = parent.parent; - child.right = parent; - } - else - { - treeNode = child.left; - parent.right = treeNode; - child.parent = parent.parent; - child.left = parent; - } - if (treeNode != null) - { - treeNode.parent = parent; - treeNode.delta += child.delta; - } - if (child.parent != null) - { - if (num2 < 0) - child.parent.left = child; - else - child.parent.right = child; - } - child.delta = num2; - parent.delta = num1; - parent.parent = child; - } - - public IndexedTree.TreeNode Root => this._root; - - public IndexedTree.TreeEnumerator GetEnumerator() => new IndexedTree.TreeEnumerator(this); - - [Conditional("DEBUG")] - private void DEBUG_BumpGeneration() - { - } - - public class TreeNode - { - public int delta; - public IndexedTree.TreeNode left; - public IndexedTree.TreeNode right; - public IndexedTree.TreeNode parent; - public object data; - - public bool IsLeftBranch => this.delta < 0; - - public bool IsRightBranch => this.delta > 0; - } - - public struct TreeEntry - { - private int _index; - private object _data; - - public TreeEntry(int index, object data) - { - this._index = index; - this._data = data; - } - - public int Index => this._index; - - public object Value => this._data; - } - - public struct TreeEnumerator - { - private IndexedTree _tree; - private bool _started; - private IndexedTree.TreeNode _current; - private int _index; - - public TreeEnumerator(IndexedTree tree) - { - this._tree = tree; - this._current = this._tree._root; - this._started = false; - this._index = this._current != null ? this._current.delta : -1; - } - - [Conditional("DEBUG")] - private void DEBUG_CheckGeneration() - { - } - - private void MoveToLeftmostChild() - { - if (this._current == null) - return; - while (this._current.left != null) - { - this._current = this._current.left; - this._index += this._current.delta; - } - } - - public bool MoveNext() - { - lock (this._tree._lockObj) - { - if (!this._started) - { - this._started = true; - this.MoveToLeftmostChild(); - } - else if (this._current.right != null) - { - this._current = this._current.right; - this._index += this._current.delta; - this.MoveToLeftmostChild(); - } - else if (this._current.IsLeftBranch) - { - this._index -= this._current.delta; - this._current = this._current.parent; - } - else - { - for (; this._current != null && this._current.IsRightBranch; this._current = this._current.parent) - this._index -= this._current.delta; - if (this._current != null) - { - this._index -= this._current.delta; - this._current = this._current.parent; - } - } - return this._current != null; - } - } - - public IndexedTree.TreeEntry Current => new IndexedTree.TreeEntry(this._index, this._current.data); - } - } -} diff --git a/UIX/Microsoft/Iris/Input/AppCommandMapping.cs b/UIX/Microsoft/Iris/Input/AppCommandMapping.cs deleted file mode 100644 index 619f695..0000000 --- a/UIX/Microsoft/Iris/Input/AppCommandMapping.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.AppCommandMapping -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class AppCommandMapping - { - private AppCommandMapping() - { - } - - public static CommandCode Find(uint appCommand) - { - CommandCode commandCode = CommandCode.None; - switch (appCommand) - { - case 1: - commandCode = CommandCode.Back; - break; - case 11: - commandCode = CommandCode.SkipForward; - break; - case 12: - commandCode = CommandCode.SkipBack; - break; - case 13: - commandCode = CommandCode.Stop; - break; - case 14: - commandCode = CommandCode.PlayPause; - break; - case 46: - commandCode = CommandCode.Play; - break; - case 47: - commandCode = CommandCode.Pause; - break; - case 48: - commandCode = CommandCode.Record; - break; - case 49: - commandCode = CommandCode.FF; - break; - case 50: - commandCode = CommandCode.Rewind; - break; - } - return commandCode; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/CommandCode.cs b/UIX/Microsoft/Iris/Input/CommandCode.cs deleted file mode 100644 index 61c239e..0000000 --- a/UIX/Microsoft/Iris/Input/CommandCode.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.CommandCode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public enum CommandCode - { - None = 0, - Guide = 1, - ChannelUp = 2, - PageUp = 2, - ChannelDown = 3, - PageDown = 3, - Play = 4, - Pause = 5, - Record = 6, - FF = 7, - Rewind = 8, - SkipForward = 9, - SkipBack = 10, // 0x0000000A - Stop = 11, // 0x0000000B - Mute = 12, // 0x0000000C - VolumeUp = 13, // 0x0000000D - VolumeDown = 14, // 0x0000000E - Details = 15, // 0x0000000F - Back = 16, // 0x00000010 - Home = 17, // 0x00000011 - MyPictures = 18, // 0x00000012 - LiveTV = 19, // 0x00000013 - MyShows = 20, // 0x00000014 - MyMusic = 21, // 0x00000015 - DVDMenu = 22, // 0x00000016 - MyVideos = 23, // 0x00000017 - DVDAudio = 24, // 0x00000018 - DVDSubtitles = 25, // 0x00000019 - Clear = 26, // 0x0000001A - MyTV = 27, // 0x0000001B - Forward = 28, // 0x0000001C - PlayPause = 30, // 0x0000001E - GoToBeginning = 31, // 0x0000001F - GoToEnd = 32, // 0x00000020 - StartOfList = 33, // 0x00000021 - EndOfList = 34, // 0x00000022 - ClosedCaption = 35, // 0x00000023 - Enter = 36, // 0x00000024 - ToggleWindowMode = 37, // 0x00000025 - RecordedTV = 38, // 0x00000026 - Refresh = 39, // 0x00000027 - DVDAngle = 40, // 0x00000028 - Reload = 41, // 0x00000029 - Print = 42, // 0x0000002A - Console = 43, // 0x0000002B - Kanji = 44, // 0x0000002C - Kana = 45, // 0x0000002D - MyRadio = 46, // 0x0000002E - Copy = 47, // 0x0000002F - Paste = 48, // 0x00000030 - SearchGuide = 49, // 0x00000031 - AdvanceZoomMode = 50, // 0x00000032 - MyGames = 51, // 0x00000033 - MorePrograms = 52, // 0x00000034 - Teletext = 53, // 0x00000035 - TeletextRed = 54, // 0x00000036 - TeletextGreen = 55, // 0x00000037 - TeletextYellow = 56, // 0x00000038 - TeletextBlue = 57, // 0x00000039 - MCEPower = 58, // 0x0000003A - DesignMode = 59, // 0x0000003B - ToBeRecorded = 60, // 0x0000003C - Messenger = 61, // 0x0000003D - Deprecated1 = 62, // 0x0000003E - Hangul = 63, // 0x0000003F - Hanja = 64, // 0x00000040 - PlayDisc = 65, // 0x00000041 - ToggleLock = 66, // 0x00000042 - SymphonyMessenger = 67, // 0x00000043 - OnlineSpotlight = 68, // 0x00000044 - OEMExtensibilityLaunch1 = 69, // 0x00000045 - Extender = 70, // 0x00000046 - Minimize = 71, // 0x00000047 - Close = 72, // 0x00000048 - OEMExtensibility0 = 73, // 0x00000049 - OEMExtensibility1 = 74, // 0x0000004A - OEMExtensibility2 = 75, // 0x0000004B - OEMExtensibility3 = 76, // 0x0000004C - OEMExtensibility4 = 77, // 0x0000004D - OEMExtensibility5 = 78, // 0x0000004E - OEMExtensibility6 = 79, // 0x0000004F - OEMExtensibility7 = 80, // 0x00000050 - OEMExtensibility8 = 81, // 0x00000051 - OEMExtensibility9 = 82, // 0x00000052 - OEMExtensibility10 = 83, // 0x00000053 - OEMExtensibility11 = 84, // 0x00000054 - } -} diff --git a/UIX/Microsoft/Iris/Input/DragDropInfo.cs b/UIX/Microsoft/Iris/Input/DragDropInfo.cs deleted file mode 100644 index d4fe7ba..0000000 --- a/UIX/Microsoft/Iris/Input/DragDropInfo.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.DragDropInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class DragDropInfo : MouseInfo - { - private static InputInfo.InfoType s_poolType = InfoType.DragDrop; - private InputModifiers _modifiers; - private DragOperation _operation; - - static DragDropInfo() => SetPoolLimitMode(s_poolType, false); - - private DragDropInfo() - { - } - - public static DragDropInfo Create( - IRawInputSite rawSource, - int x, - int y, - InputModifiers modifiers, - DragOperation operation) - { - DragDropInfo dragDropInfo = (DragDropInfo)GetFromPool(s_poolType) ?? new DragDropInfo(); - dragDropInfo.Initialize(rawSource, x, y, modifiers, operation); - return dragDropInfo; - } - - public void Initialize( - IRawInputSite rawSource, - int x, - int y, - InputModifiers modifiers, - DragOperation operation) - { - this._modifiers = modifiers; - this._operation = operation; - this.Initialize(rawSource, x, y, EventTypeForDragOperation(operation)); - } - - protected override InputInfo.InfoType PoolType => s_poolType; - - public InputModifiers Modifiers => this._modifiers; - - public DragOperation Operation => this._operation; - - private static InputEventType EventTypeForDragOperation(DragOperation operation) - { - switch (operation) - { - case DragOperation.Enter: - return InputEventType.DragEnter; - case DragOperation.Over: - return InputEventType.DragOver; - case DragOperation.Leave: - return InputEventType.DragLeave; - case DragOperation.Drop: - return InputEventType.DragDropped; - case DragOperation.DragComplete: - return InputEventType.DragComplete; - default: - return InputEventType.Invalid; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Input/DragOperation.cs b/UIX/Microsoft/Iris/Input/DragOperation.cs deleted file mode 100644 index 2375ffb..0000000 --- a/UIX/Microsoft/Iris/Input/DragOperation.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.DragOperation -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public enum DragOperation - { - Enter, - Over, - Leave, - Drop, - DragComplete, - } -} diff --git a/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs b/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs deleted file mode 100644 index 79c8a5c..0000000 --- a/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.HIDCommandMapping -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class HIDCommandMapping - { - private static readonly HIDCommandMapping[] s_mappings = new HIDCommandMapping[41] - { - new HIDCommandMapping(CommandCode.Guide, 141U, 12U), - new HIDCommandMapping(CommandCode.ChannelUp, 156U, 12U), - new HIDCommandMapping(CommandCode.ChannelDown, 157U, 12U), - new HIDCommandMapping(CommandCode.Print, 520U, 12U), - new HIDCommandMapping(CommandCode.Details, 521U, 12U), - new HIDCommandMapping(CommandCode.Home, 13U, 65468U), - new HIDCommandMapping(CommandCode.DVDMenu, 36U, 65468U), - new HIDCommandMapping(CommandCode.LiveTV, 37U, 65468U), - new HIDCommandMapping(CommandCode.AdvanceZoomMode, 39U, 65468U), - new HIDCommandMapping(CommandCode.OnlineSpotlight, 60U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibilityLaunch1, 61U, 65468U), - new HIDCommandMapping(CommandCode.ClosedCaption, 43U, 65468U), - new HIDCommandMapping(CommandCode.MyTV, 70U, 65468U), - new HIDCommandMapping(CommandCode.MyMusic, 71U, 65468U), - new HIDCommandMapping(CommandCode.MyShows, 72U, 65468U), - new HIDCommandMapping(CommandCode.MyPictures, 73U, 65468U), - new HIDCommandMapping(CommandCode.MyVideos, 74U, 65468U), - new HIDCommandMapping(CommandCode.DVDAngle, 75U, 65468U), - new HIDCommandMapping(CommandCode.DVDAudio, 76U, 65468U), - new HIDCommandMapping(CommandCode.DVDSubtitles, 77U, 65468U), - new HIDCommandMapping(CommandCode.MyRadio, 80U, 65468U), - new HIDCommandMapping(CommandCode.Teletext, 90U, 65468U), - new HIDCommandMapping(CommandCode.TeletextRed, 91U, 65468U), - new HIDCommandMapping(CommandCode.TeletextGreen, 92U, 65468U), - new HIDCommandMapping(CommandCode.TeletextYellow, 93U, 65468U), - new HIDCommandMapping(CommandCode.TeletextBlue, 94U, 65468U), - new HIDCommandMapping(CommandCode.SymphonyMessenger, 100U, 65468U), - new HIDCommandMapping(CommandCode.Messenger, 105U, 65468U), - new HIDCommandMapping(CommandCode.MCEPower, 112U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility0, 50U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility1, 51U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility2, 52U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility3, 53U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility4, 54U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility5, 55U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility6, 56U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility7, 57U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility8, 58U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility9, 128U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility10, 129U, 65468U), - new HIDCommandMapping(CommandCode.OEMExtensibility11, 111U, 65468U) - }; - private CommandCode _command; - private uint _usage; - private uint _usagePage; - - private HIDCommandMapping(CommandCode command, uint usage, uint usagePage) - { - this._command = command; - this._usage = usage; - this._usagePage = usagePage; - } - - public static CommandCode Find(uint usage, uint usagePage) - { - foreach (HIDCommandMapping mapping in s_mappings) - { - if ((int)mapping._usage == (int)usage && (int)mapping._usagePage == (int)usagePage) - return mapping._command; - } - return CommandCode.None; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/HidDevice.cs b/UIX/Microsoft/Iris/Input/HidDevice.cs deleted file mode 100644 index a84f9e1..0000000 --- a/UIX/Microsoft/Iris/Input/HidDevice.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.HidDevice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class HidDevice : InputDevice - { - public HidDevice(InputManager manager) - : base(manager) - { - } - - public KeyCommandInfo OnRawInput(CommandCode command, ref RawHidData args) - { - KeyCommandInfo keyCommandInfo = null; - if (command != CommandCode.None) - keyCommandInfo = KeyCommandInfo.Create(args._action, args._deviceType, command); - return keyCommandInfo; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/ICookedInputSite.cs b/UIX/Microsoft/Iris/Input/ICookedInputSite.cs deleted file mode 100644 index 70376b5..0000000 --- a/UIX/Microsoft/Iris/Input/ICookedInputSite.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.ICookedInputSite -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public interface ICookedInputSite - { - IRawInputSite RawInputSource { get; } - - bool IsValid { get; } - - bool AllowDoubleClicks { get; } - } -} diff --git a/UIX/Microsoft/Iris/Input/IInputCustomFocus.cs b/UIX/Microsoft/Iris/Input/IInputCustomFocus.cs deleted file mode 100644 index 55c650f..0000000 --- a/UIX/Microsoft/Iris/Input/IInputCustomFocus.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.IInputCustomFocus -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public interface IInputCustomFocus - { - bool OverrideHostFocus(); - } -} diff --git a/UIX/Microsoft/Iris/Input/InputDevice.cs b/UIX/Microsoft/Iris/Input/InputDevice.cs deleted file mode 100644 index 05edc6b..0000000 --- a/UIX/Microsoft/Iris/Input/InputDevice.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputDevice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public abstract class InputDevice - { - private InputManager _manager; - - public InputDevice(InputManager manager) => this._manager = manager; - - public InputManager Manager => this._manager; - } -} diff --git a/UIX/Microsoft/Iris/Input/InputEventType.cs b/UIX/Microsoft/Iris/Input/InputEventType.cs deleted file mode 100644 index 9be2e02..0000000 --- a/UIX/Microsoft/Iris/Input/InputEventType.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputEventType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public enum InputEventType - { - Invalid, - CommandDown, - CommandUp, - GainKeyFocus, - LoseKeyFocus, - KeyDown, - KeyUp, - KeyCharacter, - MouseMove, - GainMouseFocus, - LoseMouseFocus, - MousePrimaryDown, - MouseSecondaryDown, - MousePrimaryUp, - MouseSecondaryUp, - MouseDoubleClick, - MouseWheel, - DragEnter, - DragOver, - DragLeave, - DragDropped, - DragComplete, - } -} diff --git a/UIX/Microsoft/Iris/Input/InputInfo.cs b/UIX/Microsoft/Iris/Input/InputInfo.cs deleted file mode 100644 index c4a7ff5..0000000 --- a/UIX/Microsoft/Iris/Input/InputInfo.cs +++ /dev/null @@ -1,146 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.Input -{ - public abstract class InputInfo - { - private static InputInfo.InfoPool[] s_pools; - protected ICookedInputSite _target; - protected InputEventType _eventType; - private byte _lockCount; - private bool _routeTruncated; - private bool _handled; - - protected void Initialize(InputEventType eventType) - { - this._eventType = eventType; - this._lockCount = 0; - this._routeTruncated = false; - this._handled = false; - } - - [Conditional("DEBUG")] - protected void DEBUG_AssertInitialized() - { - } - - [Conditional("DEBUG")] - private void DEBUG_AssertZombied() - { - } - - protected static void SetPoolLimitMode(InputInfo.InfoType type, bool keepSingle) - { - if (s_pools == null) - s_pools = new InputInfo.InfoPool[9]; - s_pools[(int)type].SetLimitMode(keepSingle); - } - - protected abstract InputInfo.InfoType PoolType { get; } - - protected virtual void Zombie() - { - this._target = null; - this._eventType = InputEventType.Invalid; - } - - protected static InputInfo GetFromPool(InputInfo.InfoType poolType) => s_pools[(int)poolType].GetPooledInfo(); - - public void ReturnToPool() - { - if (!this.Poolable) - return; - s_pools[(int)this.PoolType].RecycleInfo(this); - } - - private bool Poolable => this._lockCount == 0; - - public void Lock() => ++this._lockCount; - - public void Unlock() - { - --this._lockCount; - if (this._lockCount != 0) - return; - this.ReturnToPool(); - } - - public bool Handled => this._handled; - - public void MarkHandled() => this._handled = true; - - public bool RouteTruncated => this._routeTruncated; - - public ICookedInputSite Target => this._target; - - public virtual InputEventType EventType => this._eventType; - - public void TruncateRoute() => this._routeTruncated = true; - - public virtual void UpdateTarget(ICookedInputSite target) => this._target = target; - - public override string ToString() => this.GetType().Name; - - private struct InfoPool - { - private int _numEntries; - private int _maxEntries; - private object _storage; - - public void SetLimitMode(bool keepSingle) => this._maxEntries = keepSingle ? 1 : 10; - - public InputInfo GetPooledInfo() - { - InputInfo inputInfo = null; - if (this._numEntries > 0) - { - inputInfo = this._maxEntries != 1 ? ((InputInfo[])this._storage)[this._numEntries - 1] : (InputInfo)this._storage; - --this._numEntries; - } - return inputInfo; - } - - public bool RecycleInfo(InputInfo info) - { - bool flag = false; - if (this._numEntries < this._maxEntries) - { - info.Zombie(); - if (this._maxEntries == 1) - { - this._storage = info; - } - else - { - if (this._storage == null) - this._storage = (new InputInfo[this._maxEntries]); - ((InputInfo[])this._storage)[this._numEntries] = info; - } - ++this._numEntries; - flag = true; - } - return flag; - } - } - - public enum InfoType - { - KeyCommand, - KeyFocus, - KeyState, - KeyCharacter, - MouseFocus, - MouseMove, - MouseButton, - MouseWheel, - DragDrop, - NumTypes, - } - } -} diff --git a/UIX/Microsoft/Iris/Input/InputItem.cs b/UIX/Microsoft/Iris/Input/InputItem.cs deleted file mode 100644 index 9a71fd1..0000000 --- a/UIX/Microsoft/Iris/Input/InputItem.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputItem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Debug; -using Microsoft.Iris.Queues; - -namespace Microsoft.Iris.Input -{ - public class InputItem : QueueItem - { - private const int c_maxCacheCount = 5; - private static InputItem s_cache; - private static int s_cachedCount; - private InputManager _manager; - private ICookedInputSite _target; - private InputInfo _info; - - private InputItem() - { - } - - public static InputItem Create( - InputManager manager, - ICookedInputSite target, - InputInfo info) - { - InputItem inputItem = AllocateFromPool(); - inputItem._manager = manager; - inputItem._target = target; - inputItem._info = info; - return inputItem; - } - - private static InputItem AllocateFromPool() - { - InputItem inputItem = null; - if (s_cache != null) - { - inputItem = s_cache; - s_cache = (InputItem)inputItem._next; - inputItem._next = null; - --s_cachedCount; - } - if (inputItem == null) - inputItem = new InputItem(); - return inputItem; - } - - public void ReturnToPool() => this.ReturnToPool(true); - - private void ReturnToPool(bool returnInfoToo) - { - if (returnInfoToo) - this._info.ReturnToPool(); - this._manager = null; - this._target = null; - this._info = null; - this._prev = null; - this._next = null; - this._owner = null; - if (s_cachedCount >= 5) - return; - this._next = s_cache; - s_cache = this; - ++s_cachedCount; - } - - public InputManager Manager => this._manager; - - public InputInfo Info => this._info; - - public override string ToString() => base.ToString() + " -> " + _info + " -> " + DebugHelpers.DEBUG_ObjectToString(_target); - - public override void Dispatch() - { - if (this._info.Target == null) - this._info.UpdateTarget(this._target); - this._info.Lock(); - this._manager.DeliverInput(this._target, this._info); - this._info.Unlock(); - this.ReturnToPool(false); - } - - public void UpdateInputSite(ICookedInputSite target) => this._target = target; - } -} diff --git a/UIX/Microsoft/Iris/Input/InputManager.cs b/UIX/Microsoft/Iris/Input/InputManager.cs deleted file mode 100644 index 4babbd3..0000000 --- a/UIX/Microsoft/Iris/Input/InputManager.cs +++ /dev/null @@ -1,653 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputManager -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Debug; -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Queues; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Input -{ - public class InputManager : IRawInputCallbacks - { - private InputModifiers _HACK_sysModifiers; - private UISession _session; - private InputQueue _inputQueue; - private int _inputSuspendCount; - private readonly SimpleCallback _resumeInput; - private KeyboardDevice _keyboardDevice; - private MouseDevice _mouseDevice; - private HidDevice _remoteDevice; - private DateTime _lastInputTime; - private bool _keyFocusCanBeNull; - private bool _ignoreHungKeyFocus; - private ICookedInputSite _ignoreHungKeyFocusTarget; - private bool _inputDisabled; - private KeyCoalesceFilter _keyCoalescePolicy; - private KeyStateInfo _currentCoalesceKeyEvent; - private bool _currentCoalesceUndelivered; - private Point _physicalMouseOffset; - private bool _refreshHitTargetPending; - private readonly SimpleCallback _refreshHitTargetHandler; - private UIZone _mouseFocusZone; - private UIZone _keyFocusZone; - private static readonly DeferredHandler s_deliverCoalescedKey = new DeferredHandler(DeliverCoalescedKey); - - public InputManager(UISession session) - { - this._session = session; - this._keyFocusCanBeNull = true; - this._lastInputTime = DateTime.MinValue; - this._inputQueue = new InputQueue(this); - this._resumeInput = new SimpleCallback(this.ResumeInput); - this._refreshHitTargetHandler = new SimpleCallback(this.RefreshHitTargetHandler); - } - - public void ConnectToRenderer() => this.Session.RenderSession.InputSystem.RegisterRawInputCallbacks(this); - - public void PrepareToShutDown() - { - this.KeyCoalescePolicy = null; - this.EndKeyCoalesce(); - this.InvalidKeyFocus = null; - this._inputDisabled = true; - this.Session.RenderSession.InputSystem.UnregisterRawInputCallbacks(); - this._inputQueue.PrepareToShutDown(); - } - - public UISession Session => this._session; - - public InputQueue Queue => this._inputQueue; - - public InputModifiers Modifiers => this.Keyboard.KeyboardModifiers | this.Mouse.MouseModifiers; - - public InputModifiers DragModifiers => this._inputQueue.DragModifiers; - - public KeyboardDevice Keyboard - { - get - { - if (this._keyboardDevice == null) - this._keyboardDevice = new KeyboardDevice(this); - return this._keyboardDevice; - } - } - - public MouseDevice Mouse - { - get - { - if (this._mouseDevice == null) - this._mouseDevice = new MouseDevice(this); - return this._mouseDevice; - } - } - - public HidDevice Remote - { - get - { - if (this._remoteDevice == null) - this._remoteDevice = new HidDevice(this); - return this._remoteDevice; - } - } - - public DateTime LastInputTime => this._lastInputTime; - - public bool InputEnabled => !this._inputDisabled; - - public bool KeyFocusCanBeNull - { - get => this._inputDisabled || this._keyFocusCanBeNull; - set - { - if (this._keyFocusCanBeNull == value) - return; - this._keyFocusCanBeNull = value; - if (value) - return; - this._inputQueue.RevalidateInputSiteUsage(null, false); - } - } - - public ICookedInputSite RawKeyFocus => this._inputQueue.PendingKeyFocus; - - public ICookedInputSite RawInstantaneousKeyFocus => this._inputQueue.InstantaneousKeyFocus; - - public bool RawKeyFocusIsDefault => this._inputQueue.PendingKeyFocusIsDefault; - - public KeyCoalesceFilter KeyCoalescePolicy - { - get => this._keyCoalescePolicy; - set => this._keyCoalescePolicy = value; - } - - public Point MostRecentPhysicalMousePos - { - get => this._physicalMouseOffset; - set - { - if (!(this._physicalMouseOffset != value)) - return; - this._physicalMouseOffset = value; - if (this.MousePositionChanged == null) - return; - this.MousePositionChanged(this, EventArgs.Empty); - } - } - - public event InvalidKeyFocusHandler InvalidKeyFocus; - - public event EventHandler MousePositionChanged; - - public event InputNotificationHandler PreviewInput; - - public event InputNotificationHandler HandledInput; - - public event InputNotificationHandler UnhandledInput; - - public void SuspendInputUntil(DispatchPriority unlockPriority) - { - DeferredCall.Post(unlockPriority, this._resumeInput); - this.Session.Dispatcher.BlockInputQueue(true); - ++this._inputSuspendCount; - } - - private void ResumeInput() - { - if (this._inputSuspendCount <= 0) - return; - --this._inputSuspendCount; - if (this._inputSuspendCount != 0) - return; - this.Session.Dispatcher.BlockInputQueue(false); - } - - public void UpdateLastInputTime() => this._lastInputTime = DateTime.UtcNow; - - public InputHandlerFlags InputHandlerMask => InputHandlerFlags.All; - - public void HandleRawKeyboardInput( - uint message, - InputModifiers modifiers, - ref RawKeyboardData args) - { - KeyInfo info = this.Keyboard.OnRawInput(message, modifiers, ref args); - if (info != null) - this._inputQueue.RawKeyAction(info); - this.UpdateLastInputTime(); - } - - public void HandleRawMouseInput(uint message, InputModifiers modifiers, ref RawMouseData args) - { - this.Mouse.OnRawInput(message, modifiers, ref args); - this.UpdateLastInputTime(); - } - - public void HandleRawHidInput(ref RawHidData args) - { - KeyActionInfo keyActionInfo = this.Remote.OnRawInput(HIDCommandMapping.Find(args._commandCode, args._usagePage), ref args); - if (keyActionInfo != null) - this._inputQueue.RawKeyAction(keyActionInfo); - this.UpdateLastInputTime(); - } - - public void HandleAppCommand(ref RawHidData args) - { - KeyActionInfo keyActionInfo = this.Remote.OnRawInput(AppCommandMapping.Find(args._commandCode), ref args); - if (keyActionInfo != null) - this._inputQueue.RawKeyAction(keyActionInfo); - this.UpdateLastInputTime(); - } - - public void HandleRawDragInput(uint message, InputModifiers modifiers, ref RawDragData args) - { - using (DataObject dataObject = new DataObject(args._pDataStream)) - { - object data = null; - if (message == 0U) - data = dataObject.GetExternalData(); - this.Mouse.OnRawInput(message, modifiers, ref args, data); - } - this.UpdateLastInputTime(); - } - - public void RevalidateInputSiteUsage( - ICookedInputSite target, - bool recursiveFlag, - bool knownDisabledFlag) - { - if (this._ignoreHungKeyFocus && !knownDisabledFlag) - { - this.StopIgnoringHungKeyFocus(); - target = null; - recursiveFlag = false; - } - this._inputQueue.RevalidateInputSiteUsage(target, recursiveFlag); - if (this._refreshHitTargetPending) - return; - this._refreshHitTargetPending = true; - DeferredCall.Post(DispatchPriority.RenderSync, this._refreshHitTargetHandler); - } - - private void RefreshHitTargetHandler() - { - this._refreshHitTargetPending = false; - this.Session.Form.RefreshHitTarget(); - } - - public bool IsPendingKeyFocusValid() => this.IsValidKeyFocusWorker(this._inputQueue.PendingKeyFocus); - - public void SimulateDragEnter( - ICookedInputSite dragSource, - IRawInputSite rawTargetSite, - object data, - int x, - int y, - InputModifiers modifiers) - { - this._inputQueue.SimulateDragEnter(dragSource, rawTargetSite, data, x, y, modifiers); - } - - public void SimulateDragOver(InputModifiers modifiers) => this._inputQueue.SimulateDragOver(modifiers); - - public void SimulateDragOver( - IRawInputSite rawTargetSite, - int x, - int y, - InputModifiers modifiers) - { - this._inputQueue.SimulateDragOver(rawTargetSite, x, y, modifiers); - } - - public void SimulateDragEnd( - IRawInputSite rawTargetSite, - InputModifiers modifiers, - DragOperation formOperation) - { - this._inputQueue.SimulateDragEnd(rawTargetSite, modifiers, formOperation); - } - - public object GetDragDropValue() => this._inputQueue.GetDragDropValue(); - - public bool FilterKeyboardEvent(KeyStateInfo info) - { - switch (info.Action) - { - case KeyAction.Up: - this.EndKeyCoalesce(); - break; - case KeyAction.Down: - if (info.RepeatCount == 2U) - { - this.BeginKeyCoalesce(info); - break; - } - if (info.RepeatCount > 2U && this.CoalesceRepeatedKey(info)) - return false; - this.EndKeyCoalesce(); - break; - } - return true; - } - - private bool BeginKeyCoalesce(KeyStateInfo info) - { - this.EndKeyCoalesce(); - if (this._keyCoalescePolicy == null || !this._keyCoalescePolicy(info.Key)) - return false; - this.SetCoalesceKeyEvent(info.MakeRepeatableCopy()); - return true; - } - - private void SetCoalesceKeyEvent(KeyStateInfo info) - { - if (this._currentCoalesceKeyEvent != null) - this._currentCoalesceKeyEvent.Unlock(); - this._currentCoalesceKeyEvent = info; - if (this._currentCoalesceKeyEvent == null) - return; - this._currentCoalesceKeyEvent.Lock(); - } - - private bool CoalesceRepeatedKey(KeyStateInfo info) - { - if (!info.IsRepeatOf(this._currentCoalesceKeyEvent)) - return false; - this.SetCoalesceKeyEvent(info); - if (!this._currentCoalesceUndelivered) - { - this._currentCoalesceUndelivered = true; - this._inputQueue.RawInputIdleItem(DeferredCall.Create(s_deliverCoalescedKey, this)); - } - return true; - } - - private void EndKeyCoalesce() - { - this.SetCoalesceKeyEvent(null); - this._currentCoalesceUndelivered = false; - } - - private static void DeliverCoalescedKey(object args) - { - InputManager inputManager = (InputManager)args; - if (!inputManager._currentCoalesceUndelivered) - return; - inputManager._currentCoalesceUndelivered = false; - ICookedInputSite instantaneousKeyFocus = inputManager._inputQueue.InstantaneousKeyFocus; - inputManager.DeliverInputWorker(instantaneousKeyFocus, inputManager._currentCoalesceKeyEvent, EventRouteStages.All); - inputManager.SuspendInputUntil(DispatchPriority.Idle); - } - - public void MapMouseInput(MouseActionInfo info, ICookedInputSite captureSite) - { - ICookedInputSite target = this.HitTestInput(info.RawSource, captureSite); - if (!this.IsValidCookedInputSite(target)) - target = null; - IRawInputSite naturalHit = info.NaturalHit; - ICookedInputSite naturalTarget = null; - if (naturalHit != null) - naturalTarget = naturalHit != info.RawSource ? (naturalHit is ITreeNode treeNode ? treeNode.Zone?.MapInput(naturalHit, null) : null) : target; - info.SetMappedTargets(target, naturalTarget); - } - - public ICookedInputSite HitTestInput( - IRawInputSite rawSource, - ICookedInputSite targetRelative) - { - ICookedInputSite cookedInputSite = null; - if (!this._inputDisabled) - { - ITreeNode treeNode = null; - if (targetRelative != null) - treeNode = targetRelative as ITreeNode; - else if (rawSource != null) - treeNode = rawSource.OwnerData as ITreeNode; - if (treeNode != null) - { - UIZone zone = treeNode.Zone; - if (zone != null) - cookedInputSite = zone.MapInput(rawSource, targetRelative); - } - } - return cookedInputSite; - } - - public bool IsValidCookedInputSite(ICookedInputSite target) => target == null || (target as ITreeNode).Zone != null; - - public bool IsSiteInfluencedByPeer(ICookedInputSite target, ICookedInputSite peer) - { - if (!(peer is ITreeNode potentialParent)) - return false; - UIZone zone = potentialParent.Zone; - return zone != null && target is ITreeNode potentialChild && potentialChild.Zone == zone && zone.IsChildADescendant(potentialParent, potentialChild); - } - - public bool IsValidKeyFocusSite(ICookedInputSite target) - { - bool flag = this.IsValidKeyFocusWorker(target); - if (this._ignoreHungKeyFocus) - { - if (flag) - this.StopIgnoringHungKeyFocus(); - else if (target == this._ignoreHungKeyFocusTarget) - flag = true; - else - this.StopIgnoringHungKeyFocus(); - } - return flag; - } - - private bool IsValidKeyFocusWorker(ICookedInputSite candidate) - { - bool flag = this.KeyFocusCanBeNull; - if (candidate is ITreeNode child) - { - UIZone zone = child.Zone; - if (zone != null) - flag = zone.IsChildKeyFocusable(child); - } - return flag; - } - - public void RepairInvalidKeyFocus(uint attemptCount) - { - if (this._inputQueue.PendingKeyFocus is ITreeNode pendingKeyFocus && pendingKeyFocus.Zone == null) - { - this._inputQueue.RequestKeyFocus(null, KeyFocusReason.Default); - if (this._keyFocusCanBeNull) - return; - } - if (attemptCount <= 1U) - { - this.SuspendInputUntil(DispatchPriority.LayoutSync); - } - else - { - if (this.InvalidKeyFocus != null) - this.InvalidKeyFocus(this._inputQueue.LastCompletedKeyFocus); - ICookedInputSite pendingKeyFocusB = this._inputQueue.PendingKeyFocus; - if (this.IsValidKeyFocusWorker(pendingKeyFocusB)) - return; - if (this._keyFocusCanBeNull) - { - this._inputQueue.RequestKeyFocus(null, KeyFocusReason.Default); - } - else - { - this._ignoreHungKeyFocus = true; - this._ignoreHungKeyFocusTarget = pendingKeyFocusB; - } - } - } - - private void StopIgnoringHungKeyFocus() - { - this._ignoreHungKeyFocus = false; - this._ignoreHungKeyFocusTarget = null; - } - - public void RequestHostKeyFocus(ICookedInputSite target) - { - if (!this._session.IsValid || target is IInputCustomFocus inputCustomFocus && inputCustomFocus.OverrideHostFocus() || this._session.Form == null) - return; - this._session.Form.TakeFocus(); - } - - public void RequestHostMouseCapture(IRawInputSite rawSource, bool state) - { - if (this._session.Form == null) - return; - this._session.Form.SetCapture(rawSource, state); - } - - public void DeliverInput(ICookedInputSite target, InputInfo info) - { - if (info is KeyStateInfo info1 && !this.FilterKeyboardEvent(info1)) - return; - this.DeliverInputWorker(target, info, EventRouteStages.All); - } - - public void ForwardInput(ICookedInputSite target, InputInfo info) => this.DeliverInputWorker(target, info, EventRouteStages.Direct); - - private void DeliverInputWorker( - ICookedInputSite target, - InputInfo info, - EventRouteStages stages) - { - if (this._inputDisabled) - return; - InputManager.ZoneDeliveryInfo inputZoneRouting = this.ComputeInputZoneRouting(target, info); - if (this.CheckFocus(target, ref inputZoneRouting, info) && inputZoneRouting.zone != null) - { - byte traceLevelForEvent = Trace.GetTraceLevelForEvent(info); - EventRouteStages stage = EventRouteStages.None; - if (this.PreviewInput != null && (stages & EventRouteStages.Preview) != EventRouteStages.None) - { - this.PreviewInput(this, new InputNotificationEventArgs(info, target, stage)); - if (info.Handled) - stage = EventRouteStages.Preview; - } - if (!info.Handled && (stages & EventRouteStages.Routed) != EventRouteStages.None) - { - int num = (int)this.DeliverInputStageWorker(info, EventRouteStages.Routed, ref inputZoneRouting, traceLevelForEvent); - if (info.Handled) - stage = EventRouteStages.Routed; - } - if (!info.Handled && (stages & EventRouteStages.Direct) != EventRouteStages.None) - { - int num = (int)this.DeliverInputStageWorker(info, EventRouteStages.Direct, ref inputZoneRouting, traceLevelForEvent); - if (info.Handled) - stage = EventRouteStages.Direct; - } - if (!info.Handled && (stages & EventRouteStages.Bubbled) != EventRouteStages.None) - { - int num = (int)this.DeliverInputStageWorker(info, EventRouteStages.Bubbled, ref inputZoneRouting, traceLevelForEvent); - if (info.Handled) - stage = EventRouteStages.Bubbled; - } - if (!info.Handled && (stages & EventRouteStages.Unhandled) != EventRouteStages.None) - { - int num = (int)this.DeliverInputStageWorker(info, EventRouteStages.Unhandled, ref inputZoneRouting, traceLevelForEvent); - if (info.Handled) - stage = EventRouteStages.Unhandled; - } - InputNotificationHandler notificationHandler = !info.Handled ? this.UnhandledInput : this.HandledInput; - if (notificationHandler != null) - notificationHandler(this, new InputNotificationEventArgs(info, target, stage)); - } - if (inputZoneRouting.zone == null) - return; - inputZoneRouting.zone.RecycleInputDeliveryData(inputZoneRouting.param); - } - - private InputDeliveryStatus DeliverInputStageWorker( - InputInfo input, - EventRouteStages stage, - ref InputManager.ZoneDeliveryInfo deliveryInfo, - byte traceLevel) - { - InputDeliveryStatus inputDeliveryStatus = InputDeliveryStatus.Normal; - if (deliveryInfo.param != null) - { - bool handled = input.Handled; - inputDeliveryStatus = deliveryInfo.zone.DeliverInput(deliveryInfo.param, stage); - int num1 = input.Handled ? 1 : 0; - int num2 = handled ? 1 : 0; - } - deliveryInfo.stagesDelivered |= stage; - return inputDeliveryStatus; - } - - private InputManager.ZoneDeliveryInfo ComputeInputZoneRouting( - ICookedInputSite finalTarget, - InputInfo info) - { - ITreeNode endpoint = null; - UIZone uiZone = null; - if (finalTarget is ITreeNode) - { - endpoint = (ITreeNode)finalTarget; - uiZone = endpoint.Zone; - } - if (uiZone == null) - return new InputManager.ZoneDeliveryInfo(); - return new InputManager.ZoneDeliveryInfo() - { - zone = uiZone, - param = uiZone.PrepareInputForDelivery(endpoint, finalTarget, info) - }; - } - - private bool CheckFocus( - ICookedInputSite target, - ref InputManager.ZoneDeliveryInfo deliveryInfo, - InputInfo info) - { - bool flag = true; - switch (info) - { - case MouseFocusInfo mouseFocusInfo: - if (mouseFocusInfo.State || mouseFocusInfo.Other == null) - { - InputManager.ZoneDeliveryInfo newFocusInfo = new InputManager.ZoneDeliveryInfo(); - if (mouseFocusInfo.State) - newFocusInfo = deliveryInfo; - ProcessFocusUpdates(InputDeviceType.Mouse, ref this._mouseFocusZone, newFocusInfo, target as ITreeNode); - this._session.RootZone.UpdateCursor(null); - } - if (mouseFocusInfo.State && target == mouseFocusInfo.Other) - flag = false; - return flag; - case KeyFocusInfo keyFocusInfo: - if (keyFocusInfo.State || keyFocusInfo.Other == null) - { - InputManager.ZoneDeliveryInfo newFocusInfo = new InputManager.ZoneDeliveryInfo(); - if (keyFocusInfo.State) - newFocusInfo = deliveryInfo; - ProcessFocusUpdates(InputDeviceType.Keyboard, ref this._keyFocusZone, newFocusInfo, target as ITreeNode); - } - if (keyFocusInfo.State && target == keyFocusInfo.Other) - flag = false; - return flag; - default: - return flag; - } - } - - private static void ProcessFocusUpdates( - InputDeviceType focusType, - ref UIZone refCurrentFocusZone, - InputManager.ZoneDeliveryInfo newFocusInfo, - ITreeNode actualFocus) - { - UIZone zone = refCurrentFocusZone; - if (zone == null && newFocusInfo.zone == null) - return; - refCurrentFocusZone = newFocusInfo.zone; - if (refCurrentFocusZone == null) - UpdateZoneFocusStates(focusType, zone, null, false, null); - if (newFocusInfo.zone == null) - return; - UpdateZoneFocusStates(focusType, newFocusInfo.zone, newFocusInfo.param, true, actualFocus); - } - - private static void UpdateZoneFocusStates( - InputDeviceType focusType, - UIZone zone, - object param, - bool deepFocusFlag, - ITreeNode actualFocus) - { - ITreeNode directFocusChild = null; - object obj = null; - if (deepFocusFlag) - { - if (actualFocus != null && actualFocus.Zone == zone) - directFocusChild = actualFocus; - obj = param; - } - zone.UpdateInputFocusStates(focusType, deepFocusFlag, directFocusChild, obj); - } - - public InputModifiers HACK_SystemModifiers => this._HACK_sysModifiers; - - public void HACK_UpdateSystemModifiers(InputModifiers modifiers) => this._HACK_sysModifiers = modifiers; - - private struct ZoneDeliveryInfo - { - public UIZone zone; - public object param; - public EventRouteStages stagesDelivered; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/InputQueue.cs b/UIX/Microsoft/Iris/Input/InputQueue.cs deleted file mode 100644 index 6a94c4d..0000000 --- a/UIX/Microsoft/Iris/Input/InputQueue.cs +++ /dev/null @@ -1,768 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.InputQueue -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Queues; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Input -{ - public class InputQueue : SimpleQueue - { - private QueueItem.Stack _filterStack; - private InputManager _inputManager; - private ICookedInputSite _currentKeyFocus; - private ICookedInputSite _desiredKeyFocus; - private KeyFocusReason _desiredKeyFocusReason; - private ICookedInputSite _lastCompletedKeyFocus; - private bool _revalidateKeyFocus; - private uint _keyFocusRepairCount; - private SimpleCallback _invalidKeyFocusCallback; - private bool _mouseMoved; - private IRawInputSite _rawMouseSite; - private IRawInputSite _rawMouseNaturalSite; - private Point _rawMousePos; - private Point _rawScreenPos; - private InputModifiers _rawMouseModifiers; - private int _mouseWheelDelta; - private bool _dragOver; - private bool _dragging; - private ICookedInputSite _dragSource; - private IRawInputSite _rawDropTargetSite; - private Point _rawDragPoint; - private InputModifiers _rawDragModifiers; - private object _dragData; - private object _pendingDragData; - private ICookedInputSite _appDropTarget; - private IRawInputSite _appMouseFocusSite; - private IRawInputSite _appNaturalTarget; - private ICookedInputSite _appMouseFocusTarget; - private ICookedInputSite _appMouseFocusCapture; - private InputModifiers _appMouseFocusButtons; - private ICookedInputSite _lastCompletedMouseFocus; - private Point _appMousePos; - private bool _revalidateMouseFocus; - private SimpleQueue _inputIdleQueue; - - public InputQueue(InputManager manager) - { - this._inputManager = manager; - this._filterStack = new QueueItem.Stack(); - this._rawMousePos = new Point(); - this._appMousePos = new Point(); - this._desiredKeyFocusReason = KeyFocusReason.Default; - this._inputIdleQueue = new SimpleQueue(); - this._inputIdleQueue.Wake += new EventHandler(this.OnChildQueueWake); - this._invalidKeyFocusCallback = new SimpleCallback(this.InvalidKeyFocusCallback); - } - - public ICookedInputSite InstantaneousKeyFocus => this._currentKeyFocus; - - public ICookedInputSite PendingKeyFocus => this._desiredKeyFocus; - - public bool PendingKeyFocusIsDefault => this._desiredKeyFocusReason == KeyFocusReason.Default; - - public ICookedInputSite LastCompletedKeyFocus => this._lastCompletedKeyFocus; - - public ICookedInputSite CurrentMouseFocus => this._appMouseFocusTarget; - - public InputModifiers DragModifiers => this._rawDragModifiers; - - public void RequestKeyFocus(ICookedInputSite desired) => this.RequestKeyFocus(desired, KeyFocusReason.Other); - - public void RequestKeyFocus(ICookedInputSite desired, KeyFocusReason reason) - { - if (this._desiredKeyFocus != desired) - { - this._desiredKeyFocus = desired; - this._desiredKeyFocusReason = reason; - } - else if (reason != KeyFocusReason.Default) - this._desiredKeyFocusReason = reason; - if (desired != null) - this._inputManager.RequestHostKeyFocus(desired); - if (this._desiredKeyFocus == this._currentKeyFocus) - return; - this.OnWake(); - } - - public void PrepareToShutDown() - { - this.RequestKeyFocus(null); - this.RawMouseLeave(); - } - - public void RawKeyAction(KeyInfo info) => this.PostItem(this.GenerateGenericInput(info)); - - public void RawMouseMove( - IRawInputSite site, - IRawInputSite naturalSite, - InputModifiers modifiers, - ref RawMouseData rawEventData) - { - this._rawMouseSite = site; - this._rawMouseNaturalSite = naturalSite; - this._rawMousePos.X = rawEventData._positionX; - this._rawMousePos.Y = rawEventData._positionY; - this._rawScreenPos.X = rawEventData._screenX; - this._rawScreenPos.Y = rawEventData._screenY; - this._rawMouseModifiers = modifiers; - this.SetMouseMoved(); - } - - public void RawMouseLeave() - { - this.CancelMouseCapture(null); - this._mouseWheelDelta = 0; - this._rawMouseSite = null; - this._rawMouseNaturalSite = null; - this._rawMousePos.X = -1; - this._rawMousePos.Y = -1; - this._rawScreenPos.X = -1; - this._rawScreenPos.Y = -1; - this._rawMouseModifiers = InputModifiers.None; - this.SetMouseMoved(); - } - - public void RawMouseButtonState( - uint message, - IRawInputSite site, - IRawInputSite naturalSite, - InputModifiers modifiers, - MouseButtons button, - bool state) - { - this.PostItem(this.GenerateMouseButton(site, naturalSite, this._rawMousePos.X, this._rawMousePos.Y, this._rawScreenPos.X, this._rawScreenPos.Y, modifiers, button, state, message)); - } - - public void RawMouseWheel(InputModifiers modifiers, ref RawMouseData rawEventData) - { - bool flag = this._mouseWheelDelta != 0; - this._mouseWheelDelta += rawEventData._wheelDelta; - this._rawMouseModifiers = modifiers; - if (flag || this._mouseWheelDelta == 0) - return; - this.OnWake(); - } - - public void SimulateDragEnter( - ICookedInputSite dragSource, - IRawInputSite rawTargetSite, - object data, - int x, - int y, - InputModifiers modifiers) - { - this.SimulateDragDrop(dragSource, rawTargetSite, data, x, y, modifiers, DragOperation.Enter); - } - - public void SimulateDragOver(InputModifiers modifiers) => this.SimulateDragDrop(this._dragSource, this._rawDropTargetSite, null, this._rawDragPoint.X, this._rawDragPoint.Y, modifiers, DragOperation.Over); - - public void SimulateDragOver( - IRawInputSite rawTargetSite, - int x, - int y, - InputModifiers modifiers) - { - this.SimulateDragDrop(this._dragSource, rawTargetSite, null, x, y, modifiers, DragOperation.Over); - } - - public void SimulateDragEnd( - IRawInputSite rawTargetSite, - InputModifiers modifiers, - DragOperation formOperation) - { - this.PushFilterStack(this.GenerateDragDrop(this._dragSource, null, this._rawDragPoint.X, this._rawDragPoint.Y, modifiers, DragOperation.DragComplete)); - this.SimulateDragDrop(this._dragSource, rawTargetSite, null, this._rawDragPoint.X, this._rawDragPoint.Y, modifiers, formOperation); - this.OnWake(); - this._dragSource = null; - } - - private void SimulateDragDrop( - ICookedInputSite dragSource, - IRawInputSite rawTargetSite, - object data, - int x, - int y, - InputModifiers modifiers, - DragOperation formOperation) - { - this._dragSource = dragSource; - InputItem dragDropItem = this.GenerateDragDropItem(dragSource, rawTargetSite, data, x, y, modifiers, formOperation); - if (dragDropItem == null) - return; - this.PushFilterStack(dragDropItem); - this.OnWake(); - } - - public void RawDragDrop( - IRawInputSite rawSite, - object data, - int x, - int y, - InputModifiers modifiers, - DragOperation formOperation, - RawDragData rawEventData) - { - if (this._dragSource == null) - { - if (formOperation == DragOperation.Over && data == null && this._pendingDragData != null) - { - data = this._pendingDragData; - formOperation = DragOperation.Enter; - } - this._pendingDragData = null; - InputItem dragDropItem = this.GenerateDragDropItem(null, rawSite, data, x, y, modifiers, formOperation); - if (dragDropItem == null) - return; - this.PostItem(dragDropItem); - } - else if (formOperation == DragOperation.Enter) - { - this._pendingDragData = data; - } - else - { - if (formOperation != DragOperation.Leave) - return; - this._pendingDragData = null; - } - } - - private InputItem GenerateDragDropItem( - ICookedInputSite dragSource, - IRawInputSite rawSite, - object data, - int x, - int y, - InputModifiers modifiers, - DragOperation formOperation) - { - InputItem inputItem = null; - IRawInputSite rawDropTargetSite = this._rawDropTargetSite; - if (formOperation == DragOperation.Enter) - this._dragData = data; - this._rawDropTargetSite = rawSite; - this._rawDragPoint = new Point(x, y); - this._rawDragModifiers = modifiers; - if (formOperation != DragOperation.Drop) - { - this._dragging = true; - if (rawDropTargetSite == rawSite) - { - if (!this._dragOver) - { - this._dragOver = true; - this.OnWake(); - } - } - else - inputItem = this.GenerateDragDrop(null, rawSite, x, y, modifiers, DragOperation.Over); - } - else - { - inputItem = this.GenerateDragDrop(this._appDropTarget, rawSite, x, y, modifiers, DragOperation.Drop); - this._appDropTarget = null; - } - if (formOperation == DragOperation.Drop || formOperation == DragOperation.Leave) - { - this._dragOver = false; - this._dragging = false; - this._rawDropTargetSite = null; - this._rawDragPoint = new Point(); - this._rawDragModifiers = InputModifiers.None; - if (formOperation == DragOperation.Leave) - this._dragData = null; - } - return inputItem; - } - - public object GetDragDropValue() - { - object dragData = this._dragData; - if (!this._dragging) - this._dragData = null; - return dragData; - } - - public void RawInputIdleItem(QueueItem item) => this._inputIdleQueue.PostItem(item); - - public void RevalidateInputSiteUsage(ICookedInputSite target, bool recursiveFlag) - { - bool flag1 = false; - if (target == null) - { - if (!recursiveFlag) - { - this._revalidateKeyFocus = true; - this._revalidateMouseFocus = true; - this.SetMouseMoved(); - return; - } - flag1 = true; - } - this.CancelMouseCapture(target); - bool flag2 = false; - if (!this._mouseMoved && this._appMouseFocusTarget != null && (flag1 || this._appMouseFocusTarget == target || recursiveFlag && this._inputManager.IsSiteInfluencedByPeer(this._appMouseFocusTarget, target))) - { - this._revalidateMouseFocus = true; - this.SetMouseMoved(); - if (this._appMouseFocusTarget == this._desiredKeyFocus) - flag2 = true; - } - if (this._revalidateKeyFocus || !flag2 && (this._desiredKeyFocus == null || !flag1 && this._desiredKeyFocus != target && (!recursiveFlag || !this._inputManager.IsSiteInfluencedByPeer(this._desiredKeyFocus, target)))) - return; - this._revalidateKeyFocus = true; - this.OnWake(); - } - - public override QueueItem GetNextItem() - { - InputItem inputItem; - QueueItem queueItem1 = null; - while (true) - { - QueueItem queueItem2; - do - { - queueItem2 = this.PeekFilterStack(); - if (queueItem2 != null) - { - queueItem1 = this.FilterItem(queueItem2); - if (queueItem1 == null) - this.PopFilterStack(); - else - goto label_5; - } - else - goto label_8; - } - while (!(queueItem2 is InputItem)); - inputItem = (InputItem)queueItem2; - inputItem.ReturnToPool(); - continue; - label_5: - if (queueItem1 != queueItem2) - { - this.PushFilterStack(queueItem1); - queueItem1 = null; - } - else - break; - } - this.PopFilterStack(); - label_8: - return queueItem1; - } - - private void PushFilterStack(QueueItem item) => this._filterStack.Push(item); - - private QueueItem PopFilterStack() => this._filterStack.Pop(); - - private QueueItem PeekFilterStack() - { - QueueItem queueItem = this._filterStack.Peek(); - if (queueItem == null) - { - queueItem = this.GetNextRawInputItem(); - if (queueItem != null) - this.PushFilterStack(queueItem); - } - return queueItem; - } - - private QueueItem FilterItem(QueueItem item) - { - if (item is InputItem inputItem) - { - switch (inputItem.Info) - { - case MouseActionInfo mouseActionInfo: - this.MapMouseInput(mouseActionInfo); - Point clientOffset = new Point(mouseActionInfo.X, mouseActionInfo.Y); - switch (mouseActionInfo) - { - case MouseMoveInfo _: - QueueItem queueItem1 = this.UpdateMouseFocus(mouseActionInfo.Target, mouseActionInfo.RawSource, clientOffset); - if (queueItem1 != null) - return queueItem1; - if (this.IsAppMouseMove(mouseActionInfo)) - { - this.FinalizeMouseHit(inputItem, mouseActionInfo); - break; - } - item = null; - break; - case MouseButtonInfo mouseButtonInfo: - if (this.IsAppMouseMove(mouseActionInfo)) - { - InputModifiers modifiers1 = mouseButtonInfo.Modifiers; - InputModifiers modifiersForButtons = this.GetModifiersForButtons(mouseButtonInfo.Button); - InputModifiers modifiers2 = !mouseButtonInfo.IsDown ? modifiers1 | modifiersForButtons : modifiers1 & ~modifiersForButtons; - return this.GenerateMouseMove(mouseActionInfo.RawSource, mouseActionInfo.NaturalHit, mouseActionInfo.X, mouseActionInfo.Y, mouseButtonInfo.ScreenX, mouseButtonInfo.ScreenY, modifiers2); - } - this.FinalizeMouseHit(inputItem, mouseActionInfo); - this.UpdateMouseCapture(mouseActionInfo.RawSource, mouseActionInfo.Target, mouseButtonInfo.Modifiers); - this._appMouseFocusButtons = mouseButtonInfo.Modifiers & InputModifiers.AllButtons; - break; - case MouseWheelInfo _: - inputItem.UpdateInputSite(this._appMouseFocusTarget); - break; - } - break; - case MouseFocusInfo mouseFocusInfo: - if (!mouseFocusInfo.State && this._appMouseFocusButtons != InputModifiers.None) - { - QueueItem queueItem2 = this.UpdateOrphanedButtons(mouseFocusInfo.RawSource, mouseFocusInfo.X, mouseFocusInfo.Y); - if (queueItem2 != null) - return queueItem2; - break; - } - break; - case KeyActionInfo _: - QueueItem queueItem3 = this.UpdateKeyFocus(); - if (queueItem3 != null) - return queueItem3; - inputItem.UpdateInputSite(this._currentKeyFocus); - break; - case DragDropInfo dragDropInfo: - if (dragDropInfo.Operation == DragOperation.Over) - { - InputItem inputItemB = this.UpdateDragOver(this._inputManager.HitTestInput(this._rawDropTargetSite, null)); - if (inputItemB != null) - return inputItemB; - inputItemB.UpdateInputSite(this._appDropTarget); - break; - } - break; - } - } - return item; - } - - private InputModifiers GetModifiersForButtons(MouseButtons button) - { - InputModifiers inputModifiers = InputModifiers.None; - if ((button & MouseButtons.Left) != MouseButtons.None) - inputModifiers |= InputModifiers.LeftMouse; - if ((button & MouseButtons.Middle) != MouseButtons.None) - inputModifiers |= InputModifiers.MiddleMouse; - if ((button & MouseButtons.Right) != MouseButtons.None) - inputModifiers |= InputModifiers.RightMouse; - if ((button & MouseButtons.XButton1) != MouseButtons.None) - inputModifiers |= InputModifiers.XMouse1; - if ((button & MouseButtons.XButton2) != MouseButtons.None) - inputModifiers |= InputModifiers.XMouse2; - return inputModifiers; - } - - private QueueItem GetNextRawInputItem() - { - QueueItem queueItem; - if ((queueItem = this.InjectRawInput_Prty()) == null && (queueItem = this.InjectRawInput_Norm()) == null) - queueItem = this.InjectRawInput_Idle(); - return queueItem; - } - - private QueueItem InjectRawInput_Prty() => this.UpdateKeyFocus(); - - private QueueItem InjectRawInput_Norm() => base.GetNextItem(); - - private QueueItem InjectRawInput_Idle() - { - if (this._mouseWheelDelta != 0) - { - QueueItem mouseWheel = this.GenerateMouseWheel(this._rawMouseSite, this._rawMouseNaturalSite, this._rawMousePos.X, this._rawMousePos.Y, this._rawScreenPos.X, this._rawScreenPos.Y, this._rawMouseModifiers, this._mouseWheelDelta); - this._mouseWheelDelta = 0; - return mouseWheel; - } - if (this._mouseMoved) - { - QueueItem mouseMove = this.GenerateMouseMove(this._rawMouseSite, this._rawMouseNaturalSite, this._rawMousePos.X, this._rawMousePos.Y, this._rawScreenPos.X, this._rawScreenPos.Y, this._rawMouseModifiers); - this._mouseMoved = false; - return mouseMove; - } - if (!this._dragOver) - return this._inputIdleQueue.GetNextItem(); - InputItem dragDrop = this.GenerateDragDrop(null, this._rawDropTargetSite, this._rawDragPoint.X, this._rawDragPoint.Y, this._rawDragModifiers, DragOperation.Over); - this._dragOver = false; - return dragDrop; - } - - private void OnChildQueueWake(object sender, EventArgs args) => this.OnWake(); - - private void MapMouseInput(MouseActionInfo info) => this._inputManager.MapMouseInput(info, this._appMouseFocusCapture); - - private void FinalizeMouseHit(InputItem item, MouseActionInfo mouse) - { - item.UpdateInputSite(mouse.Target); - this._appMousePos = new Point(mouse.X, mouse.Y); - this._appNaturalTarget = mouse.NaturalHit; - } - - private QueueItem CheckForInvalidKeyFocus() - { - QueueItem queueItem = null; - if (!this.IsValidInputSite(this._desiredKeyFocus) || !this._inputManager.IsValidKeyFocusSite(this._desiredKeyFocus)) - { - ++this._keyFocusRepairCount; - this._revalidateKeyFocus = true; - queueItem = this.GenerateInvalidKeyFocusCallback(); - } - else - { - int focusRepairCount = (int)this._keyFocusRepairCount; - this._keyFocusRepairCount = 0U; - this._revalidateKeyFocus = false; - } - return queueItem; - } - - private void InvalidKeyFocusCallback() => this._inputManager.RepairInvalidKeyFocus(this._keyFocusRepairCount); - - private QueueItem UpdateKeyFocus() - { - QueueItem queueItem = null; - if (this._revalidateKeyFocus || this._currentKeyFocus != this._desiredKeyFocus) - { - queueItem = this.CheckForInvalidKeyFocus(); - if (queueItem == null && this._currentKeyFocus != this._desiredKeyFocus) - { - if (this._currentKeyFocus != null) - { - if (!this.IsValidInputSite(this._currentKeyFocus)) - this._currentKeyFocus = null; - queueItem = this.GenerateKeyFocus(this._currentKeyFocus, false, this._desiredKeyFocus, this._desiredKeyFocusReason); - this._currentKeyFocus = null; - } - if (queueItem == null && this._desiredKeyFocus != null) - { - this._currentKeyFocus = this._desiredKeyFocus; - if (!this.IsValidInputSite(this._lastCompletedKeyFocus)) - this._lastCompletedKeyFocus = null; - queueItem = this.GenerateKeyFocus(this._currentKeyFocus, true, this._lastCompletedKeyFocus, this._desiredKeyFocusReason); - } - if (this._currentKeyFocus == this._desiredKeyFocus) - this._lastCompletedKeyFocus = this._currentKeyFocus; - } - if (queueItem == null && this._currentKeyFocus != null) - queueItem = this.GenerateKeyFocus(this._currentKeyFocus, true, this._lastCompletedKeyFocus, KeyFocusReason.Validation); - } - return queueItem; - } - - private QueueItem UpdateMouseFocus( - ICookedInputSite target, - IRawInputSite site, - Point clientOffset) - { - QueueItem queueItem = null; - if (this._revalidateMouseFocus || this._appMouseFocusTarget != target) - { - this._revalidateMouseFocus = false; - if (this._appMouseFocusTarget != target) - { - if (this._appMouseFocusTarget != null) - { - if (!this.IsValidInputSite(this._appMouseFocusTarget)) - this._appMouseFocusTarget = null; - queueItem = this.GenerateMouseFocus(this._appMouseFocusTarget, this._appMouseFocusSite, this._appMousePos.X, this._appMousePos.Y, false, target); - this._appMouseFocusSite = null; - this._appMouseFocusTarget = null; - this._appMousePos.X = -1; - this._appMousePos.Y = -1; - } - if (queueItem == null && target != null) - { - this._appMouseFocusSite = site; - this._appMouseFocusTarget = target; - if (!this.IsValidInputSite(this._lastCompletedMouseFocus)) - this._lastCompletedMouseFocus = null; - queueItem = this.GenerateMouseFocus(this._appMouseFocusTarget, this._appMouseFocusSite, clientOffset.X, clientOffset.Y, true, this._lastCompletedMouseFocus); - } - if (this._appMouseFocusTarget == target) - this._lastCompletedMouseFocus = this._appMouseFocusTarget; - } - if (queueItem == null && this._appMouseFocusTarget != null) - queueItem = this.GenerateMouseFocus(this._appMouseFocusTarget, this._appMouseFocusSite, clientOffset.X, clientOffset.Y, true, this._lastCompletedMouseFocus); - } - return queueItem; - } - - private void UpdateMouseCapture( - IRawInputSite site, - ICookedInputSite target, - InputModifiers modifiers) - { - bool flag = (modifiers & InputModifiers.AllButtons) != InputModifiers.None; - ICookedInputSite cookedInputSite = null; - if (flag) - cookedInputSite = target; - if (this._appMouseFocusCapture == cookedInputSite) - return; - this._inputManager.RequestHostMouseCapture(site, cookedInputSite != null); - this._appMouseFocusCapture = cookedInputSite; - this.SetMouseMoved(); - } - - private QueueItem UpdateOrphanedButtons(IRawInputSite site, int x, int y) - { - MouseButtons button; - uint message; - if ((this._appMouseFocusButtons & InputModifiers.LeftMouse) != InputModifiers.None) - { - this._appMouseFocusButtons &= ~InputModifiers.LeftMouse; - button = MouseButtons.Left; - message = 514U; - } - else if ((this._appMouseFocusButtons & InputModifiers.MiddleMouse) != InputModifiers.None) - { - this._appMouseFocusButtons &= ~InputModifiers.MiddleMouse; - button = MouseButtons.Middle; - message = 520U; - } - else if ((this._appMouseFocusButtons & InputModifiers.RightMouse) != InputModifiers.None) - { - this._appMouseFocusButtons &= ~InputModifiers.RightMouse; - button = MouseButtons.Right; - message = 517U; - } - else if ((this._appMouseFocusButtons & InputModifiers.XMouse1) != InputModifiers.None) - { - this._appMouseFocusButtons &= ~InputModifiers.XMouse1; - button = MouseButtons.XButton1; - message = 524U; - } - else if ((this._appMouseFocusButtons & InputModifiers.XMouse2) != InputModifiers.None) - { - this._appMouseFocusButtons &= ~InputModifiers.XMouse2; - button = MouseButtons.XButton2; - message = 524U; - } - else - { - this._appMouseFocusButtons = InputModifiers.None; - return null; - } - return this.GenerateMouseButton(site, null, x, y, this._rawScreenPos.X, this._rawScreenPos.Y, this._appMouseFocusButtons, button, false, message); - } - - private InputItem UpdateDragOver(ICookedInputSite target) - { - if (target != this._appDropTarget) - { - if (this._appDropTarget != null) - { - ICookedInputSite appDropTarget = this._appDropTarget; - this._appDropTarget = null; - return this.GenerateDragDrop(appDropTarget, null, this._rawDragPoint.X, this._rawDragPoint.Y, this._rawMouseModifiers, DragOperation.Leave); - } - if (target != null) - { - this._appDropTarget = target; - return this.GenerateDragDrop(target, this._rawDropTargetSite, this._rawDragPoint.X, this._rawDragPoint.Y, this._rawDragModifiers, DragOperation.Enter); - } - } - return null; - } - - private bool IsAppMouseMove(MouseActionInfo mouseInfo) => mouseInfo.Target != this._appMouseFocusTarget || mouseInfo.NaturalHit != this._appNaturalTarget || mouseInfo.X != this._appMousePos.X || mouseInfo.Y != this._appMousePos.Y; - - private bool IsValidInputSite(ICookedInputSite target) => target == null || this._inputManager.IsValidCookedInputSite(target); - - private void SetMouseMoved() - { - if (this._mouseMoved) - return; - this._mouseMoved = true; - this.OnWake(); - } - - private void CancelMouseCapture(ICookedInputSite cancelSite) - { - if (this._appMouseFocusCapture == null || cancelSite != this._appMouseFocusCapture && cancelSite != null) - return; - this.UpdateMouseCapture(this._appMouseFocusCapture.RawInputSource, null, InputModifiers.None); - } - - private QueueItem GenerateGenericInput(InputInfo info) => InputItem.Create(this._inputManager, null, info); - - private QueueItem GenerateInvalidKeyFocusCallback() => DeferredCall.Create(this._invalidKeyFocusCallback); - - private QueueItem GenerateKeyFocus( - ICookedInputSite target, - bool focus, - ICookedInputSite other, - KeyFocusReason reason) - { - return InputItem.Create(this._inputManager, target, KeyFocusInfo.Create(focus, other, reason)); - } - - private InputItem GenerateMouseFocus( - ICookedInputSite target, - IRawInputSite site, - int x, - int y, - bool focus, - ICookedInputSite other) - { - return InputItem.Create(this._inputManager, target, MouseFocusInfo.Create(site, x, y, focus, other)); - } - - private InputItem GenerateMouseMove( - IRawInputSite site, - IRawInputSite naturalSite, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers) - { - return InputItem.Create(this._inputManager, null, MouseMoveInfo.Create(site, naturalSite, x, y, screenX, screenY, modifiers)); - } - - private InputItem GenerateMouseButton( - IRawInputSite site, - IRawInputSite naturalSite, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - MouseButtons button, - bool state, - uint message) - { - return InputItem.Create(this._inputManager, null, MouseButtonInfo.Create(site, naturalSite, x, y, screenX, screenY, modifiers, button, state, message)); - } - - private InputItem GenerateMouseWheel( - IRawInputSite site, - IRawInputSite naturalSite, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - int wheelDelta) - { - return InputItem.Create(this._inputManager, null, MouseWheelInfo.Create(site, naturalSite, x, y, screenX, screenY, modifiers, wheelDelta)); - } - - private InputItem GenerateDragDrop( - ICookedInputSite cookedSite, - IRawInputSite rawSite, - int x, - int y, - InputModifiers modifiers, - DragOperation operation) - { - InputInfo info = DragDropInfo.Create(rawSite, x, y, modifiers, operation); - return InputItem.Create(this._inputManager, cookedSite, info); - } - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyActionInfo.cs b/UIX/Microsoft/Iris/Input/KeyActionInfo.cs deleted file mode 100644 index 8e48529..0000000 --- a/UIX/Microsoft/Iris/Input/KeyActionInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyActionInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Input -{ - [Serializable] - public abstract class KeyActionInfo : KeyInfo - { - private KeyAction _action; - private InputDeviceType _deviceType; - private InputModifiers _modifiers; - private uint _repeatCount; - private bool _systemKey; - private uint _nativeMessageID; - private int _scanCode; - private ushort _eventFlags; - - protected void Initialize( - KeyAction action, - InputEventType eventType, - InputDeviceType deviceType, - InputModifiers modifiers, - uint repeatCount, - bool systemKey, - uint nativeMessageID, - int scanCode, - ushort eventFlags) - { - this._systemKey = systemKey; - this._action = action; - this._deviceType = deviceType; - this._modifiers = modifiers; - this._repeatCount = repeatCount; - this._nativeMessageID = nativeMessageID; - this._scanCode = scanCode; - this._eventFlags = eventFlags; - this.Initialize(eventType); - } - - protected void Initialize( - KeyAction action, - InputEventType eventType, - InputDeviceType deviceType) - { - this.Initialize(action, eventType, deviceType, InputModifiers.None, 1U, false, 0U, 0, 0); - } - - public KeyAction Action => this._action; - - public InputDeviceType DeviceType => this._deviceType; - - public InputModifiers Modifiers => this._modifiers; - - public uint RepeatCount => this._repeatCount; - - public bool SystemKey => this._systemKey; - - public uint NativeMessageID => this._nativeMessageID; - - public int ScanCode => this._scanCode; - - public ushort KeyboardFlags => this._eventFlags; - - public bool IsRepeatOf(KeyActionInfo other) => other != null && this._action == other._action && (this._deviceType == other._deviceType && this._systemKey == other._systemKey) && this._modifiers == other._modifiers; - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs b/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs deleted file mode 100644 index 5982a89..0000000 --- a/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyCharacterInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class KeyCharacterInfo : KeyActionInfo - { - private static InputInfo.InfoType s_poolType = InfoType.KeyCharacter; - private char _character; - - static KeyCharacterInfo() => SetPoolLimitMode(s_poolType, false); - - private KeyCharacterInfo() - { - } - - public static KeyCharacterInfo Create( - KeyAction action, - InputDeviceType deviceType, - InputModifiers modifiers, - uint repeatCount, - char character, - bool systemKey, - uint nativeMessageID, - int scanCode, - ushort eventFlags) - { - KeyCharacterInfo keyCharacterInfo = (KeyCharacterInfo)GetFromPool(s_poolType) ?? new KeyCharacterInfo(); - keyCharacterInfo.Initialize(action, deviceType, modifiers, repeatCount, character, systemKey, nativeMessageID, scanCode, eventFlags); - return keyCharacterInfo; - } - - private void Initialize( - KeyAction action, - InputDeviceType deviceType, - InputModifiers modifiers, - uint repeatCount, - char character, - bool systemKey, - uint nativeMessageID, - int scanCode, - ushort eventFlags) - { - this._character = character; - this.Initialize(action, InputEventType.KeyCharacter, deviceType, modifiers, repeatCount, systemKey, nativeMessageID, scanCode, eventFlags); - } - - public char Character => this._character; - - protected override InputInfo.InfoType PoolType => s_poolType; - - public override string ToString() => InvariantString.Format("{0}({1}, Key={2})", this.GetType().Name, Action, _character); - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs b/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs deleted file mode 100644 index 369fbd4..0000000 --- a/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyCommandInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class KeyCommandInfo : KeyActionInfo - { - private static InputInfo.InfoType s_poolType = InfoType.KeyCommand; - public CommandCode _command; - - static KeyCommandInfo() => SetPoolLimitMode(s_poolType, false); - - private KeyCommandInfo() - { - } - - public static KeyCommandInfo Create( - KeyAction action, - InputDeviceType deviceType, - CommandCode command) - { - KeyCommandInfo keyCommandInfo = (KeyCommandInfo)GetFromPool(s_poolType) ?? new KeyCommandInfo(); - keyCommandInfo.Initialize(action, deviceType, command); - return keyCommandInfo; - } - - private void Initialize(KeyAction action, InputDeviceType deviceType, CommandCode command) - { - this._command = command; - this.Initialize(action, action == KeyAction.Down ? InputEventType.CommandDown : InputEventType.CommandUp, deviceType); - } - - public CommandCode Command => this._command; - - protected override InputInfo.InfoType PoolType => s_poolType; - - public override string ToString() => InvariantString.Format("{0}({1}, Command={2})", this.GetType().Name, Action, _command); - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs b/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs deleted file mode 100644 index de8f310..0000000 --- a/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyFocusInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class KeyFocusInfo : KeyInfo - { - private static InputInfo.InfoType s_poolType = InfoType.KeyFocus; - private bool _state; - private ICookedInputSite _other; - private KeyFocusReason _focusReason; - - static KeyFocusInfo() => SetPoolLimitMode(s_poolType, true); - - private KeyFocusInfo() - { - } - - public static KeyFocusInfo Create( - bool state, - ICookedInputSite other, - KeyFocusReason focusReason) - { - KeyFocusInfo keyFocusInfo = (KeyFocusInfo)GetFromPool(s_poolType) ?? new KeyFocusInfo(); - keyFocusInfo.Initialize(state, other, focusReason); - return keyFocusInfo; - } - - private void Initialize(bool state, ICookedInputSite other, KeyFocusReason focusReason) - { - this._state = state; - this._other = other; - this._focusReason = focusReason; - this.Initialize(state ? InputEventType.GainKeyFocus : InputEventType.LoseKeyFocus); - } - - protected override void Zombie() - { - base.Zombie(); - this._other = null; - } - - public bool State => this._state; - - public ICookedInputSite Other => this._other; - - public KeyFocusReason FocusReason => this._focusReason; - - protected override InputInfo.InfoType PoolType => s_poolType; - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyFocusReason.cs b/UIX/Microsoft/Iris/Input/KeyFocusReason.cs deleted file mode 100644 index 7159e9f..0000000 --- a/UIX/Microsoft/Iris/Input/KeyFocusReason.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyFocusReason -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public enum KeyFocusReason - { - Default, - Directional, - Tab, - MouseDown, - MouseEnter, - Restore, - Validation, - Other, - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyInfo.cs b/UIX/Microsoft/Iris/Input/KeyInfo.cs deleted file mode 100644 index 40296b0..0000000 --- a/UIX/Microsoft/Iris/Input/KeyInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public abstract class KeyInfo : InputInfo - { - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyStateInfo.cs b/UIX/Microsoft/Iris/Input/KeyStateInfo.cs deleted file mode 100644 index 996d8d4..0000000 --- a/UIX/Microsoft/Iris/Input/KeyStateInfo.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyStateInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class KeyStateInfo : KeyActionInfo - { - private static InputInfo.InfoType s_poolType = InfoType.KeyState; - private Keys _key; - - static KeyStateInfo() => SetPoolLimitMode(s_poolType, false); - - private KeyStateInfo() - { - } - - public static KeyStateInfo Create( - KeyAction action, - InputDeviceType deviceType, - InputModifiers modifiers, - uint repeatCount, - Keys key, - bool systemKey, - uint nativeMessageID, - int scanCode, - ushort eventFlags) - { - KeyStateInfo keyStateInfo = (KeyStateInfo)GetFromPool(s_poolType) ?? new KeyStateInfo(); - keyStateInfo.Initialize(action, deviceType, modifiers, repeatCount, key, systemKey, nativeMessageID, scanCode, eventFlags); - return keyStateInfo; - } - - private void Initialize( - KeyAction action, - InputDeviceType deviceType, - InputModifiers modifiers, - uint repeatCount, - Keys key, - bool systemKey, - uint nativeMessageID, - int scanCode, - ushort eventFlags) - { - this._key = key; - this.Initialize(action, action == KeyAction.Down ? InputEventType.KeyDown : InputEventType.KeyUp, deviceType, modifiers, repeatCount, systemKey, nativeMessageID, scanCode, eventFlags); - } - - public bool IsRepeatOf(KeyStateInfo other) => other != null && this._key == other._key && this.IsRepeatOf((KeyActionInfo)other); - - public KeyStateInfo MakeRepeatableCopy() => Create(this.Action, this.DeviceType, this.Modifiers, this.RepeatCount, this._key, this.SystemKey, this.NativeMessageID, this.ScanCode, this.KeyboardFlags); - - public Keys Key => this._key; - - protected override InputInfo.InfoType PoolType => s_poolType; - - public override string ToString() => InvariantString.Format("{0}({1}, Key={2})", this.GetType().Name, Action, _key); - } -} diff --git a/UIX/Microsoft/Iris/Input/KeyboardDevice.cs b/UIX/Microsoft/Iris/Input/KeyboardDevice.cs deleted file mode 100644 index fb5b509..0000000 --- a/UIX/Microsoft/Iris/Input/KeyboardDevice.cs +++ /dev/null @@ -1,285 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.KeyboardDevice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class KeyboardDevice : InputDevice - { - public const int KeyDown = 0; - public const int KeyUp = 1; - public const int KeyChar = 2; - public const int SysKeyDown = 3; - public const int SysKeyUp = 4; - public const int SysChar = 5; - private const int k_initialArrayLength = 4; - private ExpandableArray _keyStates; - private InputModifiers _keyModifiers; - private bool _modifiersDirty; - - public KeyboardDevice(InputManager manager) - : base(manager) - { - this._keyStates = new ExpandableArray(4); - this.Reset(); - } - - public InputModifiers KeyboardModifiers - { - get - { - if (this._modifiersDirty) - this.UpdateModifierState(); - return this._keyModifiers & InputModifiers.AllKeys; - } - } - - public bool Alt => (this.KeyboardModifiers & InputModifiers.AltKey) != InputModifiers.None; - - public bool Ctrl => (this.KeyboardModifiers & InputModifiers.ControlKey) != InputModifiers.None; - - public bool Shift => (this.KeyboardModifiers & InputModifiers.ShiftKey) != InputModifiers.None; - - public bool Win => (this.KeyboardModifiers & InputModifiers.WindowsKey) != InputModifiers.None; - - public KeyInfo OnRawInput( - uint message, - InputModifiers modifiers, - ref RawKeyboardData args) - { - this.Manager.HACK_UpdateSystemModifiers(modifiers); - return message == 2U || message == 5U ? this.OnRawKeyCharacter(message, ref args) : this.OnRawKeyState(message, modifiers, ref args); - } - - public KeyInfo OnRawKeyCharacter(uint message, ref RawKeyboardData args) => KeyCharacterInfo.Create(KeyAction.Character, args._deviceType, this.Manager.Modifiers, args._repCount, (char)args._virtualKey, message == 5U, message, args._scanCode, args._flags); - - public KeyInfo OnRawKeyState( - uint message, - InputModifiers rawModifiers, - ref RawKeyboardData args) - { - KeyStateInfo keyStateInfo = null; - bool systemKey = false; - KeyAction action; - switch (message) - { - case 0: - action = KeyAction.Down; - break; - case 1: - action = KeyAction.Up; - break; - case 3: - systemKey = true; - goto case 0; - case 4: - systemKey = true; - goto case 1; - default: - return null; - } - if (this.TrackKey(action, args._virtualKey, args._scanCode)) - { - InputModifiers modifiers = this.Manager.Modifiers & ~this.MapKeyToModifier(args._virtualKey); - keyStateInfo = KeyStateInfo.Create(action, args._deviceType, modifiers, args._repCount, args._virtualKey, systemKey, message, args._scanCode, args._flags); - } - return keyStateInfo; - } - - public bool IsKeyDown(Keys key) - { - foreach (KeyboardDevice.KeyState keyState in this._keyStates) - { - if (keyState.VKey == key && keyState.IsDown) - return true; - } - return false; - } - - public bool IsKeyHandled(Keys key) - { - foreach (KeyboardDevice.KeyState keyState in this._keyStates) - { - if (keyState.VKey == key) - return keyState.IsHandled; - } - return false; - } - - public void MarkKeyHandled(Keys key) - { - foreach (KeyboardDevice.KeyState keyState in this._keyStates) - { - if (keyState.VKey == key && keyState.IsDown) - { - keyState.MarkHandled(); - break; - } - } - } - - public void Reset() - { - this._keyStates.Clear(); - this._modifiersDirty = true; - this._keyModifiers = InputModifiers.None; - } - - private bool TrackKey(KeyAction action, Keys vkey, int scanCode) - { - bool flag = false; - if (vkey == Keys.None) - return false; - if (this.IsModifier(vkey)) - this.MarkModifiersInvalid(); - switch (action) - { - case KeyAction.Up: - flag = this.TrackKeyUp(vkey, scanCode); - break; - case KeyAction.Down: - flag = this.TrackKeyDown(vkey, scanCode); - break; - } - return flag; - } - - private bool TrackKeyDown(Keys vkey, int scanCode) - { - KeyboardDevice.KeyState keyState1 = null; - for (int index = 0; index < this._keyStates.Length; ++index) - { - KeyboardDevice.KeyState keyState2 = (KeyboardDevice.KeyState)this._keyStates[index]; - if (keyState2 != null) - { - if (keyState2.IsDown) - { - if (keyState2.VKey == vkey && keyState2.ScanCode == scanCode) - { - keyState1 = keyState2; - break; - } - } - else - { - this._keyStates[index] = null; - keyState2.Dispose(); - } - } - } - if (keyState1 == null) - { - KeyboardDevice.KeyState keyState2 = new KeyboardDevice.KeyState(vkey, scanCode); - this._keyStates.Add(keyState2); - keyState2.IsDown = true; - } - return true; - } - - private bool TrackKeyUp(Keys vkey, int scanCode) - { - KeyboardDevice.KeyState keyState1 = null; - bool flag = false; - foreach (KeyboardDevice.KeyState keyState2 in this._keyStates) - { - if (keyState2.VKey == vkey && keyState2.ScanCode == scanCode) - { - keyState1 = keyState2; - break; - } - } - if (keyState1 != null) - { - flag = keyState1.IsDown; - keyState1.IsDown = false; - } - int num = flag ? 1 : 0; - return flag; - } - - private bool IsModifier(Keys vkey) => this.MapKeyToModifier(vkey) != InputModifiers.None; - - private void MarkModifiersInvalid() => this._modifiersDirty = true; - - private InputModifiers MapKeyToModifier(Keys vkey) - { - switch (vkey) - { - case Keys.ShiftKey: - case Keys.LShiftKey: - case Keys.RShiftKey: - return InputModifiers.ShiftKey; - case Keys.ControlKey: - case Keys.LControlKey: - case Keys.RControlKey: - return InputModifiers.ControlKey; - case Keys.Menu: - case Keys.LMenu: - case Keys.RMenu: - return InputModifiers.AltKey; - case Keys.LWin: - case Keys.RWin: - return InputModifiers.WindowsKey; - default: - return InputModifiers.None; - } - } - - private void UpdateModifierState() - { - if (!this._modifiersDirty) - return; - this._keyModifiers = InputModifiers.None; - foreach (KeyboardDevice.KeyState keyState in this._keyStates) - { - if (keyState.IsDown) - this._keyModifiers |= this.MapKeyToModifier(keyState.VKey); - } - this._modifiersDirty = false; - } - - private class KeyState - { - private Keys _vkey; - private int _scanCode; - private bool _down; - private bool _handled; - - public KeyState(Keys vkey, int scanCode) - { - this._vkey = vkey; - this._scanCode = scanCode; - this._down = false; - this._handled = false; - } - - public void Dispose() => this.Dispose(true); - - protected void Dispose(bool inDispose) - { - if (!inDispose) - return; - this._vkey = Keys.None; - this._scanCode = -1; - } - - public Keys VKey => this._vkey; - - public int ScanCode => this._scanCode; - - public bool IsDown - { - get => this._down; - set => this._down = value; - } - - public bool IsHandled => this._handled; - - public void MarkHandled() => this._handled = true; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseActionInfo.cs b/UIX/Microsoft/Iris/Input/MouseActionInfo.cs deleted file mode 100644 index 819ba04..0000000 --- a/UIX/Microsoft/Iris/Input/MouseActionInfo.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseActionInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public abstract class MouseActionInfo : MouseInfo - { - private IRawInputSite _naturalHit; - private ICookedInputSite _naturalTarget; - private InputModifiers _modifiers; - private int _screenX; - private int _screenY; - private int _wheelDelta; - private uint _nativeMessageID; - private MouseButtons _button; - - protected void Initialize( - IRawInputSite rawSource, - IRawInputSite rawNatural, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - InputEventType eventType, - uint messageID, - MouseButtons button, - int wheelDelta) - { - this._naturalHit = rawNatural; - this._modifiers = modifiers; - this._screenX = screenX; - this._screenY = screenY; - this._wheelDelta = wheelDelta; - this._nativeMessageID = messageID; - this._button = button; - this.Initialize(rawSource, x, y, eventType); - } - - protected override void Zombie() - { - base.Zombie(); - this._naturalHit = null; - this._naturalTarget = null; - } - - public uint NativeMessageID => this._nativeMessageID; - - public IRawInputSite NaturalHit => this._naturalHit; - - public ICookedInputSite NaturalTarget => this._naturalTarget; - - public InputModifiers Modifiers => this._modifiers; - - public MouseButtons Button => this._button; - - public int ScreenX => this._screenX; - - public int ScreenY => this._screenY; - - public int WheelDelta => this._wheelDelta; - - public void SetMappedTargets(ICookedInputSite target, ICookedInputSite naturalTarget) - { - this.UpdateTarget(target); - this._naturalTarget = naturalTarget; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs b/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs deleted file mode 100644 index 234f15d..0000000 --- a/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseButtonInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class MouseButtonInfo : MouseActionInfo - { - private static InputInfo.InfoType s_poolType = InfoType.MouseButton; - private bool _doubleClick; - private bool _state; - - static MouseButtonInfo() => SetPoolLimitMode(s_poolType, false); - - private MouseButtonInfo() - { - } - - public static MouseButtonInfo Create( - IRawInputSite rawSource, - IRawInputSite rawNatural, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - MouseButtons button, - bool state, - uint messageID) - { - MouseButtonInfo mouseButtonInfo = (MouseButtonInfo)GetFromPool(s_poolType) ?? new MouseButtonInfo(); - mouseButtonInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, button, state, messageID); - return mouseButtonInfo; - } - - private void Initialize( - IRawInputSite rawSource, - IRawInputSite rawNatural, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - MouseButtons button, - bool state, - uint messageID) - { - this._state = state; - this._doubleClick = false; - this.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, EventTypeForMouseButton(state, button, modifiers), messageID, button, 0); - } - - public override InputEventType EventType => this._doubleClick ? InputEventType.MouseDoubleClick : this._eventType; - - public override void UpdateTarget(ICookedInputSite target) - { - base.UpdateTarget(target); - this._doubleClick = (this.Modifiers & InputModifiers.DoubleClick) != InputModifiers.None && target != null && target.AllowDoubleClicks; - } - - private static InputEventType EventTypeForMouseButton( - bool state, - MouseButtons button, - InputModifiers modifiers) - { - bool flag = (button & MouseButtons.Left) != MouseButtons.None; - return !state ? (!flag ? InputEventType.MouseSecondaryUp : InputEventType.MousePrimaryUp) : (!flag ? InputEventType.MouseSecondaryDown : InputEventType.MousePrimaryDown); - } - - public bool IsDown => this._state; - - protected override InputInfo.InfoType PoolType => s_poolType; - - public override string ToString() => InvariantString.Format("{0}({1}, Button={2})", this.GetType().Name, this._state ? "Down" : "Up", Button); - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseDevice.cs b/UIX/Microsoft/Iris/Input/MouseDevice.cs deleted file mode 100644 index 6e7c487..0000000 --- a/UIX/Microsoft/Iris/Input/MouseDevice.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseDevice -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Input -{ - public class MouseDevice : InputDevice - { - public const uint LButtonDown = 513; - public const uint LButtonUp = 514; - public const uint LButtonDblClk = 515; - public const uint RButtonDown = 516; - public const uint RButtonUp = 517; - public const uint RButtonDblClk = 518; - public const uint MButtonDown = 519; - public const uint MButtonUp = 520; - public const uint MButtonDblClk = 521; - public const uint XButtonDown = 523; - public const uint XButtonUp = 524; - public const uint XButtonDblClk = 525; - public const uint MouseMove = 512; - public const uint MouseWheel = 522; - public const uint MouseLeave = 675; - - public MouseDevice(InputManager manager) - : base(manager) - { - } - - public InputModifiers MouseModifiers => this.Manager.HACK_SystemModifiers & InputModifiers.AllMouse; - - public bool OnRawInput(uint message, InputModifiers modifiers, ref RawMouseData args) - { - IRawInputSite visCapture = args._visCapture; - IRawInputSite visNatural = args._visNatural; - this.Manager.HACK_UpdateSystemModifiers(modifiers); - switch (message) - { - case 512: - case 513: - case 514: - case 515: - case 516: - case 517: - case 518: - case 519: - case 520: - case 521: - case 523: - case 524: - case 525: - this.Manager.MostRecentPhysicalMousePos = new Point(args._physicalX, args._physicalY); - this.Manager.Queue.RawMouseMove(visCapture, visNatural, this.Manager.Modifiers, ref args); - break; - case 675: - this.Manager.Queue.RawMouseLeave(); - break; - } - bool state = false; - switch (message) - { - case 513: - case 515: - case 516: - case 518: - case 519: - case 521: - case 523: - case 525: - state = true; - goto case 514; - case 514: - case 517: - case 520: - case 524: - this.Manager.Queue.RawMouseButtonState(message, visCapture, visNatural, this.Manager.Modifiers, args._button, state); - break; - case 522: - this.Manager.Queue.RawMouseWheel(this.Manager.Modifiers, ref args); - break; - } - return true; - } - - public bool OnRawInput( - uint message, - InputModifiers modifiers, - ref RawDragData args, - object data) - { - this.Manager.HACK_UpdateSystemModifiers(modifiers); - this.Manager.MostRecentPhysicalMousePos = new Point(args._positionX, args._positionY); - IRawInputSite visCapture = args._visCapture; - DragOperation formOperation = (DragOperation)message; - this.Manager.Queue.RawDragDrop(visCapture, data, args._positionX, args._positionY, modifiers, formOperation, args); - return true; - } - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs b/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs deleted file mode 100644 index 9da234f..0000000 --- a/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseFocusInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class MouseFocusInfo : MouseInfo - { - private static InputInfo.InfoType s_poolType = InfoType.MouseFocus; - private bool _state; - private ICookedInputSite _other; - - static MouseFocusInfo() => SetPoolLimitMode(s_poolType, true); - - private MouseFocusInfo() - { - } - - public static MouseFocusInfo Create( - IRawInputSite rawSource, - int x, - int y, - bool state, - ICookedInputSite other) - { - MouseFocusInfo mouseFocusInfo = (MouseFocusInfo)GetFromPool(s_poolType) ?? new MouseFocusInfo(); - mouseFocusInfo.Initialize(rawSource, x, y, state, other); - return mouseFocusInfo; - } - - private void Initialize( - IRawInputSite rawSource, - int x, - int y, - bool state, - ICookedInputSite other) - { - this._state = state; - this._other = other; - this.Initialize(rawSource, x, y, state ? InputEventType.GainMouseFocus : InputEventType.LoseMouseFocus); - } - - protected override void Zombie() - { - base.Zombie(); - this._other = null; - } - - public ICookedInputSite Other => this._other; - - public bool State => this._state; - - protected override InputInfo.InfoType PoolType => s_poolType; - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseInfo.cs b/UIX/Microsoft/Iris/Input/MouseInfo.cs deleted file mode 100644 index 6c15398..0000000 --- a/UIX/Microsoft/Iris/Input/MouseInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public abstract class MouseInfo : InputInfo - { - private IRawInputSite _rawSource; - private int _x; - private int _y; - - protected void Initialize(IRawInputSite rawSource, int x, int y, InputEventType eventType) - { - this._rawSource = rawSource; - this._x = x; - this._y = y; - this.Initialize(eventType); - } - - protected override void Zombie() - { - base.Zombie(); - this._rawSource = null; - } - - public IRawInputSite RawSource => this._rawSource; - - public int X => this._x; - - public int Y => this._y; - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs b/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs deleted file mode 100644 index 4f40c3f..0000000 --- a/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseMoveInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Input -{ - public class MouseMoveInfo : MouseActionInfo - { - private static InputInfo.InfoType s_poolType = InfoType.MouseMove; - - static MouseMoveInfo() => SetPoolLimitMode(s_poolType, true); - - private MouseMoveInfo() - { - } - - public static MouseMoveInfo Create( - IRawInputSite rawSource, - IRawInputSite rawNatural, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers) - { - MouseMoveInfo mouseMoveInfo = (MouseMoveInfo)GetFromPool(s_poolType) ?? new MouseMoveInfo(); - mouseMoveInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, InputEventType.MouseMove, 512U, MouseButtons.None, 0); - return mouseMoveInfo; - } - - protected override InputInfo.InfoType PoolType => s_poolType; - } -} diff --git a/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs b/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs deleted file mode 100644 index 124c9e4..0000000 --- a/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Input.MouseWheelInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Input -{ - public class MouseWheelInfo : MouseActionInfo - { - public const int k_defaultDelta = 120; - private static InputInfo.InfoType s_poolType = InfoType.MouseWheel; - - static MouseWheelInfo() => SetPoolLimitMode(s_poolType, true); - - private MouseWheelInfo() - { - } - - public static MouseWheelInfo Create( - IRawInputSite rawSource, - IRawInputSite rawNatural, - int x, - int y, - int screenX, - int screenY, - InputModifiers modifiers, - int delta) - { - MouseWheelInfo mouseWheelInfo = (MouseWheelInfo)GetFromPool(s_poolType) ?? new MouseWheelInfo(); - mouseWheelInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, InputEventType.MouseWheel, 522U, MouseButtons.None, delta); - return mouseWheelInfo; - } - - public override string ToString() => InvariantString.Format("{0}(Delta={1})", this.GetType().Name, WheelDelta); - - protected override InputInfo.InfoType PoolType => s_poolType; - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/BeginDragPolicy.cs b/UIX/Microsoft/Iris/InputHandlers/BeginDragPolicy.cs deleted file mode 100644 index 37e2b56..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/BeginDragPolicy.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.BeginDragPolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.InputHandlers -{ - public enum BeginDragPolicy - { - Down, - Move, - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/Characters.cs b/UIX/Microsoft/Iris/InputHandlers/Characters.cs deleted file mode 100644 index a1cb78d..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/Characters.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.Characters -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.InputHandlers -{ - public static class Characters - { - public const char Back = '\b'; - public const char Enter = '\r'; - public const char Escape = '\x001B'; - public const char Space = ' '; - public const char Delete = '\x007F'; - public const char Null = '\0'; - public const char SOH = '\x0001'; - public const char STX = '\x0002'; - public const char ETX = '\x0003'; - public const char EOT = '\x0004'; - public const char ENQ = '\x0005'; - public const char ACK = '\x0006'; - public const char BELL = '\a'; - public const char Tab = '\t'; - public const char LineFeed = '\n'; - public const char VT = '\v'; - public const char FF = '\f'; - public const char SO = '\x000E'; - public const char SI = '\x000F'; - public const char DLE = '\x0010'; - public const char DC1 = '\x0011'; - public const char DC2 = '\x0012'; - public const char DC3 = '\x0013'; - public const char DC4 = '\x0014'; - public const char NAK = '\x0015'; - public const char SYN = '\x0016'; - public const char ETB = '\x0017'; - public const char Cancel = '\x0018'; - public const char EM = '\x0019'; - public const char SUB = '\x001A'; - public const char FS = '\x001C'; - public const char GS = '\x001D'; - public const char RS = '\x001E'; - public const char US = '\x001F'; - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ClickCount.cs b/UIX/Microsoft/Iris/InputHandlers/ClickCount.cs deleted file mode 100644 index 2837604..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ClickCount.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ClickCount -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.InputHandlers -{ - public enum ClickCount - { - Single, - Double, - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs deleted file mode 100644 index 5ae1d64..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs +++ /dev/null @@ -1,482 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ClickHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class ClickHandler : ModifierInputHandler - { - private static int s_defaultRepeatDelay = Win32Api.GetDefaultKeyDelay(); - private static int s_defaultRepeatRate = Win32Api.GetDefaultKeyRepeat(); - private ClickCount _clickCount; - private ClickType _clickType; - private int _repeatDelay; - private int _repeatRate; - private IUICommand _command; - private WeakReference _eventContext; - private ClickType _clickTypeInProgress; - private DispatcherTimer _repeatTimer; - private bool _clickValidPosition; - private bool _handleEscape; - private bool _handle; - private bool _repeat; - - public ClickHandler() - { - this._clickType = ClickType.Key | ClickType.GamePad | ClickType.LeftMouse; - this._clickCount = ClickCount.Single; - this._repeat = true; - this._repeatDelay = DefaultRepeatDelay; - this._repeatRate = DefaultRepeatRate; - this._handle = true; - } - - protected override void OnDispose() - { - if (this._repeatTimer != null) - this._repeatTimer.Enabled = false; - base.OnDispose(); - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - if (this.ShouldHandleEvent(ClickType.Mouse)) - this.UI.MouseInteractive = true; - if (!this.ShouldHandleEvent(ClickType.Key | ClickType.GamePad)) - return; - this.UI.KeyInteractive = true; - } - - public ClickType ClickType - { - get => this._clickType; - set - { - if (this._clickType == value) - return; - this._clickType = value; - this.FireNotification(NotificationID.ClickType); - } - } - - public ClickCount ClickCount - { - get => this._clickCount; - set - { - if (this._clickCount == value) - return; - this._clickCount = value; - this.FireNotification(NotificationID.ClickCount); - } - } - - public bool Repeat - { - get => this._repeat; - set - { - if (this._repeat == value) - return; - this._repeat = value; - this.FireNotification(NotificationID.Repeat); - } - } - - public int RepeatDelay - { - get => this._repeatDelay; - set - { - if (this._repeatDelay == value) - return; - this._repeatDelay = value; - this.FireNotification(NotificationID.RepeatDelay); - } - } - - public int RepeatRate - { - get => this._repeatRate; - set - { - if (this._repeatRate == value) - return; - this._repeatRate = value; - this.FireNotification(NotificationID.RepeatRate); - } - } - - public bool Clicking => this._clickTypeInProgress != ClickType.None && this._clickValidPosition; - - public object EventContext => this.CheckEventContext(ref this._eventContext); - - public IUICommand Command - { - get => this._command; - set - { - if (this._command == value) - return; - this._command = value; - this.FireNotification(NotificationID.Command); - } - } - - public bool Handle - { - get => this._handle; - set - { - if (this._handle == value) - return; - this._handle = value; - this.FireNotification(NotificationID.Handle); - } - } - - private void InvokeCommand() - { - this.FireNotification(NotificationID.Invoked); - if (this._command == null) - return; - this._command.Invoke(); - } - - private void BeginClick(ClickType clickType, bool validPosition) - { - if (this._clickTypeInProgress == ClickType.None) - { - this._clickTypeInProgress = clickType; - this._clickValidPosition = validPosition; - if (validPosition) - this.FireNotification(NotificationID.Clicking); - } - else if (this._clickTypeInProgress != clickType) - this.CancelClick(ClickType.Any); - this.SetEventContext(null, ref this._eventContext, NotificationID.EventContext); - } - - private void EndClick(ICookedInputSite clickTarget, ClickType clickType) - { - if (this._clickTypeInProgress == ClickType.None) - return; - this.SetEventContext(clickTarget, ref this._eventContext, NotificationID.EventContext); - if (this._clickTypeInProgress == clickType && this._clickValidPosition) - this.InvokeCommand(); - this.CancelClick(ClickType.Any); - } - - private void UpdateClickValidPosition(bool validPosition) - { - bool clicking = this.Clicking; - this._clickValidPosition = validPosition; - if (this.Clicking == clicking) - return; - this.FireNotification(NotificationID.Clicking); - } - - private void CancelClick(ClickType clickType) - { - if (this._clickTypeInProgress != ClickType.None && Library.Bits.TestAllFlags((uint)clickType, (uint)this._clickTypeInProgress)) - { - bool clicking = this.Clicking; - this._clickTypeInProgress = ClickType.None; - if (this.Clicking != clicking) - this.FireNotification(NotificationID.Clicking); - } - if (this._repeatTimer == null) - return; - this._repeatTimer.Enabled = false; - } - - private bool ShouldHandleEvent( - ClickType type, - InputHandlerModifiers modifiers, - ClickCount count) - { - return this.ShouldHandleEvent(type) && this._clickCount == count && this.ShouldHandleEvent(modifiers); - } - - private bool ShouldHandleEvent(ClickType type) => Library.Bits.TestAnyFlags((uint)this._clickType, (uint)type); - - private bool OnClickEvent( - ICookedInputSite clickTarget, - ClickType type, - InputHandlerTransition transition, - InputHandlerModifiers modifiers) - { - return this.OnClickEvent(clickTarget, type, transition, modifiers, ClickCount.Single); - } - - private bool OnClickEvent( - ICookedInputSite clickTarget, - ClickType type, - InputHandlerTransition transition, - InputHandlerModifiers modifiers, - ClickCount count) - { - if (!this.ShouldHandleEvent(type, modifiers, count)) - return false; - if (transition == InputHandlerTransition.Up) - { - if (this.HandlerTransition != InputHandlerTransition.Down) - this.EndClick(clickTarget, type); - if (this._repeatTimer != null) - this._repeatTimer.Enabled = false; - } - else - { - this.BeginClick(type, true); - if (this.HandlerTransition == InputHandlerTransition.Down) - { - this.EndClick(clickTarget, type); - this.StartRepeat(new ClickHandler.ClickInfo() - { - type = type, - transition = transition, - modifiers = modifiers, - count = count, - target = clickTarget - }); - } - } - return true; - } - - private ClickType GetClickType(MouseButtons buttons) - { - ClickType clickType = ClickType.None; - if ((buttons & MouseButtons.Left) != MouseButtons.None) - clickType |= ClickType.LeftMouse; - if ((buttons & MouseButtons.Right) != MouseButtons.None) - clickType |= ClickType.RightMouse; - if ((buttons & MouseButtons.Middle) != MouseButtons.None) - clickType |= ClickType.MiddleMouse; - return clickType; - } - - private void StartRepeat(ClickHandler.ClickInfo clickInfo) - { - if (!this.Repeat) - return; - if (this._repeatTimer == null) - { - this._repeatTimer = new DispatcherTimer(); - this._repeatTimer.Tick += new EventHandler(this.SimulateClickEvent); - this._repeatTimer.AutoRepeat = true; - } - this._repeatTimer.Interval = this.RepeatDelay; - this._repeatTimer.UserData = clickInfo; - this._repeatTimer.Enabled = true; - } - - private void SimulateClickEvent(object sender, EventArgs args) - { - bool flag = false; - ClickHandler.ClickInfo userData = (ClickHandler.ClickInfo)this._repeatTimer.UserData; - if (this.Enabled && this.Repeat && this._clickValidPosition && (userData.target == null || userData.target.IsValid)) - { - this.OnClickEvent(userData.target, userData.type, userData.transition, userData.modifiers, userData.count); - flag = true; - } - if (flag) - { - this._repeatTimer.Enabled = false; - this._repeatTimer = null; - this.StartRepeat(userData); - this._repeatTimer.Interval = this.RepeatRate; - } - else - { - this._repeatTimer.Enabled = false; - this._repeatTimer = null; - } - } - - private static int DefaultRepeatDelay => s_defaultRepeatDelay; - - private static int DefaultRepeatRate => s_defaultRepeatRate; - - protected override void OnMousePrimaryDown(UIClass ui, MouseButtonInfo info) - { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - return; - info.MarkHandled(); - } - - protected override void OnMouseSecondaryDown(UIClass ui, MouseButtonInfo info) - { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - return; - info.MarkHandled(); - } - - protected override void OnMousePrimaryUp(UIClass ui, MouseButtonInfo info) - { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - return; - info.MarkHandled(); - } - - protected override void OnMouseSecondaryUp(UIClass ui, MouseButtonInfo info) - { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - return; - info.MarkHandled(); - } - - protected override void OnMouseDoubleClick(UIClass ui, MouseButtonInfo info) - { - ClickType clickType = this.GetClickType(info.Button); - if (!this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Down, GetModifiers(info.Modifiers), ClickCount.Double)) - return; - this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Up, GetModifiers(info.Modifiers), ClickCount.Double); - if (!this._handle) - return; - info.MarkHandled(); - } - - protected override void OnMouseMove(UIClass ui, MouseMoveInfo info) - { - if (!this.ShouldHandleEvent(ClickType.Mouse)) - return; - this.UpdateClickValidPosition(this.UI.HasDescendant(info.NaturalTarget as UIClass)); - } - - protected override void OnLoseMouseFocus(UIClass ui, MouseFocusInfo info) - { - if (!this.ShouldHandleEvent(ClickType.Mouse)) - return; - this.CancelClick(ClickType.Mouse); - } - - protected override void OnKeyDown(UIClass ui, KeyStateInfo info) - { - if (info.RepeatCount > 1U) - return; - switch (info.Key) - { - case Keys.Enter: - if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.Escape: - if (!this.Clicking) - break; - this.CancelClick(ClickType.Any); - if (this._handle) - info.MarkHandled(); - this._handleEscape = true; - break; - case Keys.Space: - if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.GamePadA: - if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.GamePadStart: - if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - } - } - - protected override void OnKeyUp(UIClass ui, KeyStateInfo info) - { - switch (info.Key) - { - case Keys.Enter: - if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.Escape: - if (!this._handleEscape) - break; - if (this._handle) - info.MarkHandled(); - this._handleEscape = false; - break; - case Keys.Space: - if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.GamePadA: - if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - case Keys.GamePadStart: - if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) - break; - info.MarkHandled(); - break; - } - } - - protected override void OnKeyCharacter(UIClass ui, KeyCharacterInfo info) - { - switch (info.Character) - { - case '\r': - if (!this.ShouldHandleEvent(ClickType.EnterKey, GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) - break; - info.MarkHandled(); - break; - case '\x001B': - if (!this._handleEscape || !this._handle) - break; - info.MarkHandled(); - break; - case ' ': - if (!this.ShouldHandleEvent(ClickType.SpaceKey, GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) - break; - info.MarkHandled(); - break; - } - } - - protected override void OnLoseKeyFocus(UIClass ui, KeyFocusInfo info) - { - if (this.ShouldHandleEvent(ClickType.SpaceKey)) - this.CancelClick(ClickType.SpaceKey); - if (this.ShouldHandleEvent(ClickType.EnterKey)) - this.CancelClick(ClickType.EnterKey); - if (this.ShouldHandleEvent(ClickType.GamePadA)) - this.CancelClick(ClickType.GamePadA); - if (this.ShouldHandleEvent(ClickType.GamePadStart)) - this.CancelClick(ClickType.GamePadStart); - this._handleEscape = false; - } - - private struct ClickInfo - { - public ClickType type; - public InputHandlerTransition transition; - public InputHandlerModifiers modifiers; - public ClickCount count; - public ICookedInputSite target; - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ClickType.cs b/UIX/Microsoft/Iris/InputHandlers/ClickType.cs deleted file mode 100644 index 69532d0..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ClickType.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ClickType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.InputHandlers -{ - [Flags] - public enum ClickType - { - None = 0, - LeftMouse = 1, - RightMouse = 2, - MiddleMouse = 4, - SpaceKey = 8, - EnterKey = 16, // 0x00000010 - GamePadA = 32, // 0x00000020 - GamePadStart = 64, // 0x00000040 - Mouse = MiddleMouse | RightMouse | LeftMouse, // 0x00000007 - Key = EnterKey | SpaceKey, // 0x00000018 - GamePad = GamePadStart | GamePadA, // 0x00000060 - Any = GamePad | Key | Mouse, // 0x0000007F - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs b/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs deleted file mode 100644 index 6f9c554..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.DragDropHelper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.InputHandlers -{ - public static class DragDropHelper - { - private static bool _draggingInternally; - private static DragSourceHandler _sourceHandler; - private static DropTargetHandler _targetHandler; - private static DropAction _dropAction; - - public static bool DraggingInternally => _draggingInternally; - - public static DragSourceHandler SourceHandler => _sourceHandler; - - public static DropTargetHandler TargetHandler - { - get => _targetHandler; - set - { - if (_targetHandler == value) - return; - DropTargetHandler targetHandler = _targetHandler; - _targetHandler = value; - OnAllowedDropActionsChanged(); - } - } - - public static DropAction AllowedDropActions => _targetHandler == null ? DropAction.None : _targetHandler.AllowedDropActions; - - public static InputModifiers Modifiers => UISession.Default.InputManager.DragModifiers; - - public static void OnAllowedDropActionsChanged() - { - if (DraggingInternally) - { - _sourceHandler.UpdateCurrentAction(); - } - else - { - uint allowedDropActions = (uint)AllowedDropActions; - UISession.Default.Form.SetDragDropResult(allowedDropActions, allowedDropActions); - } - } - - public static void BeginDrag( - DragSourceHandler sourceHandler, - ICookedInputSite source, - IRawInputSite target, - int formX, - int formY, - InputModifiers modifiers) - { - _sourceHandler = sourceHandler; - _draggingInternally = true; - UISession.Default.Form.IsDragInProgress = true; - UISession.Default.InputManager.SimulateDragEnter(source, target, _sourceHandler.Value, formX, formY, modifiers); - } - - public static void Requery(InputModifiers modifiers) - { - UISession.Default.InputManager.SimulateDragOver(modifiers); - _sourceHandler.UpdateCurrentAction(); - } - - public static void Requery( - IRawInputSite target, - int formX, - int formY, - InputModifiers modifiers) - { - UISession.Default.InputManager.SimulateDragOver(target, formX, formY, modifiers); - } - - public static void EndDrag(IRawInputSite target, InputModifiers modifiers, DropAction action) - { - DragOperation formOperation = DragOperation.Drop; - _dropAction = action; - _draggingInternally = false; - if (action == DropAction.None) - { - target = null; - formOperation = DragOperation.Leave; - } - UISession.Default.InputManager.SimulateDragEnd(target, modifiers, formOperation); - UISession.Default.Form.IsDragInProgress = false; - } - - public static void OnDragComplete() - { - _sourceHandler.OnEndDrag(_dropAction); - _sourceHandler = null; - _dropAction = DropAction.None; - } - - public static object GetValue() => UISession.Default.InputManager.GetDragDropValue(); - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs b/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs deleted file mode 100644 index 969c479..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs +++ /dev/null @@ -1,473 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.DragHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.Iris.InputHandlers -{ - public class DragHandler : InputHandler - { - private CursorID _dragCursor; - private BeginDragPolicy _beginDragPolicy; - private bool _pendingDrag; - private bool _inDrag; - private bool _hasRelativeTo; - private Vector2 _initialPosition; - private Point _initialScreenPosition; - private Vector2 _beginPosition; - private Vector2 _endPosition; - private Point _screenBeginPosition; - private Point _screenEndPosition; - private Size _lastKnownSize; - private InputHandlerModifiers _activeModifiers; - private bool _cancelOnEscape; - private ViewItem _relativeTo; - private RectangleF _contextBounds; - private List _addedContexts; - private List _removedContexts; - - public DragHandler() => this._beginDragPolicy = BeginDragPolicy.Down; - - public override void OnZoneDetached() - { - this.CancelDrag(); - base.OnZoneDetached(); - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (this.HandleDirect) - this.UI.MouseInteractive = true; - if (this._relativeTo != null) - return; - this.SetRelativeTo(null); - } - - public BeginDragPolicy BeginDragPolicy - { - get => this._beginDragPolicy; - set - { - if (this._beginDragPolicy == value) - return; - this._beginDragPolicy = value; - this.FireNotification(NotificationID.BeginDragPolicy); - } - } - - public bool Dragging => this._inDrag; - - private void SetDragging(bool value) - { - if (this._inDrag == value) - return; - this._inDrag = value; - this.FireNotification(NotificationID.Dragging); - } - - public Vector2 BeginPosition => this.NormalizeCoordinates(this._beginPosition); - - private void SetBeginPosition(Vector2 relativeCoordinate) - { - if (!(this._beginPosition != relativeCoordinate)) - return; - this._beginPosition = relativeCoordinate; - this.FireNotification(NotificationID.BeginPosition); - this.FireNotification(NotificationID.RelativeDragSize); - } - - public Vector2 EndPosition => this.NormalizeCoordinates(this._endPosition); - - private void SetEndPosition(Vector2 relativeCoordinate) - { - if (!(this._endPosition != relativeCoordinate)) - return; - this._endPosition = relativeCoordinate; - this.FireNotification(NotificationID.EndPosition); - this.FireNotification(NotificationID.RelativeDragSize); - } - - public Size ScreenDragSize => (this.ScreenEndPosition - this.ScreenBeginPosition).ToSize(); - - public Vector2 LocalDragSize - { - get - { - Size screenDragSize = this.ScreenDragSize; - Vector3 vector3 = this._relativeTo != null ? this._relativeTo.ComputeEffectiveScale() : Vector3.UnitVector; - return new Vector2(screenDragSize.Width / vector3.X, screenDragSize.Height / vector3.Y); - } - } - - public Vector2 RelativeDragSize => this.EndPosition - this.BeginPosition; - - public InputHandlerModifiers ActiveModifiers => this._activeModifiers; - - private void SetActiveModifiers(InputHandlerModifiers value) - { - if (this._activeModifiers == value) - return; - this._activeModifiers = value; - this.FireNotification(NotificationID.ActiveModifiers); - } - - public CursorID DragCursor - { - get => this._dragCursor; - set - { - if (this._dragCursor == value) - return; - this._dragCursor = value; - this.FireNotification(NotificationID.DragCursor); - } - } - - private Point ScreenBeginPosition - { - get => this._screenBeginPosition; - set - { - if (!(this._screenBeginPosition != value)) - return; - this._screenBeginPosition = value; - this.FireNotification(NotificationID.ScreenDragSize); - this.FireNotification(NotificationID.LocalDragSize); - } - } - - private Point ScreenEndPosition - { - get => this._screenEndPosition; - set - { - if (!(this._screenEndPosition != value)) - return; - this._screenEndPosition = value; - this.FireNotification(NotificationID.ScreenDragSize); - this.FireNotification(NotificationID.LocalDragSize); - } - } - - public bool CancelOnEscape - { - get => this._cancelOnEscape; - set - { - if (this._cancelOnEscape == value) - return; - if (this.Dragging) - this.HookSessionInput(value); - this._cancelOnEscape = value; - this.FireNotification(NotificationID.CancelOnEscape); - } - } - - public ViewItem RelativeTo - { - get => !this._hasRelativeTo ? null : this._relativeTo; - set - { - bool hasRelativeTo = this._hasRelativeTo; - this._hasRelativeTo = value != null; - ViewItem relativeTo = this._relativeTo; - this.SetRelativeTo(value); - if (hasRelativeTo == this._hasRelativeTo && relativeTo == this._relativeTo) - return; - this.FireNotification(NotificationID.RelativeTo); - } - } - - private void SetRelativeTo(ViewItem relativeTo) - { - if (this._relativeTo == relativeTo && relativeTo != null) - return; - LayoutCompleteEventHandler completeEventHandler = new LayoutCompleteEventHandler(this.OnRelativeToLayoutComplete); - if (this._relativeTo != null) - this._relativeTo.LayoutComplete -= completeEventHandler; - this._relativeTo = relativeTo; - if (this._relativeTo == null && this.UI != null) - this._relativeTo = this.UI.RootItem; - if (this._relativeTo == null) - return; - this._relativeTo.LayoutComplete += completeEventHandler; - } - - public void ResetDragOrigin() - { - this.SetBeginPosition(this._endPosition); - this.ScreenBeginPosition = this.ScreenEndPosition; - } - - private void BeginDrag( - Vector2 relativeBegin, - Vector2 relativeEnd, - Point screenBegin, - Point screenEnd, - InputHandlerModifiers modifiers) - { - this.SetDragging(true); - this._pendingDrag = false; - this._contextBounds = RectangleF.Zero; - if (this.CancelOnEscape) - this.HookSessionInput(true); - this.SetBeginPosition(relativeBegin); - this.SetEndPosition(relativeEnd); - this.ScreenBeginPosition = screenBegin; - this.ScreenEndPosition = screenEnd; - this.SetActiveModifiers(modifiers); - this.FireNotification(NotificationID.Started); - this.UpdateCursor(); - } - - private void EndDrag(bool completed) - { - if (this.Dragging) - { - if (this.CancelOnEscape) - this.HookSessionInput(false); - this.SetDragging(false); - if (completed) - this.FireNotification(NotificationID.Ended); - else - this.FireNotification(NotificationID.Canceled); - this.UpdateCursor(); - } - this._pendingDrag = false; - } - - private void InDrag(Vector2 uiPoint, Point screenPoint, InputHandlerModifiers modifiers) - { - if (screenPoint != this.ScreenEndPosition) - { - this.SetEndPosition(this.TransformToRelative(uiPoint)); - this.ScreenEndPosition = screenPoint; - } - this.SetActiveModifiers(modifiers); - } - - protected override void OnMousePrimaryDown(UIClass ui, MouseButtonInfo info) - { - if (!this.Dragging) - { - Vector2 relative = this.TransformToRelative(this.TransformToUI(new Point(info.X, info.Y), (UIClass)info.Target)); - Point point = new Point(info.ScreenX, info.ScreenY); - if (this.BeginDragPolicy == BeginDragPolicy.Down) - { - this.BeginDrag(relative, relative, point, point, GetModifiers(info.Modifiers)); - info.MarkHandled(); - } - else - { - this._pendingDrag = true; - this._initialPosition = relative; - this._initialScreenPosition = point; - } - } - base.OnMousePrimaryDown(ui, info); - } - - protected override void OnMousePrimaryUp(UIClass ui, MouseButtonInfo info) - { - bool dragging = this.Dragging; - if (dragging || this._pendingDrag) - { - this.EndDrag(true); - if (dragging) - info.MarkHandled(); - } - base.OnMousePrimaryUp(ui, info); - } - - protected override void OnMouseMove(UIClass ui, MouseMoveInfo info) - { - if ((info.Modifiers & InputModifiers.LeftMouse) == InputModifiers.None) - this.EndDrag(true); - else if (this.Dragging || this._pendingDrag) - { - Vector2 ui1 = this.TransformToUI(new Point(info.X, info.Y), (UIClass)info.Target); - Point point = new Point(info.ScreenX, info.ScreenY); - if (this.Dragging) - { - this.InDrag(ui1, point, GetModifiers(info.Modifiers)); - info.MarkHandled(); - } - else if (Math.Abs(point.X - this._initialScreenPosition.X) >= Win32Api.GetSystemMetrics(68) || Math.Abs(point.Y - this._initialScreenPosition.Y) >= Win32Api.GetSystemMetrics(69)) - { - this.BeginDrag(this._initialPosition, this.TransformToRelative(ui1), this._initialScreenPosition, point, GetModifiers(info.Modifiers)); - info.MarkHandled(); - } - } - base.OnMouseMove(ui, info); - } - - protected override void OnLoseMouseFocus(UIClass ui, MouseFocusInfo info) - { - this.CancelDrag(); - base.OnLoseMouseFocus(ui, info); - } - - private void OnRelativeToLayoutComplete(object sender) => this.SetLastLayoutSize(this._relativeTo.LayoutSize); - - protected void SetLastLayoutSize(Size size) - { - Vector2 beginPosition = this.BeginPosition; - Vector2 endPosition = this.EndPosition; - Vector2 relativeDragSize = this.RelativeDragSize; - this._lastKnownSize = size; - if (!this.Dragging) - return; - Point client = this._relativeTo.ScreenToClient(this._screenEndPosition); - this.SetEndPosition(new Vector2(client.X, client.Y)); - if (beginPosition != this.BeginPosition) - this.FireNotification(NotificationID.BeginPosition); - if (endPosition != this.EndPosition) - this.FireNotification(NotificationID.EndPosition); - if (!(relativeDragSize != this.RelativeDragSize)) - return; - this.FireNotification(NotificationID.RelativeDragSize); - } - - private void HookSessionInput(bool hook) - { - if (hook) - this.UI.SessionInput += new SessionInputHandler(this.OnSessionInput); - else - this.UI.SessionInput -= new SessionInputHandler(this.OnSessionInput); - } - - private void OnSessionInput(InputInfo originalEvent, EventRouteStages stageHandled) - { - if (!(originalEvent is KeyStateInfo keyStateInfo)) - return; - if (keyStateInfo.Key == Keys.Escape) - this.CancelDrag(); - keyStateInfo.MarkHandled(); - } - - private Vector2 TransformToRelative(Vector2 uiPoint) - { - if (this._relativeTo != null) - { - RectangleF rectangleF = this._relativeTo.TransformFromAncestor(this.UI.RootItem, new RectangleF(uiPoint.X, uiPoint.Y, 0.0f, 0.0f)); - uiPoint.X = rectangleF.X; - uiPoint.Y = rectangleF.Y; - } - return uiPoint; - } - - private RectangleF TransformFromRelative(RectangleF relativeBounds) - { - RectangleF rectangleF = relativeBounds; - if (this._relativeTo != null) - rectangleF = this._relativeTo.TransformToAncestor(this.UI.RootItem, relativeBounds); - return rectangleF; - } - - private Vector2 TransformToUI(Point uiPoint, UIClass reference) - { - float x = uiPoint.X; - float y = uiPoint.Y; - if (reference != this.UI) - { - RectangleF rect = new RectangleF(x, y, 0.0f, 0.0f); - RectangleF ancestor = reference.RootItem.TransformToAncestor(this.UI.RootItem, rect); - x = ancestor.X; - y = ancestor.Y; - } - return new Vector2(x, y); - } - - private Vector2 NormalizeCoordinates(Vector2 pt) => this._lastKnownSize.Width == 0 || this._lastKnownSize.Height == 0 ? Vector2.Zero : new Vector2(pt.X / _lastKnownSize.Width, pt.Y / _lastKnownSize.Height); - - public override CursorID GetCursor() => this._dragCursor != CursorID.NotSpecified && this.Dragging ? this._dragCursor : CursorID.NotSpecified; - - public void CancelDrag() => this.EndDrag(false); - - private void GetDragBounds(out RectangleF relativeBounds, out RectangleF uiBounds) - { - relativeBounds = new RectangleF(Math.Min(this._beginPosition.X, this._endPosition.X), Math.Min(this._beginPosition.Y, this._endPosition.Y), Math.Abs(this._beginPosition.X - this._endPosition.X), Math.Abs(this._beginPosition.Y - this._endPosition.Y)); - uiBounds = this.TransformFromRelative(relativeBounds); - } - - public IList GetEventContexts() - { - IList added = new List(); - RectangleF uiBounds; - this.GetDragBounds(out RectangleF _, out uiBounds); - GetEventContexts(this.UI, added, null, RectangleF.Zero, uiBounds); - return added; - } - - public IList GetAddedEventContexts() - { - this.UpdateEventContexts(); - return _addedContexts; - } - - public IList GetRemovedEventContexts() - { - this.UpdateEventContexts(); - return _removedContexts; - } - - private void UpdateEventContexts() - { - RectangleF relativeBounds; - RectangleF uiBounds; - this.GetDragBounds(out relativeBounds, out uiBounds); - if (!(relativeBounds != this._contextBounds)) - return; - this._addedContexts = new List(); - this._removedContexts = new List(); - GetEventContexts(this.UI, _addedContexts, _removedContexts, this.TransformFromRelative(this._contextBounds), uiBounds); - this._contextBounds = relativeBounds; - } - - private static void GetEventContexts( - UIClass node, - IList added, - IList removed, - RectangleF oldBounds, - RectangleF newBounds) - { - ViewItem rootItem = node.RootItem; - if (rootItem == null) - return; - object eventContext = node.GetEventContext(); - if (eventContext != null && rootItem.Parent != null) - { - RectangleF rectangleF = new RectangleF(Point.Zero, rootItem.Parent.LayoutSize); - bool flag1 = rectangleF.IntersectsWith(oldBounds); - bool flag2 = rectangleF.IntersectsWith(newBounds); - if (flag2 && !flag1) - added.Add(eventContext); - else if (removed != null && flag1 && !flag2) - removed.Add(eventContext); - } - for (UIClass node1 = (UIClass)node.FirstChild; node1 != null; node1 = (UIClass)node1.NextSibling) - { - if (node1.RootItem != null) - { - RectangleF oldBounds1 = node1.RootItem.Parent.TransformFromAncestor(rootItem.Parent, oldBounds); - RectangleF newBounds1 = node1.RootItem.Parent.TransformFromAncestor(rootItem.Parent, newBounds); - GetEventContexts(node1, added, removed, oldBounds1, newBounds1); - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/DragSourceHandler.cs b/UIX/Microsoft/Iris/InputHandlers/DragSourceHandler.cs deleted file mode 100644 index b5107b0..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/DragSourceHandler.cs +++ /dev/null @@ -1,279 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.DragSourceHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class DragSourceHandler : InputHandler - { - private object _value; - private DropAction _allowedDropActions; - private DropAction _currentDropAction; - private bool _pendingDrag; - private bool _dragCanceled; - private int _initialX; - private int _initialY; - private CursorID _moveCursor; - private CursorID _copyCursor; - private CursorID _cancelCursor; - - public DragSourceHandler() - { - this._moveCursor = CursorID.Move; - this._copyCursor = CursorID.Copy; - this._cancelCursor = CursorID.Cancel; - } - - public override void OnZoneDetached() - { - if (this.Dragging) - this.EndDrag(null, InputModifiers.None, DropAction.None); - base.OnZoneDetached(); - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.MouseInteractive = true; - } - - public object Value - { - get => this._value; - set - { - if (this._value == value) - return; - this._value = value; - this.FireNotification(NotificationID.Value); - } - } - - public DropAction AllowedDropActions - { - get => this._allowedDropActions; - set - { - if (this._allowedDropActions == value) - return; - this._allowedDropActions = value; - this.FireNotification(NotificationID.AllowedDropActions); - } - } - - public DropAction CurrentDropAction => this._currentDropAction; - - private void SetCurrentDropAction(DropAction value) - { - if (this._currentDropAction == value) - return; - this._currentDropAction = value; - this.FireNotification(NotificationID.CurrentDropAction); - this.UpdateCursor(); - } - - public bool Dragging => DragDropHelper.DraggingInternally && DragDropHelper.SourceHandler == this; - - public CursorID MoveCursor - { - get => this._moveCursor; - set - { - if (this._moveCursor == value) - return; - this._moveCursor = value; - this.FireNotification(NotificationID.MoveCursor); - } - } - - public CursorID CopyCursor - { - get => this._copyCursor; - set - { - if (this._copyCursor == value) - return; - this._copyCursor = value; - this.FireNotification(NotificationID.CopyCursor); - } - } - - public CursorID CancelCursor - { - get => this._cancelCursor; - set - { - if (this._cancelCursor == value) - return; - this._cancelCursor = value; - this.FireNotification(NotificationID.CancelCursor); - } - } - - protected override void OnMousePrimaryDown(UIClass ui, MouseButtonInfo info) - { - this._pendingDrag = true; - this._initialX = info.ScreenX; - this._initialY = info.ScreenY; - base.OnMousePrimaryDown(ui, info); - } - - protected override void OnMouseMove(UIClass ui, MouseMoveInfo info) - { - if (this.Dragging) - { - DragDropHelper.Requery(info.NaturalHit, info.ScreenX, info.ScreenY, info.Modifiers); - info.MarkHandled(); - } - else if (this._pendingDrag) - { - if (Math.Abs(info.ScreenX - this._initialX) >= Win32Api.GetSystemMetrics(68) || Math.Abs(info.ScreenY - this._initialY) >= Win32Api.GetSystemMetrics(69)) - { - this._pendingDrag = false; - DragDropHelper.BeginDrag(this, info.Target, info.NaturalHit, 0, 0, info.Modifiers); - this.UI.SessionInput += new SessionInputHandler(this.OnSessionInput); - this.FireNotification(NotificationID.Dragging); - this.FireNotification(NotificationID.Started); - this.UpdateCursor(); - info.MarkHandled(); - } - } - else if (this._dragCanceled) - info.MarkHandled(); - base.OnMouseMove(ui, info); - } - - protected override void OnMousePrimaryUp(UIClass sender, MouseButtonInfo info) - { - this._pendingDrag = false; - if (this.Dragging) - { - this.EndDrag(info?.NaturalHit, info.Modifiers, this.CurrentDropAction); - info.MarkHandled(); - } - else if (this._dragCanceled) - { - this._dragCanceled = false; - info.MarkHandled(); - } - base.OnMousePrimaryUp(sender, info); - } - - protected override void OnDragComplete(UIClass sender, DragDropInfo info) - { - DragDropHelper.OnDragComplete(); - info.MarkHandled(); - base.OnDragComplete(sender, info); - } - - private void OnSessionInput(InputInfo originalEvent, EventRouteStages handledStage) - { - switch (originalEvent) - { - case KeyStateInfo keyStateInfo: - switch (keyStateInfo.Key) - { - case Keys.ControlKey: - InputModifiers modifiers = keyStateInfo.Modifiers; - if (keyStateInfo.Action == KeyAction.Down) - modifiers |= InputModifiers.ControlKey; - DragDropHelper.Requery(modifiers); - break; - case Keys.Escape: - this.EndDrag(null, keyStateInfo.Modifiers, DropAction.None); - this._dragCanceled = true; - break; - } - keyStateInfo.MarkHandled(); - break; - case MouseButtonInfo mouseButtonInfo: - if (mouseButtonInfo.Button == MouseButtons.Left) - break; - mouseButtonInfo.MarkHandled(); - break; - } - } - - protected override void OnLoseKeyFocus(UIClass sender, KeyFocusInfo info) - { - this._pendingDrag = false; - if (this.Dragging) - this.EndDrag(null, DragDropHelper.Modifiers, DropAction.None); - base.OnLoseKeyFocus(sender, info); - } - - protected override void OnLoseMouseFocus(UIClass sender, MouseFocusInfo info) - { - this._pendingDrag = false; - if (this.Dragging) - this.EndDrag(null, DragDropHelper.Modifiers, DropAction.None); - base.OnLoseMouseFocus(sender, info); - } - - private void EndDrag(IRawInputSite target, InputModifiers modifiers, DropAction action) - { - this.UI.SessionInput -= new SessionInputHandler(this.OnSessionInput); - DragDropHelper.EndDrag(target, modifiers, action); - } - - public void OnEndDrag(DropAction action) - { - this.FireNotification(NotificationID.Dragging); - switch (action) - { - case DropAction.None: - this.FireNotification(NotificationID.Canceled); - break; - case DropAction.Copy: - this.FireNotification(NotificationID.Copied); - break; - case DropAction.Move: - this.FireNotification(NotificationID.Moved); - break; - } - this.UpdateCursor(); - } - - public void UpdateCurrentAction() - { - DropAction dropAction = DragDropHelper.AllowedDropActions & this.AllowedDropActions; - if ((dropAction & DropAction.All) == DropAction.All) - { - if ((DragDropHelper.Modifiers & InputModifiers.ControlKey) == InputModifiers.ControlKey) - this.SetCurrentDropAction(DropAction.Copy); - else - this.SetCurrentDropAction(DropAction.Move); - } - else - this.SetCurrentDropAction(dropAction); - } - - public override CursorID GetCursor() - { - if (this.Dragging) - { - switch (this.CurrentDropAction) - { - case DropAction.None: - return this.CancelCursor; - case DropAction.Copy: - return this.CopyCursor; - case DropAction.Move: - return this.MoveCursor; - } - } - return CursorID.NotSpecified; - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/DropAction.cs b/UIX/Microsoft/Iris/InputHandlers/DropAction.cs deleted file mode 100644 index 9ec3192..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/DropAction.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.DropAction -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.InputHandlers -{ - [Flags] - public enum DropAction - { - None = 0, - Copy = 1, - Move = 2, - All = Move | Copy, // 0x00000003 - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/DropTargetHandler.cs b/UIX/Microsoft/Iris/InputHandlers/DropTargetHandler.cs deleted file mode 100644 index b51ad22..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/DropTargetHandler.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.DropTargetHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class DropTargetHandler : InputHandler - { - private bool _dragging; - private DropAction _allowedDropActions; - private WeakReference _eventContext; - - public DropTargetHandler() => UISession.Default.Form.EnableExternalDragDrop = true; - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.MouseInteractive = true; - } - - public DropAction AllowedDropActions - { - get => this._allowedDropActions; - set - { - if (this._allowedDropActions == value) - return; - this._allowedDropActions = value; - this.FireNotification(NotificationID.AllowedDropActions); - if (!this.Dragging) - return; - DragDropHelper.OnAllowedDropActionsChanged(); - } - } - - public bool Dragging => this._dragging; - - public object EventContext => this.CheckEventContext(ref this._eventContext); - - protected override void OnDragEnter(UIClass ui, DragDropInfo info) - { - this._dragging = true; - DragDropHelper.TargetHandler = this; - this.FireNotification(NotificationID.Dragging); - this.FireNotification(NotificationID.DragEnter); - this.SetEventContext(info.Target, ref this._eventContext, NotificationID.EventContext); - info.MarkHandled(); - base.OnDragEnter(ui, info); - } - - protected override void OnDragOver(UIClass ui, DragDropInfo info) - { - if (this.Dragging) - { - this.FireNotification(NotificationID.DragOver); - info.MarkHandled(); - } - base.OnDragOver(ui, info); - } - - protected override void OnDragLeave(UIClass ui, DragDropInfo info) - { - if (this.Dragging) - { - this.EndDrag(NotificationID.DragLeave); - info.MarkHandled(); - this.SetEventContext(null, ref this._eventContext, NotificationID.EventContext); - } - base.OnDragLeave(ui, info); - } - - protected override void OnDropped(UIClass ui, DragDropInfo info) - { - if (this.Dragging) - { - this.EndDrag(NotificationID.Dropped); - info.MarkHandled(); - } - base.OnDropped(ui, info); - } - - private void EndDrag(string eventName) - { - this._dragging = false; - this.FireNotification(NotificationID.Dragging); - this.FireNotification(eventName); - DragDropHelper.TargetHandler = null; - } - - public object GetValue() => DragDropHelper.GetValue(); - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/EventContext.cs b/UIX/Microsoft/Iris/InputHandlers/EventContext.cs deleted file mode 100644 index e4c9232..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/EventContext.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.EventContext -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.InputHandlers -{ - public class EventContext : InputHandler - { - private object _value; - - protected override void ConfigureInteractivity() => this.UI.SetEventContext(this); - - public object Value - { - get => this._value; - set - { - if (this._value == value) - return; - this._value = value; - this.FireNotification(NotificationID.Value); - } - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/FocusChangeReason.cs b/UIX/Microsoft/Iris/InputHandlers/FocusChangeReason.cs deleted file mode 100644 index 7b215a8..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/FocusChangeReason.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.FocusChangeReason -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.InputHandlers -{ - [Flags] - public enum FocusChangeReason - { - Mouse = 1, - Directional = 2, - Tab = 4, - Key = Tab | Directional, // 0x00000006 - Other = 8, - Any = Other | Key | Mouse, // 0x0000000F - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs b/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs deleted file mode 100644 index 289d5aa..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.FocusHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class FocusHandler : ModifierInputHandler - { - private FocusChangeReason _changeReason; - private WeakReference _gainedEventContext; - private WeakReference _lostEventContext; - - public FocusHandler() => this._changeReason = FocusChangeReason.Any; - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.KeyInteractive = true; - } - - public FocusChangeReason Reason - { - get => this._changeReason; - set - { - if (this._changeReason == value) - return; - this._changeReason = value; - this.FireNotification(NotificationID.Reason); - } - } - - public object GainedEventContext => this.CheckEventContext(ref this._gainedEventContext); - - public object LostEventContext => this.CheckEventContext(ref this._lostEventContext); - - protected override void OnGainKeyFocus(UIClass ui, KeyFocusInfo info) - { - if (!this.ShouldHandleEvent(info)) - return; - this.SetEventContext(info.Target, ref this._gainedEventContext, NotificationID.GainedEventContext); - this.FireNotification(NotificationID.GainedFocus); - } - - protected override void OnLoseKeyFocus(UIClass ui, KeyFocusInfo info) - { - if (!this.ShouldHandleEvent(info)) - return; - this.SetEventContext(info.Target, ref this._lostEventContext, NotificationID.LostEventContext); - this.FireNotification(NotificationID.LostFocus); - } - - private bool ShouldHandleEvent(KeyFocusInfo info) => Library.Bits.TestAnyFlags((uint)this.Reason, (uint)GetFocusChangeReason(info)) && this.ShouldHandleEvent(GetModifiers(UISession.Default.InputManager.Modifiers)); - - private static FocusChangeReason GetFocusChangeReason(KeyFocusInfo info) - { - switch (info.FocusReason) - { - case KeyFocusReason.Directional: - return FocusChangeReason.Directional; - case KeyFocusReason.Tab: - return FocusChangeReason.Tab; - case KeyFocusReason.MouseDown: - case KeyFocusReason.MouseEnter: - return FocusChangeReason.Mouse; - default: - return FocusChangeReason.Other; - } - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs b/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs deleted file mode 100644 index 0ef888d..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs +++ /dev/null @@ -1,273 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.KeyHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; - -namespace Microsoft.Iris.InputHandlers -{ - public class KeyHandler : ModifierInputHandler - { - private ArrayList _invokedKeys; - private KeyHandlerKey _key; - private IUICommand _command; - private bool _pressing; - private bool _handle; - private bool _stopRoute; - private bool _repeat; - private WeakReference _eventContext; - - public KeyHandler() - { - this._handle = true; - this.HandlerTransition = InputHandlerTransition.Down; - this._key = KeyHandlerKey.None; - this._repeat = true; - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.KeyInteractive = true; - } - - public bool Pressing => this._pressing; - - public KeyHandlerKey Key - { - get => this._key; - set - { - if (this._key == value) - return; - this._key = value; - this.FireNotification(NotificationID.Key); - } - } - - public IUICommand Command - { - get => this._command; - set - { - if (this._command == value) - return; - this._command = value; - this.FireNotification(NotificationID.Command); - } - } - - public bool Handle - { - get => this._handle; - set - { - if (this._handle == value) - return; - this._handle = value; - this.FireNotification(NotificationID.Handle); - } - } - - public bool StopRoute - { - get => this._stopRoute; - set - { - this._stopRoute = value; - this.FireNotification(NotificationID.StopRoute); - } - } - - public bool Repeat - { - get => this._repeat; - set - { - if (this._repeat == value) - return; - this._repeat = value; - this.FireNotification(NotificationID.Repeat); - } - } - - public object EventContext => this.CheckEventContext(ref this._eventContext); - - public bool TrackInvokedKeys - { - get => this._invokedKeys != null; - set - { - if (this.TrackInvokedKeys == value) - return; - this._invokedKeys = !value ? null : new ArrayList(); - this.FireNotification(NotificationID.TrackInvokedKeys); - } - } - - public void GetInvokedKeys(IList copyTo) - { - if (this.TrackInvokedKeys) - { - foreach (object invokedKey in this._invokedKeys) - copyTo.Add(invokedKey); - this._invokedKeys.Clear(); - } - else - ErrorManager.ReportError("KeyHandler needs to be marked TrackInvokedKeys=\"true\" in order to call GetInvokedKeys()"); - } - - protected override void OnKeyDown(UIClass ui, KeyStateInfo info) - { - Keys key = info.Key; - InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); - if (key != (Keys)this._key) - TranslateKey(ref key, ref modifiers); - if (!this.KeyMatches(key) || !this.ShouldHandleEvent(modifiers)) - return; - bool flag; - if (!this._pressing) - { - this._pressing = true; - this.FireNotification(NotificationID.Pressing); - flag = true; - } - else - flag = this._repeat; - if (flag) - { - if (this.HandlerTransition == InputHandlerTransition.Down) - this.InvokeCommand(key); - if (this._handle) - info.MarkHandled(); - } - if (this._stopRoute) - info.TruncateRoute(); - this.SetEventContext(info.Target, ref this._eventContext, NotificationID.EventContext); - } - - protected override void OnKeyUp(UIClass ui, KeyStateInfo info) - { - Keys key = info.Key; - InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); - if (key != (Keys)this._key) - TranslateKey(ref key, ref modifiers); - if (!this.KeyMatches(key) || !this.ShouldHandleEvent(modifiers)) - return; - this._pressing = false; - this.FireNotification(NotificationID.Pressing); - if (this.HandlerTransition == InputHandlerTransition.Up) - this.InvokeCommand(key); - if (this._handle) - info.MarkHandled(); - if (this._stopRoute) - info.TruncateRoute(); - this.SetEventContext(info.Target, ref this._eventContext, NotificationID.EventContext); - } - - protected override void OnLoseKeyFocus(UIClass ui, KeyFocusInfo info) - { - if (!this._pressing) - return; - this._pressing = false; - this.FireNotification(NotificationID.Pressing); - } - - private bool KeyMatches(Keys candidate) - { - if (this._key >= KeyHandlerKey.None) - return candidate == (Keys)this._key; - return this._key == KeyHandlerKey.Any && candidate != Keys.None; - } - - public static void TranslateKey(ref Keys key, ref InputHandlerModifiers modifiers) => TranslateKey(ref key, ref modifiers, Orientation.Horizontal); - - public static void TranslateKey( - ref Keys key, - ref InputHandlerModifiers modifiers, - Orientation orientation) - { - InputHandlerModifiers handlerModifiers = modifiers; - modifiers = InputHandlerModifiers.None; - switch (key) - { - case Keys.GamePadA: - case Keys.GamePadStart: - key = Keys.Enter; - break; - case Keys.GamePadB: - case Keys.GamePadBack: - key = Keys.Back; - break; - case Keys.GamePadRShoulder: - key = Keys.Tab; - break; - case Keys.GamePadLShoulder: - key = Keys.Tab; - modifiers = InputHandlerModifiers.Shift; - break; - case Keys.GamePadLTrigger: - key = Keys.PageUp; - break; - case Keys.GamePadRTrigger: - key = Keys.Next; - break; - case Keys.GamePadDPadUp: - case Keys.GamePadLThumbUp: - key = Keys.Up; - break; - case Keys.GamePadDPadDown: - case Keys.GamePadLThumbDown: - key = Keys.Down; - break; - case Keys.GamePadDPadLeft: - case Keys.GamePadLThumbLeft: - key = Keys.Left; - break; - case Keys.GamePadDPadRight: - case Keys.GamePadLThumbRight: - key = Keys.Right; - break; - case Keys.GamePadLThumbUpLeft: - key = orientation == Orientation.Vertical ? Keys.Up : Keys.Left; - break; - case Keys.GamePadLThumbUpRight: - key = orientation == Orientation.Vertical ? Keys.Up : Keys.Right; - break; - case Keys.GamePadLThumbDownRight: - key = orientation == Orientation.Vertical ? Keys.Down : Keys.Right; - break; - case Keys.GamePadLThumbDownLeft: - key = orientation == Orientation.Vertical ? Keys.Down : Keys.Left; - break; - default: - modifiers = handlerModifiers; - break; - } - } - - private void InvokeCommand(Keys key) - { - this.FireNotification(NotificationID.Invoked); - if (this._command != null) - this._command.Invoke(); - if (!this.TrackInvokedKeys) - return; - this._invokedKeys.Add((KeyHandlerKey)key); - } - - public override string ToString() => InvariantString.Format("{0}({1})", this.GetType().Name, _key); - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/KeyHandlerKey.cs b/UIX/Microsoft/Iris/InputHandlers/KeyHandlerKey.cs deleted file mode 100644 index 3148ac1..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/KeyHandlerKey.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.KeyHandlerKey -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.InputHandlers -{ - public enum KeyHandlerKey - { - Any = -1, // 0xFFFFFFFF - None = 0, - Backspace = 8, - Tab = 9, - Clear = 12, // 0x0000000C - Enter = 13, // 0x0000000D - Shift = 16, // 0x00000010 - Control = 17, // 0x00000011 - Alt = 18, // 0x00000012 - CapsLock = 20, // 0x00000014 - Escape = 27, // 0x0000001B - Space = 32, // 0x00000020 - PageUp = 33, // 0x00000021 - PageDown = 34, // 0x00000022 - End = 35, // 0x00000023 - Home = 36, // 0x00000024 - Left = 37, // 0x00000025 - Up = 38, // 0x00000026 - Right = 39, // 0x00000027 - Down = 40, // 0x00000028 - PrintScreen = 44, // 0x0000002C - Insert = 45, // 0x0000002D - Delete = 46, // 0x0000002E - D0 = 48, // 0x00000030 - D1 = 49, // 0x00000031 - D2 = 50, // 0x00000032 - D3 = 51, // 0x00000033 - D4 = 52, // 0x00000034 - D5 = 53, // 0x00000035 - D6 = 54, // 0x00000036 - D7 = 55, // 0x00000037 - D8 = 56, // 0x00000038 - D9 = 57, // 0x00000039 - A = 65, // 0x00000041 - B = 66, // 0x00000042 - C = 67, // 0x00000043 - D = 68, // 0x00000044 - E = 69, // 0x00000045 - F = 70, // 0x00000046 - G = 71, // 0x00000047 - H = 72, // 0x00000048 - I = 73, // 0x00000049 - J = 74, // 0x0000004A - K = 75, // 0x0000004B - L = 76, // 0x0000004C - M = 77, // 0x0000004D - N = 78, // 0x0000004E - O = 79, // 0x0000004F - P = 80, // 0x00000050 - Q = 81, // 0x00000051 - R = 82, // 0x00000052 - S = 83, // 0x00000053 - T = 84, // 0x00000054 - U = 85, // 0x00000055 - V = 86, // 0x00000056 - W = 87, // 0x00000057 - X = 88, // 0x00000058 - Y = 89, // 0x00000059 - Z = 90, // 0x0000005A - Apps = 93, // 0x0000005D - NumPad0 = 96, // 0x00000060 - NumPad1 = 97, // 0x00000061 - NumPad2 = 98, // 0x00000062 - NumPad3 = 99, // 0x00000063 - NumPad4 = 100, // 0x00000064 - NumPad5 = 101, // 0x00000065 - NumPad6 = 102, // 0x00000066 - NumPad7 = 103, // 0x00000067 - NumPad8 = 104, // 0x00000068 - NumPad9 = 105, // 0x00000069 - Multiply = 106, // 0x0000006A - Add = 107, // 0x0000006B - Subtract = 109, // 0x0000006D - Divide = 111, // 0x0000006F - F1 = 112, // 0x00000070 - F2 = 113, // 0x00000071 - F3 = 114, // 0x00000072 - F4 = 115, // 0x00000073 - F5 = 116, // 0x00000074 - F6 = 117, // 0x00000075 - F7 = 118, // 0x00000076 - F8 = 119, // 0x00000077 - F9 = 120, // 0x00000078 - F10 = 121, // 0x00000079 - F11 = 122, // 0x0000007A - F12 = 123, // 0x0000007B - F13 = 124, // 0x0000007C - F14 = 125, // 0x0000007D - F15 = 126, // 0x0000007E - F16 = 127, // 0x0000007F - F17 = 128, // 0x00000080 - F18 = 129, // 0x00000081 - F19 = 130, // 0x00000082 - F20 = 131, // 0x00000083 - F21 = 132, // 0x00000084 - F22 = 133, // 0x00000085 - F23 = 134, // 0x00000086 - F24 = 135, // 0x00000087 - NumLock = 144, // 0x00000090 - Semicolon = 186, // 0x000000BA - Equals = 187, // 0x000000BB - Comma = 188, // 0x000000BC - Underscore = 189, // 0x000000BD - Period = 190, // 0x000000BE - QuestionMark = 191, // 0x000000BF - Tilde = 192, // 0x000000C0 - OpenBrace = 219, // 0x000000DB - Pipe = 220, // 0x000000DC - CloseBrace = 221, // 0x000000DD - Quotes = 222, // 0x000000DE - Backslash = 226, // 0x000000E2 - GamePadA = 22528, // 0x00005800 - GamePadB = 22529, // 0x00005801 - GamePadX = 22530, // 0x00005802 - GamePadY = 22531, // 0x00005803 - GamePadRShoulder = 22532, // 0x00005804 - GamePadLShoulder = 22533, // 0x00005805 - GamePadLTrigger = 22534, // 0x00005806 - GamePadRTrigger = 22535, // 0x00005807 - GamePadDPadUp = 22544, // 0x00005810 - GamePadDPadDown = 22545, // 0x00005811 - GamePadDPadLeft = 22546, // 0x00005812 - GamePadDPadRight = 22547, // 0x00005813 - GamePadStart = 22548, // 0x00005814 - GamePadLThumbPress = 22550, // 0x00005816 - GamePadRThumbPress = 22551, // 0x00005817 - GamePadLThumbUp = 22560, // 0x00005820 - GamePadLThumbDown = 22561, // 0x00005821 - GamePadLThumbRight = 22562, // 0x00005822 - GamePadLThumbLeft = 22563, // 0x00005823 - GamePadLThumbUpLeft = 22564, // 0x00005824 - GamePadLThumbUpRight = 22565, // 0x00005825 - GamePadLThumbDownRight = 22566, // 0x00005826 - GamePadLThumbDownLeft = 22567, // 0x00005827 - GamePadRThumbUp = 22576, // 0x00005830 - GamePadRThumbDown = 22577, // 0x00005831 - GamePadRThumbRight = 22578, // 0x00005832 - GamePadRThumbLeft = 22579, // 0x00005833 - GamePadRThumbUpLeft = 22580, // 0x00005834 - GamePadRThumbUpRight = 22581, // 0x00005835 - GamePadRThumbDownRight = 22582, // 0x00005836 - GamePadRThumbDownLeft = 22583, // 0x00005837 - GamePadBack = 22597, // 0x00005845 - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs deleted file mode 100644 index b83e90d..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ModifierInputHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.InputHandlers -{ - public class ModifierInputHandler : InputHandler - { - private InputHandlerModifiers _requiredModifiers; - private InputHandlerModifiers _disallowedModifiers; - private InputHandlerTransition _handlerTransition; - - public ModifierInputHandler() - { - this._handlerTransition = InputHandlerTransition.Up; - this._requiredModifiers = InputHandlerModifiers.None; - this._disallowedModifiers = InputHandlerModifiers.None; - } - - public InputHandlerTransition HandlerTransition - { - get => this._handlerTransition; - set - { - if (this._handlerTransition == value) - return; - this._handlerTransition = value; - this.FireNotification(NotificationID.HandlerTransition); - } - } - - public InputHandlerModifiers RequiredModifiers - { - get => this._requiredModifiers; - set - { - if (this._requiredModifiers == value) - return; - this._requiredModifiers = value; - this.FireNotification(NotificationID.RequiredModifiers); - } - } - - public InputHandlerModifiers DisallowedModifiers - { - get => this._disallowedModifiers; - set - { - if (this._disallowedModifiers == value) - return; - this._disallowedModifiers = value; - this.FireNotification(NotificationID.DisallowedModifiers); - } - } - - protected bool ShouldHandleEvent(InputHandlerModifiers modifiers) => (this._disallowedModifiers == InputHandlerModifiers.None || !Library.Bits.TestAnyFlags((uint)modifiers, (uint)this._disallowedModifiers)) && (this._requiredModifiers == InputHandlerModifiers.None || Library.Bits.TestAllFlags((uint)modifiers, (uint)this._requiredModifiers)); - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/MouseWheelHandler.cs b/UIX/Microsoft/Iris/InputHandlers/MouseWheelHandler.cs deleted file mode 100644 index 1317633..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/MouseWheelHandler.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.MouseWheelHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.InputHandlers -{ - public class MouseWheelHandler : InputHandler - { - private bool _handle; - - public MouseWheelHandler() => this._handle = true; - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.MouseInteractive = true; - this.UI.KeyInteractive = true; - } - - public bool Handle - { - get => this._handle; - set - { - if (this._handle == value) - return; - this._handle = value; - this.FireNotification(NotificationID.Handle); - } - } - - protected override void OnMouseWheel(UIClass ui, MouseWheelInfo info) - { - if (info.WheelDelta > 0) - this.FireNotification(NotificationID.UpInvoked); - else - this.FireNotification(NotificationID.DownInvoked); - if (!this._handle) - return; - info.MarkHandled(); - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs deleted file mode 100644 index 3708cc9..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs +++ /dev/null @@ -1,366 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ScrollingHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class ScrollingHandler : InputHandler - { - private ScrollModel _model; - private bool _handleDirectionalKeysFlag; - private bool _handlePageKeysFlag; - private bool _handleHomeEndKeysFlag; - private bool _handlePageCommandsFlag; - private bool _handleMouseWheelFlag; - private bool _useFocusBehavior; - private Keys _currentCampingKey; - private int _cumulativeMouseWheelDelta; - - public ScrollingHandler() - { - this._handleDirectionalKeysFlag = true; - this._handlePageKeysFlag = true; - this._handlePageCommandsFlag = true; - this._handleHomeEndKeysFlag = true; - this._handleMouseWheelFlag = true; - this._useFocusBehavior = true; - this.HandlerStage = InputHandlerStage.Direct | InputHandlerStage.Bubbled; - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - if (this._handleDirectionalKeysFlag || this._handlePageKeysFlag || (this._handleHomeEndKeysFlag || this._handlePageCommandsFlag)) - this.UI.KeyInteractive = true; - if (!this._handleMouseWheelFlag) - return; - this.UI.MouseInteractive = true; - } - - public bool HandleDirectionalKeys - { - get => this._handleDirectionalKeysFlag; - set - { - if (this._handleDirectionalKeysFlag == value) - return; - this._handleDirectionalKeysFlag = value; - this.FireNotification(NotificationID.HandleDirectionalKeys); - } - } - - public bool HandlePageKeys - { - get => this._handlePageKeysFlag; - set - { - if (this._handlePageKeysFlag == value) - return; - this._handlePageKeysFlag = value; - this.FireNotification(NotificationID.HandlePageKeys); - } - } - - public bool HandleHomeEndKeys - { - get => this._handleHomeEndKeysFlag; - set - { - if (this._handleHomeEndKeysFlag == value) - return; - this._handleHomeEndKeysFlag = value; - this.FireNotification(NotificationID.HandleHomeEndKeys); - } - } - - public bool HandlePageCommands - { - get => this._handlePageCommandsFlag; - set - { - if (this._handlePageCommandsFlag == value) - return; - this._handlePageCommandsFlag = value; - this.FireNotification(NotificationID.HandlePageCommands); - } - } - - public bool HandleMouseWheel - { - get => this._handleMouseWheelFlag; - set - { - if (this._handleMouseWheelFlag == value) - return; - this._handleMouseWheelFlag = value; - this.FireNotification(NotificationID.HandleMouseWheel); - } - } - - public ScrollModel ScrollModel - { - get => this._model; - set - { - if (this._model == value) - return; - this._model = value; - this.FireNotification(NotificationID.ScrollModel); - } - } - - public bool UseFocusBehavior - { - get => this._useFocusBehavior; - set - { - if (this._useFocusBehavior == value) - return; - this._useFocusBehavior = value; - this.FireNotification(NotificationID.UseFocusBehavior); - } - } - - private bool ValidScrollModel => this._model != null && this._model.Enabled; - - protected override void OnGainKeyFocus(UIClass sender, KeyFocusInfo info) - { - if (!this.ValidScrollModel || !this._useFocusBehavior) - return; - this._model.NotifyFocusChange(info.Target as UIClass); - } - - protected override void OnKeyDown(UIClass ui, KeyStateInfo info) - { - if (!this.ValidScrollModel) - return; - if (info.Key != this._currentCampingKey) - this.EndCamp(); - Keys key = info.Key; - InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); - KeyHandler.TranslateKey(ref key, ref modifiers, this.Orientation); - switch (this.ShouldHandleKey(key)) - { - case HandleKeyPolicy.None: - return; - case HandleKeyPolicy.Up: - this._model.ScrollUp(this._useFocusBehavior); - break; - case HandleKeyPolicy.Down: - this._model.ScrollDown(this._useFocusBehavior); - break; - case HandleKeyPolicy.PageUp: - this._model.PageUp(this._useFocusBehavior); - break; - case HandleKeyPolicy.PageDown: - this._model.PageDown(this._useFocusBehavior); - break; - case HandleKeyPolicy.Home: - this._model.Home(this._useFocusBehavior); - break; - case HandleKeyPolicy.End: - this._model.End(this._useFocusBehavior); - break; - } - this.BeginCamp(info.Key); - info.MarkHandled(); - } - - private void BeginCamp(Keys key) - { - if (!this.IsCamping) - this._model.BeginCamp(); - this._currentCampingKey = key; - } - - private void EndCamp() - { - if (!this.IsCamping) - return; - this._model.EndCamp(); - this._currentCampingKey = Keys.None; - } - - private bool IsCamping => this._currentCampingKey != Keys.None; - - protected override void OnKeyUp(UIClass ui, KeyStateInfo info) - { - if (!this.ValidScrollModel) - return; - if (info.Key == this._currentCampingKey) - this.EndCamp(); - Keys key = info.Key; - InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); - KeyHandler.TranslateKey(ref key, ref modifiers, this.Orientation); - if (this.ShouldHandleKey(key) == HandleKeyPolicy.None) - return; - info.MarkHandled(); - } - - protected override void OnLoseDeepKeyFocus() => this.EndCamp(); - - protected override void OnCommandDown(UIClass ui, KeyCommandInfo info) - { - if (!this.ValidScrollModel || info.Action != KeyAction.Down) - return; - switch (info.Command) - { - case CommandCode.ChannelUp: - if (!this._handlePageCommandsFlag) - break; - this._model.PageUp(); - info.MarkHandled(); - break; - case CommandCode.ChannelDown: - if (!this._handlePageCommandsFlag) - break; - this._model.PageDown(); - info.MarkHandled(); - break; - } - } - - protected override void OnCommandUp(UIClass ui, KeyCommandInfo info) - { - switch (info.Command) - { - case CommandCode.ChannelUp: - case CommandCode.ChannelDown: - if (!this._handlePageCommandsFlag) - break; - info.MarkHandled(); - break; - } - } - - protected override void OnMouseWheel(UIClass ui, MouseWheelInfo info) - { - if (!this._handleMouseWheelFlag || !this.ValidScrollModel || this.InputHasKeyModifiers(info)) - return; - this._cumulativeMouseWheelDelta += -info.WheelDelta; - if (Math.Abs(this._cumulativeMouseWheelDelta) >= 120) - { - if (this._cumulativeMouseWheelDelta > 0) - this._model.ScrollDown(this._cumulativeMouseWheelDelta / 120); - else - this._model.ScrollUp(Math.Abs(this._cumulativeMouseWheelDelta / 120)); - this._cumulativeMouseWheelDelta %= 120; - } - info.MarkHandled(); - } - - private ScrollingHandler.HandleKeyPolicy ShouldHandleKey(Keys key) - { - ScrollingHandler.HandleKeyPolicy handleKeyPolicy = HandleKeyPolicy.None; - switch (key) - { - case Keys.PageUp: - if (this._handlePageKeysFlag) - { - handleKeyPolicy = HandleKeyPolicy.PageUp; - break; - } - break; - case Keys.Next: - if (this._handlePageKeysFlag) - { - handleKeyPolicy = HandleKeyPolicy.PageDown; - break; - } - break; - case Keys.End: - if (this._handleHomeEndKeysFlag) - { - handleKeyPolicy = HandleKeyPolicy.End; - break; - } - break; - case Keys.Home: - if (this._handleHomeEndKeysFlag) - { - handleKeyPolicy = HandleKeyPolicy.Home; - break; - } - break; - case Keys.Left: - if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Horizontal) - { - handleKeyPolicy = this.UI.Zone.Session.IsRtl ? HandleKeyPolicy.Down : HandleKeyPolicy.Up; - break; - } - break; - case Keys.Up: - if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Vertical) - { - handleKeyPolicy = HandleKeyPolicy.Up; - break; - } - break; - case Keys.Right: - if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Horizontal) - { - handleKeyPolicy = this.UI.Zone.Session.IsRtl ? HandleKeyPolicy.Up : HandleKeyPolicy.Down; - break; - } - break; - case Keys.Down: - if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Vertical) - { - handleKeyPolicy = HandleKeyPolicy.Down; - break; - } - break; - } - return handleKeyPolicy; - } - - private Orientation Orientation - { - get - { - Orientation orientation = Orientation.Horizontal; - if (this._model.TargetViewItem is Scroller targetViewItem) - orientation = targetViewItem.Orientation; - return orientation; - } - } - - private bool InputHasKeyModifiers(InputInfo info) - { - InputModifiers inputModifiers = InputModifiers.None; - switch (info) - { - case KeyStateInfo _: - inputModifiers = ((KeyActionInfo)info).Modifiers; - break; - case MouseActionInfo _: - inputModifiers = ((MouseActionInfo)info).Modifiers; - break; - } - return (inputModifiers & InputModifiers.AllKeys) != InputModifiers.None; - } - - private enum HandleKeyPolicy - { - None, - Up, - Down, - PageUp, - PageDown, - Home, - End, - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ShortcutHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ShortcutHandler.cs deleted file mode 100644 index b54d9ab..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ShortcutHandler.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ShortcutHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.InputHandlers -{ - public class ShortcutHandler : InputHandler - { - private ShortcutHandlerCommand _shortcut; - private IUICommand _command; - private bool _handle; - - public ShortcutHandler() => this._handle = true; - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.KeyInteractive = true; - } - - public ShortcutHandlerCommand Shortcut - { - get => this._shortcut; - set - { - if (this._shortcut == value) - return; - this._shortcut = value; - this.FireNotification(NotificationID.Shortcut); - } - } - - public IUICommand Command - { - get => this._command; - set - { - if (this._command == value) - return; - this._command = value; - this.FireNotification(NotificationID.Command); - } - } - - public bool Handle - { - get => this._handle; - set - { - if (this._handle == value) - return; - this._handle = value; - this.FireNotification(NotificationID.Handle); - } - } - - protected override void OnCommandDown(UIClass ui, KeyCommandInfo info) - { - if (info.Command != (CommandCode)this._shortcut) - return; - this.InvokeCommand(); - if (!this._handle) - return; - info.MarkHandled(); - } - - protected override void OnCommandUp(UIClass ui, KeyCommandInfo info) - { - if (info.Command != (CommandCode)this._shortcut || !this._handle) - return; - info.MarkHandled(); - } - - private void InvokeCommand() - { - this.FireNotification(NotificationID.Invoked); - if (this._command == null) - return; - this._command.Invoke(); - } - - public override string ToString() => InvariantString.Format("{0}({1})", this.GetType().Name, _shortcut); - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/ShortcutHandlerCommand.cs b/UIX/Microsoft/Iris/InputHandlers/ShortcutHandlerCommand.cs deleted file mode 100644 index 202cece..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/ShortcutHandlerCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.ShortcutHandlerCommand -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.InputHandlers -{ - public enum ShortcutHandlerCommand - { - None = 0, - ChannelUp = 2, - PageUp = 2, - ChannelDown = 3, - PageDown = 3, - Play = 4, - Pause = 5, - Record = 6, - FastForward = 7, - Rewind = 8, - SkipForward = 9, - SkipBack = 10, // 0x0000000A - Stop = 11, // 0x0000000B - Back = 16, // 0x00000010 - Clear = 26, // 0x0000001A - PlayPause = 30, // 0x0000001E - Enter = 36, // 0x00000024 - OEMExtensibility0 = 73, // 0x00000049 - OEMExtensibility1 = 74, // 0x0000004A - OEMExtensibility2 = 75, // 0x0000004B - OEMExtensibility3 = 76, // 0x0000004C - OEMExtensibility4 = 77, // 0x0000004D - OEMExtensibility5 = 78, // 0x0000004E - OEMExtensibility6 = 79, // 0x0000004F - OEMExtensibility7 = 80, // 0x00000050 - OEMExtensibility8 = 81, // 0x00000051 - OEMExtensibility9 = 82, // 0x00000052 - OEMExtensibility10 = 83, // 0x00000053 - OEMExtensibility11 = 84, // 0x00000054 - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs b/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs deleted file mode 100644 index 944a1b3..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs +++ /dev/null @@ -1,1113 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.TextEditingHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Input; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.InputHandlers -{ - public class TextEditingHandler : - InputHandler, - IRichTextCallbacks, - ITextScrollModelCallback, - IImeCallbacks - { - private const uint WM_LBUTTONDOWN = 513; - private const uint WM_LBUTTONUP = 514; - private TextEditingHandler.TextEditingCommand _copyCommand; - private TextEditingHandler.TextEditingCommand _cutCommand; - private TextEditingHandler.TextEditingCommand _deleteCommand; - private TextEditingHandler.TextPasteCommand _pasteCommand; - private TextEditingHandler.TextEditingCommand _selectAllCommand; - private TextEditingHandler.TextEditingCommand _undoCommand; - private uint _bits; - private Range _selection; - private Point _inputOffset; - private int _savedMouseYPositionToWorkAroundRichEditBug; - private EditableTextData _editData; - private EventHandler _maxLengthChangedHandler; - private EventHandler _readOnlyChangedHandler; - private EventHandler _valueChangedHandler; - private EventHandler _activationStateHandler; - private Form _activationStateNotifier; - private Text _textDisplay; - private CaretInfo _caretInfo; - private RichText _editControl; - private CursorID _cursor; - private TextScrollModel.State _pendingHorizontalScrollState; - private TextScrollModel.State _pendingVerticalScrollState; - private TextScrollModel _horizontalScrollModel; - private TextScrollModel _verticalScrollModel; - private SimpleCallback _updateScrollbars; - private InputInfo _pendingPointerDown; - private Color _linkColor; - private string _linkClickedParameter; - private bool _InImeMode; - private uint _ImeCallbackToken; - - public TextEditingHandler() - { - this._caretInfo = new CaretInfo(); - this._editControl = new RichText(true, this); - this._maxLengthChangedHandler = new EventHandler(this.OnEditableTextMaxLengthChanged); - this._readOnlyChangedHandler = new EventHandler(this.OnEditableTextReadOnlyChanged); - this._valueChangedHandler = new EventHandler(this.OnEditableTextValueChanged); - this._activationStateHandler = new EventHandler(this.OnActivationChanged); - this.SetBit(Bits.AcceptsEnter); - } - - protected override void OnDispose() - { - base.OnDispose(); - this.RemoveEditableTextEventHandlers(); - this.UnregisterImeMessageHandler(); - if (this._activationStateNotifier != null) - this.UpdateActivationStateHandler(false); - this.HorizontalScrollModel = null; - this.VerticalScrollModel = null; - this._editControl.Dispose(); - } - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.MouseInteractive = true; - this.UI.KeyInteractive = true; - } - - public override void OnZoneAttached() - { - if (!this.UI.DirectKeyFocus) - return; - this.UpdateActivationStateHandler(true); - } - - private void OnActivationChanged(object sender, EventArgs ea) - { - this.WindowIsActivated = this._activationStateNotifier.ActivationState; - this.UpdateCaretVisibility(); - } - - public EditableTextData EditableTextData - { - get => this._editData; - set - { - if (this._editData == value) - return; - this.RemoveEditableTextEventHandlers(); - this._editData = value; - if (this._editData != null) - { - this.AddEditableTextEventHandlers(); - this.UpdateMaxLengthOnRichEdit(); - this.UpdateReadOnlyOnRichEdit(); - this.UpdateContentOnRichEdit(); - } - this.FireThreadSafeNotification(NotificationID.EditableTextData); - } - } - - private void RemoveEditableTextEventHandlers() - { - if (this._editData == null) - return; - this._editData.MaxLengthChanged -= this._maxLengthChangedHandler; - this._editData.ReadOnlyChanged -= this._readOnlyChangedHandler; - this._editData.ValueChanged -= this._valueChangedHandler; - } - - private void AddEditableTextEventHandlers() - { - this._editData.MaxLengthChanged += this._maxLengthChangedHandler; - this._editData.ReadOnlyChanged += this._readOnlyChangedHandler; - this._editData.ValueChanged += this._valueChangedHandler; - } - - private void UnregisterImeMessageHandler() => RendererApi.IFC(NativeApi.SpUnregisterImeCallbacks(this._ImeCallbackToken)); - - private void OnEditableTextMaxLengthChanged(object sender, EventArgs unused) => this.UpdateMaxLengthOnRichEdit(); - - private void OnEditableTextReadOnlyChanged(object sender, EventArgs unused) => this.UpdateReadOnlyOnRichEdit(); - - private void OnEditableTextValueChanged(object sender, EventArgs unused) - { - if (this.InsideValueChangeOnEditableTextData) - return; - this.UpdateContentOnRichEdit(); - } - - private void UpdateContentOnRichEdit() - { - if (this._editData == null) - return; - this.InsideContentChangeOnRichEdit = true; - this._editControl.Content = this._editData.Value; - if (this._textDisplay != null) - this._textDisplay.MarkScaleDirty(); - this.InsideContentChangeOnRichEdit = false; - } - - private void UpdateReadOnlyOnRichEdit() - { - this._editControl.ReadOnly = this._editData.ReadOnly; - this.UpdateSelectionAndReadOnlyCommands(); - } - - private void UpdateMaxLengthOnRichEdit() => this._editControl.MaxLength = this._editData.MaxLength; - - public Text TextDisplay - { - get => this._textDisplay; - set - { - if (this._textDisplay == value) - return; - LayoutCompleteEventHandler completeEventHandler = new LayoutCompleteEventHandler(this.TextLayoutComplete); - if (this._textDisplay != null) - { - this._textDisplay.ExternalRasterizer = null; - this._textDisplay.ExternalEditingHandler = null; - this._textDisplay.LayoutComplete -= completeEventHandler; - } - this._textDisplay = value; - if (this._textDisplay != null) - { - this._textDisplay.ExternalRasterizer = this._editControl; - this._textDisplay.ExternalEditingHandler = this; - this._textDisplay.OnDisplayedContentChange(); - this._textDisplay.LayoutComplete += completeEventHandler; - this.InputOffsetDirty = true; - } - this.FireThreadSafeNotification(NotificationID.TextDisplay); - } - } - - private void TextLayoutComplete(object sender) => this.InputOffsetDirty = true; - - private void FireTypingInputRejectedEvent() => this.FireThreadSafeNotification(NotificationID.TypingInputRejected); - - public bool DetectUrls - { - get => this.GetBit(Bits.DetectUrls); - set - { - if (!this.ChangeBit(Bits.DetectUrls, value)) - return; - this._editControl.DetectUrls = value; - this.FireThreadSafeNotification(NotificationID.DetectUrls); - } - } - - public Color LinkColor - { - get => this._linkColor; - set - { - if (!(this._linkColor != value)) - return; - this._linkColor = value; - this.FireThreadSafeNotification(NotificationID.LinkColor); - } - } - - private void FireLinkClicked() => this.FireThreadSafeNotification(NotificationID.LinkClicked); - - public string LinkClickedParameter - { - get => this._linkClickedParameter; - private set - { - if (!(this._linkClickedParameter != value)) - return; - this._linkClickedParameter = value; - this.FireThreadSafeNotification(NotificationID.LinkClickedParameter); - } - } - - HRESULT IRichTextCallbacks.SetCursor(EditCursorType type) - { - CursorID cursorId = CursorID.NotSpecified; - switch (type) - { - case EditCursorType.IBeam: - cursorId = CursorID.IBeam; - break; - } - if (cursorId != this._cursor) - { - this._cursor = cursorId; - this.UpdateCursor(); - } - return new HRESULT(0); - } - - public override CursorID GetCursor() => this._cursor; - - private bool IgnoreReadOnlyChar(char character) => character == '\r' || character == '\t'; - - protected override void OnKeyDown(UIClass ui, KeyStateInfo info) - { - bool flag = this.ForwardKeyStateChange(info); - switch (info.Key) - { - case Keys.Back: - if (this._editData.ReadOnly) - this.FireTypingInputRejectedEvent(); - info.MarkHandled(); - break; - case Keys.Tab: - if (flag) - info.MarkHandled(); - this.HandledTabKeyDown = info.Handled; - break; - case Keys.Enter: - if (!info.Handled && this.AcceptsEnter && (info.Modifiers == InputModifiers.None && !this._editData.ReadOnly)) - { - this._editData.Submit(); - info.MarkHandled(); - } - this.HandledEnterKeyDown = info.Handled; - break; - } - } - - protected override void OnKeyCharacter(UIClass ui, KeyCharacterInfo info) - { - if (this.ForwardKeyCharacter(info) && !info.Handled && (this._editData.ReadOnly && !this.IgnoreReadOnlyChar(info.Character))) - this.FireTypingInputRejectedEvent(); - switch (info.Character) - { - case '\b': - info.MarkHandled(); - break; - case '\t': - if (!this.HandledTabKeyDown) - break; - info.MarkHandled(); - break; - case '\r': - if (!this.HandledEnterKeyDown) - break; - info.MarkHandled(); - break; - } - } - - protected override void OnKeyUp(UIClass ui, KeyStateInfo info) - { - this.ForwardKeyStateChange(info); - switch (info.Key) - { - case Keys.Back: - info.MarkHandled(); - break; - case Keys.Tab: - if (!this.HandledTabKeyDown) - break; - info.MarkHandled(); - this.HandledTabKeyDown = false; - break; - case Keys.Enter: - if (!this.HandledEnterKeyDown) - break; - info.MarkHandled(); - this.HandledEnterKeyDown = false; - break; - } - } - - private bool ForwardKeyToRichEdit(KeyStateInfo info) - { - bool flag = true; - switch (info.Key) - { - case Keys.Tab: - flag = info.Action != KeyAction.Down ? this.HandledTabKeyDown : this.AcceptsTab; - break; - case Keys.Enter: - flag = info.Action != KeyAction.Down ? this.HandledEnterKeyDown : this.AcceptsEnter; - break; - } - return flag; - } - - private bool ForwardKeyCharacterToRichEdit(KeyCharacterInfo info) - { - bool flag = true; - switch (info.Character) - { - case '\t': - flag = this.HandledTabKeyDown; - break; - case '\r': - flag = this.HandledEnterKeyDown; - break; - } - return flag; - } - - private bool ForwardKeyStateChange(KeyStateInfo info) - { - if (!this.ForwardKeyToRichEdit(info)) - return false; - if (this._editControl.ForwardKeyStateNotification(info.NativeMessageID, (int)info.Key, info.ScanCode, (int)info.RepeatCount, (uint)info.Modifiers, info.KeyboardFlags)) - info.MarkHandled(); - return true; - } - - private bool ForwardKeyCharacter(KeyCharacterInfo info) - { - if (!this.ForwardKeyCharacterToRichEdit(info)) - return false; - if (this._editControl.ForwardKeyCharacterNotification(info.NativeMessageID, info.Character, info.ScanCode, (int)info.RepeatCount, (uint)info.Modifiers, info.KeyboardFlags)) - info.MarkHandled(); - return true; - } - - protected override void OnGainKeyFocus(UIClass ui, KeyFocusInfo info) - { - RendererApi.IFC(NativeApi.SpRegisterImeCallbacks(this, out this._ImeCallbackToken)); - this._editControl.NotifyOfFocusChange(true); - if (this.Overtype) - this.SelectAll(); - this.DeliverPendingPointerDown(); - if (this.UI.IsZoned) - this.UpdateActivationStateHandler(true); - if (!this._textDisplay.UsePasswordMask && !this._textDisplay.DisableIme) - return; - RendererApi.IFC(NativeApi.SpPostDeferredImeMessage(1032U, new UIntPtr(this._ImeCallbackToken), UIntPtr.Zero)); - } - - protected override void OnLoseKeyFocus(UIClass ui, KeyFocusInfo info) - { - this._editControl.NotifyOfFocusChange(false); - this.HandledEnterKeyDown = false; - this.HandledTabKeyDown = false; - if (this.UI.IsZoned) - this.UpdateActivationStateHandler(false); - this.ClearPendingPointerDown(); - RendererApi.IFC(NativeApi.SpUnregisterImeCallbacks(this._ImeCallbackToken)); - } - - protected override void OnLoseMouseFocus(UIClass ui, MouseFocusInfo info) - { - } - - private void UpdateActivationStateHandler(bool add) - { - if (add) - { - this._activationStateNotifier = UI.Zone.Form; - this._activationStateNotifier.ActivationChange += this._activationStateHandler; - this.OnActivationChanged(null, EventArgs.Empty); - } - else - { - this._activationStateNotifier.ActivationChange -= this._activationStateHandler; - this._activationStateNotifier = null; - } - } - - protected override void OnMouseDoubleClick(UIClass ui, MouseButtonInfo info) => this.ForwardMouseInput(info); - - protected override void OnMouseMove(UIClass ui, MouseMoveInfo info) => this.ForwardMouseInput(info); - - protected override void OnMousePrimaryDown(UIClass ui, MouseButtonInfo info) - { - this._pendingPointerDown = info; - info.Lock(); - if (!this.UI.DirectKeyFocus && this.HandlerStage == InputHandlerStage.Direct && this.UI.KeyFocusOnMouseDown) - return; - this.DeliverPendingPointerDown(); - } - - private void DeliverPendingPointerDown() - { - if (this._pendingPointerDown == null) - return; - this.MousePrimaryDown = true; - MouseButtonInfo pendingPointerDown = (MouseButtonInfo)this._pendingPointerDown; - this._savedMouseYPositionToWorkAroundRichEditBug = pendingPointerDown.Y; - this.ForwardMouseInput(pendingPointerDown); - this.ClearPendingPointerDown(); - } - - private void ClearPendingPointerDown() - { - if (this._pendingPointerDown == null) - return; - this._pendingPointerDown.Unlock(); - this._pendingPointerDown = null; - } - - protected override void OnMousePrimaryUp(UIClass ui, MouseButtonInfo info) - { - this.MousePrimaryDown = false; - this.ForwardMouseInput(info); - } - - protected override void OnMouseSecondaryDown(UIClass ui, MouseButtonInfo info) => this.ForwardMouseInput(info); - - protected override void OnMouseSecondaryUp(UIClass ui, MouseButtonInfo info) => this.ForwardMouseInput(info); - - protected override void OnMouseWheel(UIClass ui, MouseWheelInfo info) - { - if (!this._textDisplay.WordWrap) - return; - this.ForwardMouseInput(info); - } - - private bool ForwardMouseInput( - uint nativeMessageID, - InputModifiers modifiers, - MouseButtons button, - int inputX, - int inputY, - int wheelDelta) - { - if (this.InputOffsetDirty) - { - Vector3 parentOffsetPxlVector; - ViewItem.GetAccumulatedOffsetAndScale(_textDisplay, UI.RootItem, out parentOffsetPxlVector, out Vector3 _); - this._inputOffset = new Point((int)Math.Floor(parentOffsetPxlVector.X), (int)Math.Floor(parentOffsetPxlVector.Y)); - this.InputOffsetDirty = false; - } - int x = inputX - this._inputOffset.X; - int y = inputY - this._inputOffset.Y; - if (this.MousePrimaryDown && this._textDisplay != null && !this._textDisplay.WordWrap) - y = this._savedMouseYPositionToWorkAroundRichEditBug - this._inputOffset.Y; - return this._editControl.ForwardMouseInput(nativeMessageID, (uint)modifiers, (int)button, x, y, wheelDelta); - } - - private void ForwardMouseInput(MouseActionInfo info) - { - if (!this.ForwardMouseInput(info.NativeMessageID, info.Modifiers, info.Button, info.X, info.Y, info.WheelDelta)) - return; - info.MarkHandled(); - } - - public bool Overtype - { - get => this.GetBit(Bits.Overtype); - set - { - if (!this.ChangeBit(Bits.Overtype, value)) - return; - this.FireThreadSafeNotification(NotificationID.Overtype); - } - } - - public bool AcceptsTab - { - get => this.GetBit(Bits.AcceptsTab); - set - { - if (!this.ChangeBit(Bits.AcceptsTab, value)) - return; - this.FireThreadSafeNotification(NotificationID.AcceptsTab); - } - } - - public bool AcceptsEnter - { - get => this.GetBit(Bits.AcceptsEnter); - set - { - if (!this.ChangeBit(Bits.AcceptsEnter, value)) - return; - this.FireThreadSafeNotification(NotificationID.AcceptsEnter); - } - } - - public bool WordWrap - { - set - { - if (!this.ChangeBit(Bits.WordWrap, value)) - return; - this._editControl.SetWordWrap(value); - if (!value) - return; - this.UpdateContentOnRichEdit(); - } - } - - public CaretInfo CaretInfo => this._caretInfo; - - private void CreateCommands() - { - if (this.GetBit(Bits.CommandsCreated)) - return; - this.SetBit(Bits.CommandsCreated); - this._undoCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Undo)); - this._cutCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Cut)); - this._copyCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Copy)); - this._pasteCommand = new TextEditingHandler.TextPasteCommand(new SimpleCallback(this._editControl.Paste)); - this._deleteCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Delete)); - this._selectAllCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this.SelectAll)); - this.UpdateSelectionAndReadOnlyCommands(); - this.UpdateTextBasedCommandAvailability(); - } - - public IUICommand UndoCommand - { - get - { - this.CreateCommands(); - return _undoCommand; - } - } - - public void Undo() => this._editControl.Undo(); - - public IUICommand CutCommand - { - get - { - this.CreateCommands(); - return _cutCommand; - } - } - - public void Cut() => this._editControl.Cut(); - - public IUICommand CopyCommand - { - get - { - this.CreateCommands(); - return _copyCommand; - } - } - - public void Copy() => this._editControl.Copy(); - - public IUICommand PasteCommand - { - get - { - this.CreateCommands(); - return _pasteCommand; - } - } - - public void Paste() => this._editControl.Paste(); - - public IUICommand DeleteCommand - { - get - { - this.CreateCommands(); - return _deleteCommand; - } - } - - public void Delete() => this._editControl.Delete(); - - public IUICommand SelectAllCommand - { - get - { - this.CreateCommands(); - return _selectAllCommand; - } - } - - public void SelectAll() - { - string str = this._editData != null ? this._editData.Value : null; - if (string.IsNullOrEmpty(str)) - return; - this.SelectionRange = new Range(0, str.Length); - } - - public Range SelectionRange - { - get => this._selection; - set - { - if (this._selection.IsEqual(value)) - return; - this._editControl.SetSelectionRange(value.Begin, value.End); - } - } - - private void UpdateTextBasedCommandAvailability() - { - this._undoCommand.Available = this._editControl.CanUndo; - this._selectAllCommand.Available = this._editData != null && !string.IsNullOrEmpty(this._editData.Value); - } - - private void UpdateSelectionAndReadOnlyCommands() - { - if (!this.GetBit(Bits.CommandsCreated)) - return; - bool flag1 = !this._selection.IsEmpty; - bool flag2 = this._editData == null || this._editData.ReadOnly; - this._cutCommand.Available = flag1 && !flag2; - this._copyCommand.Available = flag1; - this._deleteCommand.Available = flag1 && !flag2; - this._pasteCommand.TextIsReadOnly = flag2; - } - - HRESULT IRichTextCallbacks.TextChanged() - { - if (!Application.IsApplicationThread) - { - Application.DeferredInvoke(args => ((IRichTextCallbacks)args).TextChanged(), this, DeferredInvokePriority.Normal); - return new HRESULT(0); - } - if (this.GetBit(Bits.CommandsCreated)) - this.UpdateTextBasedCommandAvailability(); - if (this._editData != null && !this.InsideContentChangeOnRichEdit) - { - this.InsideValueChangeOnEditableTextData = true; - this._editData.Value = this._editControl.SimpleContent; - this.InsideValueChangeOnEditableTextData = false; - } - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.InvalidateContent() - { - if (!Application.IsApplicationThread) - { - Application.DeferredInvoke(args => ((IRichTextCallbacks)args).InvalidateContent(), this, DeferredInvokePriority.Normal); - return new HRESULT(0); - } - if (this._textDisplay != null) - this._textDisplay.OnDisplayedContentChange(); - this.RefreshCaretPosition(); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.SelectionChanged( - int selectionStart, - int selectionEnd) - { - this._selection = new Range(selectionStart, selectionEnd); - this.FireThreadSafeNotification(NotificationID.SelectionRange); - this.UpdateSelectionAndReadOnlyCommands(); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.MaxLengthExceeded() - { - this.FireTypingInputRejectedEvent(); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.SetTimer(uint id, uint timeout) - { - this._editControl.SetTimer(id, timeout); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.KillTimer(uint id) - { - this._editControl.KillTimer(id); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.CreateCaret(int width, int height) - { - this._caretInfo.CreateCaret(new Size(width, height)); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.SetCaretPos(int x, int y) - { - this._caretInfo.SetCaretPosition(new Point(x, y)); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.ShowCaret(bool visible) - { - this.RichEditCaretVisible = visible; - this.UpdateCaretVisibility(); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.ClientToWindow(Point pt, out Point ppt) - { - ppt = this._textDisplay == null ? new Point(0, 0) : this._textDisplay.ClientToWindow(pt); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.ClientToScreen(Point pt, out Point ppt) - { - ppt = this._textDisplay.ClientToScreen(pt); - return new HRESULT(0); - } - - HRESULT IRichTextCallbacks.LinkClicked(int start, int end) - { - string str = this._editData != null ? this._editData.Value : string.Empty; - if (string.IsNullOrEmpty(str)) - { - this.LinkClickedParameter = string.Empty; - } - else - { - end = end >= 0 ? Math.Min(str.Length, end) : str.Length; - start = Math.Min(start, end); - this.LinkClickedParameter = str.Substring(start, end - start); - } - this.FireLinkClicked(); - return new HRESULT(0); - } - - HRESULT IImeCallbacks.OnImeMessageReceived( - uint message, - UIntPtr wParam, - UIntPtr lParam) - { - switch (message) - { - case 269: - this.InImeCompositionMode = true; - break; - case 270: - this.InImeCompositionMode = false; - break; - } - return this._editControl.ForwardImeMessage(message, wParam, lParam); - } - - public bool InImeCompositionMode - { - get => this._InImeMode; - set - { - if (this._InImeMode == value) - return; - this.CaretInfo.IgnoreIdealWidth = value; - this._InImeMode = value; - this.FireThreadSafeNotification(NotificationID.InImeCompositionMode); - } - } - - HRESULT IRichTextCallbacks.SetScrollRange( - int whichBarInt, - int minPosition, - int extent, - int viewExtent, - int scrollPosition) - { - if (whichBarInt == 1 && this._verticalScrollModel != null) - { - this.SetScrollRange(ref this._pendingVerticalScrollState, minPosition, extent, viewExtent, scrollPosition); - this.ScheduleScrollbarUpdate(true); - } - else if (this._horizontalScrollModel != null) - { - this.SetScrollRange(ref this._pendingHorizontalScrollState, minPosition, extent, viewExtent, scrollPosition); - this.ScheduleScrollbarUpdate(false); - } - return new HRESULT(0); - } - - private void SetScrollRange( - ref TextScrollModel.State state, - int minPosition, - int extent, - int viewExtent, - int scrollAmount) - { - state.Min = minPosition; - state.Extent = extent; - state.ViewExtent = viewExtent; - state.ScrollAmount = scrollAmount; - } - - private bool IsVerticalScrollbar(ScrollbarType whichBar) => whichBar == ScrollbarType.Vertical || whichBar == ScrollbarType.Both; - - private bool IsHorizontalScrollbar(ScrollbarType whichBar) => whichBar == ScrollbarType.Horizontal || whichBar == ScrollbarType.Both; - - HRESULT IRichTextCallbacks.EnableScrollbar( - int whichBarInt, - ScrollbarEnableFlags flags) - { - ScrollbarType whichBar = (ScrollbarType)whichBarInt; - if (this.IsVerticalScrollbar(whichBar) && this._verticalScrollModel != null) - { - this.EnableScrollbar(ref this._pendingVerticalScrollState, flags); - this.ScheduleScrollbarUpdate(true); - } - if (this.IsHorizontalScrollbar(whichBar) && this._horizontalScrollModel != null) - { - this.EnableScrollbar(ref this._pendingHorizontalScrollState, flags); - this.ScheduleScrollbarUpdate(false); - } - return new HRESULT(0); - } - - private void EnableScrollbar(ref TextScrollModel.State state, ScrollbarEnableFlags flags) - { - switch (flags) - { - case ScrollbarEnableFlags.EnableBoth: - state.CanScrollUp = true; - state.CanScrollDown = true; - break; - case ScrollbarEnableFlags.DisableNear: - state.CanScrollUp = false; - state.CanScrollDown = true; - break; - case ScrollbarEnableFlags.DisableFar: - state.CanScrollUp = true; - state.CanScrollDown = false; - break; - case ScrollbarEnableFlags.DisableBoth: - state.CanScrollUp = false; - state.CanScrollDown = false; - break; - } - } - - private void ScheduleScrollbarUpdate(bool vertical) - { - bool flag = !this.GetBit(Bits.PendingVerticalScrollbarUpdate) && !this.GetBit(Bits.PendingHorizontalScrollbarUpdate); - if (vertical) - this.SetBit(Bits.PendingVerticalScrollbarUpdate); - else - this.SetBit(Bits.PendingHorizontalScrollbarUpdate); - if (!flag) - return; - if (this._updateScrollbars == null) - this._updateScrollbars = new SimpleCallback(this.UpdateScrollbars); - DeferredCall.Post(DispatchPriority.Normal, this._updateScrollbars); - } - - private void UpdateScrollbars() - { - if (this.GetBit(Bits.PendingVerticalScrollbarUpdate)) - { - this.ClearBit(Bits.PendingVerticalScrollbarUpdate); - this._verticalScrollModel.UpdateState(this._pendingVerticalScrollState); - this._pendingVerticalScrollState = new TextScrollModel.State(); - } - if (!this.GetBit(Bits.PendingHorizontalScrollbarUpdate)) - return; - this.ClearBit(Bits.PendingHorizontalScrollbarUpdate); - this._horizontalScrollModel.UpdateState(this._pendingHorizontalScrollState); - this._pendingHorizontalScrollState = new TextScrollModel.State(); - } - - public TextScrollModel HorizontalScrollModel - { - get - { - if (this._horizontalScrollModel == null) - this.StoreScrollModel(ref this._horizontalScrollModel, new TextScrollModel()); - return this._horizontalScrollModel; - } - set - { - if (this._horizontalScrollModel == value) - return; - this.StoreScrollModel(ref this._horizontalScrollModel, value); - this.FireThreadSafeNotification(NotificationID.HorizontalScrollModel); - } - } - - public TextScrollModel VerticalScrollModel - { - get - { - if (this._verticalScrollModel == null) - this.StoreScrollModel(ref this._verticalScrollModel, new TextScrollModel()); - return this._verticalScrollModel; - } - set - { - if (this._verticalScrollModel == value) - return; - this.StoreScrollModel(ref this._verticalScrollModel, value); - this.FireThreadSafeNotification(NotificationID.VerticalScrollModel); - } - } - - private void StoreScrollModel(ref TextScrollModel storage, TextScrollModel newDude) - { - if (storage != null) - storage.DetachCallbacks(); - storage = newDude; - if (storage != null) - storage.AttachCallbacks(this); - this._editControl.SetScrollbars(this._horizontalScrollModel != null, this._verticalScrollModel != null); - } - - private ScrollbarType WhichScrollbar(TextScrollModel who) => who != this._verticalScrollModel ? ScrollbarType.Horizontal : ScrollbarType.Vertical; - - void ITextScrollModelCallback.ScrollUp(TextScrollModel who) => this._editControl.ScrollUp(this.WhichScrollbar(who)); - - void ITextScrollModelCallback.ScrollDown(TextScrollModel who) => this._editControl.ScrollDown(this.WhichScrollbar(who)); - - void ITextScrollModelCallback.PageUp(TextScrollModel who) => this._editControl.PageUp(this.WhichScrollbar(who)); - - void ITextScrollModelCallback.PageDown(TextScrollModel who) => this._editControl.PageDown(this.WhichScrollbar(who)); - - void ITextScrollModelCallback.ScrollToPosition( - TextScrollModel who, - int whereTo) - { - this._editControl.ScrollToPosition(this.WhichScrollbar(who), whereTo); - } - - private void UpdateCaretVisibility() => this.CaretInfo.SetVisible(this.RichEditCaretVisible && this.WindowIsActivated); - - private void RefreshCaretPosition() - { - if (!this.CaretInfo.Visible || this.MousePrimaryDown || this._editControl == null) - return; - this._editControl.NotifyOfFocusChange(true); - } - - private bool HandledTabKeyDown - { - get => this.GetBit(Bits.HandledTabKeyDown); - set => this.SetBit(Bits.HandledTabKeyDown, value); - } - - private bool HandledEnterKeyDown - { - get => this.GetBit(Bits.HandledEnterKeyDown); - set => this.SetBit(Bits.HandledEnterKeyDown, value); - } - - private bool InputOffsetDirty - { - get => this.GetBit(Bits.InputOffsetDirty); - set => this.SetBit(Bits.InputOffsetDirty, value); - } - - private bool MousePrimaryDown - { - get => this.GetBit(Bits.MousePrimaryDown); - set => this.SetBit(Bits.MousePrimaryDown, value); - } - - private bool InsideValueChangeOnEditableTextData - { - get => this.GetBit(Bits.InsideValueChangeOnEditableTextData); - set => this.SetBit(Bits.InsideValueChangeOnEditableTextData, value); - } - - private bool InsideContentChangeOnRichEdit - { - get => this.GetBit(Bits.InsideContentChangeOnRichEdit); - set => this.SetBit(Bits.InsideContentChangeOnRichEdit, value); - } - - private bool RichEditCaretVisible - { - get => this.GetBit(Bits.RichEditCaretVisible); - set => this.SetBit(Bits.RichEditCaretVisible, value); - } - - private bool WindowIsActivated - { - get => this.GetBit(Bits.WindowIsActivated); - set => this.SetBit(Bits.WindowIsActivated, value); - } - - private bool GetBit(TextEditingHandler.Bits lookupBit) => ((TextEditingHandler.Bits)this._bits & lookupBit) != 0; - - private void SetBit(TextEditingHandler.Bits changeBit) - { - TextEditingHandler textEditingHandler = this; - textEditingHandler._bits = (uint)((TextEditingHandler.Bits)textEditingHandler._bits | changeBit); - } - - private void SetBit(TextEditingHandler.Bits changeBit, bool value) => this._bits = value ? (uint)((TextEditingHandler.Bits)this._bits | changeBit) : (uint)((TextEditingHandler.Bits)this._bits & ~changeBit); - - private void ClearBit(TextEditingHandler.Bits changeBit) - { - TextEditingHandler textEditingHandler = this; - textEditingHandler._bits = (uint)((TextEditingHandler.Bits)textEditingHandler._bits & ~changeBit); - } - - private bool ChangeBit(TextEditingHandler.Bits changeBit, bool value) - { - uint num = value ? (uint)((TextEditingHandler.Bits)this._bits | changeBit) : (uint)((TextEditingHandler.Bits)this._bits & ~changeBit); - bool flag = (int)num != (int)this._bits; - if (flag) - this._bits = num; - return flag; - } - - private enum Bits - { - AcceptsTab = 1, - AcceptsEnter = 2, - HandledTabKeyDown = 4, - HandledEnterKeyDown = 16, // 0x00000010 - InputOffsetDirty = 32, // 0x00000020 - MousePrimaryDown = 64, // 0x00000040 - Overtype = 128, // 0x00000080 - InsideValueChangeOnEditableTextData = 256, // 0x00000100 - InsideContentChangeOnRichEdit = 512, // 0x00000200 - RichEditCaretVisible = 1024, // 0x00000400 - WindowIsActivated = 2048, // 0x00000800 - WordWrap = 4096, // 0x00001000 - CommandsCreated = 8192, // 0x00002000 - PendingHorizontalScrollbarUpdate = 16384, // 0x00004000 - PendingVerticalScrollbarUpdate = 32768, // 0x00008000 - DetectUrls = 65536, // 0x00010000 - } - - private class TextEditingCommand : UICommand - { - private SimpleCallback _onInvoked; - - public TextEditingCommand(SimpleCallback onInvoked) => this._onInvoked = onInvoked; - - protected override void OnInvoked() - { - base.OnInvoked(); - this._onInvoked(); - } - } - - private class TextPasteCommand : TextEditingHandler.TextEditingCommand, IUICommand - { - private bool _isReadOnly; - - public TextPasteCommand(SimpleCallback onInvoked) - : base(onInvoked) - { - } - - bool IUICommand.Available - { - get => Clipboard.ContainsText() && !this._isReadOnly; - set - { - } - } - - public bool TextIsReadOnly - { - get => this._isReadOnly; - set => this._isReadOnly = value; - } - } - } -} diff --git a/UIX/Microsoft/Iris/InputHandlers/TypingHandler.cs b/UIX/Microsoft/Iris/InputHandlers/TypingHandler.cs deleted file mode 100644 index ed67282..0000000 --- a/UIX/Microsoft/Iris/InputHandlers/TypingHandler.cs +++ /dev/null @@ -1,224 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InputHandlers.TypingHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.InputHandlers -{ - public class TypingHandler : InputHandler - { - private EditableTextData _edit; - private bool _submitOnEnter; - private bool _treatEscapeAsBackspace; - private bool _handlingBackspaceFlag; - private bool _handlingDeleteFlag; - - protected override void ConfigureInteractivity() - { - base.ConfigureInteractivity(); - if (!this.HandleDirect) - return; - this.UI.MouseInteractive = true; - this.UI.KeyInteractive = true; - } - - public bool SubmitOnEnter - { - get => this._submitOnEnter; - set - { - if (this._submitOnEnter == value) - return; - this._submitOnEnter = value; - this.FireNotification(NotificationID.SubmitOnEnter); - } - } - - public bool TreatEscapeAsBackspace - { - get => this._treatEscapeAsBackspace; - set - { - if (this._treatEscapeAsBackspace == value) - return; - this._treatEscapeAsBackspace = value; - this.FireNotification(NotificationID.TreatEscapeAsBackspace); - } - } - - private void FireTypingInputRejectedEvent() => this.FireNotification(NotificationID.TypingInputRejected); - - public EditableTextData EditableTextData - { - get => this._edit; - set - { - if (this._edit == value) - return; - this._edit = value; - this.FireNotification(NotificationID.EditableTextData); - } - } - - protected override void OnKeyDown(UIClass ui, KeyStateInfo info) - { - if (this.ShouldIgnoreInput(info) || this._edit == null) - return; - switch (info.Key) - { - case Keys.Back: - if (this.IsEditableTextEmpty() && !this._handlingBackspaceFlag) - break; - info.MarkHandled(); - break; - case Keys.Enter: - if (!this._submitOnEnter) - break; - this._edit.Submit(); - info.MarkHandled(); - break; - case Keys.Escape: - if (!this._treatEscapeAsBackspace) - break; - goto case Keys.Back; - case Keys.Delete: - if (this.IsEditableTextEmpty()) - break; - this.RemoveChar(); - info.MarkHandled(); - this._handlingDeleteFlag = true; - break; - case Keys.NumPad0: - case Keys.NumPad1: - case Keys.NumPad2: - case Keys.NumPad3: - case Keys.NumPad4: - case Keys.NumPad5: - case Keys.NumPad6: - case Keys.NumPad7: - case Keys.NumPad8: - case Keys.NumPad9: - info.MarkHandled(); - break; - } - } - - protected override void OnKeyCharacter(UIClass ui, KeyCharacterInfo info) - { - if (this.ShouldIgnoreInput(info) || this._edit == null) - return; - switch (info.Character) - { - case '\b': - if (!this.IsEditableTextEmpty()) - { - this.RemoveChar(); - info.MarkHandled(); - this._handlingBackspaceFlag = true; - break; - } - if (!this._handlingBackspaceFlag) - break; - info.MarkHandled(); - break; - case '\t': - break; - case '\r': - if (!this._submitOnEnter) - break; - info.MarkHandled(); - break; - case '\x001B': - if (!this._treatEscapeAsBackspace) - break; - goto case '\b'; - default: - this.InputChar(info.Character); - info.MarkHandled(); - break; - } - } - - protected override void OnKeyUp(UIClass ui, KeyStateInfo info) - { - if (this.ShouldIgnoreInput(info) || this._edit == null) - return; - switch (info.Key) - { - case Keys.Back: - if (!this._handlingBackspaceFlag) - break; - info.MarkHandled(); - this._handlingBackspaceFlag = false; - break; - case Keys.Enter: - if (!this._submitOnEnter) - break; - info.MarkHandled(); - break; - case Keys.Escape: - if (!this._treatEscapeAsBackspace) - break; - goto case Keys.Back; - case Keys.Delete: - if (!this._handlingDeleteFlag) - break; - info.MarkHandled(); - this._handlingDeleteFlag = false; - break; - case Keys.NumPad0: - case Keys.NumPad1: - case Keys.NumPad2: - case Keys.NumPad3: - case Keys.NumPad4: - case Keys.NumPad5: - case Keys.NumPad6: - case Keys.NumPad7: - case Keys.NumPad8: - case Keys.NumPad9: - info.MarkHandled(); - break; - } - } - - private void RemoveChar() - { - if (this._edit == null || this.IsEditableTextEmpty()) - return; - if (!this._edit.ReadOnly) - this._edit.Value = this._edit.Value.Substring(0, this._edit.Value.Length - 1); - else - this.FireTypingInputRejectedEvent(); - } - - private void Clear() - { - if (this._edit == null || this.IsEditableTextEmpty()) - return; - if (!this._edit.ReadOnly) - this._edit.Value = string.Empty; - else - this.FireTypingInputRejectedEvent(); - } - - private void InputChar(char ch) - { - if (this._edit == null) - return; - if (!this._edit.ReadOnly && (this.IsEditableTextEmpty() || this._edit.Value.Length < this._edit.MaxLength)) - this._edit.Value += (string)(object)ch; - else - this.FireTypingInputRejectedEvent(); - } - - private bool ShouldIgnoreInput(KeyActionInfo info) => (info.Modifiers & InputModifiers.ControlKey) == InputModifiers.ControlKey || (info.Modifiers & InputModifiers.AltKey) == InputModifiers.AltKey || (info.Modifiers & InputModifiers.WindowsKey) == InputModifiers.WindowsKey; - - private bool IsEditableTextEmpty() => string.IsNullOrEmpty(this._edit.Value); - } -} diff --git a/UIX/Microsoft/Iris/IntRangedValue.cs b/UIX/Microsoft/Iris/IntRangedValue.cs deleted file mode 100644 index 2336ee8..0000000 --- a/UIX/Microsoft/Iris/IntRangedValue.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.IntRangedValue -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris -{ - public class IntRangedValue : RangedValue, IUIIntRangedValue, IUIRangedValue, IUIValueRange, INotifyObject - { - public IntRangedValue(IModelItemOwner owner, string description) : base(owner, description) - { - } - - public IntRangedValue(IModelItemOwner owner) : this(owner, null) - { - } - - public IntRangedValue() : this(null) - { - } - - public int Value - { - get => (int)base.Value; - set => base.Value = value; - } - - public int MinValue - { - get => (int)base.MinValue; - set => base.MinValue = value; - } - - public int MaxValue - { - get => (int)base.MaxValue; - set => base.MaxValue = value; - } - - public int Step - { - get => (int)base.Step; - set => base.Step = value; - } - - public override ModelItems.RangedValue CreateInternalRangedValue() => new ModelItems.IntRangedValue(); - } -} diff --git a/UIX/Microsoft/Iris/InvokePolicy.cs b/UIX/Microsoft/Iris/InvokePolicy.cs deleted file mode 100644 index 733b995..0000000 --- a/UIX/Microsoft/Iris/InvokePolicy.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.InvokePolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public enum InvokePolicy - { - Synchronous, - AsynchronousNormal, - AsynchronousLowPri, - } -} diff --git a/UIX/Microsoft/Iris/ItemCountHandler.cs b/UIX/Microsoft/Iris/ItemCountHandler.cs deleted file mode 100644 index 8bf225b..0000000 --- a/UIX/Microsoft/Iris/ItemCountHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ItemCountHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public delegate void ItemCountHandler(VirtualList list); -} diff --git a/UIX/Microsoft/Iris/Key.cs b/UIX/Microsoft/Iris/Key.cs deleted file mode 100644 index 9590dc3..0000000 --- a/UIX/Microsoft/Iris/Key.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Key -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public static class Key - { - public const string PublicKey = "0x0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"; - public const string PublicKeyToken = "31bf3856ad364e35"; - public const string PublicKeyTokenAttrib = ",PublicKeyToken=31bf3856ad364e35"; - public const string PublicKeyAttrib = ",PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"; - } -} diff --git a/UIX/Microsoft/Iris/Layout/Alignment.cs b/UIX/Microsoft/Iris/Layout/Alignment.cs deleted file mode 100644 index 70672ac..0000000 --- a/UIX/Microsoft/Iris/Layout/Alignment.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.Alignment -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layout -{ - public enum Alignment - { - Unspecified, - Near, - Center, - Far, - Fill, - } -} diff --git a/UIX/Microsoft/Iris/Layout/AreaOfInterest.cs b/UIX/Microsoft/Iris/Layout/AreaOfInterest.cs deleted file mode 100644 index 12943b6..0000000 --- a/UIX/Microsoft/Iris/Layout/AreaOfInterest.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.AreaOfInterest -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layout -{ - public struct AreaOfInterest - { - private Rectangle _rectangle; - private Rectangle _displayRectangle; - private AreaOfInterestID _id; - - public AreaOfInterest(Size size, AreaOfInterestID id) - : this(size, Inset.Zero, id) - { - } - - public AreaOfInterest(Size size, Inset margins, AreaOfInterestID id) - : this(new Rectangle(Point.Zero, size), margins, id) - { - } - - public AreaOfInterest(Rectangle rectangle, AreaOfInterestID id) - : this(rectangle, rectangle, id) - { - } - - public AreaOfInterest(Rectangle rectangle, Inset margins, AreaOfInterestID id) - : this(rectangle, Rectangle.Inflate(rectangle, margins.ToRect), id) - { - } - - public AreaOfInterest(Rectangle rectangle, Rectangle displayRectangle, AreaOfInterestID id) - { - this._rectangle = rectangle; - this._displayRectangle = displayRectangle; - this._id = id; - } - - public AreaOfInterest Transform(Point offset) => new AreaOfInterest(Rectangle.Offset(this._rectangle, offset), Rectangle.Offset(this._displayRectangle, offset), this.Id); - - public static void AddAreaOfInterest( - AreaOfInterest interest, - ref Vector areasOfInterestList) - { - if (areasOfInterestList == null) - areasOfInterestList = new Vector(); - for (int index = 0; index < areasOfInterestList.Count; ++index) - { - if (areasOfInterestList[index].Id == interest.Id) - return; - } - areasOfInterestList.Add(interest); - } - - public override string ToString() => InvariantString.Format("AreaOfInterest(\"{0}\", {1}, {2})", Id, Rectangle, DisplayRectangle); - - public override int GetHashCode() => this._rectangle.GetHashCode() ^ this._displayRectangle.GetHashCode() ^ this._id.GetHashCode(); - - public override bool Equals(object other) - { - try - { - return this == (AreaOfInterest)other; - } - catch - { - return false; - } - } - - public bool Equals(AreaOfInterest other) => this._rectangle == other._rectangle && this._displayRectangle == other._displayRectangle && this._id == other._id; - - public static bool operator ==(AreaOfInterest a, AreaOfInterest b) => a._rectangle == b._rectangle && a._displayRectangle == b._displayRectangle && a._id == b._id; - - public static bool operator !=(AreaOfInterest a, AreaOfInterest b) => a._rectangle != b._rectangle || a._displayRectangle != b._displayRectangle || a._id != b._id; - - public Rectangle Rectangle => this._rectangle; - - public Rectangle DisplayRectangle - { - get => this._displayRectangle; - set => this._displayRectangle = value; - } - - public AreaOfInterestID Id => this._id; - } -} diff --git a/UIX/Microsoft/Iris/Layout/AreaOfInterestID.cs b/UIX/Microsoft/Iris/Layout/AreaOfInterestID.cs deleted file mode 100644 index 8bc8297..0000000 --- a/UIX/Microsoft/Iris/Layout/AreaOfInterestID.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.AreaOfInterestID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Layout -{ - [Flags] - public enum AreaOfInterestID - { - Focus = 1, - FocusOverride = 2, - PendingFocus = 4, - ScrollIntoViewRequest = 8, - ScrollableRange = 16, // 0x00000010 - } -} diff --git a/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs b/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs deleted file mode 100644 index 20c0b42..0000000 --- a/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.AreaOfInterestLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layout -{ - public class AreaOfInterestLayoutInput : ILayoutInput - { - private AreaOfInterestID _id; - private Inset _margins; - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - - public AreaOfInterestLayoutInput(AreaOfInterestID idName, Inset margins) - { - this._id = idName; - this._margins = margins; - } - - public AreaOfInterestLayoutInput() - { - } - - public AreaOfInterestID Id - { - get => this._id; - set => this._id = value; - } - - public Inset Margins => this._margins; - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => s_dataProperty; - - public override string ToString() => InvariantString.Format("{0}({1})", this.GetType().Name, _id); - } -} diff --git a/UIX/Microsoft/Iris/Layout/ExtendedLayoutOutput.cs b/UIX/Microsoft/Iris/Layout/ExtendedLayoutOutput.cs deleted file mode 100644 index 595af85..0000000 --- a/UIX/Microsoft/Iris/Layout/ExtendedLayoutOutput.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.ExtendedLayoutOutput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layout -{ - public abstract class ExtendedLayoutOutput - { - public ExtendedLayoutOutput nextOutput; - - private DataCookie Data => this.OutputID; - - public abstract DataCookie OutputID { get; } - } -} diff --git a/UIX/Microsoft/Iris/Layout/ILayout.cs b/UIX/Microsoft/Iris/Layout/ILayout.cs deleted file mode 100644 index edc46e4..0000000 --- a/UIX/Microsoft/Iris/Layout/ILayout.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.ILayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layout -{ - public interface ILayout - { - Size Measure(ILayoutNode layoutNode, Size constraint); - - void Arrange(ILayoutNode layoutNode, LayoutSlot slot); - - ItemAlignment DefaultChildAlignment { get; } - } -} diff --git a/UIX/Microsoft/Iris/Layout/ILayoutInput.cs b/UIX/Microsoft/Iris/Layout/ILayoutInput.cs deleted file mode 100644 index 63c9edf..0000000 --- a/UIX/Microsoft/Iris/Layout/ILayoutInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.ILayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layout -{ - public interface ILayoutInput - { - DataCookie Data { get; } - } -} diff --git a/UIX/Microsoft/Iris/Layout/ILayoutNode.cs b/UIX/Microsoft/Iris/Layout/ILayoutNode.cs deleted file mode 100644 index 587f221..0000000 --- a/UIX/Microsoft/Iris/Layout/ILayoutNode.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.ILayoutNode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layout -{ - public interface ILayoutNode - { - Size Measure(Size constraint); - - void Arrange(LayoutSlot parentSlot); - - void Arrange(LayoutSlot parentSlot, Rectangle bounds); - - void Arrange(LayoutSlot parentSlot, Rectangle bounds, Vector3 scale, Rotation rotation); - - void Commit(); - - void MarkHidden(); - - ILayoutInput GetLayoutInput(DataCookie inputID); - - void SetLayoutInput(ILayoutInput input); - - void SetLayoutInput(ILayoutInput input, bool invalidateLayout); - - ExtendedLayoutOutput GetExtendedLayoutOutput(DataCookie outputID); - - void SetExtendedLayoutOutput(ExtendedLayoutOutput newDataOutput); - - bool ContainsAreaOfInterest(AreaOfInterestID id); - - bool TryGetAreaOfInterest(AreaOfInterestID id, out AreaOfInterest area); - - void AddAreaOfInterest(AreaOfInterest interest); - - Vector GetSpecificChildrenRequestList(); - - void RequestMoreChildren(int childrenCount); - - void RequestSpecificChildren(Vector indiciesList); - - object MeasureData { get; set; } - - int LayoutChildrenCount { get; } - - LayoutNodeEnumerator LayoutChildren { get; } - - ILayoutNode NextSibling { get; } - - ILayoutNode NextVisibleSibling { get; } - - bool LayoutContributesToWidth { get; set; } - - void SetVisibleIndexRange( - int beginVisible, - int endVisible, - int beginVisibleOffscreen, - int endVisibleOffscreen, - int? focusedItem); - - Size DesiredSize { get; } - - Size AlignedSize { get; } - - Point AlignmentOffset { get; } - - Point LayoutPosition { get; } - - bool Visible { get; } - } -} diff --git a/UIX/Microsoft/Iris/Layout/ItemAlignment.cs b/UIX/Microsoft/Iris/Layout/ItemAlignment.cs deleted file mode 100644 index 5b54d72..0000000 --- a/UIX/Microsoft/Iris/Layout/ItemAlignment.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.ItemAlignment -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layout -{ - public struct ItemAlignment - { - private Alignment _horizontal; - private Alignment _vertical; - public static readonly ItemAlignment Default = new ItemAlignment(); - - public ItemAlignment(Alignment horizontal, Alignment vertical) - { - this._horizontal = horizontal; - this._vertical = vertical; - } - - public Alignment Horizontal - { - get => this._horizontal; - set => this._horizontal = value; - } - - public Alignment Vertical - { - get => this._vertical; - set => this._vertical = value; - } - - public Alignment GetAlignment(Orientation orientation) => orientation != Orientation.Horizontal ? this.Vertical : this.Horizontal; - - public override bool Equals(object obj) => obj is ItemAlignment itemAlignment && this == itemAlignment; - - public override int GetHashCode() => (int)((Alignment)((int)this.Horizontal << 16) ^ this.Vertical); - - public static bool operator ==(ItemAlignment left, ItemAlignment right) => left.Horizontal == right.Horizontal && left.Vertical == right.Vertical; - - public static bool operator !=(ItemAlignment left, ItemAlignment right) => !(left == right); - - public static ItemAlignment Merge(ItemAlignment alignment, ItemAlignment fallback) - { - if (alignment.Horizontal == Alignment.Unspecified) - alignment.Horizontal = fallback.Horizontal; - if (alignment.Vertical == Alignment.Unspecified) - alignment.Vertical = fallback.Vertical; - return alignment; - } - } -} diff --git a/UIX/Microsoft/Iris/Layout/LayoutCompleteEventHandler.cs b/UIX/Microsoft/Iris/Layout/LayoutCompleteEventHandler.cs deleted file mode 100644 index 9801432..0000000 --- a/UIX/Microsoft/Iris/Layout/LayoutCompleteEventHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.LayoutCompleteEventHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layout -{ - public delegate void LayoutCompleteEventHandler(object sender); -} diff --git a/UIX/Microsoft/Iris/Layout/LayoutConstants.cs b/UIX/Microsoft/Iris/Layout/LayoutConstants.cs deleted file mode 100644 index 8881bb1..0000000 --- a/UIX/Microsoft/Iris/Layout/LayoutConstants.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.LayoutConstants -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layout -{ - public static class LayoutConstants - { - public const int Infinite = 16777215; - } -} diff --git a/UIX/Microsoft/Iris/Layout/LayoutNodeEnumerator.cs b/UIX/Microsoft/Iris/Layout/LayoutNodeEnumerator.cs deleted file mode 100644 index 28f2672..0000000 --- a/UIX/Microsoft/Iris/Layout/LayoutNodeEnumerator.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.LayoutNodeEnumerator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layout -{ - public struct LayoutNodeEnumerator - { - private ILayoutNode _start; - private ILayoutNode _current; - private bool _haventStartedYet; - - public LayoutNodeEnumerator GetEnumerator() => this; - - public LayoutNodeEnumerator(ILayoutNode start) - { - this._start = start; - this._current = null; - this._haventStartedYet = true; - } - - public bool MoveNext() - { - if (this._current != null) - this._current = this._current.NextVisibleSibling; - else if (this._haventStartedYet) - { - this._current = this._start; - this._haventStartedYet = false; - } - return this._current != null; - } - - public ILayoutNode Current => this._current; - - public void Reset() - { - this._current = null; - this._haventStartedYet = true; - } - } -} diff --git a/UIX/Microsoft/Iris/Layout/LayoutSlot.cs b/UIX/Microsoft/Iris/Layout/LayoutSlot.cs deleted file mode 100644 index a423026..0000000 --- a/UIX/Microsoft/Iris/Layout/LayoutSlot.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.LayoutSlot -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using System.Text; - -namespace Microsoft.Iris.Layout -{ - public struct LayoutSlot - { - private Size _bounds; - private Point _offset; - private Rectangle _viewBounds; - private Rectangle _peripheralViewBounds; - - public LayoutSlot(Size extent) - : this(extent, Point.Zero, new Rectangle(extent), new Rectangle(extent)) - { - } - - public LayoutSlot( - Size extent, - Point offset, - Rectangle viewBounds, - Rectangle viewPeripheralBounds) - { - this._bounds = extent; - this._offset = offset; - this._viewBounds = viewBounds; - this._peripheralViewBounds = viewPeripheralBounds; - } - - public Size Bounds - { - get => this._bounds; - set => this._bounds = value; - } - - public Point Offset - { - get => this._offset; - set => this._offset = value; - } - - public Rectangle View - { - get => this._viewBounds; - set => this._viewBounds = value; - } - - public Rectangle PeripheralView - { - get => this._peripheralViewBounds; - set => this._peripheralViewBounds = value; - } - - public void Deflate(Inset inset) - { - int num1 = inset.Left + inset.Right; - int num2 = inset.Top + inset.Bottom; - this._bounds.Width -= num1; - if (this._bounds.Width < 0) - this._bounds.Width = 0; - this._bounds.Height -= num2; - if (this._bounds.Height < 0) - this._bounds.Height = 0; - this._viewBounds.X -= inset.Left; - this._viewBounds.Y -= inset.Top; - this._peripheralViewBounds.X -= inset.Left; - this._peripheralViewBounds.Y -= inset.Top; - } - - public static bool operator ==(LayoutSlot left, LayoutSlot right) => left._bounds == right._bounds && left._offset == right._offset && left._viewBounds == right._viewBounds && left._peripheralViewBounds == right._peripheralViewBounds; - - public static bool operator !=(LayoutSlot left, LayoutSlot right) => !(left == right); - - public override bool Equals(object obj) => obj is LayoutSlot layoutSlot && this == layoutSlot; - - public override int GetHashCode() => this._bounds.GetHashCode() ^ this._offset.GetHashCode() ^ this._viewBounds.GetHashCode() ^ this._peripheralViewBounds.GetHashCode(); - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append(this.GetType().Name); - stringBuilder.Append("("); - stringBuilder.Append("Bounds="); - stringBuilder.Append(_bounds); - stringBuilder.Append(", Offset="); - stringBuilder.Append(_offset); - stringBuilder.Append(", View="); - stringBuilder.Append(_viewBounds); - if (this._peripheralViewBounds != this._viewBounds) - { - stringBuilder.Append(", Peripheral="); - stringBuilder.Append(_peripheralViewBounds); - } - stringBuilder.Append(")"); - return stringBuilder.ToString(); - } - } -} diff --git a/UIX/Microsoft/Iris/Layout/SharedSize.cs b/UIX/Microsoft/Iris/Layout/SharedSize.cs deleted file mode 100644 index a079198..0000000 --- a/UIX/Microsoft/Iris/Layout/SharedSize.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.SharedSize -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Layout -{ - public class SharedSize : NotifyObjectBase - { - private Size _minimumSize; - private Size _maximumSize; - private Size _desiredSize; - private bool _accumulatingSize; - private bool _applyPending; - private Vector _dependents; - - public SharedSize() - { - this._minimumSize = Size.Zero; - this._maximumSize = Size.Zero; - this._desiredSize = Size.Zero; - this._accumulatingSize = true; - } - - public Size MaximumSize - { - get => this._maximumSize; - set - { - if (!(this._maximumSize != value)) - return; - Size size1 = this.Size; - this._maximumSize = value; - Size size2 = this.Size; - this.FireNotification(NotificationID.MaximumSize); - if (!(size1 != size2)) - return; - this.FireNotification(NotificationID.Size); - this.InvalidateDependents(true); - } - } - - public Size MinimumSize - { - get => this._minimumSize; - set - { - if (!(this._minimumSize != value)) - return; - Size size1 = this.Size; - this._minimumSize = value; - Size size2 = this.Size; - this.FireNotification(NotificationID.MinimumSize); - if (!(size1 != size2)) - return; - this.FireNotification(NotificationID.Size); - this.InvalidateDependents(true); - } - } - - public Size Size - { - get - { - Size size = Size.Max(this._desiredSize, this.MinimumSize); - Size maximumSize = this.MaximumSize; - if (maximumSize.Width > 0) - size.Width = Math.Min(size.Width, maximumSize.Width); - if (maximumSize.Height > 0) - size.Height = Math.Min(size.Height, maximumSize.Height); - return size; - } - set => this.SetSize(value, true); - } - - public void AutoSize() - { - this.SetSize(Size.Zero, false); - this.InvalidateDependents(true); - } - - private void SetSize(Size value, bool stopAccumulating) - { - if (this._desiredSize != value) - { - Size size1 = this.Size; - this._desiredSize = value; - Size size2 = this.Size; - if (size1 != size2) - { - this.FireNotification(NotificationID.Size); - if (stopAccumulating) - this.InvalidateDependents(true); - } - } - this._accumulatingSize = !stopAccumulating; - } - - public void Register(ViewItem viewitem) - { - if (this._dependents == null) - this._dependents = new Vector(); - this._dependents.Add(viewitem); - } - - public void Unregister(ViewItem viewitem) => this._dependents.Remove(viewitem); - - public void AdjustConstraint(ref Size constraint, ref Size minSize, SharedSizePolicy policy) - { - Size size1 = this.Size; - Size maximumSize = this.MaximumSize; - Size size2 = constraint; - Size size3 = size1; - Size size4 = minSize; - if ((policy & SharedSizePolicy.SharesWidth) != 0) - { - if (!this._accumulatingSize) - { - int num = Math.Max(size4.Width, Math.Min(size1.Width, size2.Width)); - if (num >= this.MinimumSize.Width && (num <= maximumSize.Width || maximumSize.Width == 0)) - { - size4.Width = num; - size2.Width = num; - } - else - { - size2.Width = 0; - size4.Width = 1; - } - } - else - { - if (maximumSize.Width != 0) - size2.Width = Math.Min(maximumSize.Width, size2.Width); - size4.Width = Math.Max(size3.Width, size4.Width); - } - } - if ((policy & SharedSizePolicy.SharesHeight) != 0) - { - if (!this._accumulatingSize) - { - int num = Math.Max(size4.Height, Math.Min(size1.Height, size2.Height)); - if (num >= this.MinimumSize.Height && (num <= maximumSize.Height || maximumSize.Height == 0)) - { - size4.Height = num; - size2.Height = num; - } - else - { - size2.Height = 0; - size4.Height = 1; - } - } - else - { - if (maximumSize.Height != 0) - size2.Height = Math.Min(maximumSize.Height, size2.Height); - size4.Height = Math.Max(size3.Height, size4.Height); - } - } - constraint = size2; - minSize = size4; - } - - public void AccumulateSize(Size size, SharedSizePolicy policy) - { - if (!this._accumulatingSize) - return; - Size size1 = this.Size; - if ((policy & SharedSizePolicy.ContributesToWidth) != 0 && size.Width > size1.Width) - size1.Width = size.Width; - if ((policy & SharedSizePolicy.ContributesToHeight) != 0 && size.Height > size1.Height) - size1.Height = size.Height; - this.SetSize(size1, false); - this.EnsureApplySize(); - } - - private void EnsureApplySize() - { - if (this._applyPending) - return; - this._applyPending = true; - DeferredCall.Post(DispatchPriority.LayoutPass2, new SimpleCallback(this.ApplySize)); - } - - private void ApplySize() - { - this._accumulatingSize = false; - this._applyPending = false; - this.InvalidateDependents(false); - } - - private void InvalidateDependents(bool forceInvalid) - { - if (this._dependents == null) - return; - Size size1 = this.Size; - foreach (ViewItem dependent in this._dependents) - { - if (forceInvalid) - { - dependent.MarkLayoutInvalid(); - } - else - { - SharedSizePolicy sharedSizePolicy = dependent.SharedSizePolicy; - Size size2 = ((ILayoutNode)dependent).DesiredSize - dependent.Margins.Size; - if (size1.Width != size2.Width && (sharedSizePolicy & SharedSizePolicy.SharesWidth) != 0 || size1.Height != size2.Height && (sharedSizePolicy & SharedSizePolicy.SharesHeight) != 0) - dependent.MarkLayoutInvalid(); - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/Layout/SharedSizePolicy.cs b/UIX/Microsoft/Iris/Layout/SharedSizePolicy.cs deleted file mode 100644 index 2173877..0000000 --- a/UIX/Microsoft/Iris/Layout/SharedSizePolicy.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.SharedSizePolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Layout -{ - [Flags] - public enum SharedSizePolicy - { - ContributesToWidth = 1, - ContributesToHeight = 2, - ContributesToSize = ContributesToHeight | ContributesToWidth, // 0x00000003 - SharesWidth = 4, - SharesHeight = 8, - SharesSize = SharesHeight | SharesWidth, // 0x0000000C - Default = SharesSize | ContributesToSize, // 0x0000000F - } -} diff --git a/UIX/Microsoft/Iris/Layout/Visibility.cs b/UIX/Microsoft/Iris/Layout/Visibility.cs deleted file mode 100644 index de15d4d..0000000 --- a/UIX/Microsoft/Iris/Layout/Visibility.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layout.Visibility -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layout -{ - public enum Visibility : byte - { - Visible, - ImplicitlyHidden, - ExplicitlyHidden, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/AnchorEdge.cs b/UIX/Microsoft/Iris/Layouts/AnchorEdge.cs deleted file mode 100644 index 838d549..0000000 --- a/UIX/Microsoft/Iris/Layouts/AnchorEdge.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.AnchorEdge -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Text; - -namespace Microsoft.Iris.Layouts -{ - public class AnchorEdge - { - private string _idName; - private float _percentValue; - private int _offsetValue; - private float _maximumPercentValue; - private int _maximumOffsetValue; - private float _minimumPercentValue; - private int _minimumOffsetValue; - private bool _maximumSetFlag; - private bool _minimumSetFlag; - - public AnchorEdge() - { - } - - public AnchorEdge(string id, float percent) - { - this.Id = id; - this.Percent = percent; - } - - public string Id - { - get => this._idName; - set => this._idName = value; - } - - public float Percent - { - get => this._percentValue; - set => this._percentValue = value; - } - - public int Offset - { - get => this._offsetValue; - set => this._offsetValue = value; - } - - public float MaximumPercent - { - get => this._maximumPercentValue; - set - { - this._maximumPercentValue = value; - this._maximumSetFlag = true; - } - } - - public int MaximumOffset - { - get => this._maximumOffsetValue; - set - { - this._maximumOffsetValue = value; - this._maximumSetFlag = true; - } - } - - public float MinimumPercent - { - get => this._minimumPercentValue; - set - { - this._minimumPercentValue = value; - this._minimumSetFlag = true; - } - } - - public int MinimumOffset - { - get => this._minimumOffsetValue; - set - { - this._minimumOffsetValue = value; - this._minimumSetFlag = true; - } - } - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append("("); - stringBuilder.Append(this._idName); - stringBuilder.Append(", "); - stringBuilder.Append(this._percentValue); - if (this._offsetValue != 0) - { - stringBuilder.Append(", "); - stringBuilder.Append(this._offsetValue); - } - if (_maximumPercentValue > 0.0) - { - stringBuilder.Append(", MaximumPercent="); - stringBuilder.Append(this._maximumPercentValue); - stringBuilder.Append(", MaximumOffset="); - stringBuilder.Append(this._maximumOffsetValue); - } - if (_minimumPercentValue > 0.0) - { - stringBuilder.Append(", MinimumPercent="); - stringBuilder.Append(this._minimumPercentValue); - stringBuilder.Append(", MinimumOffset="); - stringBuilder.Append(this._minimumOffsetValue); - } - stringBuilder.Append(")"); - return stringBuilder.ToString(); - } - - public static bool operator ==(AnchorEdge lhs, AnchorEdge rhs) - { - if ((object)lhs == null && (object)rhs == null) - return true; - return (object)lhs != null && lhs.Equals(rhs); - } - - public static bool operator !=(AnchorEdge lhs, AnchorEdge rhs) => !(lhs == rhs); - - public override bool Equals(object obj) - { - AnchorEdge anchorEdge = obj as AnchorEdge; - return (object)anchorEdge != null && this.Id == anchorEdge.Id && (Percent == (double)anchorEdge.Percent && this.Offset == anchorEdge.Offset) && (this.MaximumSet == anchorEdge.MaximumSet && MaximumPercent == (double)anchorEdge.MaximumPercent && (this.MaximumOffset == anchorEdge.MaximumOffset && this.MinimumSet == anchorEdge.MinimumSet)) && MinimumPercent == (double)anchorEdge.MinimumPercent && this.MinimumOffset == anchorEdge.MinimumOffset; - } - - public override int GetHashCode() => (this.Id != null ? this.Id.GetHashCode() : 0) ^ this.Percent.GetHashCode() ^ this.Offset << 8 ^ this.MaximumSet.GetHashCode() ^ this.MaximumPercent.GetHashCode() ^ this.MaximumOffset << 16 ^ this.MinimumSet.GetHashCode() ^ this.MinimumPercent.GetHashCode() ^ this.MinimumOffset << 24; - - public bool MaximumSet => this._maximumSetFlag; - - public bool MinimumSet => this._minimumSetFlag; - } -} diff --git a/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs b/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs deleted file mode 100644 index 3cd3554..0000000 --- a/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs +++ /dev/null @@ -1,415 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.AnchorLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class AnchorLayout : ILayout - { - private bool _sizeToHorizontalChildrenFlag = true; - private bool _sizeToVerticalChildrenFlag = true; - private ItemAlignment _defaultChildAlignment; - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - private static AnchorEdge s_anchorParent0 = new AnchorEdge("Parent", 0.0f); - private static AnchorEdge s_anchorParent1 = new AnchorEdge("Parent", 1f); - private static AnchorEdge s_anchorParentActual0 = new AnchorEdge("ParentActual", 0.0f); - private static AnchorEdge s_anchorParentActual1 = new AnchorEdge("ParentActual", 1f); - - public bool SizeToHorizontalChildren - { - get => this._sizeToHorizontalChildrenFlag; - set => this._sizeToHorizontalChildrenFlag = value; - } - - public bool SizeToVerticalChildren - { - get => this._sizeToVerticalChildrenFlag; - set => this._sizeToVerticalChildrenFlag = value; - } - - public ItemAlignment DefaultChildAlignment - { - get => this._defaultChildAlignment; - set => this._defaultChildAlignment = value; - } - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - if (!(layoutNode.MeasureData is AnchorLayout.Packet packet)) - { - packet = new AnchorLayout.Packet(); - layoutNode.MeasureData = packet; - packet.ParentRecord = new AnchorLayout.Record("Parent", new Rectangle(Point.Zero, constraint), LayoutPhase.Done); - packet.ParentActualRecord = new AnchorLayout.Record("ParentActual", Rectangle.Zero, LayoutPhase.Arrange); - packet.AreaOfInterestRecord = new AnchorLayout.Record("Focus", Rectangle.Zero, LayoutPhase.Arrange); - packet.Records = new Vector(layoutNode.LayoutChildrenCount); - } - else - { - packet.ParentRecord.Bounds = new Rectangle(Point.Zero, constraint); - packet.CircularitiesDetected = false; - packet.CircularityBreakerRecord = null; - } - packet.Subject = layoutNode; - packet.Constraint = constraint; - packet.TotalBounds = new Rectangle(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue); - Size zero = Size.Zero; - if (layoutNode.LayoutChildrenCount == 0) - { - packet.Records.Clear(); - if (!this._sizeToHorizontalChildrenFlag) - zero.Width = constraint.Width; - if (!this._sizeToVerticalChildrenFlag) - zero.Height = constraint.Height; - layoutNode.RequestMoreChildren(int.MaxValue); - return zero; - } - int index = 0; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (index < packet.Records.Count) - { - packet.Records[index].Initialize(layoutChild); - } - else - { - AnchorLayout.Record record = new AnchorLayout.Record(layoutChild); - packet.Records.Add(record); - } - ++index; - } - packet.Records.RemoveRange(index, packet.Records.Count - index); - foreach (AnchorLayout.Record record in packet.Records) - { - if (record.Phase == LayoutPhase.Untouched) - { - packet.CircularityBreakerRecord = null; - this.MeasureChild(packet, record); - } - } - if (packet.CircularitiesDetected) - { - foreach (AnchorLayout.Record record in packet.Records) - { - if (record.Phase == LayoutPhase.Circular) - record.Phase = LayoutPhase.Untouched; - } - packet.CircularitiesDetected = false; - foreach (AnchorLayout.Record record in packet.Records) - { - if (record.Phase == LayoutPhase.Untouched) - this.MeasureChild(packet, record); - } - } - Size size = constraint; - if (this._sizeToHorizontalChildrenFlag || this._sizeToVerticalChildrenFlag) - { - if (this._sizeToHorizontalChildrenFlag) - size.Width = packet.TotalBounds.Width; - if (this._sizeToVerticalChildrenFlag) - size.Height = packet.TotalBounds.Height; - foreach (AnchorLayout.Record record in packet.Records) - { - Rectangle bounds = record.Bounds; - if (this._sizeToHorizontalChildrenFlag) - bounds.X -= packet.TotalBounds.X; - if (this._sizeToVerticalChildrenFlag) - bounds.Y -= packet.TotalBounds.Y; - record.Bounds = bounds; - } - } - layoutNode.RequestMoreChildren(int.MaxValue); - return size; - } - - private void MeasureChild(AnchorLayout.Packet packet, AnchorLayout.Record record) - { - AnchorLayoutInput input = record.Input; - record.Phase = LayoutPhase.InProgress; - bool allArrangePhase = true; - bool anyArrangePhase = false; - int edge1 = this.ComputeEdge(packet, "Left", input.Left, s_anchorParent0, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge2 = this.ComputeEdge(packet, "Top", input.Top, s_anchorParent0, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge3 = this.ComputeEdge(packet, "Right", input.Right, s_anchorParent1, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge4 = this.ComputeEdge(packet, "Bottom", input.Bottom, s_anchorParent1, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - if (anyArrangePhase) - { - if (!allArrangePhase) - { - ErrorManager.ReportError("All AnchorEdges must refer to actual positions on AnchorLayoutInput {0}.", record.Input); - record.Invalid = true; - } - if (record.Input.ContributesToHeight || record.Input.ContributesToWidth) - { - ErrorManager.ReportError("AnchorLayoutInput {0} cannot contribute to width or height.", record.Input); - record.Invalid = true; - } - record.Phase = LayoutPhase.Arrange; - } - else - { - Normalize(ref edge1, ref edge3); - Normalize(ref edge2, ref edge4); - int constraintMaxValue1; - ComputeConstraint(edge1, edge3, out constraintMaxValue1); - int constraintMaxValue2; - ComputeConstraint(edge2, edge4, out constraintMaxValue2); - Size constraint = new Size(constraintMaxValue1, constraintMaxValue2); - record.LayoutNode.Measure(constraint); - int size1; - int x = LocationFromEdges(input.Left, input.Right, edge1, edge3, record.LayoutNode.DesiredSize.Width, record.LayoutNode.AlignedSize.Width, record.LayoutNode.AlignmentOffset.X, out size1); - int size2; - int y = LocationFromEdges(input.Top, input.Bottom, edge2, edge4, record.LayoutNode.DesiredSize.Height, record.LayoutNode.AlignedSize.Height, record.LayoutNode.AlignmentOffset.Y, out size2); - record.Bounds = new Rectangle(x, y, size1, size2); - bool flag = packet.CircularityBreakerRecord == record; - if (record.Phase != LayoutPhase.InProgress && !flag) - return; - record.Phase = LayoutPhase.Done; - Rectangle bounds = record.Bounds; - if (!input.ContributesToWidth) - { - bounds.X = int.MaxValue; - bounds.Width = int.MinValue; - } - if (!input.ContributesToHeight) - { - bounds.Y = int.MaxValue; - bounds.Height = int.MinValue; - } - packet.TotalBounds = Rectangle.Union(packet.TotalBounds, bounds); - } - } - - private int ComputeEdge( - AnchorLayout.Packet packet, - string edgeName, - AnchorEdge anchor, - AnchorEdge fallback, - Orientation orientation, - AnchorLayout.Record record, - out AnchorLayout.Record recordRef, - ref bool allArrangePhase, - ref bool anyArrangePhase) - { - anchor = anchor != null ? anchor : fallback; - recordRef = this.GetReferenceRecord(packet, anchor.Id); - if (recordRef == null) - { - allArrangePhase = false; - return 0; - } - bool flag = recordRef.Phase == LayoutPhase.Arrange; - allArrangePhase &= flag; - anyArrangePhase |= flag; - record.Visible &= recordRef.Visible; - Rectangle bounds = recordRef.Bounds; - if (recordRef.Phase != LayoutPhase.Done && recordRef.Phase != LayoutPhase.Arrange) - { - record.Phase = LayoutPhase.Circular; - bounds = packet.ParentRecord.Bounds; - if (recordRef.Phase == LayoutPhase.InProgress && packet.CircularityBreakerRecord == null) - { - packet.CircularityBreakerRecord = recordRef; - packet.CircularitiesDetected = true; - } - } - int val1 = Weigh(orientation == Orientation.Horizontal ? bounds.Width : bounds.Height, anchor.Percent) + (orientation == Orientation.Horizontal ? bounds.X : bounds.Y) + anchor.Offset; - int num = orientation == Orientation.Horizontal ? packet.ParentRecord.Bounds.Width : packet.ParentRecord.Bounds.Height; - if (anchor.MaximumSet) - { - int val2 = Weigh(num, anchor.MaximumPercent) + anchor.MaximumOffset; - val1 = Math.Min(val1, val2); - } - if (anchor.MinimumSet) - { - int val2 = Weigh(num, anchor.MinimumPercent) + anchor.MinimumOffset; - val1 = Math.Max(val1, val2); - } - return val1; - } - - private static void ComputeConstraint(int nearValue, int farValue, out int constraintMaxValue) => constraintMaxValue = farValue - nearValue; - - private static int LocationFromEdges( - AnchorEdge near, - AnchorEdge far, - int nearValue, - int farValue, - int desiredSize, - int alignedSize, - int alignmentOffset, - out int size) - { - size = desiredSize; - int num; - if (near == null && far == null) - num = (nearValue + farValue - desiredSize) / 2; - else if (near != null && far == null) - num = nearValue; - else if (near == null && far != null) - { - num = farValue - desiredSize; - } - else - { - num = nearValue + alignmentOffset; - size = alignedSize; - } - return num; - } - - private static void Normalize(ref int nearValue, ref int farValue) - { - if (farValue >= nearValue) - return; - farValue = nearValue; - } - - private static int Weigh(int value, float percentValue) => (int)(value * (double)percentValue); - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - AnchorLayout.Packet measureData = (AnchorLayout.Packet)layoutNode.MeasureData; - if (measureData.Records == null) - return; - measureData.ParentActualRecord.Bounds = new Rectangle(Point.Zero, slot.Bounds); - measureData.AreaOfInterestRecord.Bounds = Rectangle.Zero; - Vector vector = null; - AnchorLayout.Record record1 = null; - foreach (AnchorLayout.Record record2 in measureData.Records) - { - if (record2.Phase != LayoutPhase.Arrange) - { - record2.LayoutNode.Arrange(slot, record2.Bounds); - if (record1 == null && (record2.LayoutNode.ContainsAreaOfInterest(AreaOfInterestID.FocusOverride) || record2.LayoutNode.ContainsAreaOfInterest(AreaOfInterestID.Focus))) - record1 = record2; - } - else if (!record2.Invalid) - { - if (vector == null) - vector = new Vector(); - vector.Add(record2); - } - else - record2.LayoutNode.MarkHidden(); - } - if (vector == null) - return; - if (record1 != null) - { - AreaOfInterest area; - if (!record1.LayoutNode.TryGetAreaOfInterest(AreaOfInterestID.FocusOverride, out area)) - record1.LayoutNode.TryGetAreaOfInterest(AreaOfInterestID.Focus, out area); - measureData.AreaOfInterestRecord.Bounds = Rectangle.Offset(area.DisplayRectangle, record1.Bounds.Location); - } - foreach (AnchorLayout.Record record2 in vector) - { - AnchorLayoutInput input = record2.Input; - bool flag = false; - AnchorLayout.Record recordRef; - int edge1 = this.ComputeEdge(measureData, "Left", input.Left, null, Orientation.Horizontal, record2, out recordRef, ref flag, ref flag); - int edge2 = this.ComputeEdge(measureData, "Top", input.Top, null, Orientation.Vertical, record2, out recordRef, ref flag, ref flag); - int edge3 = this.ComputeEdge(measureData, "Right", input.Right, null, Orientation.Horizontal, record2, out recordRef, ref flag, ref flag); - int edge4 = this.ComputeEdge(measureData, "Bottom", input.Bottom, null, Orientation.Vertical, record2, out recordRef, ref flag, ref flag); - int width = edge3 - edge1; - int height = edge4 - edge2; - record2.LayoutNode.Measure(new Size(width, height)); - record2.LayoutNode.Arrange(slot, new Rectangle(edge1, edge2, width, height)); - } - } - - private AnchorLayout.Record GetReferenceRecord( - AnchorLayout.Packet packet, - string id) - { - if (id == "Parent") - return packet.ParentRecord; - if (id == "ParentActual") - return packet.ParentActualRecord; - if (id == "Focus") - return packet.AreaOfInterestRecord; - foreach (AnchorLayout.Record record in packet.Records) - { - if (record.ID == id) - { - if (record.Phase == LayoutPhase.Untouched) - this.MeasureChild(packet, record); - return record; - } - } - ErrorManager.ReportError("Anchor layout: {0} cannot find the '{1}' child", this.GetType().Name, id); - return null; - } - - public static DataCookie InputData => s_dataProperty; - - public enum LayoutPhase - { - Untouched, - InProgress, - Circular, - Done, - Arrange, - } - - public class Record - { - public ILayoutNode LayoutNode; - public string ID; - public AnchorLayoutInput Input; - public Rectangle Bounds; - public AnchorLayout.LayoutPhase Phase; - public bool Visible = true; - public bool Invalid; - private static AnchorLayoutInput s_defaultInput = new AnchorLayoutInput(); - - public Record(ILayoutNode layoutNode) => this.Initialize(layoutNode); - - public void Initialize(ILayoutNode layoutNode) - { - this.LayoutNode = layoutNode; - this.Input = layoutNode.GetLayoutInput(InputData) as AnchorLayoutInput; - if (this.Input == null) - this.Input = s_defaultInput; - this.ID = ((ViewItem)layoutNode).Name; - this.Bounds = Rectangle.Zero; - this.Phase = LayoutPhase.Untouched; - this.Visible = true; - this.Invalid = false; - } - - public Record(string idName, Rectangle bounds, AnchorLayout.LayoutPhase phaseOverride) - { - this.ID = idName; - this.Bounds = bounds; - this.Phase = phaseOverride; - } - - public override string ToString() => string.Format("AnchorLayout.Record({0}, Phase={1})", ID, Phase); - } - - private class Packet - { - public ILayoutNode Subject; - public Vector Records; - public AnchorLayout.Record ParentRecord; - public AnchorLayout.Record ParentActualRecord; - public AnchorLayout.Record AreaOfInterestRecord; - public Size Constraint; - public Rectangle TotalBounds; - public bool CircularitiesDetected; - public AnchorLayout.Record CircularityBreakerRecord; - - public override string ToString() => string.Format("AnchorLayout.Packet({0})", Subject); - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs deleted file mode 100644 index 26cd52c..0000000 --- a/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.AnchorLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layouts -{ - public class AnchorLayoutInput : ILayoutInput - { - private AnchorEdge _anchorLeft; - private AnchorEdge _anchorTop; - private AnchorEdge _anchorRight; - private AnchorEdge _anchorBottom; - private bool _contributesToWidthFlag = true; - private bool _contributesToHeightFlag = true; - - public AnchorEdge Left - { - get => this._anchorLeft; - set => this._anchorLeft = value; - } - - public AnchorEdge Top - { - get => this._anchorTop; - set => this._anchorTop = value; - } - - public AnchorEdge Right - { - get => this._anchorRight; - set => this._anchorRight = value; - } - - public AnchorEdge Bottom - { - get => this._anchorBottom; - set => this._anchorBottom = value; - } - - public bool ContributesToWidth - { - get => this._contributesToWidthFlag; - set => this._contributesToWidthFlag = value; - } - - public bool ContributesToHeight - { - get => this._contributesToHeightFlag; - set => this._contributesToHeightFlag = value; - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => AnchorLayout.InputData; - - public override string ToString() => InvariantString.Format("AnchorLayoutInput(Left={0}, Top={1}, Right={2}, Bottom={3}{4}{5})", Left, Top, Right, Bottom, this.ContributesToWidth ? ", ContributesToWidth=true" : string.Empty, this.ContributesToHeight ? ", ContributesToHeight=true" : string.Empty); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ContentPositioningPolicy.cs b/UIX/Microsoft/Iris/Layouts/ContentPositioningPolicy.cs deleted file mode 100644 index 0fc9938..0000000 --- a/UIX/Microsoft/Iris/Layouts/ContentPositioningPolicy.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ContentPositioningPolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum ContentPositioningPolicy - { - RespectPaddingAndLocking, - ShowMaximalContent, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs b/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs deleted file mode 100644 index d282e3e..0000000 --- a/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.DefaultLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layouts -{ - public class DefaultLayout : ILayout - { - private static DefaultLayout s_sharedLayout = new DefaultLayout(); - - private DefaultLayout() - { - } - - public static DefaultLayout Instance => s_sharedLayout; - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) => Measure(layoutNode, constraint); - - public static Size Measure(ILayoutNode layoutNode, Size constraint) - { - Size sz1 = Size.Zero; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - Size sz2 = layoutChild.Measure(constraint); - sz1 = Size.Max(sz1, sz2); - } - layoutNode.RequestMoreChildren(int.MaxValue); - return sz1; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) => Arrange(layoutNode, slot); - - public static void Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - layoutChild.Arrange(slot); - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/DockLayout.cs b/UIX/Microsoft/Iris/Layouts/DockLayout.cs deleted file mode 100644 index 2864f5d..0000000 --- a/UIX/Microsoft/Iris/Layouts/DockLayout.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.DockLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layouts -{ - public class DockLayout : ILayout - { - private DockLayoutInput _defaultLayoutInput; - private ItemAlignment _defaultChildAlignment; - private static int s_numberOfAdditionalItemsToRequestAtATime = 42; - private static DockLayoutInput s_defaultLayoutInput = DockLayoutInput.Client; - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - - public static DataCookie DockData => s_dataProperty; - - public DockLayoutInput DefaultLayoutInput - { - get => this._defaultLayoutInput; - set => this._defaultLayoutInput = value; - } - - public ItemAlignment DefaultChildAlignment - { - get => this._defaultChildAlignment; - set => this._defaultChildAlignment = value; - } - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - Size size1 = constraint; - Size sz2_1 = Size.Zero; - Size constraint1 = size1; - bool flag = false; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - Size size2 = layoutChild.Measure(constraint1); - sz2_1 = Size.Max(size1 - constraint1 + size2, sz2_1); - DockLayoutInput layoutInputForNode = this.GetLayoutInputForNode(layoutChild); - if (layoutInputForNode == DockLayoutInput.Left || layoutInputForNode == DockLayoutInput.Right) - constraint1.Width -= size2.Width; - else if (layoutInputForNode == DockLayoutInput.Top || layoutInputForNode == DockLayoutInput.Bottom) - constraint1.Height -= size2.Height; - else if (layoutInputForNode == DockLayoutInput.Client) - flag = true; - } - if (flag) - { - Size sz2_2 = Size.Zero; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (this.GetLayoutInputForNode(layoutChild) == DockLayoutInput.Client) - sz2_2 = Size.Max(layoutChild.Measure(constraint1), sz2_2); - } - sz2_1 = Size.Max(size1 - constraint1 + sz2_2, sz2_1); - } - if (sz2_1.Width < size1.Width || sz2_1.Height < size1.Height) - layoutNode.RequestMoreChildren(s_numberOfAdditionalItemsToRequestAtATime); - return sz2_1; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - Rectangle bounds1 = new Rectangle(Point.Zero, slot.Bounds); - bool flag = false; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - Size desiredSize = layoutChild.DesiredSize; - Rectangle bounds2 = bounds1; - DockLayoutInput layoutInputForNode = this.GetLayoutInputForNode(layoutChild); - if (layoutInputForNode == DockLayoutInput.Left) - { - bounds2.Width = desiredSize.Width; - bounds1.X += desiredSize.Width; - bounds1.Width -= desiredSize.Width; - } - else if (layoutInputForNode == DockLayoutInput.Right) - { - bounds2.X = bounds1.Right - desiredSize.Width; - bounds2.Width = desiredSize.Width; - bounds1.Width -= desiredSize.Width; - } - else if (layoutInputForNode == DockLayoutInput.Top) - { - bounds2.Height = desiredSize.Height; - bounds1.Y += desiredSize.Height; - bounds1.Height -= desiredSize.Height; - } - else if (layoutInputForNode == DockLayoutInput.Bottom) - { - bounds2.Y = bounds1.Bottom - desiredSize.Height; - bounds2.Height = desiredSize.Height; - bounds1.Height -= desiredSize.Height; - } - else if (layoutInputForNode == DockLayoutInput.Client) - { - flag = true; - continue; - } - layoutChild.Arrange(slot, bounds2); - } - if (!flag) - return; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (this.GetLayoutInputForNode(layoutChild) == DockLayoutInput.Client) - layoutChild.Arrange(slot, bounds1); - } - } - - private DockLayoutInput GetLayoutInputForNode(ILayoutNode node) - { - if (!(node.GetLayoutInput(s_dataProperty) is DockLayoutInput dockLayoutInput)) - dockLayoutInput = this._defaultLayoutInput ?? s_defaultLayoutInput; - return dockLayoutInput; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs deleted file mode 100644 index 34b1884..0000000 --- a/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.DockLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layouts -{ - public class DockLayoutInput : ILayoutInput - { - public static readonly DockLayoutInput Left = new DockLayoutInput(); - public static readonly DockLayoutInput Top = new DockLayoutInput(); - public static readonly DockLayoutInput Right = new DockLayoutInput(); - public static readonly DockLayoutInput Bottom = new DockLayoutInput(); - public static readonly DockLayoutInput Client = new DockLayoutInput(); - - private DockLayoutInput() - { - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => DockLayout.DockData; - - public string PositionString - { - get - { - if (this == Left) - return "Left"; - if (this == Top) - return "Top"; - if (this == Right) - return "Right"; - return this == Bottom ? "Bottom" : "Client"; - } - } - - public override string ToString() => InvariantString.Format("{0}(Position={1})", this.GetType().Name, PositionString); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/FlipDirection.cs b/UIX/Microsoft/Iris/Layouts/FlipDirection.cs deleted file mode 100644 index a8b09bb..0000000 --- a/UIX/Microsoft/Iris/Layouts/FlipDirection.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.FlipDirection -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Layouts -{ - [Flags] - public enum FlipDirection - { - None = 0, - Horizontal = 1, - Vertical = 2, - Both = Vertical | Horizontal, // 0x00000003 - } -} diff --git a/UIX/Microsoft/Iris/Layouts/FlowLayout.cs b/UIX/Microsoft/Iris/Layouts/FlowLayout.cs deleted file mode 100644 index 71e8cb0..0000000 --- a/UIX/Microsoft/Iris/Layouts/FlowLayout.cs +++ /dev/null @@ -1,790 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.FlowLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class FlowLayout : ILayout - { - private Orientation _orientationFlow; - private MajorMinor _spacingMajorMinor; - private MajorMinor _repeatGapMajorMinor; - private RepeatPolicy _repeat; - private StripAlignment _stripAlignment; - private bool _allowWrapFlag; - private MissingItemPolicy _policyForMissingItems; - private int _minimumSampleSizeValue; - private ItemAlignment _defaultChildAlignment; - - public FlowLayout() - { - this._orientationFlow = Orientation.Horizontal; - this._minimumSampleSizeValue = 3; - } - - public Orientation Orientation - { - get => this._orientationFlow; - set => this._orientationFlow = value; - } - - public MajorMinor Spacing - { - get => this._spacingMajorMinor; - set => this._spacingMajorMinor = value; - } - - public bool AllowWrap - { - get => this._allowWrapFlag; - set => this._allowWrapFlag = value; - } - - public StripAlignment StripAlignment - { - get => this._stripAlignment; - set => this._stripAlignment = value; - } - - public RepeatPolicy Repeat - { - get => this._repeat; - set => this._repeat = value; - } - - public MajorMinor RepeatGap - { - get => this._repeatGapMajorMinor; - set => this._repeatGapMajorMinor = value; - } - - public MissingItemPolicy MissingItemPolicy - { - get => this._policyForMissingItems; - set => this._policyForMissingItems = value; - } - - public int MinimumSampleSize - { - get => this._minimumSampleSizeValue; - set => this._minimumSampleSizeValue = value; - } - - public ItemAlignment DefaultChildAlignment - { - get => this._defaultChildAlignment; - set => this._defaultChildAlignment = value; - } - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - if (!(layoutNode.MeasureData is FlowLayout.Packet packet)) - { - packet = new FlowLayout.Packet(); - layoutNode.MeasureData = packet; - } - else - packet.Clear(); - packet.Subject = layoutNode; - packet.Constraint = constraint; - packet.Available = new MajorMinor(constraint, this.Orientation); - packet.Cache = (FlowSizeMemoryLayoutInput)packet.Subject.GetLayoutInput(FlowSizeMemoryLayoutInput.Data); - packet.RepeatOrientation = this.Orientation; - if (this.AllowWrap) - packet.RepeatOrientation = this.Orientation == Orientation.Vertical ? Orientation.Horizontal : Orientation.Vertical; - this.DetermineCount(packet); - if (layoutNode.LayoutChildrenCount == 0) - { - if (packet.PotentialCount > 0) - layoutNode.RequestMoreChildren(1); - return Size.Zero; - } - this.CreateRecordsFromChildren(packet); - this.HandleMissingRecords(packet); - this.MeasureRecords(packet); - if (packet.DesiredSize.IsEmpty && packet.PotentialCount != layoutNode.LayoutChildrenCount) - layoutNode.RequestMoreChildren(1); - return packet.DesiredSize.ToSize(this.Orientation); - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - if (layoutNode.LayoutChildrenCount == 0) - return; - FlowLayout.Packet measureData = (FlowLayout.Packet)layoutNode.MeasureData; - measureData.Slot = slot; - Rectangle peripheralView = slot.PeripheralView; - Rectangle view = slot.View; - measureData.PeripheralStart = new MajorMinor(new Size(peripheralView.Location), measureData.RepeatOrientation); - measureData.PeripheralSize = new MajorMinor(peripheralView.Size, measureData.RepeatOrientation); - measureData.PeripheralEnd = measureData.PeripheralStart + measureData.PeripheralSize; - measureData.ViewStart = new MajorMinor(new Size(view.Location), measureData.RepeatOrientation); - measureData.ViewSize = new MajorMinor(view.Size, measureData.RepeatOrientation); - measureData.ViewEnd = measureData.ViewStart + measureData.ViewSize; - this.DetermineRepeatPolicy(measureData); - this.ArrangeChildren(measureData); - this.CalculateVisualIntersections(measureData); - this.RequestMissingChildren(measureData); - MajorMinor majorMinor = measureData.DesiredSize; - if (measureData.Repeat) - { - majorMinor = new MajorMinor(measureData.Available.Major, measureData.DesiredSize.Minor); - Rectangle rectangle = new Rectangle(new MajorMinor(-measureData.Available.Major / 2, 0).ToPoint(this._orientationFlow), majorMinor.ToSize(this._orientationFlow)); - layoutNode.AddAreaOfInterest(new AreaOfInterest(rectangle, AreaOfInterestID.ScrollableRange)); - } - layoutNode.SetVisibleIndexRange(measureData.BeginVisible, measureData.EndVisible, measureData.BeginVisibleOffscreen, measureData.EndVisibleOffscreen, measureData.FocusedItem); - } - - private void DetermineCount(FlowLayout.Packet packet) - { - int num = !(packet.Subject.GetLayoutInput(CountLayoutInput.Data) is CountLayoutInput layoutInput) ? packet.Subject.LayoutChildrenCount : layoutInput.Count; - packet.PotentialCount = num; - } - - private void InitializeRecordList(ref Vector recordList, int count) - { - if (recordList == null) - { - recordList = new Vector(count); - } - else - { - int count1 = recordList.Count - count; - if (count1 > 0) - recordList.RemoveRange(count, count1); - foreach (FlowLayout.Record record in recordList) - record?.Clear(); - } - for (int count1 = recordList.Count; count1 < count; ++count1) - recordList.Add(null); - } - - private void CreateRecordsFromChildren(FlowLayout.Packet packet) - { - this.InitializeRecordList(ref packet.Records, packet.PotentialCount); - Vector availableDataIndices = packet.AvailableDataIndices; - Vector availableVirtualIndices = packet.AvailableVirtualIndices; - bool flag = false; - int childIndex = 0; - foreach (ILayoutNode layoutChild in packet.Subject.LayoutChildren) - { - int virtualIndex; - int dataIndex; - IndexType type; - this.GetIndex(layoutChild, childIndex, packet.PotentialCount, out virtualIndex, out dataIndex, out int _, out type); - Vector vector = packet.Records; - if (type == IndexType.Content) - { - availableVirtualIndices.Add(virtualIndex); - } - else - { - if (!flag) - { - this.InitializeRecordList(ref packet.Dividers, packet.PotentialCount); - flag = true; - } - vector = packet.Dividers; - } - FlowLayout.Record record1 = vector[dataIndex]; - if (Record.IsNullOrEmpty(record1)) - { - FlowLayout.Record record2 = record1; - if (record2 == null) - vector[dataIndex] = record2 = new FlowLayout.Record(); - record2.Initialize(RecordSourceType.LayoutNode); - if (record2.Nodes == null) - record2.Nodes = new Vector(1); - record2.Nodes.Add(layoutChild); - record2.Index = dataIndex; - if (type == IndexType.Content) - { - availableDataIndices.Add(record2.Index); - } - else - { - layoutChild.Measure(packet.Constraint); - record2.Size = new MajorMinor(layoutChild.DesiredSize, this.Orientation); - record2.SizeValid = true; - } - } - else - record1.Nodes.Add(layoutChild); - ++childIndex; - } - if (packet.Cache == null) - { - packet.Cache = new FlowSizeMemoryLayoutInput(); - packet.Subject.SetLayoutInput(packet.Cache, false); - } - else - { - int index = 0; - foreach (Size knownSiz in packet.Cache.KnownSizes) - { - if (index >= packet.Records.Count) - break; - if (!knownSiz.IsEmpty) - { - MajorMinor majorMinor = new MajorMinor(knownSiz, this.Orientation); - if (!this.AllowWrap) - majorMinor = new MajorMinor(majorMinor.Major, 0); - FlowLayout.Record record = packet.Records[index]; - if (!Record.IsNullOrEmpty(record)) - { - record.CachedSize = majorMinor; - } - else - { - if (record == null) - packet.Records[index] = record = new FlowLayout.Record(); - record.Initialize(RecordSourceType.SizeCache); - record.Index = index; - record.CachedSize = majorMinor; - } - ++index; - } - } - } - } - - private void GetIndex( - ILayoutNode childNode, - int childIndex, - int itemsCount, - out int virtualIndex, - out int dataIndex, - out int generationValue, - out IndexType type) - { - IndexLayoutInput layoutInput = (IndexLayoutInput)childNode.GetLayoutInput(IndexLayoutInput.Data); - if (layoutInput != null) - { - virtualIndex = layoutInput.Index.Value; - ListUtility.GetWrappedIndex(virtualIndex, itemsCount, out dataIndex, out generationValue); - type = layoutInput.Type; - } - else - { - virtualIndex = childIndex; - dataIndex = childIndex; - generationValue = 0; - type = IndexType.Content; - } - } - - private void HandleMissingRecords(FlowLayout.Packet packet) - { - int count = packet.AvailableDataIndices.Count; - if (packet.PotentialCount - count == 0) - return; - MissingItemPolicy missingItemPolicy = this.MissingItemPolicy; - if (count < this._minimumSampleSizeValue) - missingItemPolicy = MissingItemPolicy.Wait; - MajorMinor a = this.MissingItemPolicy != MissingItemPolicy.SizeToSmallest ? MajorMinor.Zero : new MajorMinor(16777215, 16777215); - for (int index = 0; index < packet.Records.Count; ++index) - { - FlowLayout.Record record = packet.Records[index]; - if (!Record.IsNullOrEmpty(record)) - { - if (ListUtility.IsNullOrEmpty(record.Nodes)) - ++count; - switch (missingItemPolicy) - { - case MissingItemPolicy.SizeToAverage: - a += record.CachedSize; - continue; - case MissingItemPolicy.SizeToSmallest: - a = MajorMinor.Min(a, record.CachedSize); - continue; - case MissingItemPolicy.SizeToLargest: - a = MajorMinor.Max(a, record.CachedSize); - continue; - default: - continue; - } - } - } - if (packet.PotentialCount == count) - return; - if (missingItemPolicy == MissingItemPolicy.SizeToAverage) - { - a.Major = (int)Math.Round(a.Major / (double)count); - a.Minor = (int)Math.Round(a.Minor / (double)count); - } - for (int index = 0; index < packet.Records.Count; ++index) - { - FlowLayout.Record record = packet.Records[index]; - if (Record.IsNullOrEmpty(record)) - { - if (record == null) - packet.Records[index] = record = new FlowLayout.Record(); - record.Initialize(RecordSourceType.Fake); - record.Index = index; - record.CachedSize = a; - } - } - } - - private void MeasureRecords(FlowLayout.Packet packet) - { - MajorMinor offset = MajorMinor.Zero; - MajorMinor zero = MajorMinor.Zero; - int num1 = 0; - int num2 = 0; - MajorMinor stripSize = MajorMinor.Zero; - int lastLaidOutIndex = -1; - int count = packet.Records.Count; - for (int index = 0; index < packet.Records.Count; ++index) - { - FlowLayout.Record record = packet.Records[index]; - this.MeasureRecord(packet, record, offset); - MajorMinor majorMinor1 = offset + record.Size; - MajorMinor majorMinor2 = packet.Available - majorMinor1; - if (majorMinor2.Minor < 0) - { - record.SizeValid = false; - break; - } - if (majorMinor2.Major < 0) - { - if (this.AllowWrap) - { - if (num2 == 0) - { - record.SizeValid = false; - break; - } - this.FinalizeStrip(packet, stripSize, offset, ref zero); - ++num1; - num2 = 0; - stripSize = MajorMinor.Zero; - offset = new MajorMinor(0, zero.Minor + this.Spacing.Minor); - --index; - } - else - break; - } - else - { - record.Strip = num1; - record.Offset = offset; - FlowLayout.Record divider = this.GetDivider(packet, record); - if (divider != null) - { - if (num2 > 0) - { - MajorMinor majorMinor3 = offset; - majorMinor3.Major -= (this.Spacing.Major + divider.Size.Major) / 2; - divider.Offset = majorMinor3; - divider.Strip = num1; - } - else - divider.Size = MajorMinor.Zero; - } - ++num2; - stripSize = new MajorMinor(majorMinor1.Major, Math.Max(record.Size.Minor, stripSize.Minor)); - offset.Major = majorMinor1.Major + this.Spacing.Major; - lastLaidOutIndex = index; - } - } - if (num2 != 0) - { - this.HandleLastItem(packet, ref lastLaidOutIndex, ref offset, ref stripSize); - this.FinalizeStrip(packet, stripSize, offset, ref zero); - } - packet.LastLaidOutRecord = lastLaidOutIndex; - packet.StoppedAtRecord = count; - packet.DesiredSize = zero; - } - - private void MeasureRecord( - FlowLayout.Packet packet, - FlowLayout.Record record, - MajorMinor offset) - { - if (record.SizeValid) - return; - Size childConstraint = this.GetChildConstraint(packet, offset); - record.Size = MajorMinor.Zero; - if (record.Nodes != null && record.Nodes.Count > 0) - { - for (int index = 0; index < record.Nodes.Count; ++index) - { - ILayoutNode node = record.Nodes[index]; - this.GetIndex(node, 0, packet.PotentialCount, out int _, out int _, out int _, out IndexType _); - node.Measure(childConstraint); - MajorMinor a = new MajorMinor(node.DesiredSize, this.Orientation); - record.Size = index <= 0 || a.Equals(record.Size) ? a : MajorMinor.Max(a, record.Size); - } - packet.Cache.KnownSizes.ExpandTo(record.Index + 1); - packet.Cache.KnownSizes[record.Index] = record.Size.ToSize(this.Orientation); - } - else - record.Size = record.CachedSize; - record.SizeValid = true; - } - - private Size GetChildConstraint(FlowLayout.Packet packet, MajorMinor offset) - { - Size constraint = packet.Constraint; - return this.AllowWrap ? constraint : (packet.Available - offset).ToSize(this.Orientation); - } - - private void FinalizeStrip( - FlowLayout.Packet packet, - MajorMinor stripSize, - MajorMinor offset, - ref MajorMinor desiredSize) - { - packet.StripSizes.Add(stripSize); - desiredSize = new MajorMinor(Math.Max(desiredSize.Major, stripSize.Major), offset.Minor + stripSize.Minor); - } - - private FlowLayout.Record GetDivider( - FlowLayout.Packet packet, - FlowLayout.Record record) - { - return packet.Dividers == null ? null : packet.Dividers[record.Index]; - } - - private void HandleLastItem( - FlowLayout.Packet packet, - ref int lastLaidOutIndex, - ref MajorMinor offset, - ref MajorMinor stripSize) - { - int index = lastLaidOutIndex + 1; - if (index == packet.Records.Count) - return; - FlowLayout.Record record = packet.Records[index]; - if (ListUtility.IsNullOrEmpty(record.Nodes)) - return; - Size size = (packet.Available - offset).ToSize(this.Orientation); - foreach (ILayoutNode node in record.Nodes) - node.Measure(size); - Size desiredSize = record.Nodes[0].DesiredSize; - if (desiredSize.Width > size.Width || desiredSize.Height > size.Height) - return; - record.Size = new MajorMinor(desiredSize, this.Orientation); - record.SizeValid = true; - int major = offset.Major + record.Size.Major; - offset = new MajorMinor(major + this.Spacing.Major, offset.Minor); - lastLaidOutIndex = index; - stripSize = new MajorMinor(major, Math.Max(record.Size.Minor, stripSize.Minor)); - } - - private void DetermineRepeatPolicy(FlowLayout.Packet packet) - { - MajorMinor majorMinor = new MajorMinor(packet.Slot.View.Size, this.Orientation); - bool flag1 = packet.DesiredSize.Major <= majorMinor.Major; - bool flag2; - switch (this.Repeat) - { - case RepeatPolicy.WhenTooBig: - flag2 = !flag1; - break; - case RepeatPolicy.WhenTooSmall: - flag2 = flag1; - break; - case RepeatPolicy.Always: - flag2 = true; - break; - default: - flag2 = false; - break; - } - packet.Repeat = flag2; - } - - private void CalculateVisualIntersections(FlowLayout.Packet packet) - { - if (packet.DesiredSize.IsEmpty) - { - packet.BeginVisible = packet.BeginVisibleOffscreen = 0; - packet.EndVisible = packet.EndVisibleOffscreen = packet.LastLaidOutRecord + 1; - } - else - { - int major1 = packet.PeripheralStart.Major; - int major2 = packet.ViewStart.Major; - int major3 = packet.ViewEnd.Major; - int major4 = packet.PeripheralEnd.Major; - packet.BeginVisibleOffscreen = this.IndexFromPosition(packet, major1, false) - 1; - packet.BeginVisible = packet.BeginVisibleOffscreen; - if (major2 != major1) - packet.BeginVisible = this.IndexFromPosition(packet, major2, false) - 1; - packet.EndVisible = this.IndexFromPosition(packet, major3, false); - packet.EndVisibleOffscreen = packet.EndVisible; - if (major4 == major3) - return; - packet.EndVisibleOffscreen = this.IndexFromPosition(packet, major4, false); - } - } - - private int GetRepeatMajor(FlowLayout.Packet packet, MajorMinor majorMinor) => this.Orientation != packet.RepeatOrientation ? majorMinor.Minor : majorMinor.Major; - - private int IndexFromPosition(FlowLayout.Packet packet, int position, bool exactMatch) - { - int dataIndex1 = position; - int generationValue = 0; - if (packet.PotentialCount == packet.LastLaidOutRecord + 1) - { - int itemsCount = this.GetRepeatMajor(packet, packet.DesiredSize) + this.GetRepeatMajor(packet, this.RepeatGap); - ListUtility.GetWrappedIndex(position, itemsCount, out dataIndex1, out generationValue); - } - int dataIndex2 = packet.PotentialCount; - for (int index = 0; index < packet.Records.Count; ++index) - { - FlowLayout.Record record = packet.Records[index]; - if (exactMatch && this.GetRepeatMajor(packet, record.Offset) <= dataIndex1 && this.GetRepeatMajor(packet, record.Offset) + this.GetRepeatMajor(packet, record.Size) >= dataIndex1) - { - dataIndex2 = record.Index; - break; - } - if (index == packet.StoppedAtRecord) - { - dataIndex2 = packet.PotentialCount; - break; - } - if (this.GetRepeatMajor(packet, record.Offset) >= dataIndex1 || index > packet.LastLaidOutRecord) - { - dataIndex2 = record.Index; - break; - } - } - int num = dataIndex2; - if (packet.PotentialCount == packet.LastLaidOutRecord + 1) - num = ListUtility.GetUnwrappedIndex(dataIndex2, generationValue, packet.PotentialCount); - return num; - } - - private void FilterIntersectionPoints(FlowLayout.Packet packet) - { - int num1 = packet.BeginVisibleOffscreen; - int num2 = packet.EndVisibleOffscreen; - if (!packet.Repeat) - { - num1 = 0; - num2 = packet.PotentialCount; - } - if (packet.LastLaidOutRecord < packet.PotentialCount - 1) - { - num1 = Math.Max(Math.Min(num1, packet.LastLaidOutRecord), 0); - num2 = Math.Max(Math.Min(num2, packet.LastLaidOutRecord + 2), num1 + 1); - } - if (num1 == packet.BeginVisibleOffscreen && num2 == packet.EndVisibleOffscreen) - return; - packet.BeginVisibleOffscreen = Math2.Clamp(packet.BeginVisibleOffscreen, num1, num2); - packet.BeginVisible = Math2.Clamp(packet.BeginVisible, num1, num2); - packet.BeginVisible = Math.Max(packet.BeginVisible, packet.BeginVisibleOffscreen); - packet.EndVisible = Math.Max(packet.EndVisible, packet.BeginVisible + 1); - packet.EndVisible = Math2.Clamp(packet.EndVisible, num1, num2); - packet.EndVisibleOffscreen = Math2.Clamp(packet.EndVisibleOffscreen, num1, num2); - packet.EndVisibleOffscreen = Math.Max(packet.EndVisibleOffscreen, packet.EndVisible); - } - - private void RequestMissingChildren(FlowLayout.Packet packet) - { - this.FilterIntersectionPoints(packet); - int visibleOffscreen = packet.BeginVisibleOffscreen; - int num1 = packet.EndVisibleOffscreen - 1; - int num2 = -1; - if (packet.AvailableDataIndices.Count < this._minimumSampleSizeValue) - num2 = this._minimumSampleSizeValue; - Vector indiciesList = null; - for (int index = visibleOffscreen; index <= num1; ++index) - { - if (!IntListUtility.Contains(packet.AvailableVirtualIndices, index)) - { - if (indiciesList == null) - indiciesList = packet.Subject.GetSpecificChildrenRequestList(); - indiciesList.Add(index); - if (num2 > 0 && indiciesList.Count >= num2) - break; - } - } - if (ListUtility.IsNullOrEmpty(indiciesList)) - return; - packet.Subject.RequestSpecificChildren(indiciesList); - } - - private void ArrangeChildren(FlowLayout.Packet packet) - { - MajorMinor majorMinor1 = MajorMinor.Zero; - int strip = -1; - int childIndex = 0; - foreach (ILayoutNode layoutChild in packet.Subject.LayoutChildren) - { - int virtualIndex; - int dataIndex; - int generationValue; - IndexType type; - this.GetIndex(layoutChild, childIndex, packet.PotentialCount, out virtualIndex, out dataIndex, out generationValue, out type); - FlowLayout.Record record = type != IndexType.Content ? packet.Dividers[dataIndex] : packet.Records[dataIndex]; - if (!record.SizeValid) - { - layoutChild.MarkHidden(); - } - else - { - if (type == IndexType.Content && strip != record.Strip) - { - strip = record.Strip; - majorMinor1 = this.GetStripOffset(packet, strip); - } - MajorMinor majorMinor2 = this.PositionFromIndex(packet, record.Offset, generationValue); - majorMinor2.Major += majorMinor1.Major; - Size size = new MajorMinor(new MajorMinor(layoutChild.DesiredSize, this.Orientation).Major, majorMinor1.Minor).ToSize(this.Orientation); - Rectangle bounds = new Rectangle(majorMinor2.ToPoint(this.Orientation), size); - layoutChild.Arrange(packet.Slot, bounds); - if (layoutChild.ContainsAreaOfInterest(AreaOfInterestID.Focus)) - packet.FocusedItem = new int?(virtualIndex); - ++childIndex; - } - } - } - - private MajorMinor GetStripOffset(FlowLayout.Packet packet, int strip) - { - MajorMinor zero = MajorMinor.Zero; - if (strip >= 0 && strip < packet.StripSizes.Count) - { - MajorMinor stripSiz = packet.StripSizes[strip]; - MajorMinor majorMinor1 = new MajorMinor(packet.Slot.Bounds, this.Orientation); - switch (this.StripAlignment) - { - case StripAlignment.Center: - zero.Major = (majorMinor1.Major - stripSiz.Major) / 2; - break; - case StripAlignment.Far: - zero.Major = majorMinor1.Major - stripSiz.Major; - break; - } - if (!this.AllowWrap) - { - MajorMinor majorMinor2 = new MajorMinor(packet.Slot.Bounds, this.Orientation); - zero.Minor = majorMinor2.Minor; - } - else - zero.Minor = stripSiz.Minor; - } - return zero; - } - - private MajorMinor PositionFromIndex( - FlowLayout.Packet packet, - MajorMinor recordoffset, - int generationValue) - { - if (generationValue == 0) - return recordoffset; - MajorMinor majorMinor = recordoffset; - if (this.Orientation == packet.RepeatOrientation) - majorMinor.Major = ListUtility.GetUnwrappedIndex(majorMinor.Major, generationValue, packet.DesiredSize.Major + this.RepeatGap.Major); - else - majorMinor.Minor = ListUtility.GetUnwrappedIndex(majorMinor.Minor, generationValue, packet.DesiredSize.Minor + this.RepeatGap.Minor); - return majorMinor; - } - - public class Record - { - public int Index; - public Vector Nodes; - public MajorMinor Size; - public bool SizeValid; - public MajorMinor CachedSize; - public MajorMinor Offset; - public int Strip; - - public static bool IsNullOrEmpty(FlowLayout.Record record) => record == null || record.Index == int.MinValue; - - public void Clear() => this.Initialize(RecordSourceType.Unspecified); - - public void Initialize(FlowLayout.RecordSourceType source) - { - this.Index = int.MinValue; - if (this.Nodes != null) - this.Nodes.Clear(); - this.Size = MajorMinor.Zero; - this.SizeValid = false; - this.CachedSize = MajorMinor.Zero; - this.Offset = MajorMinor.Zero; - this.Strip = 0; - } - - public override string ToString() => InvariantString.Format("Record[{0}] Size:{1}", Index, Size); - } - - public enum RecordSourceType - { - Unspecified, - LayoutNode, - SizeCache, - Fake, - } - - private class Packet - { - public ILayoutNode Subject; - public Size Constraint; - public LayoutSlot Slot; - public MajorMinor Available; - public FlowSizeMemoryLayoutInput Cache; - public Orientation RepeatOrientation; - public MajorMinor PeripheralStart; - public MajorMinor PeripheralSize; - public MajorMinor PeripheralEnd; - public MajorMinor ViewStart; - public MajorMinor ViewSize; - public MajorMinor ViewEnd; - public Vector Records; - public Vector Dividers; - public int PotentialCount; - public Vector AvailableVirtualIndices = new Vector(); - public Vector AvailableDataIndices = new Vector(); - public MajorMinor DesiredSize; - public Vector StripSizes = new Vector(); - public int LastLaidOutRecord; - public int StoppedAtRecord; - public bool Repeat; - public int BeginVisibleOffscreen; - public int BeginVisible; - public int EndVisible; - public int EndVisibleOffscreen; - public int? FocusedItem; - - public void Clear() - { - this.PeripheralStart = MajorMinor.Zero; - this.PeripheralSize = MajorMinor.Zero; - this.PeripheralEnd = MajorMinor.Zero; - this.ViewStart = MajorMinor.Zero; - this.ViewSize = MajorMinor.Zero; - this.ViewEnd = MajorMinor.Zero; - this.PotentialCount = 0; - this.AvailableVirtualIndices.Clear(); - this.AvailableDataIndices.Clear(); - this.DesiredSize = MajorMinor.Zero; - this.StripSizes.Clear(); - this.LastLaidOutRecord = 0; - this.StoppedAtRecord = 0; - this.Repeat = false; - this.BeginVisibleOffscreen = 0; - this.BeginVisible = 0; - this.EndVisible = 0; - this.EndVisibleOffscreen = 0; - this.FocusedItem = new int?(); - } - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs deleted file mode 100644 index 53a737b..0000000 --- a/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.FlowSizeMemoryLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System.Text; - -namespace Microsoft.Iris.Layouts -{ - public class FlowSizeMemoryLayoutInput : ILayoutInput - { - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - private Vector _cache; - - public FlowSizeMemoryLayoutInput() => this._cache = new Vector(); - - public Vector KnownSizes - { - get => this._cache; - set => this._cache = value; - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => s_dataProperty; - - public override string ToString() - { - StringBuilder stringBuilder = new StringBuilder(); - bool flag = true; - int num = 0; - foreach (Size size in this._cache) - { - if (!flag) - stringBuilder.Append(", "); - flag = false; - stringBuilder.Append("["); - stringBuilder.Append(num); - stringBuilder.Append("]="); - stringBuilder.Append(size); - ++num; - } - return InvariantString.Format("{0}({1})", this.GetType().Name, stringBuilder); - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/FormLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/FormLayoutInput.cs deleted file mode 100644 index e39d5cf..0000000 --- a/UIX/Microsoft/Iris/Layouts/FormLayoutInput.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.FormLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public class FormLayoutInput : AnchorLayoutInput - { - } -} diff --git a/UIX/Microsoft/Iris/Layouts/GridLayout.cs b/UIX/Microsoft/Iris/Layouts/GridLayout.cs deleted file mode 100644 index 90fac20..0000000 --- a/UIX/Microsoft/Iris/Layouts/GridLayout.cs +++ /dev/null @@ -1,650 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.GridLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class GridLayout : ILayout - { - private Orientation _orientation; - private bool _allowWrap; - private Size _referenceSize; - private Size _spacing; - private int _rows; - private int _columns; - private RepeatPolicy _repeat; - private int _repeatGap; - private ItemAlignment _defaultChildAlignment; - - public GridLayout() - : this(Orientation.Horizontal) - { - } - - public GridLayout(Orientation o) => this._orientation = o; - - public Orientation Orientation - { - get => this._orientation; - set - { - if (this._orientation == value) - return; - this._orientation = value; - } - } - - public bool AllowWrap - { - get => this._allowWrap; - set - { - if (this._allowWrap == value) - return; - this._allowWrap = value; - } - } - - public Size ReferenceSize - { - get => this._referenceSize; - set - { - if (!(this._referenceSize != value)) - return; - this._referenceSize = value; - } - } - - public int Rows - { - get => this._rows; - set - { - if (this._rows == value) - return; - this._rows = value; - } - } - - public int Columns - { - get => this._columns; - set - { - if (this._columns == value) - return; - this._columns = value; - } - } - - public Size Spacing - { - get => this._spacing; - set - { - if (!(this._spacing != value)) - return; - this._spacing = value; - } - } - - public RepeatPolicy Repeat - { - get => this._repeat; - set - { - if (this._repeat == value) - return; - this._repeat = value; - } - } - - public int RepeatGap - { - get => this._repeatGap; - set - { - if (this._repeatGap == value) - return; - this._repeatGap = value; - } - } - - public ItemAlignment DefaultChildAlignment - { - get => this._defaultChildAlignment; - set => this._defaultChildAlignment = value; - } - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - GridLayout.GeneralFlowInfo generalFlowInfo = this.CalculateGeneralFlowInfo(layoutNode, constraint); - layoutNode.MeasureData = generalFlowInfo; - if (generalFlowInfo.itemsCount <= 0 || !generalFlowInfo.referenceExtent.IsEmpty) - return generalFlowInfo.usedSize.ToSize(this.Orientation); - layoutNode.RequestMoreChildren(1); - return Size.Zero; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - GridLayout.GeneralFlowInfo measureData = (GridLayout.GeneralFlowInfo)layoutNode.MeasureData; - measureData.slot = slot; - MajorMinor majorMinor1 = new MajorMinor(slot.View.Size, this.Orientation); - MajorMinor majorMinor2 = new MajorMinor(slot.PeripheralView.Size, this.Orientation); - MajorMinor majorMinor3 = new MajorMinor(slot.View.Location.ToSize(), this.Orientation); - bool flag1 = measureData.availableSpace.Major != majorMinor2.Major || majorMinor3.Major != 0; - bool flag2 = measureData.availableSpace.Minor != majorMinor2.Minor || majorMinor3.Minor != 0; - MajorMinor majorMinor4 = majorMinor2 + measureData.spacing; - MajorMinor majorMinor5 = majorMinor1 + measureData.spacing; - bool roundUp1 = flag1; - bool roundUp2 = flag2; - MajorMinor a = MajorMinor.Zero; - a.Major = DivideIntegers(majorMinor5.Major, measureData.referenceWithSpacing.Major, roundUp1); - a.Minor = DivideIntegers(majorMinor5.Minor, measureData.referenceWithSpacing.Minor, roundUp2); - a.Minor = Math.Min(a.Minor, measureData.fitItems.Minor); - bool flag3 = !measureData.wrapping ? measureData.totalItems.Major <= a.Major : measureData.totalItems.Minor <= a.Minor; - bool flag4; - switch (this._repeat) - { - case RepeatPolicy.WhenTooBig: - flag4 = !flag3; - break; - case RepeatPolicy.WhenTooSmall: - flag4 = flag3; - break; - case RepeatPolicy.Always: - flag4 = true; - break; - default: - flag4 = false; - break; - } - if (!flag4) - a = MajorMinor.Min(a, measureData.totalItems); - else - measureData.wrapping |= this.AllowWrap; - measureData.repeating = flag4; - measureData.allowPartialItemsMajor = roundUp1; - measureData.allowPartialItemsMinor = roundUp2; - measureData.viewSize = majorMinor2; - if (measureData.itemsCount > 0) - { - GridLayout.IndexRangeInfo indicesInfo; - Vector indicesToDisplayList; - this.ArrangeChildren(layoutNode, measureData, out indicesInfo, out indicesToDisplayList); - if (indicesToDisplayList != null) - layoutNode.RequestSpecificChildren(indicesToDisplayList); - layoutNode.SetVisibleIndexRange(indicesInfo.realBeginIndex, indicesInfo.realEndIndex, indicesInfo.beginIndex, indicesInfo.endIndex, measureData.focusedItemIndex); - } - MajorMinor usedSize = measureData.usedSize; - if (!measureData.repeating) - return; - MajorMinor zero = MajorMinor.Zero; - if (measureData.wrapping) - zero.Minor = -usedSize.Minor / 2; - else - zero.Major = -usedSize.Major / 2; - Rectangle rectangle = new Rectangle(zero.ToPoint(this.Orientation), usedSize.ToSize(this.Orientation)); - layoutNode.AddAreaOfInterest(new AreaOfInterest(rectangle, AreaOfInterestID.ScrollableRange)); - } - - private int GetItemCount(ILayoutNode layoutNode) - { - int num = -1; - if (layoutNode.GetLayoutInput(CountLayoutInput.Data) is CountLayoutInput layoutInput) - num = layoutInput.Count; - if (num == -1) - num = layoutNode.LayoutChildrenCount; - return num; - } - - private Size GetReferenceSize(ILayoutNode layoutNode, Size constraint) - { - Size referenceSize = this.ReferenceSize; - if (referenceSize.Width == 0.0 && this.Columns != 0) - { - int num = (constraint.Width - this.Spacing.Width * (this.Columns - 1)) / this.Columns; - if (num <= 0) - return Size.Zero; - referenceSize.Width = num; - constraint.Width = num; - } - if (referenceSize.Height == 0.0 && this.Rows != 0) - { - int num = (constraint.Height - this.Spacing.Height * (this.Rows - 1)) / this.Rows; - if (num <= 0) - return Size.Zero; - referenceSize.Height = num; - constraint.Height = num; - } - if (referenceSize.IsEmpty && layoutNode.LayoutChildrenCount > 0) - { - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - layoutChild.Measure(constraint); - if (referenceSize.Width == 0) - referenceSize.Width = layoutChild.DesiredSize.Width; - if (referenceSize.Height == 0) - referenceSize.Height = layoutChild.DesiredSize.Height; - if (!referenceSize.IsEmpty) - break; - } - } - return referenceSize; - } - - private GridLayout.GeneralFlowInfo CalculateGeneralFlowInfo( - ILayoutNode layoutNode, - Size constraint) - { - int itemCount = this.GetItemCount(layoutNode); - Size size1 = this.GetReferenceSize(layoutNode, constraint); - GridLayout.GeneralFlowInfo generalFlowInfo = new GridLayout.GeneralFlowInfo(itemCount, size1, constraint); - if (itemCount == 0 || size1.IsEmpty) - return generalFlowInfo; - if (size1.Width > constraint.Width || size1.Height > constraint.Height) - { - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - layoutChild.MarkHidden(); - generalFlowInfo.referenceExtent = Size.Zero; - return generalFlowInfo; - } - bool flag = this.AllowWrap; - if (this.Orientation == Orientation.Vertical && this.Columns > 1) - flag = true; - else if (this.Orientation == Orientation.Horizontal && this.Rows > 1) - flag = true; - MajorMinor majorMinor1 = new MajorMinor(size1, this.Orientation); - MajorMinor a = new MajorMinor(0, majorMinor1.Minor); - if (!flag && new MajorMinor(this.ReferenceSize, this.Orientation).Minor == 0) - { - majorMinor1.Minor = new MajorMinor(constraint, this.Orientation).Minor; - size1 = majorMinor1.ToSize(this.Orientation); - } - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - Size size2 = layoutChild.Measure(size1); - a = MajorMinor.Max(a, new MajorMinor(size2, this.Orientation)); - } - if (!flag) - { - majorMinor1.Minor = a.Minor; - size1 = majorMinor1.ToSize(this.Orientation); - } - MajorMinor majorMinor2 = new MajorMinor(size1, this.Orientation); - MajorMinor majorMinor3 = new MajorMinor(this.Spacing, this.Orientation); - MajorMinor majorMinor4 = majorMinor2 + majorMinor3; - MajorMinor majorMinor5 = new MajorMinor(constraint, this.Orientation); - MajorMinor majorMinor6 = majorMinor5 + majorMinor3; - MajorMinor zero1 = MajorMinor.Zero; - zero1.Major = DivideIntegers(majorMinor6.Major, majorMinor4.Major, false); - zero1.Minor = DivideIntegers(majorMinor6.Minor, majorMinor4.Minor, false); - if (zero1.Major >= itemCount) - flag = false; - MajorMinor zero2 = MajorMinor.Zero; - zero2.Major = Math.Min(itemCount, zero1.Major); - zero2.Minor = 1; - if (flag && zero2.Major > 0) - { - zero2.Minor = DivideIntegers(itemCount, zero2.Major, true); - zero2.Minor = Math.Min(zero2.Minor, zero1.Minor); - } - MajorMinor majorMinor7 = majorMinor4 * zero2 - majorMinor3; - MajorMinor majorMinor8 = new MajorMinor(this.RepeatGap, 0); - if (flag) - majorMinor8 = majorMinor8.Swap(); - MajorMinor majorMinor9 = majorMinor7 + majorMinor8; - MajorMinor majorMinor10 = majorMinor7; - if (this.Repeat == RepeatPolicy.WhenTooSmall || this.Repeat == RepeatPolicy.Always) - { - if (flag) - majorMinor10.Minor = majorMinor5.Minor; - else - majorMinor10.Major = majorMinor5.Major; - } - generalFlowInfo.wrapping = flag; - generalFlowInfo.reference = majorMinor2; - generalFlowInfo.spacing = majorMinor3; - generalFlowInfo.referenceWithSpacing = majorMinor4; - generalFlowInfo.availableSpace = majorMinor5; - generalFlowInfo.fitItems = zero1; - generalFlowInfo.totalItems = zero2; - generalFlowInfo.repeatInstanceSize = majorMinor9; - generalFlowInfo.usedSize = majorMinor10; - return generalFlowInfo; - } - - private void ArrangeChildren( - ILayoutNode layoutNode, - GridLayout.GeneralFlowInfo generalInfo, - out GridLayout.IndexRangeInfo indicesInfo, - out Vector indicesToDisplayList) - { - indicesInfo = this.GetIndexRange(layoutNode, generalInfo); - indicesToDisplayList = null; - if (indicesInfo.nonEmptyRange) - { - indicesToDisplayList = layoutNode.GetSpecificChildrenRequestList(); - for (int beginIndex = indicesInfo.beginIndex; beginIndex <= indicesInfo.endIndex; ++beginIndex) - indicesToDisplayList.Add(beginIndex); - } - if (layoutNode.LayoutChildrenCount == 0) - return; - Size referenceExtent = generalInfo.referenceExtent; - if (!generalInfo.wrapping) - { - if (this.Orientation == Orientation.Horizontal) - referenceExtent.Height = generalInfo.slot.Bounds.Height; - else - referenceExtent.Width = generalInfo.slot.Bounds.Width; - } - Rectangle rectangle1 = new Rectangle(Point.Zero, generalInfo.slot.Bounds); - int num = 0; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - int idx = num; - if (layoutChild.GetLayoutInput(IndexLayoutInput.Data) is IndexLayoutInput layoutInput) - { - idx = layoutInput.Index.Value; - int type = (int)layoutInput.Type; - } - Point offset = this.PositionFromIndex(layoutNode, idx, generalInfo, out MajorMinor _); - if (indicesToDisplayList != null) - indicesToDisplayList.Remove(idx); - Rectangle rectangle2 = new Rectangle(offset, referenceExtent); - if (generalInfo.repeating || rectangle1.Contains(rectangle2)) - { - layoutChild.Arrange(generalInfo.slot, rectangle2); - if (layoutChild.ContainsAreaOfInterest(AreaOfInterestID.Focus)) - generalInfo.focusedItemIndex = new int?(idx); - } - else - layoutChild.MarkHidden(); - ++num; - } - } - - private GridLayout.IndexRangeInfo GetIndexRange( - ILayoutNode layoutNode, - GridLayout.GeneralFlowInfo generalInfo) - { - if (generalInfo.totalItems.IsEmpty) - return new GridLayout.IndexRangeInfo(); - MajorMinor position1 = new MajorMinor(generalInfo.slot.PeripheralView.Location.ToSize(), this.Orientation); - MajorMinor position2 = new MajorMinor(generalInfo.slot.View.Location.ToSize(), this.Orientation); - MajorMinor majorMinor1 = new MajorMinor(generalInfo.slot.PeripheralView.Size, this.Orientation); - MajorMinor majorMinor2 = new MajorMinor(generalInfo.slot.View.Size, this.Orientation); - MajorMinor position3 = position1 + majorMinor1; - MajorMinor position4 = position2 + majorMinor2; - bool flag1 = true; - bool flag2 = true; - int index1; - bool flag3 = flag1 & this.GetViewIntersectionFromPosition(layoutNode, position1, generalInfo, ViewIntersectionType.BeginOffscreen, out index1); - int index2; - bool flag4 = flag2 & this.GetViewIntersectionFromPosition(layoutNode, position2, generalInfo, ViewIntersectionType.BeginOnscreen, out index2); - int index3; - bool flag5 = flag3 & this.GetViewIntersectionFromPosition(layoutNode, position3, generalInfo, ViewIntersectionType.EndOnscreen, out index3); - int index4; - bool flag6 = flag4 & this.GetViewIntersectionFromPosition(layoutNode, position4, generalInfo, ViewIntersectionType.EndOffscreen, out index4); - return !flag5 ? new GridLayout.IndexRangeInfo() : new GridLayout.IndexRangeInfo(index1, index3, index2, index4, generalInfo); - } - - private Point PositionFromIndex( - ILayoutNode layoutNode, - int idx, - GridLayout.GeneralFlowInfo generalInfo, - out MajorMinor index) - { - int dataIndex; - int generationValue; - ListUtility.GetWrappedIndex(idx, generalInfo.itemsCount, out dataIndex, out generationValue); - index = this.PositionFromIndex(dataIndex, generalInfo.totalItems); - MajorMinor majorMinor1 = index * generalInfo.referenceWithSpacing; - MajorMinor majorMinor2 = generalInfo.repeatInstanceSize * new MajorMinor(generationValue, generationValue); - if (generalInfo.wrapping) - majorMinor2.Major = 0; - else - majorMinor2.Minor = 0; - return (majorMinor1 + majorMinor2).ToPoint(this.Orientation); - } - - private MajorMinor PositionFromIndex(int idx, MajorMinor totalItems) - { - if (totalItems.IsEmpty) - return MajorMinor.Zero; - MajorMinor zero = MajorMinor.Zero; - zero.Minor = idx / totalItems.Major; - zero.Major = idx - zero.Minor * totalItems.Major; - return zero; - } - - private bool GetViewIntersectionFromPosition( - ILayoutNode layoutNode, - MajorMinor position, - GridLayout.GeneralFlowInfo generalInfo, - GridLayout.ViewIntersectionType intersectionType, - out int index) - { - MajorMinor repeatInstanceSize = generalInfo.repeatInstanceSize; - MajorMinor majorMinor1 = position; - index = 0; - bool biasUp = false; - bool flag1 = false; - switch (intersectionType) - { - case ViewIntersectionType.BeginOffscreen: - case ViewIntersectionType.BeginOnscreen: - if (!generalInfo.repeating) - flag1 = position.Major >= repeatInstanceSize.Major || position.Minor >= repeatInstanceSize.Minor; - if (generalInfo.wrapping) - position.Major = 0; - biasUp = true; - break; - case ViewIntersectionType.EndOnscreen: - case ViewIntersectionType.EndOffscreen: - if (!generalInfo.repeating) - flag1 = position.Major <= 0 || position.Minor <= 0; - if (generalInfo.wrapping) - position.Major = repeatInstanceSize.Major - 1; - biasUp = false; - break; - } - if (!flag1) - { - if (!generalInfo.repeating) - position = !biasUp ? MajorMinor.Min(position, repeatInstanceSize - new MajorMinor(1, 1)) : MajorMinor.Max(position, MajorMinor.Zero); - bool flag2 = position.Major != majorMinor1.Major; - bool flag3 = position.Minor != majorMinor1.Minor; - int dataIndex1; - int generationValue1; - ListUtility.GetWrappedIndex(position.Major, repeatInstanceSize.Major, out dataIndex1, out generationValue1); - int dataIndex2; - int generationValue2; - ListUtility.GetWrappedIndex(position.Minor, repeatInstanceSize.Minor, out dataIndex2, out generationValue2); - int generation = generationValue1; - if (generalInfo.wrapping) - generation = generationValue2; - MajorMinor majorMinor2 = new MajorMinor(dataIndex1, dataIndex2); - MajorMinor zero = MajorMinor.Zero; - int result1; - zero.Major = Math.DivRem(majorMinor2.Major, generalInfo.referenceWithSpacing.Major, out result1); - int result2; - zero.Minor = Math.DivRem(majorMinor2.Minor, generalInfo.referenceWithSpacing.Minor, out result2); - if (generalInfo.wrapping) - { - if (!flag3) - zero.Minor = this.ApplyEdgeBias(biasUp, result2, generalInfo.reference.Minor, generalInfo.allowPartialItemsMinor, zero.Minor); - int max = generalInfo.totalItems.Major - 1; - bool flag4 = zero.Minor == generalInfo.totalItems.Minor - 1; - bool flag5 = generalInfo.totalItems.Minor * generalInfo.totalItems.Major > generalInfo.itemsCount; - if (flag4 && flag5) - { - int num = generalInfo.itemsCount % generalInfo.totalItems.Major; - if (num != 0) - max = num - 1; - } - zero.Major = Math2.Clamp(zero.Major, 0, max); - } - else - { - zero.Minor = 0; - if (!flag2) - zero.Major = this.ApplyEdgeBias(biasUp, result1, generalInfo.reference.Major, generalInfo.allowPartialItemsMajor, zero.Major); - } - index = this.IndexFromGridPosition(zero, generation, generalInfo, out int _); - } - return !flag1; - } - - private int ApplyEdgeBias( - bool biasUp, - int remainder, - int reference, - bool allowPartialItems, - int currentGridPosition) - { - if (biasUp && (remainder >= reference || remainder != 0 && !allowPartialItems)) - ++currentGridPosition; - else if (!biasUp && (remainder == 0 || remainder < reference && !allowPartialItems)) - --currentGridPosition; - return currentGridPosition; - } - - private int IndexFromGridPosition( - MajorMinor gridPosition, - int generation, - GridLayout.GeneralFlowInfo generalInfo, - out int normalizedIndex) - { - normalizedIndex = gridPosition.Minor * generalInfo.totalItems.Major + gridPosition.Major; - int num = generalInfo.itemsCount * generation; - return normalizedIndex + num; - } - - private static int DivideIntegers(int a, int b, bool roundUp) - { - double num = a / (double)b; - return roundUp ? (int)Math.Ceiling(num) : (int)Math.Floor(num); - } - - private enum ViewIntersectionType - { - BeginOffscreen, - BeginOnscreen, - EndOnscreen, - EndOffscreen, - } - - private class GeneralFlowInfo - { - public Size constraint; - public LayoutSlot slot; - public int itemsCount; - public Size referenceExtent; - public bool repeating; - public bool wrapping; - public bool allowPartialItemsMajor; - public bool allowPartialItemsMinor; - public int? focusedItemIndex; - public MajorMinor reference; - public MajorMinor spacing; - public MajorMinor referenceWithSpacing; - public MajorMinor availableSpace; - public MajorMinor viewSize; - public MajorMinor fitItems; - public MajorMinor totalItems; - public MajorMinor repeatInstanceSize; - public MajorMinor usedSize; - - public GeneralFlowInfo(int itemsCount, Size referenceExtent, Size constraint) - { - this.itemsCount = itemsCount; - this.referenceExtent = referenceExtent; - this.constraint = constraint; - this.repeating = false; - this.reference = MajorMinor.Zero; - this.spacing = MajorMinor.Zero; - this.referenceWithSpacing = MajorMinor.Zero; - this.availableSpace = MajorMinor.Zero; - this.viewSize = MajorMinor.Zero; - this.totalItems = MajorMinor.Zero; - this.repeatInstanceSize = MajorMinor.Zero; - this.usedSize = MajorMinor.Zero; - this.wrapping = false; - this.allowPartialItemsMajor = false; - this.allowPartialItemsMinor = false; - this.focusedItemIndex = new int?(); - } - } - - private struct IndexRangeInfo - { - private int _beginIndex; - private int _endIndex; - private int _realBeginIndex; - private int _realEndIndex; - private bool _isValid; - - public IndexRangeInfo( - int beginIndex, - int endIndex, - int realBeginIndex, - int realEndIndex, - GridLayout.GeneralFlowInfo generalInfo) - { - if (!generalInfo.repeating) - { - NormalizeRange(beginIndex, endIndex, generalInfo.itemsCount, out beginIndex, out endIndex); - NormalizeRange(realBeginIndex, realEndIndex, generalInfo.itemsCount, out realBeginIndex, out realEndIndex); - } - this._beginIndex = beginIndex; - this._endIndex = endIndex; - this._realBeginIndex = realBeginIndex; - this._realEndIndex = realEndIndex; - this._isValid = true; - } - - private static void NormalizeRange( - int begin, - int end, - int itemsCount, - out int normalizedBegin, - out int normalizedEnd) - { - int generationValue1; - ListUtility.GetWrappedIndex(begin, itemsCount, out normalizedBegin, out generationValue1); - int generationValue2; - ListUtility.GetWrappedIndex(end, itemsCount, out normalizedEnd, out generationValue2); - if (generationValue2 != generationValue1) - { - normalizedEnd = ListUtility.GetUnwrappedIndex(normalizedEnd, generationValue2 - generationValue1, itemsCount); - normalizedBegin -= normalizedEnd - itemsCount; - normalizedEnd = itemsCount; - } - normalizedBegin = Math2.Clamp(normalizedBegin, 0, itemsCount); - normalizedEnd = Math2.Clamp(normalizedEnd, 0, itemsCount); - } - - public int beginIndex => this._beginIndex; - - public int endIndex => this._endIndex; - - public int realBeginIndex => this._realBeginIndex; - - public int realEndIndex => this._realEndIndex; - - public bool nonEmptyRange => this._isValid; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/InterestPoint.cs b/UIX/Microsoft/Iris/Layouts/InterestPoint.cs deleted file mode 100644 index a3a8484..0000000 --- a/UIX/Microsoft/Iris/Layouts/InterestPoint.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.InterestPoint -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum InterestPoint - { - TopLeft, - TopRight, - BottomLeft, - BottomRight, - Center, - NumPoints, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs deleted file mode 100644 index 73f50cb..0000000 --- a/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.KeepAliveLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layouts -{ - public class KeepAliveLayoutInput : ILayoutInput - { - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - private int _count; - - public static bool ShouldKeepVisible(ILayoutNode layoutNode) => layoutNode.GetLayoutInput(Data) != null; - - public int Count - { - get => this._count; - set => this._count = value; - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => s_dataProperty; - - public override string ToString() => InvariantString.Format("{0}", this.GetType().Name); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/MajorMinor.cs b/UIX/Microsoft/Iris/Layouts/MajorMinor.cs deleted file mode 100644 index 9a93892..0000000 --- a/UIX/Microsoft/Iris/Layouts/MajorMinor.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.MajorMinor -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using System; - -namespace Microsoft.Iris.Layouts -{ - public struct MajorMinor - { - private int major; - private int minor; - public static readonly MajorMinor Zero = new MajorMinor(0, 0); - - public MajorMinor(int major, int minor) - { - this.major = major; - this.minor = minor; - } - - public MajorMinor(Size size, Orientation o) - { - switch (o) - { - case Orientation.Horizontal: - this.major = size.Width; - this.minor = size.Height; - break; - default: - this.major = size.Height; - this.minor = size.Width; - break; - } - } - - public SizeF ToSizeF(Orientation o) - { - switch (o) - { - case Orientation.Horizontal: - return new SizeF(major, minor); - default: - return new SizeF(minor, major); - } - } - - public Size ToSize(Orientation o) - { - switch (o) - { - case Orientation.Horizontal: - return new Size(this.major, this.minor); - default: - return new Size(this.minor, this.major); - } - } - - public Point ToPoint(Orientation o) => this.ToSize(o).ToPoint(); - - public static MajorMinor Min(MajorMinor a, MajorMinor b) => new MajorMinor(Math.Min(a.Major, b.Major), Math.Min(a.Minor, b.Minor)); - - public static MajorMinor Max(MajorMinor a, MajorMinor b) => new MajorMinor(Math.Max(a.Major, b.Major), Math.Max(a.Minor, b.Minor)); - - public static MajorMinor Clamp(MajorMinor original, MajorMinor min, MajorMinor max) => new MajorMinor(Math2.Clamp(original.Major, min.Major, max.Major), Math2.Clamp(original.Minor, min.Minor, max.Minor)); - - public static MajorMinor operator +(MajorMinor left, MajorMinor right) => new MajorMinor(left.Major + right.Major, left.Minor + right.Minor); - - public static MajorMinor operator -(MajorMinor left, MajorMinor right) => new MajorMinor(left.Major - right.Major, left.Minor - right.Minor); - - public static MajorMinor operator *(MajorMinor left, MajorMinor right) => new MajorMinor(left.Major * right.Major, left.Minor * right.Minor); - - public static MajorMinor operator /(MajorMinor left, MajorMinor right) => new MajorMinor(left.Major / right.Major, left.Minor / right.Minor); - - public static bool operator ==(MajorMinor left, MajorMinor right) => left.Major == right.Major && left.Minor == right.Minor; - - public static bool operator !=(MajorMinor left, MajorMinor right) => !(left == right); - - public override bool Equals(object obj) => obj is MajorMinor majorMinor && majorMinor == this; - - public override int GetHashCode() => this.major ^ this.minor; - - public MajorMinor Swap() => new MajorMinor(this.Minor, this.Major); - - public int Major - { - get => this.major; - set => this.major = value; - } - - public int Minor - { - get => this.minor; - set => this.minor = value; - } - - public bool IsEmpty => this.Major == 0 || this.Minor == 0; - - public override string ToString() => InvariantString.Format("(Major={0}, Minor={1})", Major, Minor); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/MissingItemPolicy.cs b/UIX/Microsoft/Iris/Layouts/MissingItemPolicy.cs deleted file mode 100644 index 8221b5e..0000000 --- a/UIX/Microsoft/Iris/Layouts/MissingItemPolicy.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.MissingItemPolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum MissingItemPolicy - { - SizeToAverage, - SizeToSmallest, - SizeToLargest, - Wait, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/MouseTarget.cs b/UIX/Microsoft/Iris/Layouts/MouseTarget.cs deleted file mode 100644 index 8425e94..0000000 --- a/UIX/Microsoft/Iris/Layouts/MouseTarget.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.MouseTarget -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum MouseTarget - { - None, - Fixed, - Follow, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/PlacementMode.cs b/UIX/Microsoft/Iris/Layouts/PlacementMode.cs deleted file mode 100644 index 3c540ff..0000000 --- a/UIX/Microsoft/Iris/Layouts/PlacementMode.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.PlacementMode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public class PlacementMode - { - private PopupPosition[] _popupPositions; - private MouseTarget _mouseTarget; - private bool _usesTargetSize; - private static PlacementMode s_origin; - private static PlacementMode s_left; - private static PlacementMode s_right; - private static PlacementMode s_top; - private static PlacementMode s_bottom; - private static PlacementMode s_center; - private static PlacementMode s_mouseOrigin; - private static PlacementMode s_mouseBottom; - private static PlacementMode s_followMouseOrigin; - private static PlacementMode s_followMouseBottom; - - public PopupPosition[] PopupPositions - { - get => this._popupPositions; - set - { - this._popupPositions = value; - this._usesTargetSize = false; - if (this._popupPositions == null) - return; - for (int index = 0; index < this._popupPositions.Length; ++index) - { - if (this._popupPositions[index].Target != InterestPoint.TopLeft) - { - this._usesTargetSize = true; - break; - } - } - } - } - - public MouseTarget MouseTarget - { - get => this._mouseTarget; - set => this._mouseTarget = value; - } - - public bool UsesTargetSize => this._usesTargetSize; - - public override string ToString() - { - if (this == s_origin) - return "Origin"; - if (this == s_bottom) - return "Bottom"; - if (this == s_top) - return "Top"; - if (this == s_left) - return "Left"; - if (this == s_right) - return "Right"; - if (this == s_center) - return "Center"; - if (this == s_mouseOrigin) - return "MouseOrigin"; - if (this == s_mouseBottom) - return "MouseBottom"; - if (this == s_followMouseOrigin) - return "FollowMouseOrigin"; - return this == s_followMouseBottom ? "FollowMouseBottom" : base.ToString(); - } - - public static PlacementMode Origin - { - get - { - if (s_origin == null) - { - s_origin = new PlacementMode(); - s_origin.PopupPositions = new PopupPosition[1] - { - new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopLeft, FlipDirection.None) - }; - } - return s_origin; - } - } - - public static PlacementMode Bottom - { - get - { - if (s_bottom == null) - { - s_bottom = new PlacementMode(); - s_bottom.PopupPositions = new PopupPosition[2] - { - new PopupPosition(InterestPoint.BottomLeft, InterestPoint.TopLeft, FlipDirection.None), - new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomLeft, FlipDirection.Vertical) - }; - } - return s_bottom; - } - } - - public static PlacementMode Center - { - get - { - if (s_center == null) - { - s_center = new PlacementMode(); - s_center.PopupPositions = new PopupPosition[1] - { - new PopupPosition(InterestPoint.Center, InterestPoint.Center, FlipDirection.None) - }; - } - return s_center; - } - } - - public static PlacementMode Right - { - get - { - if (s_right == null) - { - s_right = new PlacementMode(); - s_right.PopupPositions = new PopupPosition[4] - { - new PopupPosition(InterestPoint.TopRight, InterestPoint.TopLeft, FlipDirection.None), - new PopupPosition(InterestPoint.BottomRight, InterestPoint.BottomLeft, FlipDirection.Vertical), - new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopRight, FlipDirection.Horizontal), - new PopupPosition(InterestPoint.BottomLeft, InterestPoint.BottomRight, FlipDirection.Both) - }; - } - return s_right; - } - } - - public static PlacementMode Left - { - get - { - if (s_left == null) - { - s_left = new PlacementMode(); - s_left.PopupPositions = new PopupPosition[4] - { - new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopRight, FlipDirection.None), - new PopupPosition(InterestPoint.BottomLeft, InterestPoint.BottomRight, FlipDirection.Vertical), - new PopupPosition(InterestPoint.TopRight, InterestPoint.TopLeft, FlipDirection.Horizontal), - new PopupPosition(InterestPoint.BottomRight, InterestPoint.BottomLeft, FlipDirection.Both) - }; - } - return s_left; - } - } - - public static PlacementMode Top - { - get - { - if (s_top == null) - { - s_top = new PlacementMode(); - s_top.PopupPositions = new PopupPosition[2] - { - new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomLeft, FlipDirection.None), - new PopupPosition(InterestPoint.BottomLeft, InterestPoint.TopLeft, FlipDirection.Vertical) - }; - } - return s_top; - } - } - - public static PlacementMode MouseOrigin - { - get - { - if (s_mouseOrigin == null) - { - s_mouseOrigin = new PlacementMode(); - s_mouseOrigin.MouseTarget = MouseTarget.Fixed; - s_mouseOrigin.PopupPositions = new PopupPosition[4] - { - new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopLeft, FlipDirection.None), - new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopRight, FlipDirection.Horizontal), - new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomLeft, FlipDirection.Vertical), - new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomRight, FlipDirection.Both) - }; - } - return s_mouseOrigin; - } - } - - public static PlacementMode MouseBottom - { - get - { - if (s_mouseBottom == null) - { - s_mouseBottom = new PlacementMode(); - s_mouseBottom.MouseTarget = MouseTarget.Fixed; - s_mouseBottom.PopupPositions = Bottom.PopupPositions; - } - return s_mouseBottom; - } - } - - public static PlacementMode FollowMouseOrigin - { - get - { - if (s_followMouseOrigin == null) - { - s_followMouseOrigin = new PlacementMode(); - s_followMouseOrigin.MouseTarget = MouseTarget.Follow; - s_followMouseOrigin.PopupPositions = MouseOrigin.PopupPositions; - } - return s_followMouseOrigin; - } - } - - public static PlacementMode FollowMouseBottom - { - get - { - if (s_followMouseBottom == null) - { - s_followMouseBottom = new PlacementMode(); - s_followMouseBottom.MouseTarget = MouseTarget.Follow; - s_followMouseBottom.PopupPositions = MouseBottom.PopupPositions; - } - return s_followMouseBottom; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/PopupLayout.cs b/UIX/Microsoft/Iris/Layouts/PopupLayout.cs deleted file mode 100644 index d0f0674..0000000 --- a/UIX/Microsoft/Iris/Layouts/PopupLayout.cs +++ /dev/null @@ -1,288 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.PopupLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; - -namespace Microsoft.Iris.Layouts -{ - public class PopupLayout : ILayout - { - private const float c_tolerance = 0.01f; - private static DeferredHandler s_checkForLayoutChanges = new DeferredHandler(CheckForLayoutChanges); - private Vector _followMouseSubjects; - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - - public static DataCookie DataCookie => s_dataProperty; - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (!(layoutChild.GetLayoutInput(s_dataProperty) is PopupLayoutInput layoutInput) || !layoutInput.ConstrainToTarget) - layoutChild.Measure(constraint); - } - layoutNode.RequestMoreChildren(int.MaxValue); - return constraint; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - bool hook = false; - ViewItem viewItem = (ViewItem)layoutNode; - if (layoutNode.LayoutChildrenCount > 0) - { - RectangleF layoutBounds = new RectangleF(PointF.Zero, new SizeF(slot.Bounds.Width, slot.Bounds.Height)); - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (!(layoutChild.GetLayoutInput(s_dataProperty) is PopupLayoutInput layoutInput)) - layoutInput = PopupLayoutInput.Default; - if (layoutInput.TargetIsFollowMouse) - hook = true; - ViewItem child = (ViewItem)layoutChild; - Point zero = Point.Zero; - Size size = Size.Zero; - RectangleF placementTargetRect = this.GetPlacementTargetRect(child, viewItem, layoutInput, slot); - if (layoutInput.ConstrainToTarget) - { - size = new Size((int)placementTargetRect.Width, (int)placementTargetRect.Height); - layoutChild.Measure(size); - } - else - size = layoutChild.DesiredSize; - Point childPosition = this.GetChildPosition(viewItem, layoutBounds, layoutInput, layoutChild, child, slot, placementTargetRect); - layoutChild.Arrange(slot, new Rectangle(childPosition, size)); - } - } - this.HookMousePositionChanged(viewItem, hook); - } - - private Point GetChildPosition( - ViewItem layoutElement, - RectangleF layoutBounds, - PopupLayoutInput layoutInput, - ILayoutNode childNode, - ViewItem child, - LayoutSlot slot, - RectangleF placementRect) - { - PlacementMode placement = layoutInput.Placement; - if (placement == null || ListUtility.IsNullOrEmpty(placement.PopupPositions)) - return Point.Zero; - PointF[] interestPoints = InterestPointsFromRect(placementRect); - PointF[] childInterestPoints = this.GetChildInterestPoints(childNode); - this.GetBounds(interestPoints); - RectangleF bounds = this.GetBounds(childInterestPoints); - double width = bounds.Width; - double height = bounds.Height; - bool flag1 = layoutInput.RespectMenuDropAlignment && Win32Api.GetMenuDropAlignment(); - PointF bestPosition = PointF.Zero; - float num1 = -1f; - FlipDirection flipDirection = FlipDirection.None; - int length = placement.PopupPositions.Length; - for (int index = 0; index < length; ++index) - { - PopupPosition popupPosition = placement.PopupPositions[index]; - InterestPoint target = popupPosition.Target; - InterestPoint popup = popupPosition.Popup; - SizeF sizeF = interestPoints[(int)target] - childInterestPoints[(int)popup]; - PointF pos = new PointF(sizeF.Width, sizeF.Height); - RectangleF b = RectangleF.Offset(bounds, pos); - RectangleF rectangleF = RectangleF.Intersect(layoutBounds, b); - float num2 = !rectangleF.IsEmpty ? rectangleF.Width * rectangleF.Height : 0.0f; - bool flag2 = (popupPosition.Flipped & FlipDirection.Horizontal) == FlipDirection.Horizontal; - bool flag3 = (popupPosition.Flipped & FlipDirection.Vertical) == FlipDirection.Vertical; - if (flag2 && flag1 || !flag2 && !flag1) - num2 += 0.1f; - if (!flag3) - num2 += 0.1f; - if (num2 - (double)num1 > 0.00999999977648258) - { - bestPosition = pos; - num1 = num2; - flipDirection = popupPosition.Flipped; - } - if (!layoutInput.StayInBounds) - break; - } - layoutInput.FlippedHorizontally = (flipDirection & FlipDirection.Horizontal) == FlipDirection.Horizontal; - layoutInput.FlippedVertically = (flipDirection & FlipDirection.Vertical) == FlipDirection.Vertical; - if (layoutInput.StayInBounds) - bestPosition = this.NudgeIntoBounds(layoutBounds, bestPosition, bounds, placement); - return new Point((int)bestPosition.X, (int)bestPosition.Y); - } - - private RectangleF GetPlacementTargetRect( - ViewItem child, - ViewItem layoutElement, - PopupLayoutInput layoutInput, - LayoutSlot slot) - { - PlacementMode placement = layoutInput.Placement; - ViewItem placementTarget = layoutInput.PlacementTarget; - bool flag = false; - RectangleF rectangleF; - if (layoutInput.TargetIsMouse || layoutInput.TargetIsFollowMouse) - { - if (layoutInput.MouseRect == RectangleF.Zero || layoutInput.TargetIsFollowMouse) - layoutInput.MouseRect = this.GetMouseRect(placement); - rectangleF = layoutInput.MouseRect; - flag = true; - } - else if (placementTarget == null || placementTarget.IsDisposed) - { - rectangleF = new RectangleF(Point.Zero, slot.Bounds); - } - else - { - rectangleF = placementTarget.BoundsRelativeToAncestor(null); - flag = true; - PopupLayout.PlacementTargetInfo placementTargetInfo = new PopupLayout.PlacementTargetInfo(child, placementTarget, rectangleF); - DeferredCall.Post(DispatchPriority.LayoutSync, s_checkForLayoutChanges, placementTargetInfo); - } - rectangleF.Offset(layoutInput.Offset.X, layoutInput.Offset.Y); - if (flag) - rectangleF = layoutElement.TransformFromAncestor(null, rectangleF); - return rectangleF; - } - - private static void CheckForLayoutChanges(object args) - { - PopupLayout.PlacementTargetInfo placementTargetInfo = (PopupLayout.PlacementTargetInfo)args; - if (placementTargetInfo.placementTarget.IsDisposed || placementTargetInfo.child.IsDisposed) - return; - RectangleF ancestor = placementTargetInfo.placementTarget.BoundsRelativeToAncestor(null); - if (!(placementTargetInfo.bounds != ancestor)) - return; - placementTargetInfo.child.MarkLayoutInvalid(); - } - - private PointF[] GetChildInterestPoints(ILayoutNode childNode) - { - Size desiredSize = childNode.DesiredSize; - return InterestPointsFromRect(new RectangleF(0.0f, 0.0f, desiredSize.Width, desiredSize.Height)); - } - - private static PointF[] InterestPointsFromRect(RectangleF rect) => new PointF[5] - { - rect.TopLeft, - rect.TopRight, - rect.BottomLeft, - rect.BottomRight, - rect.Center - }; - - private RectangleF GetBounds(PointF[] interestPoints) - { - float num1; - float x1 = num1 = interestPoints[0].X; - float num2; - float y1 = num2 = interestPoints[0].Y; - for (int index = 1; index < interestPoints.Length; ++index) - { - float x2 = interestPoints[index].X; - float y2 = interestPoints[index].Y; - if (x2 < (double)x1) - x1 = x2; - if (x2 > (double)num1) - num1 = x2; - if (y2 < (double)y1) - y1 = y2; - if (y2 > (double)num2) - num2 = y2; - } - return new RectangleF(x1, y1, num1 - x1, num2 - y1); - } - - private PointF NudgeIntoBounds( - RectangleF layoutBounds, - PointF bestPosition, - RectangleF childBounds, - PlacementMode placement) - { - bestPosition.X = Math2.Clamp(bestPosition.X, layoutBounds.Left, layoutBounds.Right - childBounds.Width); - bestPosition.Y = Math2.Clamp(bestPosition.Y, layoutBounds.Top, layoutBounds.Bottom - childBounds.Height); - return bestPosition; - } - - private RectangleF GetMouseRect(PlacementMode placement) - { - Point physicalMousePos = UISession.Default.InputManager.MostRecentPhysicalMousePos; - if (!placement.UsesTargetSize) - return new RectangleF(physicalMousePos.X, physicalMousePos.Y, 0.0f, 0.0f); - int height; - int hotY; - NativeApi.SpGetMouseCursorInfo(out height, out hotY); - return new RectangleF(physicalMousePos.X, physicalMousePos.Y - hotY - 1, 0.0f, height + 2); - } - - private void HookMousePositionChanged(ViewItem subject, bool hook) - { - if ((this._followMouseSubjects != null && this._followMouseSubjects.Contains(subject)) == hook) - return; - if (hook) - { - if (this._followMouseSubjects == null) - { - this._followMouseSubjects = new Vector(); - UISession.Default.InputManager.MousePositionChanged += new EventHandler(this.OnMousePositionChanged); - } - this._followMouseSubjects.Add(subject); - } - else - { - this._followMouseSubjects.Remove(subject); - if (this._followMouseSubjects.Count != 0) - return; - this._followMouseSubjects = null; - UISession.Default.InputManager.MousePositionChanged -= new EventHandler(this.OnMousePositionChanged); - } - } - - private void OnMousePositionChanged(object sender, EventArgs args) - { - for (int index = 0; index < this._followMouseSubjects.Count; ++index) - { - ViewItem followMouseSubject = this._followMouseSubjects[index]; - if (followMouseSubject.Layout == this && !followMouseSubject.IsDisposed) - { - followMouseSubject.MarkLayoutInvalid(); - } - else - { - this.HookMousePositionChanged(followMouseSubject, false); - if (this._followMouseSubjects == null) - break; - --index; - } - } - } - - private class PlacementTargetInfo - { - public ViewItem child; - public ViewItem placementTarget; - public RectangleF bounds; - - public PlacementTargetInfo(ViewItem child, ViewItem placementTarget, RectangleF bounds) - { - this.child = child; - this.placementTarget = placementTarget; - this.bounds = bounds; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs deleted file mode 100644 index 58ccb9a..0000000 --- a/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.PopupLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Layouts -{ - public class PopupLayoutInput : NotifyObjectBase, ILayoutInput - { - private ViewItem _target; - private PlacementMode _placementMode; - private Point _offset; - private bool _stayInBounds; - private bool _respectMenuDropAlignment; - private bool _constrainToTarget; - private RectangleF _mouseRect = RectangleF.Zero; - private bool _flippedHorizontally; - private bool _flippedVertically; - private static PopupLayoutInput s_default; - - public PopupLayoutInput() - { - this._stayInBounds = true; - this._respectMenuDropAlignment = true; - this.Placement = PlacementMode.Origin; - } - - public ViewItem PlacementTarget - { - get => this._target; - set => this._target = value; - } - - public PlacementMode Placement - { - get => this._placementMode; - set => this._placementMode = value; - } - - public Point Offset - { - get => this._offset; - set => this._offset = value; - } - - public bool StayInBounds - { - get => this._stayInBounds; - set => this._stayInBounds = value; - } - - public bool RespectMenuDropAlignment - { - get => this._respectMenuDropAlignment; - set => this._respectMenuDropAlignment = value; - } - - public bool ConstrainToTarget - { - get => this._constrainToTarget; - set => this._constrainToTarget = value; - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => PopupLayout.DataCookie; - - public RectangleF MouseRect - { - get => this._mouseRect; - set => this._mouseRect = value; - } - - public bool FlippedHorizontally - { - get => this._flippedHorizontally; - set - { - if (this._flippedHorizontally == value) - return; - this._flippedHorizontally = value; - this.FireNotification(NotificationID.FlippedHorizontally); - } - } - - public bool FlippedVertically - { - get => this._flippedVertically; - set - { - if (this._flippedVertically == value) - return; - this._flippedVertically = value; - this.FireNotification(NotificationID.FlippedVertically); - } - } - - public bool TargetIsMouse => this._placementMode != null && this._placementMode.MouseTarget == MouseTarget.Fixed; - - public bool TargetIsFollowMouse => this._placementMode != null && this._placementMode.MouseTarget == MouseTarget.Follow; - - public static PopupLayoutInput Default - { - get - { - if (s_default == null) - s_default = new PopupLayoutInput(); - return s_default; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/PopupPosition.cs b/UIX/Microsoft/Iris/Layouts/PopupPosition.cs deleted file mode 100644 index cb0d864..0000000 --- a/UIX/Microsoft/Iris/Layouts/PopupPosition.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.PopupPosition -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public struct PopupPosition - { - private InterestPoint _popup; - private InterestPoint _target; - private FlipDirection _flipDirection; - - public PopupPosition(InterestPoint target, InterestPoint popup, FlipDirection flipDirection) - { - this._target = target; - this._popup = popup; - this._flipDirection = flipDirection; - } - - public InterestPoint Target - { - get => this._target; - set => this._target = value; - } - - public InterestPoint Popup - { - get => this._popup; - set => this._popup = value; - } - - public FlipDirection Flipped - { - get => this._flipDirection; - set => this._flipDirection = value; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/RelativeEdge.cs b/UIX/Microsoft/Iris/Layouts/RelativeEdge.cs deleted file mode 100644 index 9bf18b9..0000000 --- a/UIX/Microsoft/Iris/Layouts/RelativeEdge.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.RelativeEdge -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum RelativeEdge - { - Near, - Far, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/RepeatPolicy.cs b/UIX/Microsoft/Iris/Layouts/RepeatPolicy.cs deleted file mode 100644 index 74ab2a2..0000000 --- a/UIX/Microsoft/Iris/Layouts/RepeatPolicy.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.RepeatPolicy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum RepeatPolicy - { - Never, - WhenTooBig, - WhenTooSmall, - Always, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/RotateLayout.cs b/UIX/Microsoft/Iris/Layouts/RotateLayout.cs deleted file mode 100644 index 7ed8dec..0000000 --- a/UIX/Microsoft/Iris/Layouts/RotateLayout.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.RotateLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layouts -{ - public class RotateLayout : ILayout - { - private int _angleDegrees; - - public int AngleDegrees - { - get => this._angleDegrees; - set => this._angleDegrees = value; - } - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - private bool IsVertical => this.AngleDegrees == 90 || this.AngleDegrees == 270; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - if (this.IsVertical) - constraint = new Size(constraint.Height, constraint.Width); - Size size = DefaultLayout.Measure(layoutNode, constraint); - if (this.IsVertical) - size = new Size(size.Height, size.Width); - return size; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - if (layoutNode.LayoutChildrenCount <= 0) - return; - Rectangle rectangle = new Rectangle(slot.Bounds); - switch (this.AngleDegrees) - { - case 90: - Point offset1 = new Point(rectangle.Width, rectangle.Width); - rectangle = RotateRect90(rectangle, offset1); - slot.View = RotateRect90(slot.View, offset1); - slot.PeripheralView = RotateRect90(slot.PeripheralView, offset1); - break; - case 180: - Point offset2 = new Point(2 * rectangle.Width, 2 * rectangle.Height); - rectangle = RotateRect180(rectangle, offset2); - slot.View = RotateRect180(slot.View, offset2); - slot.PeripheralView = RotateRect180(slot.PeripheralView, offset2); - break; - case 270: - Point offset3 = new Point(rectangle.Height, rectangle.Height); - rectangle = RotateRect270(rectangle, offset3); - slot.View = RotateRect270(slot.View, offset3); - slot.PeripheralView = RotateRect270(slot.PeripheralView, offset3); - break; - } - Rotation rotation = Rotation.Default; - rotation.AngleDegrees = this.AngleDegrees; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - layoutChild.Arrange(slot, rectangle, Vector3.UnitVector, rotation); - } - - private static Rectangle RotateRect90(Rectangle rect, Point offset) => new Rectangle(rect.Y + offset.X, -rect.Right + offset.Y, rect.Height, rect.Width); - - private static Rectangle RotateRect180(Rectangle rect, Point offset) => new Rectangle(-rect.Right + offset.X, -rect.Bottom + offset.Y, rect.Width, rect.Height); - - private static Rectangle RotateRect270(Rectangle rect, Point offset) => new Rectangle(-rect.Bottom + offset.X, rect.X + offset.Y, rect.Height, rect.Width); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs b/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs deleted file mode 100644 index 014e43a..0000000 --- a/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ScaleLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Drawing; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class ScaleLayout : ILayout - { - private Vector2 _minimumScale; - private Vector2 _maximumScale; - private bool _maintainAspectRatio; - - public ScaleLayout() - { - this._minimumScale = new Vector2(0.0f, 0.0f); - this._maximumScale = new Vector2(1f, 1f); - this._maintainAspectRatio = true; - } - - public Vector2 MinimumScale - { - get => this._minimumScale; - set => this._minimumScale = value; - } - - public Vector2 MaximumScale - { - get => this._maximumScale; - set => this._maximumScale = value; - } - - public bool MaintainAspectRatio - { - get => this._maintainAspectRatio; - set => this._maintainAspectRatio = value; - } - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - Size zero = Size.Zero; - Size constraint1 = new Size(this.UnscaleConstraint(constraint.Width, this.MinimumScale.X), this.UnscaleConstraint(constraint.Height, this.MinimumScale.Y)); - Size size = DefaultLayout.Measure(layoutNode, constraint1); - SizeF sizeF = new SizeF(1f, 1f); - if (!size.IsZero) - sizeF = new SizeF(constraint.Width / (float)size.Width, constraint.Height / (float)size.Height); - if (this._maintainAspectRatio) - { - float num = Math.Min(sizeF.Width, sizeF.Height); - sizeF = new SizeF(num, num); - } - sizeF.Width = Math.Max(sizeF.Width, this.MinimumScale.X); - sizeF.Height = Math.Max(sizeF.Height, this.MinimumScale.Y); - if (MaximumScale.X != 0.0) - sizeF.Width = Math.Min(sizeF.Width, this.MaximumScale.X); - if (MaximumScale.Y != 0.0) - sizeF.Height = Math.Min(sizeF.Height, this.MaximumScale.Y); - layoutNode.MeasureData = sizeF; - size.Width = (int)Math.Round(size.Width * (double)sizeF.Width); - size.Height = (int)Math.Round(size.Height * (double)sizeF.Height); - return size; - } - - private int UnscaleConstraint(int constraint, float minScale) => minScale == 0.0 ? 16777215 : Math.Min((int)Math.Round(constraint / (double)minScale), 16777215); - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - if (layoutNode.LayoutChildrenCount <= 0) - return; - SizeF measureData = (SizeF)layoutNode.MeasureData; - Vector3 scale = new Vector3(measureData.Width, measureData.Height, 1f); - slot.View = ScaleView(slot.View, measureData); - slot.PeripheralView = ScaleView(slot.PeripheralView, measureData); - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - layoutChild.Arrange(slot, new Rectangle(Point.Zero, layoutChild.DesiredSize), scale, Rotation.Default); - } - - private static Rectangle ScaleView(Rectangle view, SizeF scale) - { - view.X = (int)Math.Round(view.X / (double)scale.Width); - view.Y = (int)Math.Round(view.Y / (double)scale.Height); - view.Width = (int)Math.Round(view.Width / (double)scale.Width); - view.Height = (int)Math.Round(view.Height / (double)scale.Height); - return view; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ScrollIntoViewDisposition.cs b/UIX/Microsoft/Iris/Layouts/ScrollIntoViewDisposition.cs deleted file mode 100644 index 9b529eb..0000000 --- a/UIX/Microsoft/Iris/Layouts/ScrollIntoViewDisposition.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ScrollIntoViewDisposition -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layouts -{ - public class ScrollIntoViewDisposition - { - private int _beginPadding; - private int _endPadding; - private bool _locked; - private float _lockedPosition; - private float _lockedAlignment; - private ContentPositioningPolicy _positioningPolicy; - private bool _enabled; - private RelativeEdge _relativeBeginPadding; - private RelativeEdge _relativeEndPadding; - - public ScrollIntoViewDisposition() - : this(0) - { - } - - public ScrollIntoViewDisposition(int paddingValue) - { - this.Reset(); - this._beginPadding = this._endPadding = paddingValue; - } - - public void CopyFrom(ScrollIntoViewDisposition other) - { - this._beginPadding = other._beginPadding; - this._endPadding = other._endPadding; - this._lockedPosition = other._lockedPosition; - this._lockedAlignment = other._lockedAlignment; - this._locked = other._locked; - this._enabled = other._enabled; - this._positioningPolicy = other._positioningPolicy; - this._relativeBeginPadding = other._relativeBeginPadding; - this._relativeEndPadding = other._relativeEndPadding; - } - - public void Reset() - { - this._beginPadding = this._endPadding = 0; - this._lockedPosition = -1f; - this._lockedAlignment = 0.5f; - this._enabled = true; - this._locked = false; - this._positioningPolicy = ContentPositioningPolicy.RespectPaddingAndLocking; - this._relativeBeginPadding = RelativeEdge.Near; - this._relativeEndPadding = RelativeEdge.Far; - } - - public bool IsDefault => this._beginPadding == 0 && this._endPadding == 0 && (this.BeginPaddingRelativeTo == RelativeEdge.Near && this.EndPaddingRelativeTo == RelativeEdge.Far) && !this.Locked; - - public int Padding - { - get => this.BeginPadding; - set - { - this.EndPadding = value; - this.BeginPadding = value; - } - } - - public int BeginPadding - { - get => this._beginPadding; - set => this._beginPadding = value; - } - - public int EndPadding - { - get => this._endPadding; - set => this._endPadding = value; - } - - public RelativeEdge BeginPaddingRelativeTo - { - get => this._relativeBeginPadding; - set => this._relativeBeginPadding = value; - } - - public RelativeEdge EndPaddingRelativeTo - { - get => this._relativeEndPadding; - set => this._relativeEndPadding = value; - } - - public bool Locked - { - get => this._locked; - set => this._locked = value; - } - - public float LockedPosition - { - get => this._lockedPosition; - set => this._lockedPosition = value; - } - - public float LockedAlignment - { - get => this._lockedAlignment; - set => this._lockedAlignment = value; - } - - public bool Enabled - { - get => this._enabled; - set => this._enabled = value; - } - - public ContentPositioningPolicy ContentPositioningBehavior - { - get => this._positioningPolicy; - set => this._positioningPolicy = value; - } - - public override string ToString() - { - string str1 = InvariantString.Format("{0}(", this.GetType().Name); - string str2; - if (!this._enabled) - { - str2 = InvariantString.Format("{0}Disabled", str1); - } - else - { - str2 = InvariantString.Format("{0}(BeginPadding={1}({2}), EndPadding={3}({4})", str1, _beginPadding, _relativeBeginPadding, _endPadding, _relativeEndPadding); - if (this.Locked) - str2 = InvariantString.Format("{0}, LockedPosition={1}, LockedAlignment={2}", str2, _lockedPosition, _lockedAlignment); - } - return str2 + ")"; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs deleted file mode 100644 index 32bffaf..0000000 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs +++ /dev/null @@ -1,333 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ScrollingLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class ScrollingLayout : ILayout - { - private Orientation _orientation; - private int _prefetch; - private static bool s_allowScrollFocusIntoView; - - public ScrollingLayout(Orientation orientation, int prefetch) - { - this._orientation = orientation; - this._prefetch = prefetch; - } - - public Orientation Orientation - { - get => this._orientation; - set - { - if (this._orientation == value) - return; - this._orientation = value; - } - } - - public int Prefetch - { - get => this._prefetch; - set - { - if (this._prefetch == value) - return; - this._prefetch = value; - } - } - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - Size size; - if (!(layoutNode.GetLayoutInput(ScrollingLayoutInput.Data) is ScrollingLayoutInput layoutInput) || layoutInput.Enabled) - { - Size infiniteConstraint = this.GetInfiniteConstraint(constraint); - size = DefaultLayout.Measure(layoutNode, infiniteConstraint); - layoutNode.MeasureData = size; - } - else - size = DefaultLayout.Measure(layoutNode, constraint); - return size; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - if (!(layoutNode.GetLayoutInput(ScrollingLayoutInput.Data) is ScrollingLayoutInput sli)) - sli = new ScrollingLayoutInput(); - int scrollAmount = sli.ScrollAmount; - ScrollingLayoutOutput scrollingLayoutOutput = null; - if (layoutNode.LayoutChildrenCount > 0) - { - if (sli.Enabled) - { - scrollingLayoutOutput = this.Arrange(layoutNode, slot, sli, ref scrollAmount); - } - else - { - DefaultLayout.Arrange(layoutNode, slot); - scrollAmount = 0; - scrollingLayoutOutput = new ScrollingLayoutOutput(); - } - } - sli.SetScrollAmount(scrollAmount); - if (scrollingLayoutOutput == null) - return; - layoutNode.SetExtendedLayoutOutput(scrollingLayoutOutput); - } - - private ScrollingLayoutOutput Arrange( - ILayoutNode layoutNode, - LayoutSlot slot, - ScrollingLayoutInput sli, - ref int scrollAmount) - { - LayoutSlot childSlot; - Rectangle viewBounds; - this.GetChildSlot(slot, scrollAmount, out childSlot, out viewBounds); - int num = scrollAmount; - ScrollingLayoutOutput scrollingLayoutOutput = this.ArrangeChildren(layoutNode, slot, childSlot, viewBounds, sli, true, ref scrollAmount); - if (num != scrollAmount) - { - this.GetChildSlot(slot, scrollAmount, out childSlot, out viewBounds); - scrollingLayoutOutput = this.ArrangeChildren(layoutNode, slot, childSlot, viewBounds, sli, false, ref scrollAmount); - } - return scrollingLayoutOutput; - } - - private void GetChildSlot( - LayoutSlot slot, - int scrollAmount, - out LayoutSlot childSlot, - out Rectangle viewBounds) - { - Size infiniteConstraint = this.GetInfiniteConstraint(slot.Bounds); - Size bounds = slot.Bounds; - viewBounds = new Rectangle(Point.Zero, bounds); - Point offset = this.ScrollAmountToOffset(this._prefetch); - Rectangle viewPeripheralBounds = viewBounds; - viewPeripheralBounds.Inflate(offset.X, offset.Y); - childSlot = new LayoutSlot(infiniteConstraint, slot.Offset, viewBounds, viewPeripheralBounds); - } - - private ScrollingLayoutOutput ArrangeChildren( - ILayoutNode layoutNode, - LayoutSlot slot, - LayoutSlot childSlot, - Rectangle viewBounds, - ScrollingLayoutInput sli, - bool applyPendingScrollData, - ref int scrollAmount) - { - Rectangle areaOfInterestBounds = Rectangle.Zero; - bool scrollAreaOfInterestIntoView = sli.ScrollIntoViewDisposition.Enabled; - bool flag1 = false; - VisibleIndexRangeLayoutOutput rangeLayoutOutput = null; - Rectangle rectangle1 = Rectangle.Zero; - Rectangle bounds = new Rectangle(new MajorMinor(-scrollAmount, 0).ToPoint(this.Orientation), Size.Max(slot.Bounds, (Size)layoutNode.MeasureData)); - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - layoutChild.Arrange(childSlot, bounds); - rangeLayoutOutput = layoutChild.GetExtendedLayoutOutput(VisibleIndexRangeLayoutOutput.DataCookie) as VisibleIndexRangeLayoutOutput; - bool flag2 = true; - AreaOfInterest area1; - if (!layoutChild.TryGetAreaOfInterest(AreaOfInterestID.ScrollIntoViewRequest, out area1) && !layoutChild.TryGetAreaOfInterest(AreaOfInterestID.PendingFocus, out area1)) - flag2 = layoutChild.TryGetAreaOfInterest(AreaOfInterestID.Focus, out area1); - if (flag2) - areaOfInterestBounds = area1.Rectangle; - if (this.IsFocusAreaOfInterest(area1.Id) && !sli.ScrollIntoViewDisposition.Enabled) - DisallowScrollFocusIntoView(); - scrollAreaOfInterestIntoView &= ScrollFocusIntoView; - if (area1.Id == AreaOfInterestID.ScrollIntoViewRequest && !areaOfInterestBounds.IsZero) - { - scrollAreaOfInterestIntoView = true; - flag1 = true; - } - Rectangle rectangle2 = new Rectangle(Point.Zero, layoutChild.DesiredSize); - AreaOfInterest area2; - if (layoutChild.TryGetAreaOfInterest(AreaOfInterestID.ScrollableRange, out area2)) - rectangle2 = Rectangle.Union(rectangle2, area2.Rectangle); - rectangle1 = Rectangle.Union(rectangle1, rectangle2); - } - ScrollingLayoutOutput scrollAmount1 = this.CalculateScrollAmount(layoutNode, viewBounds, rectangle1, sli, applyPendingScrollData, scrollAreaOfInterestIntoView, areaOfInterestBounds, ref scrollAmount); - scrollAmount1.VisibleIndices = rangeLayoutOutput; - scrollAmount1.ProcessedExplicitScrollIntoViewRequest = flag1; - scrollAmount1.ScrollFocusIntoView = ScrollFocusIntoView; - return scrollAmount1; - } - - private bool IsFocusAreaOfInterest(AreaOfInterestID areaOfInterestID) => areaOfInterestID == AreaOfInterestID.PendingFocus || areaOfInterestID == AreaOfInterestID.Focus; - - private ScrollingLayoutOutput CalculateScrollAmount( - ILayoutNode layoutNode, - Rectangle viewBounds, - Rectangle scrollableBounds, - ScrollingLayoutInput sli, - bool applyPendingScrollData, - bool scrollAreaOfInterestIntoView, - Rectangle areaOfInterestBounds, - ref int scrollAmount) - { - int space1 = this.ItemToSpace(viewBounds.Size); - int space2 = this.ItemToSpace(scrollableBounds.Size); - int num1 = -(space1 - space2); - int num2 = (int)Math.Round(space1 * (double)sli.PageStep); - int num3 = this.ItemToSpace(scrollableBounds.Location.ToSize()); - int num4 = num3 + num1; - if (num1 < 0) - { - num3 = 0; - num4 = 0; - } - if (!areaOfInterestBounds.IsZero && scrollAreaOfInterestIntoView) - { - scrollAmount = this.ScrollIntoView(layoutNode, areaOfInterestBounds, scrollAmount, space1, space2, num3, num4, sli.ScrollIntoViewDisposition); - if (sli.SecondaryScrollIntoViewDisposition != null && sli.SecondaryScrollIntoViewDisposition.Enabled) - scrollAmount = this.ScrollIntoView(layoutNode, areaOfInterestBounds, scrollAmount, space1, space2, num3, num4, sli.SecondaryScrollIntoViewDisposition); - scrollAmount = Math.Max(scrollAmount, num3); - scrollAmount = Math.Min(scrollAmount, num4); - } - else if (num1 > 0) - { - if (applyPendingScrollData) - { - float position = 0.0f; - if (sli.GetPendingScrollPosition(out position)) - { - int num5 = (int)Math2.Blend(num3, num4, position, false); - scrollAmount = num5; - } - int amount = 0; - if (sli.GetPendingPageRequests(out amount)) - { - int num5 = amount * num2; - scrollAmount += num5; - } - } - scrollAmount = Math.Max(scrollAmount, num3); - scrollAmount = Math.Min(scrollAmount, num4); - } - else - scrollAmount = 0; - int space3 = this.ItemToSpace(scrollableBounds.Location.ToSize()); - bool flag1 = -scrollAmount < space3; - bool flag2 = -scrollAmount + space2 > space1; - float num6 = 1f; - float val2 = 1f; - float num7 = 0.0f; - float num8 = 1f; - float num9 = num1; - float num10 = scrollAmount; - if (num2 > 0) - { - val2 = (float)(num9 / (double)num2 + 1.0); - num6 = Math.Max(Math.Min((float)(num10 / (double)num2 + 1.0), val2), 0.0f); - } - if (num1 > 0) - { - num7 = num10 / space2; - num8 = (num10 + space1) / space2; - } - return new ScrollingLayoutOutput() - { - CanScrollNegative = flag1, - CanScrollPositive = flag2, - CurrentPage = num6, - TotalPages = val2, - ViewNear = num7, - ViewFar = num8 - }; - } - - private int ScrollIntoView( - ILayoutNode layoutNode, - Rectangle areaOfInterestBounds, - int scrollAmount, - int viewMajorSpace, - int naturalMajorSpace, - int naturalMinScroll, - int naturalMaxScroll, - ScrollIntoViewDisposition scrollIntoView) - { - Rectangle rectangle = areaOfInterestBounds; - int num1 = this.ItemToSpace(rectangle.Location.ToSize()); - int space = this.ItemToSpace(rectangle.Size); - int num2 = num1 + space; - int num3 = scrollAmount; - int num4 = viewMajorSpace; - int num5 = num3 + num4; - int num6 = num3; - int num7 = num5; - int beginPadding = scrollIntoView.BeginPadding; - switch (scrollIntoView.BeginPaddingRelativeTo) - { - case RelativeEdge.Near: - num6 = num3 + beginPadding; - break; - case RelativeEdge.Far: - num6 = num5 - beginPadding; - break; - } - int endPadding = scrollIntoView.EndPadding; - switch (scrollIntoView.EndPaddingRelativeTo) - { - case RelativeEdge.Near: - num7 = num3 + endPadding; - break; - case RelativeEdge.Far: - num7 = num5 - endPadding; - break; - } - int num8 = num6 - num3; - int num9 = num7 - num5; - if (scrollIntoView.Locked) - { - float num10 = num7 - num6; - float num11 = num10 * scrollIntoView.LockedPosition; - float num12 = num10 * (1f - scrollIntoView.LockedPosition); - int num13 = num1 + (int)(space * (double)scrollIntoView.LockedAlignment); - num1 = num13 - (int)num11; - num2 = num13 + (int)num12; - } - int num14 = scrollAmount; - if (num2 > num7) - { - scrollAmount = num2 - num4 - num9; - int num10 = scrollAmount - num14; - num6 += num10; - int num11 = num7 + num10; - } - if (num1 < num6) - scrollAmount = num1 - num8; - if (scrollIntoView.ContentPositioningBehavior == ContentPositioningPolicy.ShowMaximalContent) - scrollAmount = Math2.Clamp(scrollAmount, naturalMinScroll, naturalMaxScroll); - return scrollAmount; - } - - private int ItemToSpace(Size size) => new MajorMinor(size, this._orientation).Major; - - protected Point ScrollAmountToOffset(int scrollAmount) => new MajorMinor(scrollAmount, 0).ToPoint(this._orientation); - - protected Size GetInfiniteConstraint(Size maxExtent) => new MajorMinor(maxExtent, this._orientation) - { - Major = 16777215 - }.ToSize(this._orientation); - - public static void ResetScrollFocusIntoView() => s_allowScrollFocusIntoView = true; - - public static bool ScrollFocusIntoView => s_allowScrollFocusIntoView; - - public static void DisallowScrollFocusIntoView() => s_allowScrollFocusIntoView = false; - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs deleted file mode 100644 index 70e8be4..0000000 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ScrollingLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Layouts -{ - public class ScrollingLayoutInput : ILayoutInput - { - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - private int _scrollAmount; - private int _pendingScrollAmount; - private int _pendingPageCommands; - private float _pendingScrollPosition; - private bool _havePendingScrollPosition; - private bool _enabled; - private float _pageStep; - private ScrollIntoViewDisposition _scrollIntoView; - private ScrollIntoViewDisposition _secondaryScrollIntoView; - - public ScrollingLayoutInput() - { - this._pageStep = 1f; - this._enabled = true; - this._scrollIntoView = new ScrollIntoViewDisposition(); - } - - public bool Enabled - { - get => this._enabled; - set - { - if (value == this._enabled) - return; - this._enabled = value; - if (!value) - return; - this._scrollAmount = 0; - this._pendingScrollAmount = 0; - this._pendingPageCommands = 0; - this._pendingScrollPosition = 0.0f; - this._havePendingScrollPosition = false; - } - } - - public void Scroll(int amount) => this._scrollAmount += amount; - - public void PageUp() => --this._pendingPageCommands; - - public void PageDown() => ++this._pendingPageCommands; - - public void Home() => this.ScrollToPosition(0.0f); - - public void End() => this.ScrollToPosition(1f); - - public void ScrollToPosition(float position) - { - this._havePendingScrollPosition = true; - this._pendingScrollPosition = position; - } - - public bool GetPendingScrollPosition(out float position) - { - if (!this._havePendingScrollPosition) - { - position = 0.0f; - return false; - } - position = this._pendingScrollPosition; - return true; - } - - public bool GetPendingPageRequests(out int amount) - { - amount = this._pendingPageCommands; - return this._pendingPageCommands != 0; - } - - public int ScrollAmount => this._scrollAmount; - - public void SetScrollAmount(int scrollAmount) => this._pendingScrollAmount = scrollAmount; - - public void OnLayoutComplete() - { - this.SecondaryScrollIntoViewDisposition = null; - this._havePendingScrollPosition = false; - this._pendingPageCommands = 0; - this._scrollAmount = this._pendingScrollAmount; - } - - public float PageStep - { - get => this._pageStep; - set => this._pageStep = value; - } - - public ScrollIntoViewDisposition ScrollIntoViewDisposition - { - get => this._scrollIntoView; - set => this._scrollIntoView = value; - } - - public ScrollIntoViewDisposition SecondaryScrollIntoViewDisposition - { - get => this._secondaryScrollIntoView; - set => this._secondaryScrollIntoView = value; - } - - DataCookie ILayoutInput.Data => Data; - - public static DataCookie Data => s_dataProperty; - - public override string ToString() => InvariantString.Format("{0}(ScrollAmount={1}, PageAmount={2}, PageStep={3}, Disposition=({4}))", this.GetType().Name, _pendingScrollAmount, _pendingPageCommands, _pageStep, _scrollIntoView); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs deleted file mode 100644 index d635c05..0000000 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.ScrollingLayoutOutput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Layouts -{ - public class ScrollingLayoutOutput : ExtendedLayoutOutput - { - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - private bool _canScrollNegative; - private bool _canScrollPositive; - private float _currentPage; - private float _totalPages; - private float _viewNear; - private float _viewFar; - private bool _processedScrollIntoViewRequest; - private bool _scrollFocusIntoView = true; - private VisibleIndexRangeLayoutOutput _visibleIndices; - - public bool CanScrollNegative - { - get => this._canScrollNegative; - set => this._canScrollNegative = value; - } - - public bool CanScrollPositive - { - get => this._canScrollPositive; - set => this._canScrollPositive = value; - } - - public float CurrentPage - { - get => this._currentPage; - set => this._currentPage = value; - } - - public float TotalPages - { - get => this._totalPages; - set => this._totalPages = value; - } - - public float ViewNear - { - get => this._viewNear; - set => this._viewNear = value; - } - - public float ViewFar - { - get => this._viewFar; - set => this._viewFar = value; - } - - public bool ProcessedExplicitScrollIntoViewRequest - { - get => this._processedScrollIntoViewRequest; - set => this._processedScrollIntoViewRequest = value; - } - - public bool ScrollFocusIntoView - { - get => this._scrollFocusIntoView; - set => this._scrollFocusIntoView = value; - } - - public VisibleIndexRangeLayoutOutput VisibleIndices - { - get => this._visibleIndices; - set => this._visibleIndices = value; - } - - public override DataCookie OutputID => DataCookie; - - public static DataCookie DataCookie => s_dataProperty; - - public override string ToString() => InvariantString.Format("{0}(CanScrollNegative={1}, CanScrollPositive={2}, CurrentPage={3}, TotalPages={4})", this.GetType().Name, _canScrollNegative, _canScrollPositive, _currentPage, _totalPages); - } -} diff --git a/UIX/Microsoft/Iris/Layouts/StackLayout.cs b/UIX/Microsoft/Iris/Layouts/StackLayout.cs deleted file mode 100644 index 7139f4a..0000000 --- a/UIX/Microsoft/Iris/Layouts/StackLayout.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.StackLayout -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; - -namespace Microsoft.Iris.Layouts -{ - public class StackLayout : ILayout - { - private static StackLayoutInput s_defaultLayoutInput = new StackLayoutInput(); - private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - - public static DataCookie Data => s_dataProperty; - - public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) - { - Size size1 = new Size(); - if (layoutNode.LayoutChildrenCount > 0) - { - int num = 0; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - StackLayoutInput layoutInputForNode = this.GetLayoutInputForNode(layoutChild); - Size size2 = layoutChild.Measure(constraint); - size1.Height = Math.Max(size1.Height, layoutChild.DesiredSize.Height); - if (layoutInputForNode.Priority == StackPriority.High) - num += size2.Width; - else if (layoutInputForNode.Priority == StackPriority.Medium) - num += layoutInputForNode.MinimumSize.Width; - } - size1.Width = num; - layoutNode.MeasureData = num; - } - layoutNode.RequestMoreChildren(int.MaxValue); - return size1; - } - - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) - { - if (layoutNode.LayoutChildrenCount <= 0) - return; - int measureData = (int)layoutNode.MeasureData; - int width1 = slot.Bounds.Width; - int x = 0; - int width2 = width1 - measureData; - foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) - { - if (x < width1) - { - int width3 = width1 - x; - StackLayoutInput layoutInputForNode = this.GetLayoutInputForNode(layoutChild); - if (layoutInputForNode.Priority == StackPriority.High) - { - if (layoutChild.DesiredSize.Width > width3) - { - Size constraint = new Size(width3, slot.Bounds.Height); - layoutChild.Measure(constraint); - } - } - else if (layoutInputForNode.Priority == StackPriority.Medium && layoutInputForNode.MinimumSize.Width <= width3) - { - Size constraint = new Size(layoutInputForNode.MinimumSize.Width + width2, slot.Bounds.Height); - layoutChild.Measure(constraint); - width2 -= layoutChild.DesiredSize.Width - layoutInputForNode.MinimumSize.Width; - } - else if (layoutInputForNode.Priority == StackPriority.Low && width2 > 0) - { - Size constraint = new Size(width2, slot.Bounds.Height); - layoutChild.Measure(constraint); - width2 -= layoutChild.DesiredSize.Width; - } - else - { - layoutChild.MarkHidden(); - continue; - } - layoutChild.Arrange(slot, new Rectangle(x, 0, layoutChild.DesiredSize.Width, slot.Bounds.Height)); - x += layoutChild.DesiredSize.Width; - } - else - layoutChild.MarkHidden(); - } - } - - private StackLayoutInput GetLayoutInputForNode(ILayoutNode layoutNode) - { - if (!(layoutNode.GetLayoutInput(s_dataProperty) is StackLayoutInput stackLayoutInput)) - stackLayoutInput = s_defaultLayoutInput; - return stackLayoutInput; - } - } -} diff --git a/UIX/Microsoft/Iris/Layouts/StackLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/StackLayoutInput.cs deleted file mode 100644 index 8adcc64..0000000 --- a/UIX/Microsoft/Iris/Layouts/StackLayoutInput.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.StackLayoutInput -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Layouts -{ - public class StackLayoutInput : ILayoutInput - { - private StackPriority _priority; - private Size _minimumSize; - - public StackLayoutInput() => this.Priority = StackPriority.Low; - - public StackPriority Priority - { - get => this._priority; - set => this._priority = value; - } - - public Size MinimumSize - { - get => this._minimumSize; - set => this._minimumSize = value; - } - - DataCookie ILayoutInput.Data => StackLayout.Data; - } -} diff --git a/UIX/Microsoft/Iris/Layouts/StackPriority.cs b/UIX/Microsoft/Iris/Layouts/StackPriority.cs deleted file mode 100644 index bf022db..0000000 --- a/UIX/Microsoft/Iris/Layouts/StackPriority.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.StackPriority -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum StackPriority - { - Low, - Medium, - High, - } -} diff --git a/UIX/Microsoft/Iris/Layouts/StripAlignment.cs b/UIX/Microsoft/Iris/Layouts/StripAlignment.cs deleted file mode 100644 index 29e4a3e..0000000 --- a/UIX/Microsoft/Iris/Layouts/StripAlignment.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Layouts.StripAlignment -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Layouts -{ - public enum StripAlignment - { - Near, - Center, - Far, - } -} diff --git a/UIX/Microsoft/Iris/Library/AncestorEnumerator.cs b/UIX/Microsoft/Iris/Library/AncestorEnumerator.cs deleted file mode 100644 index 67980de..0000000 --- a/UIX/Microsoft/Iris/Library/AncestorEnumerator.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.AncestorEnumerator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Library -{ - public struct AncestorEnumerator : IEnumerator, IEnumerable - { - private TreeNode _nodeStart; - private TreeNode _nodeCurrent; - private TreeNode _nodeNext; - - public AncestorEnumerator(TreeNode nodeStart) - { - this._nodeStart = nodeStart; - this._nodeCurrent = null; - this._nodeNext = this._nodeStart; - } - - object IEnumerator.Current => _nodeCurrent; - - public TreeNode Current => this._nodeCurrent; - - IEnumerator IEnumerable.GetEnumerator() => this; - - public AncestorEnumerator GetEnumerator() => this; - - public void Reset() - { - this._nodeCurrent = null; - this._nodeNext = this._nodeStart; - } - - public bool MoveNext() - { - this._nodeCurrent = this._nodeNext; - if (this._nodeNext == null) - return false; - this._nodeNext = this._nodeNext.Parent; - return true; - } - } -} diff --git a/UIX/Microsoft/Iris/Library/Bits.cs b/UIX/Microsoft/Iris/Library/Bits.cs deleted file mode 100644 index 19d5fca..0000000 --- a/UIX/Microsoft/Iris/Library/Bits.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.Bits -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.Library -{ - public static class Bits - { - public static bool TestFlag(int value, int maskValue) => (value & maskValue) != 0; - - public static bool TestFlag(uint value, uint maskValue) => ((int)value & (int)maskValue) != 0; - - public static bool TestAnyFlags(int value, int maskValue) => (value & maskValue) != 0; - - public static bool TestAnyFlags(uint value, uint maskValue) => ((int)value & (int)maskValue) != 0; - - public static bool TestAllFlags(int value, int maskValue) => (value & maskValue) == maskValue; - - public static bool TestAllFlags(uint value, uint maskValue) => ((int)value & (int)maskValue) == (int)maskValue; - - public static void SetFlag(ref int value, int maskValue) => value |= maskValue; - - public static void SetFlag(ref uint value, uint maskValue) => value |= maskValue; - - public static void ClearFlag(ref int value, int maskValue) => value &= ~maskValue; - - public static void ClearFlag(ref uint value, uint maskValue) => value &= ~maskValue; - - public static void ChangeFlags(ref int value, int newValue, int maskValue) => value = newValue & maskValue | value & ~maskValue; - - public static void ChangeFlags(ref uint value, uint newValue, uint maskValue) => value = (uint)((int)newValue & (int)maskValue | (int)value & ~(int)maskValue); - - public static void ChangeFlag(ref int value, bool flag, int maskValue) - { - int num = flag ? maskValue : 0; - value = num & maskValue | value & ~maskValue; - } - - public static void ChangeFlag(ref uint value, bool flag, uint maskValue) - { - uint num = flag ? maskValue : 0U; - value = (uint)((int)num & (int)maskValue | (int)value & ~(int)maskValue); - } - - public static void FlipFlags(ref int value, int maskValue) => value ^= maskValue; - - public static void FlipFlags(ref uint value, uint maskValue) => value ^= maskValue; - - public static int ExtractFlags(int value, int maskValue) => value & maskValue; - - public static int ExtractFlags(int value, int maskValue, int shiftBitsCount) => (value & maskValue) >> shiftBitsCount; - - public static uint ExtractFlags(uint value, uint maskValue) => value & maskValue; - - public static uint ExtractFlags(uint value, uint maskValue, int shiftBitsCount) => (value & maskValue) >> shiftBitsCount; - - [Conditional("DEBUG")] - public static void AssertFlags(int testFlagsValue, int validFlagsValue) - { - } - - [Conditional("DEBUG")] - public static void AssertFlags(uint testFlagsValue, uint validFlagsValue) - { - } - - public static void PromptFlags(int testFlagsValue, int validFlagsValue) - { - } - - public static void PromptFlags(uint testFlagsValue, uint validFlagsValue) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Library/DataCookie.cs b/UIX/Microsoft/Iris/Library/DataCookie.cs deleted file mode 100644 index 614c8a7..0000000 --- a/UIX/Microsoft/Iris/Library/DataCookie.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.DataCookie -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public struct DataCookie - { - public static readonly DataCookie NULL = new DataCookie(); - private uint m_value; - - private DataCookie(uint value) => this.m_value = value; - - public static bool operator ==(DataCookie hl, DataCookie hr) => (int)hl.m_value == (int)hr.m_value; - - public static bool operator !=(DataCookie hl, DataCookie hr) => (int)hl.m_value != (int)hr.m_value; - - public override bool Equals(object oCompare) - { - uint num; - if (oCompare is DataCookie dataCookie) - num = dataCookie.m_value; - else if (oCompare is uint value) - num = value; - else - return false; - - return (int)m_value == (int)num; - } - - public override int GetHashCode() => (int)this.m_value; - - public static DataCookie FromUInt32(uint value) => new DataCookie(value); - - public static uint ToUInt32(DataCookie handle) => handle.m_value; - - public static DataCookie ReserveSlot() => FromUInt32(KeyAllocator.ReserveSlot()); - } -} diff --git a/UIX/Microsoft/Iris/Library/DisposableNotifyObjectBase.cs b/UIX/Microsoft/Iris/Library/DisposableNotifyObjectBase.cs deleted file mode 100644 index d73e110..0000000 --- a/UIX/Microsoft/Iris/Library/DisposableNotifyObjectBase.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.DisposableNotifyObjectBase -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris.Library -{ - public class DisposableNotifyObjectBase : DisposableObject, INotifyObject - { - private NotifyService _notifier = new NotifyService(); - - protected DisposableNotifyObjectBase() - { - } - - protected void FireNotification(string id) => this._notifier.Fire(id); - - protected void FireThreadSafeNotification(string id) => this._notifier.FireThreadSafe(id); - - public void AddListener(Listener listener) => this._notifier.AddListener(listener); - } -} diff --git a/UIX/Microsoft/Iris/Library/DisposableObject.cs b/UIX/Microsoft/Iris/Library/DisposableObject.cs deleted file mode 100644 index 0f94518..0000000 --- a/UIX/Microsoft/Iris/Library/DisposableObject.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.DisposableObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.Library -{ - public class DisposableObject : IDisposableObject - { - private bool _isDisposed; - - protected DisposableObject() - { - } - - public bool IsDisposed => this._isDisposed; - - public void DeclareOwner(object owner) => this.OnOwnerDeclared(owner); - - public void TransferOwnership(object owner) => this.OnOwnerDeclared(owner); - - protected virtual void OnOwnerDeclared(object owner) - { - } - - public void Dispose(object owner) => this.OnDispose(); - - protected virtual void OnDispose() => this._isDisposed = true; - - [Conditional("DEBUG")] - public void DEBUG_DeclareDisposeUnnecessary() - { - } - } -} diff --git a/UIX/Microsoft/Iris/Library/DynamicData.cs b/UIX/Microsoft/Iris/Library/DynamicData.cs deleted file mode 100644 index d8650e9..0000000 --- a/UIX/Microsoft/Iris/Library/DynamicData.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.DynamicData -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Library -{ - public struct DynamicData - { - private SmartMap _dataMap; - - public void Create() => this._dataMap = new SmartMap(); - - public object GetData(DataCookie cookie) => this._dataMap[GetKey(cookie)]; - - public void SetData(DataCookie cookie, object value) => this._dataMap[GetKey(cookie)] = value; - - public Delegate GetEventHandler(EventCookie cookie) => this._dataMap[GetKey(cookie)] as Delegate; - - public bool AddEventHandler(EventCookie cookie, Delegate handlerToAdd) - { - uint key = GetKey(cookie); - Delegate data = this._dataMap[key] as Delegate; - this._dataMap[key] = Delegate.Combine(data, handlerToAdd); - return (object)data == null; - } - - public bool RemoveEventHandler(EventCookie cookie, Delegate handlerToRemove) - { - uint key = GetKey(cookie); - Delegate @delegate = Delegate.Remove(this._dataMap[key] as Delegate, handlerToRemove); - this._dataMap[key] = @delegate; - return (object)@delegate == null; - } - - public void RemoveEventHandlers(EventCookie cookie) => this._dataMap[GetKey(cookie)] = null; - - private static uint GetKey(DataCookie cookie) => DataCookie.ToUInt32(cookie); - - private static uint GetKey(EventCookie cookie) => EventCookie.ToUInt32(cookie); - } -} diff --git a/UIX/Microsoft/Iris/Library/EventCookie.cs b/UIX/Microsoft/Iris/Library/EventCookie.cs deleted file mode 100644 index 70c49aa..0000000 --- a/UIX/Microsoft/Iris/Library/EventCookie.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.EventCookie -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public struct EventCookie - { - public static readonly EventCookie NULL = new EventCookie(); - private uint m_value; - - private EventCookie(uint value) => this.m_value = value; - - public static bool operator ==(EventCookie hl, EventCookie hr) => (int)hl.m_value == (int)hr.m_value; - - public static bool operator !=(EventCookie hl, EventCookie hr) => (int)hl.m_value != (int)hr.m_value; - - public override bool Equals(object oCompare) - { - uint num; - if (oCompare is EventCookie eventCookie) - num = eventCookie.m_value; - else if (oCompare is uint value) - num = value; - else - return false; - - return (int)m_value == (int)num; - } - - public override int GetHashCode() => (int)this.m_value; - - public static EventCookie FromUInt32(uint value) => new EventCookie(value); - - public static uint ToUInt32(EventCookie handle) => handle.m_value; - - public static EventCookie ReserveSlot() => FromUInt32(KeyAllocator.ReserveSlot()); - } -} diff --git a/UIX/Microsoft/Iris/Library/ExpandableArray.cs b/UIX/Microsoft/Iris/Library/ExpandableArray.cs deleted file mode 100644 index d3fd2ac..0000000 --- a/UIX/Microsoft/Iris/Library/ExpandableArray.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.ExpandableArray -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.Collections; -using System.Linq; - -namespace Microsoft.Iris.Library -{ - public class ExpandableArray - { - private object[] _array; - private int _generation; - private int _lockCount; - - public ExpandableArray(int initialSize) => this._array = new object[initialSize]; - - public int Length => this._array.Length; - - public bool IsFixedSize => false; - - public bool IsReadOnly => false; - - public object this[int index] - { - get => this._array[index]; - set => this.SetItem(index, value); - } - - public int Add(object value) - { - int index = 0; - while (index < this._array.Length && this._array[index] != null) - ++index; - this.SetItem(index, value); - return index; - } - - public void Clear() - { - this.IncrementGeneration(); - Array.Clear(_array, 0, _array.Length); - } - - public bool Contains(object value) => this._array.Contains(value); - - public int IndexOf(object value) => Array.IndexOf(_array, value); - - public void Insert(int index, object value) - { - } - - public void Remove(object value) - { - } - - public void RemoveAt(int index) - { - } - - public int Count - { - get - { - int num = 0; - for (int index = 0; index < this._array.Length; ++index) - { - if (this._array[index] != null) - ++num; - } - return num; - } - } - - public bool IsSynchronized => false; - - public object SyncRoot => (object)null; - - public void CopyTo(Array array, int index) => this._array.CopyTo(array, index); - - public ExpandableArray.NullSkippingEnumerator GetEnumerator() => new ExpandableArray.NullSkippingEnumerator(this); - - public void LockArray() => ++this._lockCount; - - public void UnlockArray() => --this._lockCount; - - private void IncrementGeneration() - { - ++this._generation; - if (this._generation != int.MaxValue) - return; - this._generation = 0; - } - - private void ExpandArray(int index) - { - int length = this._array.Length; - while (index >= length) - length <<= 1; - object[] objArray = new object[length]; - for (int index1 = 0; index1 < this._array.Length; ++index1) - objArray[index1] = this._array[index1]; - this._array = objArray; - } - - private void SetItem(int index, object value) - { - this.IncrementGeneration(); - if (index >= this._array.Length) - this.ExpandArray(index); - this._array[index] = value; - } - - public struct NullSkippingEnumerator : IEnumerator - { - private ExpandableArray _array; - private int _position; - private int _generation; - - public NullSkippingEnumerator(ExpandableArray array) - { - this._array = array; - this._position = -1; - this._generation = array._generation; - } - - public object Current - { - get - { - this.CheckGeneration(); - return this._array[this._position]; - } - } - - public bool MoveNext() - { - this.CheckGeneration(); - for (++this._position; this._position < this._array.Length; ++this._position) - { - if (this._array[this._position] != null) - return true; - } - return false; - } - - public void Reset() - { - this.CheckGeneration(); - this._position = -1; - } - - private void CheckGeneration() - { - } - } - } -} diff --git a/UIX/Microsoft/Iris/Library/IDisposableObject.cs b/UIX/Microsoft/Iris/Library/IDisposableObject.cs deleted file mode 100644 index 4c8835d..0000000 --- a/UIX/Microsoft/Iris/Library/IDisposableObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.IDisposableObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public interface IDisposableObject - { - bool IsDisposed { get; } - - void DeclareOwner(object owner); - - void TransferOwnership(object owner); - - void Dispose(object owner); - } -} diff --git a/UIX/Microsoft/Iris/Library/IDisposableOwner.cs b/UIX/Microsoft/Iris/Library/IDisposableOwner.cs deleted file mode 100644 index d33513d..0000000 --- a/UIX/Microsoft/Iris/Library/IDisposableOwner.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.IDisposableOwner -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public interface IDisposableOwner - { - void RegisterDisposable(IDisposableObject disposable); - - bool UnregisterDisposable(ref IDisposableObject disposable); - } -} diff --git a/UIX/Microsoft/Iris/Library/ITreeNode.cs b/UIX/Microsoft/Iris/Library/ITreeNode.cs deleted file mode 100644 index c778805..0000000 --- a/UIX/Microsoft/Iris/Library/ITreeNode.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.ITreeNode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Library -{ - public interface ITreeNode - { - UIZone Zone { get; } - - ITreeNode Parent { get; } - } -} diff --git a/UIX/Microsoft/Iris/Library/KeyAllocator.cs b/UIX/Microsoft/Iris/Library/KeyAllocator.cs deleted file mode 100644 index b044a30..0000000 --- a/UIX/Microsoft/Iris/Library/KeyAllocator.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.KeyAllocator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Threading; - -namespace Microsoft.Iris.Library -{ - public class KeyAllocator - { - private static int s_idxKeyGen; - - public static uint ReserveSlot() => (uint)Interlocked.Increment(ref s_idxKeyGen); - } -} diff --git a/UIX/Microsoft/Iris/Library/Math2.cs b/UIX/Microsoft/Iris/Library/Math2.cs deleted file mode 100644 index 12c7fe7..0000000 --- a/UIX/Microsoft/Iris/Library/Math2.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.Math2 -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public class Math2 - { - public static int FindPowerOf2(int value) => FindPowerOf2(value, 1); - - public static int FindPowerOf2(int value, int startValue) - { - int num = startValue; - while (num < value) - num *= 2; - return num; - } - - public static int RoundUp(float value) => (int)(value + 0.5); - - public static int Clamp(int value, int min, int max) - { - if (value < min) - return min; - return value > max ? max : value; - } - - public static float Clamp(float value, float min, float max) - { - if (value < (double)min) - return min; - return value > (double)max ? max : value; - } - - public static bool WithinEpsilon(float value1, float value2) - { - float num = value1 - value2; - return -9.99999974737875E-06 <= num && num <= 9.99999974737875E-06; - } - - public static double Blend(double a, double b, double weight, bool allowOutOfRangeWeights) => (1.0 - weight) * a + weight * b; - } -} diff --git a/UIX/Microsoft/Iris/Library/NotifyObjectBase.cs b/UIX/Microsoft/Iris/Library/NotifyObjectBase.cs deleted file mode 100644 index 5bc4f16..0000000 --- a/UIX/Microsoft/Iris/Library/NotifyObjectBase.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.NotifyObjectBase -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup; - -namespace Microsoft.Iris.Library -{ - public class NotifyObjectBase : INotifyObject - { - private NotifyService _notifier = new NotifyService(); - - protected NotifyObjectBase() - { - } - - protected void FireNotification(string id) => this._notifier.Fire(id); - - protected void FireThreadSafeNotification(string id) => this._notifier.FireThreadSafe(id); - - public void AddListener(Listener listener) => this._notifier.AddListener(listener); - } -} diff --git a/UIX/Microsoft/Iris/Library/Result.cs b/UIX/Microsoft/Iris/Library/Result.cs deleted file mode 100644 index 91dcc34..0000000 --- a/UIX/Microsoft/Iris/Library/Result.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.Result -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public struct Result - { - public static Result Success = new Result(null); - private string _error; - - public static Result Fail(string error) => new Result(error); - - public static Result Fail(string format, object param) => new Result(string.Format(format, param)); - - public static Result Fail(string format, object param1, object param2) => new Result(string.Format(format, param1, param2)); - - public static Result Fail(string format, object param1, object param2, object param3) => new Result(string.Format(format, param1, param2, param3)); - - public bool Failed => this._error != null; - - public string Error => this._error; - - public override string ToString() => this._error; - - private Result(string error) => this._error = error; - } -} diff --git a/UIX/Microsoft/Iris/Library/SharedDisposableObject.cs b/UIX/Microsoft/Iris/Library/SharedDisposableObject.cs deleted file mode 100644 index f7eb496..0000000 --- a/UIX/Microsoft/Iris/Library/SharedDisposableObject.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.SharedDisposableObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public class SharedDisposableObject : DisposableObject - { - private int _usageCount; - - public SharedDisposableObject() => this.DeclareOwner(this); - - protected override void OnDispose() => base.OnDispose(); - - public virtual void RegisterUsage(object consumer) => ++this._usageCount; - - public virtual void UnregisterUsage(object consumer) - { - --this._usageCount; - if (this._usageCount != 0) - return; - this.Dispose(this); - } - } -} diff --git a/UIX/Microsoft/Iris/Library/SmartMap.cs b/UIX/Microsoft/Iris/Library/SmartMap.cs deleted file mode 100644 index 49df5c5..0000000 --- a/UIX/Microsoft/Iris/Library/SmartMap.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.SmartMap -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Library -{ - public struct SmartMap - { - private SmartMap.Entry[] _listEntries; - - public int Count - { - get - { - int num = 0; - if (this._listEntries != null) - num = this._listEntries.Length; - return num; - } - } - - public bool IsEmpty => this.Count == 0; - - public object this[uint key] - { - get - { - int index = this.IndexOf(key); - return index < 0 ? null : this._listEntries[index].dataObject; - } - set - { - int slotIndex = this.IndexOf(key); - if (value != null) - { - if (slotIndex >= 0) - this._listEntries[slotIndex].dataObject = value; - else - this.Add(key, value, ~slotIndex); - } - else - { - if (slotIndex < 0) - return; - this.Remove(key, slotIndex); - } - } - } - - public uint[] Keys - { - get - { - uint[] numArray = null; - if (this._listEntries != null) - { - numArray = new uint[this._listEntries.Length]; - for (int index = 0; index < this._listEntries.Length; ++index) - numArray[index] = this._listEntries[index].key; - } - return numArray; - } - } - - public object[] Values - { - get - { - object[] objArray = null; - if (this._listEntries != null) - { - objArray = new object[this._listEntries.Length]; - for (int index = 0; index < this._listEntries.Length; ++index) - objArray[index] = this._listEntries[index].dataObject; - } - return objArray; - } - } - - public bool Lookup(object desired, out uint key) - { - if (this._listEntries != null) - { - foreach (SmartMap.Entry listEntry in this._listEntries) - { - if (listEntry.dataObject == desired) - { - key = listEntry.key; - return true; - } - } - } - key = 0U; - return false; - } - - private int IndexOf(uint key) - { - if (this._listEntries == null) - return -1; - uint num1 = uint.MaxValue; - int index1 = 0; - if (this._listEntries.Length > 4) - { - int num2 = 0; - int num3 = this._listEntries.Length - 1; - while (num2 <= num3) - { - index1 = (num3 + num2) / 2; - num1 = this._listEntries[index1].key; - if ((int)key == (int)num1) - return index1; - if (key < num1) - num3 = index1 - 1; - else - num2 = index1 + 1; - } - } - else - { - for (int index2 = 0; index2 < this._listEntries.Length; ++index2) - { - index1 = index2; - num1 = this._listEntries[index1].key; - if ((int)key == (int)num1) - return index1; - if (key < num1) - break; - } - } - if (key > num1) - ++index1; - return ~index1; - } - - private void Add(uint key, object dataObject, int slotIndex) - { - SmartMap.Entry[] entryArray; - if (this._listEntries == null) - { - entryArray = new SmartMap.Entry[1]; - } - else - { - int length = this._listEntries.Length; - entryArray = new SmartMap.Entry[length + 1]; - Array.Copy(_listEntries, entryArray, slotIndex); - Array.Copy(_listEntries, slotIndex, entryArray, slotIndex + 1, length - slotIndex); - } - this._listEntries = entryArray; - this._listEntries[slotIndex].key = key; - this._listEntries[slotIndex].dataObject = dataObject; - } - - private void Remove(uint key, int slotIndex) - { - int length = this._listEntries.Length; - if (length > 0) - { - SmartMap.Entry[] entryArray = new SmartMap.Entry[length - 1]; - Array.Copy(_listEntries, entryArray, slotIndex); - Array.Copy(_listEntries, slotIndex + 1, entryArray, slotIndex, length - (slotIndex + 1)); - this._listEntries = entryArray; - } - else - this._listEntries = null; - } - - private struct Entry - { - public uint key; - public object dataObject; - } - } -} diff --git a/UIX/Microsoft/Iris/Library/StackIListEnumerator.cs b/UIX/Microsoft/Iris/Library/StackIListEnumerator.cs deleted file mode 100644 index 504b4e6..0000000 --- a/UIX/Microsoft/Iris/Library/StackIListEnumerator.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.StackIListEnumerator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Library -{ - public struct StackIListEnumerator : IEnumerator - { - private const int START_INVALID_INDEX = -1; - private IList _list; - private int _currentIndex; - - public StackIListEnumerator(IList list) - { - this._list = list; - this._currentIndex = -1; - } - - public StackIListEnumerator GetEnumerator() => this; - - public bool MoveNext() => ++this._currentIndex < this._list.Count; - - public object Current => this._list[this._currentIndex]; - - public void Reset() => this._currentIndex = -1; - } -} diff --git a/UIX/Microsoft/Iris/Library/StackIListReverseEnumerator.cs b/UIX/Microsoft/Iris/Library/StackIListReverseEnumerator.cs deleted file mode 100644 index 1d2d3ad..0000000 --- a/UIX/Microsoft/Iris/Library/StackIListReverseEnumerator.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.StackIListReverseEnumerator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Library -{ - public struct StackIListReverseEnumerator : IEnumerator - { - private IList _list; - private int _currentIndex; - - public StackIListReverseEnumerator(IList list) - { - this._list = list; - this._currentIndex = list.Count; - } - - public StackIListReverseEnumerator GetEnumerator() => this; - - public bool MoveNext() => --this._currentIndex >= 0; - - public object Current => this._list[this._currentIndex]; - - public void Reset() => this._currentIndex = this._list.Count; - } -} diff --git a/UIX/Microsoft/Iris/Library/TreeNode.cs b/UIX/Microsoft/Iris/Library/TreeNode.cs deleted file mode 100644 index 1e0bafe..0000000 --- a/UIX/Microsoft/Iris/Library/TreeNode.cs +++ /dev/null @@ -1,261 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.TreeNode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Library -{ - public abstract class TreeNode : DisposableObject, ITreeNode - { - private static readonly DataCookie s_instanceIDProperty = DataCookie.ReserveSlot(); - private static readonly EventCookie s_deepParentChangeEvent = EventCookie.ReserveSlot(); - private TreeNode _nodeParent; - private TreeNode _nodeFirstChild; - private TreeNode _nodeNext; - private TreeNode _nodePrevious; - private UIZone _zone; - private DynamicData _dataMap; - - public TreeNode() - { - this._dataMap = new DynamicData(); - this._dataMap.Create(); - } - - protected override void OnDispose() - { - base.OnDispose(); - this.ChangeParent(null); - this.RemoveEventHandlers(s_deepParentChangeEvent); - } - - public bool IsZoned => this._zone != null; - - public void ChangeParent(TreeNode nodeNewParent) => this.ChangeParent(nodeNewParent, null, LinkType.First); - - public void ChangeParent(TreeNode nodeNewParent, TreeNode nodeSibling, TreeNode.LinkType lt) - { - if (this._nodeParent == nodeNewParent) - return; - UIZone zone = null; - TreeNode nodeParent = this._nodeParent; - if (this._nodeParent != null) - { - DoUnlink(this); - nodeParent.OnChildrenChanged(); - } - if (nodeNewParent != null) - { - DoLink(nodeNewParent, this, nodeSibling, lt); - zone = nodeNewParent.Zone; - nodeNewParent.OnChildrenChanged(); - } - this.PropagateZone(zone); - this.FireTreeChangeWorker(); - } - - public void PropagateZone(UIZone zone) - { - if (this._zone == zone) - return; - if (this._zone != null) - this.OnZoneDetached(); - this._zone = zone; - if (zone != null) - this.OnZoneAttached(); - foreach (TreeNode child in this.Children) - child.PropagateZone(zone); - } - - public void MoveNode(TreeNode nodeSibling, TreeNode.LinkType lt) - { - TreeNode nodeParent = this._nodeParent; - DoUnlink(this); - DoLink(nodeParent, this, nodeSibling, lt); - } - - public void RemoveAllChildren(bool disposeChildrenFlag) - { - while (this._nodeFirstChild != null) - this._nodeFirstChild.ChangeParent(null); - } - - protected virtual void OnZoneAttached() - { - } - - protected virtual void OnZoneDetached() - { - } - - protected virtual void OnChildrenChanged() - { - } - - public event EventHandler DeepParentChange - { - add => this.AddEventHandler(s_deepParentChangeEvent, value); - remove => this.RemoveEventHandler(s_deepParentChangeEvent, value); - } - - public UIZone Zone => this._zone; - - UIZone ITreeNode.Zone => this._zone; - - public UISession UISession => this._zone.Session; - - public bool HasChildren => this._nodeFirstChild != null; - - public abstract bool IsRoot { get; } - - ITreeNode ITreeNode.Parent => _nodeParent; - - public TreeNode Parent => this._nodeParent; - - public TreeNode NextSibling => this._nodeNext; - - public TreeNode PreviousSibling => this._nodePrevious; - - public TreeNode FirstSibling => this._nodeParent == null ? this : this._nodeParent._nodeFirstChild; - - public TreeNode LastSibling - { - get - { - TreeNode treeNode = this; - while (treeNode._nodeNext != null) - treeNode = treeNode._nodeNext; - return treeNode; - } - } - - public TreeNode FirstChild => this._nodeFirstChild; - - public TreeNode LastChild => this._nodeFirstChild != null ? this._nodeFirstChild.LastSibling : null; - - public TreeNodeCollection Children => new TreeNodeCollection(this); - - public AncestorEnumerator Ancestors => new AncestorEnumerator(this); - - public bool HasDescendant(TreeNode nodeOther) - { - for (; nodeOther != null; nodeOther = nodeOther._nodeParent) - { - if (nodeOther == this) - return true; - } - return false; - } - - public int ChildCount - { - get - { - int num = 0; - for (TreeNode treeNode = this._nodeFirstChild; treeNode != null; treeNode = treeNode._nodeNext) - ++num; - return num; - } - } - - private static void DoLink( - TreeNode nodeParent, - TreeNode nodeChange, - TreeNode nodeSibling, - TreeNode.LinkType lt) - { - nodeChange._nodeParent = nodeParent; - TreeNode nodeFirstChild = nodeParent._nodeFirstChild; - if (nodeFirstChild == null) - { - nodeParent._nodeFirstChild = nodeChange; - } - else - { - switch (lt) - { - case LinkType.Before: - nodeChange._nodeNext = nodeSibling; - nodeChange._nodePrevious = nodeSibling._nodePrevious; - nodeSibling._nodePrevious = nodeChange; - if (nodeChange._nodePrevious != null) - { - nodeChange._nodePrevious._nodeNext = nodeChange; - break; - } - nodeParent._nodeFirstChild = nodeChange; - break; - case LinkType.Behind: - nodeChange._nodePrevious = nodeSibling; - nodeChange._nodeNext = nodeSibling._nodeNext; - nodeSibling._nodeNext = nodeChange; - if (nodeChange._nodeNext == null) - break; - nodeChange._nodeNext._nodePrevious = nodeChange; - break; - case LinkType.First: - nodeParent._nodeFirstChild = nodeChange; - nodeChange._nodeNext = nodeFirstChild; - if (nodeFirstChild == null) - break; - nodeFirstChild._nodePrevious = nodeChange; - break; - case LinkType.Last: - TreeNode lastSibling = nodeFirstChild.LastSibling; - lastSibling._nodeNext = nodeChange; - nodeChange._nodePrevious = lastSibling; - break; - } - } - } - - private static void DoUnlink(TreeNode nodeChange) - { - if (nodeChange._nodeParent._nodeFirstChild == nodeChange) - nodeChange._nodeParent._nodeFirstChild = nodeChange._nodeNext; - if (nodeChange._nodeNext != null) - nodeChange._nodeNext._nodePrevious = nodeChange._nodePrevious; - if (nodeChange._nodePrevious != null) - nodeChange._nodePrevious._nodeNext = nodeChange._nodeNext; - nodeChange._nodeParent = null; - nodeChange._nodeNext = null; - nodeChange._nodePrevious = null; - } - - private void FireTreeChangeWorker() - { - foreach (TreeNode child in this.Children) - child.FireTreeChangeWorker(); - if (!(this.GetEventHandler(s_deepParentChangeEvent) is EventHandler eventHandler)) - return; - eventHandler(this, EventArgs.Empty); - } - - protected object GetData(DataCookie cookie) => this._dataMap.GetData(cookie); - - protected void SetData(DataCookie cookie, object value) => this._dataMap.SetData(cookie, value); - - protected Delegate GetEventHandler(EventCookie cookie) => this._dataMap.GetEventHandler(cookie); - - protected bool AddEventHandler(EventCookie cookie, Delegate handlerToAdd) => this._dataMap.AddEventHandler(cookie, handlerToAdd); - - protected bool RemoveEventHandler(EventCookie cookie, Delegate handlerToRemove) => this._dataMap.RemoveEventHandler(cookie, handlerToRemove); - - protected void RemoveEventHandlers(EventCookie cookie) => this._dataMap.RemoveEventHandlers(cookie); - - private static uint GetKey(EventCookie cookie) => EventCookie.ToUInt32(cookie); - - public enum LinkType - { - Before = 1, - Behind = 2, - First = 3, - Last = 4, - } - } -} diff --git a/UIX/Microsoft/Iris/Library/TreeNodeCollection.cs b/UIX/Microsoft/Iris/Library/TreeNodeCollection.cs deleted file mode 100644 index c40e9c2..0000000 --- a/UIX/Microsoft/Iris/Library/TreeNodeCollection.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.TreeNodeCollection -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.Collections; - -namespace Microsoft.Iris.Library -{ - public struct TreeNodeCollection : IList, ICollection, IEnumerable - { - private TreeNode _nodeSubject; - - public TreeNodeCollection(TreeNode nodeSubject) => this._nodeSubject = nodeSubject; - - public int Count => this._nodeSubject.ChildCount; - - bool ICollection.IsSynchronized => false; - - object ICollection.SyncRoot => (object)null; - - bool IList.IsFixedSize => false; - - bool IList.IsReadOnly => false; - - object IList.this[int index] - { - get => this[index]; - set - { - } - } - - public TreeNode this[int childIndex] - { - get - { - int num = 0; - foreach (TreeNode treeNode in this) - { - if (childIndex == num) - return treeNode; - ++num; - } - return null; - } - set - { - } - } - - IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - - public TreeNodeEnumerator GetEnumerator() => new TreeNodeEnumerator(this._nodeSubject); - - void ICollection.CopyTo(Array destList, int destIndex) - { - foreach (TreeNode treeNode in this) - destList.SetValue(treeNode, destIndex++); - } - - public void CopyTo(TreeNode[] destList, int destIndex) => ((ICollection)this).CopyTo(destList, destIndex); - - int IList.Add(object value) - { - this.Add((TreeNode)value); - return this._nodeSubject.ChildCount - 1; - } - - public void Add(TreeNode nodeChild) => nodeChild.ChangeParent(this._nodeSubject, null, TreeNode.LinkType.Last); - - public void Clear() => this._nodeSubject.RemoveAllChildren(true); - - bool IList.Contains(object nodeChild) => this.Contains((TreeNode)nodeChild); - - public bool Contains(TreeNode nodeChild) => nodeChild.Parent == this._nodeSubject; - - int IList.IndexOf(object nodeChild) => this.IndexOf((TreeNode)nodeChild); - - public int IndexOf(TreeNode nodeChild) - { - if (nodeChild.Parent != this._nodeSubject) - return -1; - int num = 0; - foreach (TreeNode treeNode in this) - { - if (nodeChild == treeNode) - return num; - ++num; - } - return -1; - } - - void IList.Insert(int insertAtIndex, object nodeChild) => this.Insert(insertAtIndex, (TreeNode)nodeChild); - - public void Insert(int insertAtIndex, TreeNode nodeChild) - { - TreeNode nodeSibling = null; - TreeNode.LinkType lt = TreeNode.LinkType.Last; - if (insertAtIndex < this.Count) - { - nodeSibling = this[insertAtIndex]; - lt = TreeNode.LinkType.Before; - } - nodeChild.ChangeParent(this._nodeSubject, nodeSibling, lt); - } - - void IList.Remove(object nodeChild) => this.Remove((TreeNode)nodeChild); - - public void Remove(TreeNode nodeChild) => nodeChild.ChangeParent(null); - - public void RemoveAt(int removeAtIndex) => this[removeAtIndex].ChangeParent(null); - } -} diff --git a/UIX/Microsoft/Iris/Library/TreeNodeEnumerator.cs b/UIX/Microsoft/Iris/Library/TreeNodeEnumerator.cs deleted file mode 100644 index 9bfc1e0..0000000 --- a/UIX/Microsoft/Iris/Library/TreeNodeEnumerator.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.TreeNodeEnumerator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Library -{ - public struct TreeNodeEnumerator : IEnumerator - { - private TreeNode _nodeParent; - private TreeNode _nodeCurrent; - private TreeNode _nodeNext; - - public TreeNodeEnumerator(TreeNode nodeParent) - { - this._nodeParent = nodeParent; - this._nodeCurrent = null; - this._nodeNext = nodeParent.FirstChild; - } - - object IEnumerator.Current => _nodeCurrent; - - public TreeNode Current => this._nodeCurrent; - - public void Reset() - { - this._nodeCurrent = null; - this._nodeNext = this._nodeParent.FirstChild; - } - - public bool MoveNext() - { - this._nodeCurrent = this._nodeNext; - if (this._nodeNext == null) - return false; - this._nodeNext = this._nodeNext.NextSibling; - return true; - } - } -} diff --git a/UIX/Microsoft/Iris/Library/Utility.cs b/UIX/Microsoft/Iris/Library/Utility.cs deleted file mode 100644 index e7a5136..0000000 --- a/UIX/Microsoft/Iris/Library/Utility.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Library.Utility -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Library -{ - public class Utility - { - public static bool IsEqual(object a, object b) => a == null ? b == null : a.Equals(b); - } -} diff --git a/UIX/Microsoft/Iris/ListContentsChangeType.cs b/UIX/Microsoft/Iris/ListContentsChangeType.cs deleted file mode 100644 index 414e6d5..0000000 --- a/UIX/Microsoft/Iris/ListContentsChangeType.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ListContentsChangeType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris -{ - public enum ListContentsChangeType - { - Add, - AddRange, - Remove, - Move, - Insert, - InsertRange, - Clear, - Modified, - Reset, - } -} diff --git a/UIX/Microsoft/Iris/ListContentsChangedArgs.cs b/UIX/Microsoft/Iris/ListContentsChangedArgs.cs deleted file mode 100644 index bf166f9..0000000 --- a/UIX/Microsoft/Iris/ListContentsChangedArgs.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ListContentsChangedArgs -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris -{ - public class ListContentsChangedArgs : EventArgs - { - private ListContentsChangeType _type; - private int _oldIndex; - private int _newIndex; - private int _count; - - public ListContentsChangedArgs( - ListContentsChangeType type, - int oldIndex, - int newIndex, - int count) - { - this._count = count; - this._type = type; - this._oldIndex = oldIndex; - this._newIndex = newIndex; - } - - public ListContentsChangedArgs(ListContentsChangeType type, int oldIndex, int newIndex) - : this(type, oldIndex, newIndex, 1) - { - } - - public ListContentsChangeType Type => this._type; - - public int OldIndex => this._oldIndex; - - public int NewIndex => this._newIndex; - - public int Count => this._count; - } -} diff --git a/UIX/Microsoft/Iris/ListContentsChangedHandler.cs b/UIX/Microsoft/Iris/ListContentsChangedHandler.cs deleted file mode 100644 index bb4e83c..0000000 --- a/UIX/Microsoft/Iris/ListContentsChangedHandler.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ListContentsChangedHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris -{ - public delegate void ListContentsChangedHandler(IList senderList, ListContentsChangedArgs args); -} diff --git a/UIX/Microsoft/Iris/ListContentsChangedProxy.cs b/UIX/Microsoft/Iris/ListContentsChangedProxy.cs deleted file mode 100644 index ecdbd3d..0000000 --- a/UIX/Microsoft/Iris/ListContentsChangedProxy.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ListContentsChangedProxy -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using System; -using System.Collections; - -namespace Microsoft.Iris -{ - public class ListContentsChangedProxy - { - private ListContentsChangedHandler _method; - - public static UIListContentsChangedHandler Thunk( - ListContentsChangedHandler method) - { - return new UIListContentsChangedHandler(new ListContentsChangedProxy() - { - _method = method - }.Thunk); - } - - private void Thunk(IList senderList, UIListContentsChangedArgs internalArgs) - { - ListContentsChangeType type; - switch (internalArgs.Type) - { - case UIListContentsChangeType.Add: - type = ListContentsChangeType.Add; - break; - case UIListContentsChangeType.AddRange: - type = ListContentsChangeType.AddRange; - break; - case UIListContentsChangeType.Remove: - type = ListContentsChangeType.Remove; - break; - case UIListContentsChangeType.Move: - type = ListContentsChangeType.Move; - break; - case UIListContentsChangeType.Insert: - type = ListContentsChangeType.Insert; - break; - case UIListContentsChangeType.InsertRange: - type = ListContentsChangeType.InsertRange; - break; - case UIListContentsChangeType.Clear: - type = ListContentsChangeType.Clear; - break; - case UIListContentsChangeType.Modified: - type = ListContentsChangeType.Modified; - break; - case UIListContentsChangeType.Reset: - type = ListContentsChangeType.Reset; - break; - default: - throw new ArgumentException("Unexpected ListContentsChangeType"); - } - ListContentsChangedArgs args = new ListContentsChangedArgs(type, internalArgs.OldIndex, internalArgs.NewIndex, internalArgs.Count); - this._method(senderList, args); - } - } -} diff --git a/UIX/Microsoft/Iris/ListDataSet.cs b/UIX/Microsoft/Iris/ListDataSet.cs deleted file mode 100644 index 1ae10f6..0000000 --- a/UIX/Microsoft/Iris/ListDataSet.cs +++ /dev/null @@ -1,365 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.ListDataSet -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using System; -using System.Collections; - -namespace Microsoft.Iris -{ - public class ListDataSet : ModelItem, INotifyList, IList, ICollection, IEnumerable - { - private static readonly EventCookie s_listContentsChangedEvent = EventCookie.ReserveSlot(); - private IList _sourceList; - - protected ListDataSet() - : this(null) - { - } - - public ListDataSet(IList source) - : this(null, source) - { - } - - public ListDataSet(IModelItemOwner owner, IList source) - : base(owner) - => this._sourceList = source; - - public IList Source - { - get - { - using (this.ThreadValidator) - return this._sourceList; - } - set - { - using (this.ThreadValidator) - { - if (this._sourceList == value) - return; - this._sourceList = !(this._sourceList is IVirtualList) ? value : throw new ArgumentException(InvariantString.Format("ListDataSet does not support IVirtualList. Cannot associate with source list: {0}", value)); - this.FirePropertyChanged(nameof(Source)); - this.FirePropertyChanged("Count"); - this.FireSetChanged(UIListContentsChangeType.Reset, -1, -1); - } - } - } - - public virtual int Count - { - get - { - using (this.ThreadValidator) - return this._sourceList == null ? 0 : this._sourceList.Count; - } - } - - public virtual bool IsSynchronized - { - get - { - using (this.ThreadValidator) - return this._sourceList != null && this._sourceList.IsSynchronized; - } - } - - public virtual object SyncRoot - { - get - { - using (this.ThreadValidator) - return this._sourceList == null ? null : this._sourceList.SyncRoot; - } - } - - public bool IsReadOnly - { - get - { - using (this.ThreadValidator) - return this._sourceList == null || this._sourceList.IsReadOnly; - } - } - - public bool IsFixedSize - { - get - { - using (this.ThreadValidator) - return this._sourceList == null || this._sourceList.IsFixedSize; - } - } - - public object this[int itemIndex] - { - get - { - using (this.ThreadValidator) - return this._sourceList == null ? null : this._sourceList[itemIndex]; - } - set - { - using (this.ThreadValidator) - { - if (this._sourceList == null) - throw new InvalidOperationException("Cannot use the this indexer without first specifying a Source for this ListDataSet."); - if (itemIndex < 0 || itemIndex >= this.Count) - throw new ArgumentOutOfRangeException(nameof(itemIndex), itemIndex, "Given index is out of the range of this list."); - if (this._sourceList[itemIndex] == value) - return; - this._sourceList[itemIndex] = value; - this.FireSetChanged(UIListContentsChangeType.Modified, itemIndex, itemIndex); - } - } - } - - public virtual void Clear() - { - using (this.ThreadValidator) - { - if (this._sourceList == null) - return; - this._sourceList.Clear(); - this.FireSetChanged(UIListContentsChangeType.Clear, -1, -1); - this.FirePropertyChanged("Count"); - } - } - - public virtual void CopyTo(Array array, int index) - { - using (this.ThreadValidator) - { - if (this._sourceList == null) - throw new NotImplementedException("The \"CopyTo\" operation is not supported by this ListDataSet"); - this._sourceList.CopyTo(array, index); - } - } - - public void CopyFrom(IEnumerable source) - { - using (this.ThreadValidator) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - foreach (object obj in source) - this.Add(obj); - } - } - - public virtual IEnumerator GetEnumerator() - { - using (this.ThreadValidator) - return this._sourceList != null ? this._sourceList.GetEnumerator() : throw new NotImplementedException("The \"GetEnumerator\" operation is not supported by this UIDataSet"); - } - - public bool Contains(object item) - { - using (this.ThreadValidator) - return this._sourceList != null && this._sourceList.Contains(item); - } - - public int IndexOf(object item) - { - using (this.ThreadValidator) - return this._sourceList == null ? -1 : this._sourceList.IndexOf(item); - } - - public void Remove(object item) - { - using (this.ThreadValidator) - { - int index = this.IndexOf(item); - if (index <= -1) - return; - this.RemoveAt(index); - } - } - - public void RemoveAt(int index) - { - using (this.ThreadValidator) - { - if (this._sourceList == null) - throw new ArgumentException(InvariantString.Format("Empty list cannot remove item at index {0}", index)); - object obj = this[index]; - this._sourceList.RemoveAt(index); - this.FireSetChanged(UIListContentsChangeType.Remove, index, -1); - this.FirePropertyChanged("Count"); - } - } - - public void Move(int oldIndex, int newIndex) - { - using (this.ThreadValidator) - { - if (this._sourceList == null) - throw new ArgumentException(InvariantString.Format("Empty list cannot move item from {0} to {1}", oldIndex, newIndex)); - object obj = this[oldIndex]; - if (this._sourceList is INotifyList sourceList) - { - sourceList.Move(oldIndex, newIndex); - } - else - { - this._sourceList.RemoveAt(oldIndex); - this._sourceList.Insert(newIndex, obj); - } - this.FireSetChanged(UIListContentsChangeType.Move, oldIndex, newIndex); - } - } - - public int Reorder(IList indices, int newIndex) - { - using (this.ThreadValidator) - { - if (indices == null) - throw new ArgumentNullException(nameof(indices)); - if (newIndex < 0 || newIndex > this.Count) - throw new ArgumentOutOfRangeException(nameof(newIndex), "newIndex must be greater than 0 and less than or equal to the size of the collection"); - int[] numArray = null; - if (indices.IsReadOnly) - numArray = new int[indices.Count]; - int index1 = 0; - foreach (object index2 in indices) - { - if (!(index2 is int num)) - throw new ArgumentException("indices[" + index1 + "] does not contain an int", nameof(indices)); - if (num < 0 || num >= this.Count) - throw new ArgumentOutOfRangeException(nameof(indices), "indices[" + index1 + "] must be greater than 0 and less than the size of the collection"); - if (numArray != null) - numArray[index1] = num; - ++index1; - } - if (numArray != null) - indices = numArray; - int num1 = newIndex; - for (int index2 = 0; index2 < indices.Count; ++index2) - { - int index3 = (int)indices[index2]; - if (index3 < newIndex) - { - --newIndex; - --num1; - } - if (index3 != newIndex) - { - this.Move(index3, newIndex); - for (int index4 = index2 + 1; index4 < indices.Count; ++index4) - { - int index5 = (int)indices[index4]; - if (index3 < index5 && index5 <= newIndex) - indices[index4] = index5 - 1; - else if (newIndex <= index5 && index5 < index3) - indices[index4] = index5 + 1; - else if (index5 == index3) - indices[index4] = newIndex; - } - } - ++newIndex; - } - return num1; - } - } - - public void Insert(int index, object item) - { - using (this.ThreadValidator) - { - this._sourceList.Insert(index, item); - this.FireSetChanged(UIListContentsChangeType.Insert, -1, index); - this.FirePropertyChanged("Count"); - } - } - - public int Add(object item) - { - using (this.ThreadValidator) - { - int newIndex = this._sourceList != null ? this._sourceList.Add(item) : throw new ArgumentException("Empty list cannot add items."); - this.FireSetChanged(UIListContentsChangeType.Add, -1, newIndex); - this.FirePropertyChanged("Count"); - return newIndex; - } - } - - public void Sort(IComparer comparer) - { - using (this.ThreadValidator) - { - if (comparer == null) - throw new ArgumentException("Must provide a valid IComparer"); - this.SortWorker(comparer); - } - } - - public void Sort() - { - using (this.ThreadValidator) - this.SortWorker(null); - } - - private void SortWorker(IComparer cmp) - { - for (int index1 = 0; index1 < this.Count; ++index1) - { - for (int index2 = index1 + 1; index2 < this.Count; ++index2) - { - if (this.Compare(this[index1], this[index2], cmp) > 0) - this.Move(index2, index1); - } - } - } - - private int Compare(object objA, object objB, IComparer cmp) - { - if (cmp != null) - return cmp.Compare(objA, objB); - return objA is IComparable comparable ? comparable.CompareTo(objB) : 0; - } - - event UIListContentsChangedHandler INotifyList.ContentsChanged - { - add - { - using (this.ThreadValidator) - this.AddEventHandler(s_listContentsChangedEvent, value); - } - remove - { - using (this.ThreadValidator) - this.RemoveEventHandler(s_listContentsChangedEvent, value); - } - } - - public event ListContentsChangedHandler ContentsChanged - { - add - { - using (this.ThreadValidator) - this.AddEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); - } - remove - { - using (this.ThreadValidator) - this.RemoveEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); - } - } - - public void FireSetChanged(UIListContentsChangeType type, int oldIndex, int newIndex) - { - UIListContentsChangedHandler eventHandler = (UIListContentsChangedHandler)this.GetEventHandler(s_listContentsChangedEvent); - if (eventHandler != null) - { - UIListContentsChangedArgs args = new UIListContentsChangedArgs(type, oldIndex, newIndex); - eventHandler(this, args); - } - this.FirePropertyChanged("ContentsChanged"); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AliasMapping.cs b/UIX/Microsoft/Iris/Markup/AliasMapping.cs deleted file mode 100644 index 6b69be0..0000000 --- a/UIX/Microsoft/Iris/Markup/AliasMapping.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AliasMapping -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class AliasMapping - { - public string Alias; - public LoadResult LoadResult; - public string TargetType; - - public AliasMapping(string alias, LoadResult loadResult, string targetType) - { - this.Alias = alias; - this.LoadResult = loadResult; - this.TargetType = targetType; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyConstructorSchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyConstructorSchema.cs deleted file mode 100644 index 4b500ca..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyConstructorSchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyConstructorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Reflection; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyConstructorSchema : ConstructorSchema - { - private ConstructorInfo _constructorInfo; - private TypeSchema[] _parameterTypes; - private FastReflectionInvokeHandler _constructor; - - public AssemblyConstructorSchema( - AssemblyTypeSchema owner, - ConstructorInfo constructorInfo, - TypeSchema[] parameterTypes) - : base(owner) - { - this._constructorInfo = constructorInfo; - this._parameterTypes = parameterTypes; - } - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public override object Construct(object[] parameters) - { - object[] paramters = AssemblyLoadResult.UnwrapObjectList(parameters); - AssemblyTypeSchema owner = (AssemblyTypeSchema)this.Owner; - if (this._constructor == null) - this._constructor = ReflectionHelper.CreateMethodInvoke(_constructorInfo); - object instance = this._constructor(null, paramters); - return AssemblyLoadResult.WrapObject(owner, instance); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyEventSchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyEventSchema.cs deleted file mode 100644 index 04488e9..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyEventSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyEventSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Reflection; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyEventSchema : EventSchema - { - private EventInfo _eventInfo; - - public AssemblyEventSchema(AssemblyTypeSchema owner, EventInfo eventInfo) - : base(owner) - => this._eventInfo = eventInfo; - - public override string Name => this._eventInfo.Name; - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs b/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs deleted file mode 100644 index df94781..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs +++ /dev/null @@ -1,356 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyLoadResult : LoadResult - { - private const string c_AssemblyProtocol = "assembly://"; - private Assembly _assembly; - private string _namespace; - private string _namespacePrefix; - public static TypeSchema ObjectTypeSchema; - public static TypeSchema ListTypeSchema; - public static TypeSchema EnumeratorTypeSchema; - public static TypeSchema DictionaryTypeSchema; - public static TypeSchema CommandTypeSchema; - public static TypeSchema ValueRangeTypeSchema; - private static Map s_typeCache = new Map(32); - private static Map s_assemblyCache = new Map(); - - private static LoadResult Create(string uri) - { - LoadResult loadResult = null; - string valueName = uri.Substring("assembly://".Length); - if (valueName.IndexOf('/') == -1) - { - ErrorManager.ReportError("Invalid assembly reference '{0}'. URI must contain a forward slash after the assembly name", uri); - return null; - } - string leftName; - string rightName; - SplitAtLastWhack(valueName, out leftName, out rightName); - AssemblyName name = null; - try - { - name = new AssemblyName(leftName); - } - catch (COMException ex) - { - } - catch (FileLoadException ex) - { - } - if (name == null) - { - name = new AssemblyName(); - name.CodeBase = leftName; - } - if (name != null) - { - Exception assemblyLoadException; - Assembly assembly = FindAssembly(name, out assemblyLoadException); - if (assembly != null) - loadResult = MapAssembly(assembly, rightName); - else if (assemblyLoadException != null) - ErrorManager.ReportError("Failure loading assembly: '{0}'", assemblyLoadException.Message); - else - ErrorManager.ReportError("Failure loading assembly"); - } - return loadResult; - } - - public static void Startup() - { - AssemblyObjectProxyHelper.InitializeStatics(); - MarkupSystem.RegisterFactoryByProtocol("assembly://", new CreateLoadResultHandler(Create)); - Map typeCache1 = s_typeCache; - Type type1 = typeof(object); - FrameworkCompatibleAssemblyPrimitiveTypeSchema primitiveTypeSchema; - ObjectTypeSchema = primitiveTypeSchema = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ObjectSchema.Type); - TypeSchema typeA1 = primitiveTypeSchema; - typeCache1[type1] = primitiveTypeSchema; - TypeSchema.RegisterTwoWayEquivalence(typeA1, ObjectSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(void)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(VoidSchema.Type)), VoidSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(bool)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(BooleanSchema.Type)), BooleanSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(byte)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ByteSchema.Type)), ByteSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(char)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(CharSchema.Type)), CharSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(double)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(DoubleSchema.Type)), DoubleSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(string)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(StringSchema.Type)), StringSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(float)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(SingleSchema.Type)), SingleSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(int)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int32Schema.Type)), Int32Schema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(long)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int64Schema.Type)), Int64Schema.Type); - Map typeCache2 = s_typeCache; - Type type2 = typeof(IList); - FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema1; - ListTypeSchema = assemblyTypeSchema1 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IList), typeof(IList), typeof(ArrayList)); - TypeSchema typeA2 = assemblyTypeSchema1; - typeCache2[type2] = assemblyTypeSchema1; - TypeSchema.RegisterTwoWayEquivalence(typeA2, ListSchema.Type); - Map typeCache3 = s_typeCache; - Type type3 = typeof(IEnumerator); - FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema2; - EnumeratorTypeSchema = assemblyTypeSchema2 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IEnumerator), typeof(IEnumerator)); - TypeSchema typeA3 = assemblyTypeSchema2; - typeCache3[type3] = assemblyTypeSchema2; - TypeSchema.RegisterTwoWayEquivalence(typeA3, EnumeratorSchema.Type); - Map typeCache4 = s_typeCache; - Type type4 = typeof(IDictionary); - FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema3; - DictionaryTypeSchema = assemblyTypeSchema3 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IDictionary), AssemblyObjectProxyHelper.ProxyDictionaryType, typeof(Dictionary)); - TypeSchema producer1 = assemblyTypeSchema3; - typeCache4[type4] = assemblyTypeSchema3; - TypeSchema.RegisterOneWayEquivalence(producer1, DictionarySchema.Type); - Map typeCache5 = s_typeCache; - Type type5 = typeof(ICommand); - FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema4; - CommandTypeSchema = assemblyTypeSchema4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(ICommand), AssemblyObjectProxyHelper.ProxyCommandType); - TypeSchema producer2 = assemblyTypeSchema4; - typeCache5[type5] = assemblyTypeSchema4; - TypeSchema.RegisterOneWayEquivalence(producer2, CommandSchema.Type); - Map typeCache6 = s_typeCache; - Type type6 = typeof(IValueRange); - FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema5; - ValueRangeTypeSchema = assemblyTypeSchema5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IValueRange), AssemblyObjectProxyHelper.ProxyValueRangeType); - TypeSchema producer3 = assemblyTypeSchema5; - typeCache6[type6] = assemblyTypeSchema5; - TypeSchema.RegisterOneWayEquivalence(producer3, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Group)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Group), typeof(IUIGroup))), GroupSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Image)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Image), typeof(UIImage))), ImageSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Type)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Type), typeof(TypeSchema), null, ObjectTypeSchema)), TypeSchemaDefinition.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(VideoStream)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(VideoStream))), VideoStreamSchema.Type); - TypeSchema producer4; - s_typeCache[typeof(Microsoft.Iris.Choice)] = (FrameworkCompatibleAssemblyTypeSchema)(producer4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.Choice))); - TypeSchema.RegisterOneWayEquivalence(producer4, ChoiceSchema.Type); - TypeSchema.RegisterOneWayEquivalence(producer4, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.BooleanChoice)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.BooleanChoice))), BooleanChoiceSchema.Type); - TypeSchema producer5; - s_typeCache[typeof(Microsoft.Iris.RangedValue)] = (FrameworkCompatibleAssemblyTypeSchema)(producer5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.RangedValue))); - TypeSchema.RegisterOneWayEquivalence(producer5, RangedValueSchema.Type); - TypeSchema.RegisterOneWayEquivalence(producer5, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.IntRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.IntRangedValue))), IntRangedValueSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.ByteRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.ByteRangedValue))), ByteRangedValueSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderQuery)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQuery), typeof(MarkupDataQuery))), MarkupDataQueryInstanceSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderObject)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderObject), typeof(MarkupDataType))), MarkupDataTypeInstanceSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderQueryStatus)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQueryStatus))), UIXLoadResultExports.DataQueryStatusType); - } - - public static void Shutdown() - { - foreach (SharedDisposableObject disposableObject in s_assemblyCache.Values) - disposableObject.UnregisterUsage(s_assemblyCache); - s_assemblyCache.Clear(); - s_assemblyCache = null; - foreach (AssemblyTypeSchema assemblyTypeSchema in s_typeCache.Values) - { - AssemblyLoadResult owner = (AssemblyLoadResult)assemblyTypeSchema.Owner; - assemblyTypeSchema.Dispose(owner); - } - s_typeCache.Clear(); - s_typeCache = null; - } - - public string Namespace => this._namespace; - - public override LoadResultStatus Status => LoadResultStatus.Success; - - public override TypeSchema FindType(string name) - { - Type type = this._assembly.GetType(this._namespacePrefix + name, false); - if (type == null) - return null; - if (type.IsVisible) - return MapType(type); - ErrorManager.ReportError("Type '{0}' is not public in '{1}'", name, _assembly); - return null; - } - - public static AssemblyLoadResult MapAssembly(Assembly assembly, string ns) - { - AssemblyLoadResult.MapAssemblyKey key = new AssemblyLoadResult.MapAssemblyKey(assembly, ns); - AssemblyLoadResult assemblyLoadResult; - if (!s_assemblyCache.TryGetValue(key, out assemblyLoadResult)) - { - string uri = "assembly://" + assembly.FullName; - if (ns != null) - uri = uri + "/" + ns; - assemblyLoadResult = new AssemblyLoadResult(assembly, ns, uri); - s_assemblyCache[key] = assemblyLoadResult; - assemblyLoadResult.RegisterUsage(s_assemblyCache); - } - return assemblyLoadResult; - } - - public static AssemblyTypeSchema MapType(Type type) - { - object obj; - AssemblyTypeSchema assemblyTypeSchema; - if (s_typeCache.TryGetValue(type, out obj)) - { - assemblyTypeSchema = (AssemblyTypeSchema)obj; - } - else - { - assemblyTypeSchema = AssemblyObjectProxyHelper.CreateProxySchema(type); - s_typeCache[type] = assemblyTypeSchema; - } - return assemblyTypeSchema; - } - - public static Type MapType(TypeSchema typeSchema) - { - if (typeSchema is AssemblyTypeSchema assemblyTypeSchema) - return assemblyTypeSchema.InternalType; - for (TypeSchema typeSchema1 = typeSchema; typeSchema1 != null; typeSchema1 = typeSchema1.Base) - { - if (typeSchema1.Equivalents != null) - { - foreach (TypeSchema equivalent in typeSchema1.Equivalents) - { - if (equivalent is AssemblyTypeSchema assemblyTypeSchemaB) - return assemblyTypeSchemaB.InternalType; - } - } - } - return null; - } - - public static Type[] MapTypeList(TypeSchema[] typeSchemaList) - { - Type[] typeArray = new Type[typeSchemaList.Length]; - for (int index = 0; index < typeSchemaList.Length; ++index) - { - typeArray[index] = MapType(typeSchemaList[index]); - if (typeArray[index] == null) - return null; - } - return typeArray; - } - - public static TypeSchema[] MapTypeList(Type[] typeList) - { - TypeSchema[] typeSchemaArray = new TypeSchema[typeList.Length]; - for (int index = 0; index < typeList.Length; ++index) - { - typeSchemaArray[index] = MapType(typeList[index]); - if (typeSchemaArray[index] == null) - return null; - } - return typeSchemaArray; - } - - public static object WrapObject(TypeSchema typeSchema, object instance) => AssemblyObjectProxyHelper.WrapObject(typeSchema, instance); - - public static object WrapObject(object instance) => AssemblyObjectProxyHelper.WrapObject(null, instance); - - public static object UnwrapObject(object instance) => AssemblyObjectProxyHelper.UnwrapObject(instance); - - public static object[] UnwrapObjectList(object[] instanceList) - { - if (instanceList == null) - return null; - object[] objArray = new object[instanceList.Length]; - for (int index = 0; index < objArray.Length; ++index) - objArray[index] = UnwrapObject(instanceList[index]); - return objArray; - } - - private static void SplitAtLastWhack( - string valueName, - out string leftName, - out string rightName) - { - int length = valueName.LastIndexOf('/'); - if (length != -1) - { - leftName = valueName.Substring(0, length); - rightName = valueName.Substring(length + 1); - } - else - { - leftName = valueName; - rightName = null; - } - } - - public static Assembly FindAssembly( - AssemblyName name, - out Exception assemblyLoadException) - { - Assembly assembly = null; - assemblyLoadException = null; - try - { - assembly = Assembly.Load(name); - } - catch (FileLoadException ex) - { - assemblyLoadException = ex; - } - catch (BadImageFormatException ex) - { - assemblyLoadException = ex; - } - catch (FileNotFoundException ex) - { - assemblyLoadException = ex; - } - return assembly; - } - - public override string GetCompilerReferenceName() => base.GetCompilerReferenceName() ?? string.Format("{0}{1}/{2}", "assembly://", _assembly.GetName().Name, _namespace); - - public Assembly Assembly => this._assembly; - - private AssemblyLoadResult(Assembly assembly, string ns, string uri) - : base(uri) - { - this._assembly = assembly; - this._namespace = ns; - if (ns == null) - return; - this._namespacePrefix = ns + "."; - } - - public struct MapAssemblyKey - { - private Assembly _assembly; - private string _namespace; - - public MapAssemblyKey(Assembly assembly, string ns) - { - this._assembly = assembly; - this._namespace = ns; - } - - public override bool Equals(object obj) - { - AssemblyLoadResult.MapAssemblyKey mapAssemblyKey = (AssemblyLoadResult.MapAssemblyKey)obj; - return this._assembly == mapAssemblyKey._assembly && this._namespace == mapAssemblyKey._namespace; - } - - public override int GetHashCode() - { - int hashCode = this._assembly.GetHashCode(); - if (this._namespace != null) - hashCode ^= this._namespace.GetHashCode(); - return hashCode; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataQuery.cs b/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataQuery.cs deleted file mode 100644 index f1e8883..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataQuery.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyMarkupDataQuery -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyMarkupDataQuery : MarkupDataQuery - { - private IDataProviderQuery _externalQuery; - - public AssemblyMarkupDataQuery(MarkupDataQuerySchema type, AssemblyDataProviderWrapper provider) - : base(type) - { - this._externalQuery = provider.ConstructQuery(type); - this._externalQuery.DeclareOwner(this); - this._externalQuery.SetInternalObject(this); - this.ApplyDefaultValues(); - } - - public override void NotifyInitialized() - { - base.NotifyInitialized(); - if (this._externalQuery == null) - return; - this._externalQuery.OnInitialize(); - } - - protected override void OnDispose() - { - base.OnDispose(); - if (this._externalQuery == null) - return; - this._externalQuery.Dispose(this); - } - - public override void Refresh() => this._externalQuery.Refresh(); - - public override object Result - { - get => AssemblyLoadResult.WrapObject(this._externalQuery.Result); - set => this._externalQuery.Result = AssemblyLoadResult.UnwrapObject(value); - } - - public override DataProviderQueryStatus Status => this._externalQuery.Status; - - public override bool Enabled - { - get => this._externalQuery.Enabled; - set => this._externalQuery.Enabled = value; - } - - protected override bool ExternalObjectGetProperty(string propertyName, out object value) - { - object property = this._externalQuery.GetProperty(propertyName); - value = AssemblyLoadResult.WrapObject(property); - return true; - } - - protected override bool ExternalObjectSetProperty(string propertyName, object value) - { - object obj = AssemblyLoadResult.UnwrapObject(value); - this._externalQuery.SetProperty(propertyName, obj); - return true; - } - - protected override IDataProviderBaseObject ExternalAssemblyObject => _externalQuery; - - public override IntPtr ExternalNativeObject => IntPtr.Zero; - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataType.cs b/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataType.cs deleted file mode 100644 index 146d591..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyMarkupDataType.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyMarkupDataType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyMarkupDataType : MarkupDataType - { - private IDataProviderObject _externalObject; - - public AssemblyMarkupDataType(MarkupDataTypeSchema type, IDataProviderObject externalObject) - : base(type) - => this._externalObject = externalObject; - - protected override bool ExternalObjectGetProperty(string propertyName, out object value) - { - object property = this._externalObject.GetProperty(propertyName); - value = AssemblyLoadResult.WrapObject(property); - return true; - } - - protected override bool ExternalObjectSetProperty(string propertyName, object value) - { - object obj = AssemblyLoadResult.UnwrapObject(value); - this._externalObject.SetProperty(propertyName, obj); - return true; - } - - protected override IDataProviderBaseObject ExternalAssemblyObject => _externalObject; - - public override IntPtr ExternalNativeObject => IntPtr.Zero; - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyMethodSchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyMethodSchema.cs deleted file mode 100644 index e2c864c..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyMethodSchema.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Reflection; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyMethodSchema : MethodSchema - { - private MethodInfo _methodInfo; - private TypeSchema[] _parameterTypes; - private TypeSchema _returnTypeSchema; - private FastReflectionInvokeHandler _method; - - public AssemblyMethodSchema( - AssemblyTypeSchema owner, - MethodInfo methodInfo, - TypeSchema[] parameterTypes) - : base(owner) - { - this._methodInfo = methodInfo; - this._parameterTypes = parameterTypes; - this._returnTypeSchema = AssemblyLoadResult.MapType(this._methodInfo.ReturnType); - } - - public override string Name => this._methodInfo.Name; - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public override TypeSchema ReturnType => this._returnTypeSchema; - - public override bool IsStatic => this._methodInfo.IsStatic; - - public override object Invoke(object instance, object[] parameters) - { - object target = AssemblyLoadResult.UnwrapObject(instance); - object[] paramters = AssemblyLoadResult.UnwrapObjectList(parameters); - if (this._method == null) - this._method = ReflectionHelper.CreateMethodInvoke(_methodInfo); - return AssemblyLoadResult.WrapObject(this._returnTypeSchema, this._method(target, paramters)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs b/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs deleted file mode 100644 index 3502199..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs +++ /dev/null @@ -1,649 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyObjectProxyHelper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.ViewItems; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; - -namespace Microsoft.Iris.Markup -{ - public static class AssemblyObjectProxyHelper - { - private static AssemblyObjectProxyHelper.ProxyTypeInfo[] s_proxyTypeInfoTable; - private static Type s_typeofString; - - public static void InitializeStatics() - { - s_typeofString = typeof(string); - s_proxyTypeInfoTable = new AssemblyObjectProxyHelper.ProxyTypeInfo[7] - { - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (ICommand), typeof (AssemblyObjectProxyHelper.ProxyCommand), CommandSchema.Type), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IValueRange), typeof (AssemblyObjectProxyHelper.ProxyValueRange), ValueRangeSchema.Type), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IList), typeof (AssemblyObjectProxyHelper.ProxyList), ListSchema.Type), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IDictionary), typeof (AssemblyObjectProxyHelper.ProxyDictionary), DictionarySchema.Type), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IEnumerator), typeof (AssemblyObjectProxyHelper.ProxyListEnumerator), EnumeratorSchema.Type), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IDisposable), typeof (AssemblyObjectProxyHelper.ProxyObject), null), - new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (INotifyPropertyChanged), typeof (AssemblyObjectProxyHelper.ProxyObject), null) - }; - } - - public static AssemblyTypeSchema CreateProxySchema(Type assemblyType) - { - foreach (AssemblyObjectProxyHelper.ProxyTypeInfo proxyTypeInfo in s_proxyTypeInfoTable) - { - if (proxyTypeInfo.type.IsAssignableFrom(assemblyType)) - { - AssemblyTypeSchema assemblyTypeSchema = new FrameworkCompatibleAssemblyTypeSchema(assemblyType, proxyTypeInfo.proxyType); - if (proxyTypeInfo.equivalents != null) - assemblyTypeSchema.ShareEquivalents(proxyTypeInfo.equivalents); - return assemblyTypeSchema; - } - } - return new StandardAssemblyTypeSchema(assemblyType); - } - - public static Type ProxyListType => typeof(AssemblyObjectProxyHelper.ProxyList); - - public static Type ProxyDictionaryType => typeof(AssemblyObjectProxyHelper.ProxyDictionary); - - public static Type ProxyCommandType => typeof(AssemblyObjectProxyHelper.ProxyCommand); - - public static Type ProxyValueRangeType => typeof(AssemblyObjectProxyHelper.ProxyValueRange); - - public static object WrapObject(TypeSchema typeSchema, object instance) - { - if (instance == null) - return null; - if (instance.GetType().IsPrimitive) - return instance; - switch (instance) - { - case Type type: - return AssemblyLoadResult.MapType(type); - case AssemblyObjectProxyHelper.IFrameworkProxyObject frameworkProxyObject: - return frameworkProxyObject.FrameworkObject; - default: - AssemblyObjectProxyHelper.ProxyObject proxyObject = null; - bool isDisposable = instance is IDisposable; - bool notifiesOnChange = instance is INotifyPropertyChanged; - switch (instance) - { - case ICommand _: - proxyObject = new AssemblyObjectProxyHelper.ProxyCommand(instance); - break; - case IValueRange _: - proxyObject = new AssemblyObjectProxyHelper.ProxyValueRange(instance); - break; - case IDictionary _: - proxyObject = new AssemblyObjectProxyHelper.ProxyDictionary(instance); - break; - case IList _: - proxyObject = !(instance is Group) ? (!(instance is IVirtualList) ? (!(instance is INotifyList) ? new AssemblyObjectProxyHelper.ProxyList(instance) : new AssemblyObjectProxyHelper.ProxyNotifyList(instance)) : new AssemblyObjectProxyHelper.ProxyVirtualNotifyList(instance, instance is INotifyList)) : new AssemblyObjectProxyHelper.ProxyGroup(instance, instance is INotifyList); - break; - default: - if (isDisposable || notifiesOnChange) - { - proxyObject = new AssemblyObjectProxyHelper.ProxyObject(instance); - break; - } - break; - } - if (proxyObject == null) - return instance; - proxyObject.SetIntrinsicState(isDisposable, notifiesOnChange); - return proxyObject; - } - } - - public static object UnwrapObject(object instance) - { - if (instance == null) - return null; - Type type = instance.GetType(); - if (type.IsPrimitive || type == s_typeofString) - return instance; - switch (instance) - { - case AssemblyObjectProxyHelper.IAssemblyProxyObject assemblyProxyObject: - return assemblyProxyObject.AssemblyObject; - case IList uixList: - return new AssemblyObjectProxyHelper.ReverseProxyList(uixList); - case IDictionary _: - case IDisposable _: - return new AssemblyObjectProxyHelper.WrappedFrameworkObject(instance); - default: - return instance; - } - } - - private struct ProxyTypeInfo - { - public Type type; - public Type proxyType; - public Vector equivalents; - - public ProxyTypeInfo(Type type, Type proxyType, TypeSchema equivalence) - { - this.type = type; - this.proxyType = proxyType; - this.equivalents = null; - if (equivalence == null) - return; - this.equivalents = new Vector(1); - this.equivalents.Add(equivalence); - } - } - - public interface IFrameworkProxyObject - { - object FrameworkObject { get; } - } - - private class WrappedFrameworkObject : AssemblyObjectProxyHelper.IFrameworkProxyObject - { - private object _frameworkObject; - - public WrappedFrameworkObject(object frameworkObject) => this._frameworkObject = frameworkObject; - - public object FrameworkObject => this._frameworkObject; - } - - public interface IAssemblyProxyObject - { - object AssemblyObject { get; } - } - - private class ProxyObject : - DisposableObject, - INotifyObject, - AssemblyObjectProxyHelper.IAssemblyProxyObject, - IModelItemOwner, - ISchemaInfo - { - protected object _assemblyObject; - private bool _isDisposable; - private bool _isModelItemOwner; - private bool _hasPropertyChangedHandlerAttached; - private NotifyService _notifier = new NotifyService(); - - public ProxyObject(object assemblyObject) => this._assemblyObject = assemblyObject; - - public void SetIntrinsicState(bool isDisposable, bool notifiesOnChange) => this._isDisposable = isDisposable; - - protected override void OnDispose() - { - if (this._hasPropertyChangedHandlerAttached) - { - ((INotifyPropertyChanged)this._assemblyObject).PropertyChanged -= new PropertyChangedEventHandler(this.OnPropertyChanged); - this._hasPropertyChangedHandlerAttached = false; - } - this._notifier.ClearListeners(); - if (this._isDisposable && (!(this._assemblyObject is ModelItem) || this._isModelItemOwner)) - ((IDisposable)this._assemblyObject).Dispose(); - base.OnDispose(); - } - - protected override void OnOwnerDeclared(object owner) - { - base.OnOwnerDeclared(owner); - if (!(this._assemblyObject is ModelItem assemblyObject)) - return; - assemblyObject.Owner = this; - } - - public void AddListener(Listener listener) - { - if (!this._hasPropertyChangedHandlerAttached) - { - ((INotifyPropertyChanged)this._assemblyObject).PropertyChanged += new PropertyChangedEventHandler(this.OnPropertyChanged); - this._hasPropertyChangedHandlerAttached = true; - } - this._notifier.AddListener(listener); - } - - private void OnPropertyChanged(object sender, PropertyChangedEventArgs args) - { - this._notifier.FireThreadSafe(args.PropertyName); - if (this._notifier.HasListeners) - return; - ((INotifyPropertyChanged)this._assemblyObject).PropertyChanged -= new PropertyChangedEventHandler(this.OnPropertyChanged); - this._hasPropertyChangedHandlerAttached = false; - } - - public void RegisterObject(ModelItem modelItem) - { - if (modelItem != this._assemblyObject) - throw new ArgumentException("Unexpected model item provided for ownership registration"); - this._isModelItemOwner = true; - } - - public void UnregisterObject(ModelItem modelItem) - { - if (!this._isModelItemOwner || modelItem != this._assemblyObject) - throw new ArgumentException("Unexpected model item provided for ownership unregistration"); - this._isModelItemOwner = false; - } - - public object AssemblyObject => this._assemblyObject; - - public TypeSchema TypeSchema => AssemblyLoadResult.MapType(this._assemblyObject.GetType()); - - public override bool Equals(object rhs) - { - if (rhs is AssemblyObjectProxyHelper.IAssemblyProxyObject) - rhs = ((AssemblyObjectProxyHelper.IAssemblyProxyObject)rhs).AssemblyObject; - return this._assemblyObject.Equals(rhs); - } - - public override int GetHashCode() => this._assemblyObject.GetHashCode(); - - public override string ToString() => this._assemblyObject.ToString(); - } - - private class ProxyCommand : AssemblyObjectProxyHelper.ProxyObject, IUICommand - { - public ProxyCommand(object assemblyObject) - : base(assemblyObject) - { - } - - protected ICommand ExternalCommand => (ICommand)this._assemblyObject; - - public bool Available - { - get => this.ExternalCommand.Available; - set => this.ExternalCommand.Available = value; - } - - public InvokePriority Priority - { - get - { - switch (this.ExternalCommand.Priority) - { - case InvokePolicy.Synchronous: - case InvokePolicy.AsynchronousNormal: - return InvokePriority.Normal; - default: - return InvokePriority.Low; - } - } - set - { - if (value == InvokePriority.Normal) - this.ExternalCommand.Priority = InvokePolicy.AsynchronousNormal; - else - this.ExternalCommand.Priority = InvokePolicy.AsynchronousLowPri; - } - } - - public void Invoke() => this.ExternalCommand.Invoke(); - } - - private class ProxyValueRange : AssemblyObjectProxyHelper.ProxyObject, IUIValueRange - { - public ProxyValueRange(object assemblyObject) - : base(assemblyObject) - { - } - - protected IValueRange ExternalRange => (IValueRange)this._assemblyObject; - - public object ObjectValue => AssemblyLoadResult.WrapObject(this.ExternalRange.Value); - - public bool HasPreviousValue => this.ExternalRange.HasPreviousValue; - - public bool HasNextValue => this.ExternalRange.HasNextValue; - - public void PreviousValue() => this.ExternalRange.PreviousValue(); - - public void NextValue() => this.ExternalRange.NextValue(); - } - - private class ProxyList : - AssemblyObjectProxyHelper.ProxyObject, - IUIList, - IList, - ICollection, - IEnumerable - { - private bool _canSearch; - - public ProxyList(object assemblyObject) - : base(assemblyObject) - => this._canSearch = assemblyObject is ISearchableList; - - protected IList ExternalList => (IList)this._assemblyObject; - - public int Add(object value) => this.ExternalList.Add(AssemblyLoadResult.UnwrapObject(value)); - - public void Clear() => this.ExternalList.Clear(); - - public bool Contains(object value) => this.ExternalList.Contains(AssemblyLoadResult.UnwrapObject(value)); - - public int IndexOf(object value) => this.ExternalList.IndexOf(AssemblyLoadResult.UnwrapObject(value)); - - public void Insert(int index, object value) => this.ExternalList.Insert(index, AssemblyLoadResult.UnwrapObject(value)); - - public bool IsFixedSize => this.ExternalList.IsFixedSize; - - public bool IsReadOnly => this.ExternalList.IsReadOnly; - - public void Remove(object value) => this.ExternalList.Remove(AssemblyLoadResult.UnwrapObject(value)); - - public void RemoveAt(int index) => this.ExternalList.RemoveAt(index); - - public object this[int index] - { - get => AssemblyLoadResult.WrapObject(this.ExternalList[index]); - set => this.ExternalList[index] = AssemblyLoadResult.UnwrapObject(value); - } - - public void CopyTo(Array array, int index) - { - int index1 = index; - for (int index2 = 0; index2 < this.ExternalList.Count; ++index2) - { - array.SetValue(AssemblyLoadResult.WrapObject(this.ExternalList[index2]), index1); - ++index1; - } - } - - public int Count => this.ExternalList.Count; - - public bool IsSynchronized => this.ExternalList.IsSynchronized; - - public object SyncRoot => this.ExternalList.SyncRoot; - - public IEnumerator GetEnumerator() => new AssemblyObjectProxyHelper.ProxyListEnumerator(this.ExternalList.GetEnumerator()); - - public bool CanSearch => this._canSearch; - - public int SearchForString(string searchString) => this._canSearch ? ((ISearchableList)this.ExternalList).SearchForString(searchString) : -1; - - public virtual void Move(int oldIndex, int newIndex) - { - object external = this.ExternalList[oldIndex]; - this.RemoveAt(oldIndex); - this.Insert(newIndex, external); - } - } - - private class ProxyListEnumerator : IEnumerator, AssemblyObjectProxyHelper.IAssemblyProxyObject - { - private IEnumerator _assemblyEnumerator; - - public ProxyListEnumerator(object assemblyObject) => this._assemblyEnumerator = (IEnumerator)assemblyObject; - - public bool MoveNext() => this._assemblyEnumerator.MoveNext(); - - public void Reset() => this._assemblyEnumerator.Reset(); - - public object Current => AssemblyLoadResult.WrapObject(this._assemblyEnumerator.Current); - - public object AssemblyObject => _assemblyEnumerator; - } - - private class ProxyNotifyList : - AssemblyObjectProxyHelper.ProxyList, - INotifyList, - IList, - ICollection, - IEnumerable - { - private bool _isNotifyList; - private UIListContentsChangedHandler _listContentsChangedHandler; - private Delegate _handlersAttachedToMe; - - public ProxyNotifyList(object assemblyObject, bool isNotifyList) - : base(assemblyObject) - => this._isNotifyList = isNotifyList; - - public ProxyNotifyList(object assemblyObject) - : this(assemblyObject, true) - { - } - - protected INotifyList ExternalNotifyList => (INotifyList)this._assemblyObject; - - public override void Move(int oldIndex, int newIndex) => this.ExternalNotifyList.Move(oldIndex, newIndex); - - public event UIListContentsChangedHandler ContentsChanged - { - add - { - if (!this._isNotifyList) - return; - if (this._listContentsChangedHandler == null) - { - this._listContentsChangedHandler = new UIListContentsChangedHandler(this.OnListContentsChanged); - this.ExternalNotifyList.ContentsChanged += this._listContentsChangedHandler; - } - this._handlersAttachedToMe = Delegate.Combine(this._handlersAttachedToMe, value); - } - remove - { - if (!this._isNotifyList) - return; - this._handlersAttachedToMe = Delegate.Remove(this._handlersAttachedToMe, value); - if ((object)this._handlersAttachedToMe != null) - return; - this.ExternalNotifyList.ContentsChanged -= this._listContentsChangedHandler; - this._listContentsChangedHandler = null; - } - } - - private void OnListContentsChanged(IList senderList, UIListContentsChangedArgs args) => ((UIListContentsChangedHandler)this._handlersAttachedToMe)(this, args); - } - - private class ProxyVirtualNotifyList : - AssemblyObjectProxyHelper.ProxyNotifyList, - IVirtualList, - INotifyList, - IList, - ICollection, - IEnumerable - { - private ItemRequestCallback _onItemGeneratedCallback; - private Dictionary _itemCallbacks; - - public ProxyVirtualNotifyList(object assemblyObject, bool isNotifyList) - : base(assemblyObject, isNotifyList) - { - } - - protected IVirtualList ExternalVirtualList => (IVirtualList)this._assemblyObject; - - public void RequestItem(int index, ItemRequestCallback callback) - { - if (this._itemCallbacks == null) - this._itemCallbacks = new Dictionary(); - this._itemCallbacks[index] = callback; - if (this._onItemGeneratedCallback == null) - this._onItemGeneratedCallback = new ItemRequestCallback(this.OnItemGenerated); - this.ExternalVirtualList.RequestItem(index, this._onItemGeneratedCallback); - } - - public bool IsItemAvailable(int index) => this.ExternalVirtualList.IsItemAvailable(index); - - public void NotifyVisualsCreated(int index) => this.ExternalVirtualList.NotifyVisualsCreated(index); - - public void NotifyVisualsReleased(int index) => this.ExternalVirtualList.NotifyVisualsReleased(index); - - public bool SlowDataRequestsEnabled => this.ExternalVirtualList.SlowDataRequestsEnabled; - - public void NotifyRequestSlowData(int index) => this.ExternalVirtualList.NotifyRequestSlowData(index); - - public Repeater RepeaterHost - { - get => this.ExternalVirtualList.RepeaterHost; - set => this.ExternalVirtualList.RepeaterHost = value; - } - - public SlowDataAcquireCompleteHandler SlowDataAcquireCompleteHandler - { - get => this.ExternalVirtualList.SlowDataAcquireCompleteHandler; - set => this.ExternalVirtualList.SlowDataAcquireCompleteHandler = value; - } - - private void OnItemGenerated(object sender, int index, object item) - { - ItemRequestCallback itemCallback = (ItemRequestCallback)this._itemCallbacks[index]; - this._itemCallbacks.Remove(index); - itemCallback(this, index, AssemblyLoadResult.WrapObject(item)); - } - } - - private class ProxyGroup : - AssemblyObjectProxyHelper.ProxyVirtualNotifyList, - IUIGroup, - IList, - ICollection, - IEnumerable - { - public ProxyGroup(object assemblyObject, bool isNotifyList) - : base(assemblyObject, isNotifyList) - { - } - - protected Group ExternalGroup => (Group)this._assemblyObject; - - public int StartIndex => this.ExternalGroup.StartIndex; - - public int EndIndex => this.ExternalGroup.EndIndex; - } - - private class ProxyDictionary : - AssemblyObjectProxyHelper.ProxyObject, - IDictionary, - ICollection, - IEnumerable - { - public ProxyDictionary(object assemblyObject) - : base(assemblyObject) - { - } - - protected IDictionary ExternalDictionary => (IDictionary)this._assemblyObject; - - public bool IsReadOnly => this.ExternalDictionary.IsReadOnly; - - public bool Contains(object key) => this.ExternalDictionary.Contains(AssemblyLoadResult.WrapObject(key)); - - public bool IsFixedSize => false; - - public void Remove(object key) - { - } - - public void Clear() => this.ExternalDictionary.Clear(); - - public void Add(object key, object value) => this.ExternalDictionary.Add(AssemblyLoadResult.WrapObject(key), AssemblyLoadResult.WrapObject(value)); - - public ICollection Keys => (ICollection)null; - - public ICollection Values => (ICollection)null; - - public object this[object key] - { - get => AssemblyLoadResult.UnwrapObject(this.ExternalDictionary[AssemblyLoadResult.WrapObject(key)]); - set => this.ExternalDictionary[AssemblyLoadResult.WrapObject(key)] = AssemblyLoadResult.WrapObject(value); - } - - public void CopyTo(Array array, int index) - { - } - - public int Count => this.ExternalDictionary.Count; - - public bool IsSynchronized => false; - - public object SyncRoot => (object)null; - - public IEnumerator GetEnumerator() => (IEnumerator)null; - - IDictionaryEnumerator IDictionary.GetEnumerator() => (IDictionaryEnumerator)null; - } - - private class ReverseProxyList : - IList, - ICollection, - IEnumerable, - AssemblyObjectProxyHelper.IFrameworkProxyObject - { - private IList _uixList; - - public ReverseProxyList(IList uixList) => this._uixList = uixList; - - public object FrameworkObject => _uixList; - - public int Add(object value) => this._uixList.Add(AssemblyLoadResult.WrapObject(value)); - - public void Clear() => this._uixList.Clear(); - - public bool Contains(object value) => this._uixList.Contains(AssemblyLoadResult.WrapObject(value)); - - public int IndexOf(object value) => this._uixList.IndexOf(AssemblyLoadResult.WrapObject(value)); - - public void Insert(int index, object value) => this._uixList.Insert(index, AssemblyLoadResult.WrapObject(value)); - - public bool IsFixedSize => this._uixList.IsFixedSize; - - public bool IsReadOnly => this._uixList.IsReadOnly; - - public void Remove(object value) => this._uixList.Remove(AssemblyLoadResult.WrapObject(value)); - - public void RemoveAt(int index) => this._uixList.RemoveAt(index); - - public object this[int index] - { - get => AssemblyLoadResult.UnwrapObject(this._uixList[index]); - set => this._uixList[index] = AssemblyLoadResult.WrapObject(value); - } - - public void CopyTo(Array array, int index) - { - int index1 = index; - for (int index2 = 0; index2 < this._uixList.Count; ++index2) - { - array.SetValue(AssemblyLoadResult.UnwrapObject(this._uixList[index2]), index1); - ++index1; - } - } - - public int Count => this._uixList.Count; - - public bool IsSynchronized => this._uixList.IsSynchronized; - - public object SyncRoot => this._uixList.SyncRoot; - - public IEnumerator GetEnumerator() => new AssemblyObjectProxyHelper.ReverseProxyListEnumerator(this._uixList.GetEnumerator()); - } - - private class ReverseProxyListEnumerator : - IEnumerator, - AssemblyObjectProxyHelper.IFrameworkProxyObject - { - private IEnumerator _uixEnumerator; - - public ReverseProxyListEnumerator(IEnumerator uixEnumerator) => this._uixEnumerator = uixEnumerator; - - public bool MoveNext() => this._uixEnumerator.MoveNext(); - - public void Reset() => this._uixEnumerator.Reset(); - - public object Current => AssemblyLoadResult.UnwrapObject(this._uixEnumerator.Current); - - public object FrameworkObject => _uixEnumerator; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyPropertySchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyPropertySchema.cs deleted file mode 100644 index 57c512b..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyPropertySchema.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Reflection; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyPropertySchema : PropertySchema - { - private PropertyInfo _propertyInfo; - private TypeSchema _propertyTypeSchema; - private bool _isStatic; - private FastReflectionInvokeHandler _getMethod; - private FastReflectionInvokeHandler _setMethod; - private object[] _setMethodParams; - - public AssemblyPropertySchema(AssemblyTypeSchema owner, PropertyInfo propertyInfo) - : base(owner) - { - this._propertyInfo = propertyInfo; - this._propertyTypeSchema = AssemblyLoadResult.MapType(this._propertyInfo.PropertyType); - this._isStatic = (this._propertyInfo.GetGetMethod() ?? this._propertyInfo.GetSetMethod()).IsStatic; - } - - public override string Name => this._propertyInfo.Name; - - public override TypeSchema PropertyType => this._propertyTypeSchema; - - public override TypeSchema AlternateType => (TypeSchema)null; - - public override bool CanRead => this._propertyInfo.CanRead; - - public override bool CanWrite => this._propertyInfo.CanWrite; - - public override bool IsStatic => this._isStatic; - - public override ExpressionRestriction ExpressionRestriction => ExpressionRestriction.None; - - public override bool RequiredForCreation => false; - - public override RangeValidator RangeValidator => (RangeValidator)null; - - public override bool NotifiesOnChange - { - get - { - AssemblyTypeSchema owner = (AssemblyTypeSchema)this.Owner; - return !this._isStatic && owner.NotifiesOnChange; - } - } - - public override object GetValue(object instance) - { - object target = AssemblyLoadResult.UnwrapObject(instance); - if (this._getMethod == null) - this._getMethod = ReflectionHelper.CreateMethodInvoke(this._propertyInfo.GetGetMethod()); - return AssemblyLoadResult.WrapObject(this._propertyTypeSchema, this._getMethod(target, null)); - } - - public override void SetValue(ref object instance, object value) - { - object target = AssemblyLoadResult.UnwrapObject(instance); - object obj1 = AssemblyLoadResult.UnwrapObject(value); - if (this._setMethod == null) - { - this._setMethod = ReflectionHelper.CreateMethodInvoke(this._propertyInfo.GetSetMethod()); - this._setMethodParams = new object[1]; - } - this._setMethodParams[0] = obj1; - object obj2 = this._setMethod(target, this._setMethodParams); - this._setMethodParams[0] = null; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs deleted file mode 100644 index 67e21f9..0000000 --- a/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.AssemblyTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using System; -using System.ComponentModel; -using System.Reflection; - -namespace Microsoft.Iris.Markup -{ - public class AssemblyTypeSchema : TypeSchema - { - private Type _type; - private TypeSchema _baseType; - private bool _isDisposable; - private bool _notifiesOnChange; - private bool _isFrameworkEnum; - private Map _constructorCache = new Map(); - private Map _propertyCache = new Map(); - private Map _methodCache = new Map(); - private Map _eventCache = new Map(); - private Map s_constructorInfosCache = new Map(); - private Map s_methodInfosCache = new Map(); - - protected AssemblyTypeSchema(Type type, TypeSchema baseType) - : base(AssemblyLoadResult.MapAssembly(type.Assembly, type.Namespace)) - { - this._type = type; - this._baseType = baseType; - this._isFrameworkEnum = type.IsEnum && Enum.GetUnderlyingType(type) == typeof(int); - this._notifiesOnChange = typeof(INotifyPropertyChanged).IsAssignableFrom(this._type); - this._isDisposable = typeof(IDisposable).IsAssignableFrom(this._type); - } - - protected override void OnDispose() - { - base.OnDispose(); - foreach (KeyValueEntry keyValueEntry in this._constructorCache) - keyValueEntry.Value.Dispose(this); - foreach (KeyValueEntry keyValueEntry in this._propertyCache) - keyValueEntry.Value.Dispose(this); - foreach (KeyValueEntry keyValueEntry in this._methodCache) - keyValueEntry.Value.Dispose(this); - foreach (KeyValueEntry keyValueEntry in this._eventCache) - keyValueEntry.Value.Dispose(this); - } - - public override string Name - { - get - { - string str = this._type.Name; - if (this._type.IsGenericType) - str = this._type.ToString().Substring(((AssemblyLoadResult)this.Owner).Namespace.Length + 1); - return str; - } - } - - public override string AlternateName => (string)null; - - public override TypeSchema Base - { - get - { - if (this._baseType == null && this != AssemblyLoadResult.ObjectTypeSchema) - { - if (this._type.BaseType != null) - this._baseType = AssemblyLoadResult.MapType(this._type.BaseType); - else if (this._type.IsInterface) - this._baseType = AssemblyLoadResult.ObjectTypeSchema; - } - return this._baseType; - } - } - - public override bool Contractual => this._type.IsInterface; - - public override Type RuntimeType => this._type; - - public Type InternalType => this._type; - - public override bool IsNativeAssignableFrom(object check) => this.InternalType.IsAssignableFrom(AssemblyLoadResult.UnwrapObject(check).GetType()); - - public override bool IsNativeAssignableFrom(TypeSchema checkSchema) - { - Type c = checkSchema.RuntimeType; - if (checkSchema is AssemblyTypeSchema assemblyTypeSchema) - c = assemblyTypeSchema.InternalType; - return this.InternalType.IsAssignableFrom(c); - } - - public override bool Disposable => this._isDisposable; - - public override object ConstructDefault() => AssemblyLoadResult.WrapObject(this, Activator.CreateInstance(this._type)); - - public override bool HasDefaultConstructor => this._type.IsValueType || this._type.GetConstructor(Type.EmptyTypes) != null; - - public override bool HasInitializer => false; - - public override void InitializeInstance(ref object instance) - { - } - - public override ConstructorSchema FindConstructor(TypeSchema[] parameters) - { - ConstructorSchema constructorSchema; - if (!this._constructorCache.TryGetValue(new MethodSignatureKey(parameters), out constructorSchema)) - { - ConstructorInfo[] constructors; - if (!this.s_constructorInfosCache.TryGetValue(this._type, out constructors)) - { - constructors = this._type.GetConstructors(BindingFlags.Instance | BindingFlags.Public); - this.s_constructorInfosCache[this._type] = constructors; - } - if (constructors != null) - { - foreach (ConstructorInfo constructorInfo in constructors) - { - TypeSchema[] schemaParameters = null; - if (this.CheckForMethodSignatureMatch(constructorInfo, null, parameters, out schemaParameters)) - { - constructorSchema = new AssemblyConstructorSchema(this, constructorInfo, schemaParameters); - this._constructorCache[new MethodSignatureKey(schemaParameters)] = constructorSchema; - break; - } - } - } - } - return constructorSchema; - } - - public override PropertySchema FindProperty(string name) - { - PropertySchema propertySchema; - if (!this._propertyCache.TryGetValue(name, out propertySchema)) - { - PropertyInfo propertyHelper = GetPropertyHelper(this._type, name); - if (propertyHelper != null) - { - propertySchema = new AssemblyPropertySchema(this, propertyHelper); - this._propertyCache[name] = propertySchema; - } - } - return propertySchema; - } - - private static PropertyInfo GetPropertyHelper(Type type, string name) - { - PropertyInfo propertyInfo = null; - try - { - propertyInfo = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public); - } - catch (AmbiguousMatchException ex) - { - PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public); - for (int index = 0; index < properties.Length; ++index) - { - if (properties[index].Name == name) - { - propertyInfo = properties[index]; - break; - } - } - } - if (propertyInfo == null && type.IsInterface) - { - foreach (Type type1 in type.GetInterfaces()) - { - propertyInfo = GetPropertyHelper(type1, name); - if (propertyInfo != null) - break; - } - } - return propertyInfo; - } - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) - { - MethodSchema methodSchema; - if (!this._methodCache.TryGetValue(new MethodSignatureKey(name, parameters), out methodSchema)) - { - MethodInfo[] methodInfoArray = null; - if (!this.s_methodInfosCache.TryGetValue(this._type, out methodInfoArray)) - { - methodInfoArray = this._type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public); - this.s_methodInfosCache[this._type] = methodInfoArray; - } - if (methodInfoArray != null) - { - foreach (MethodInfo methodInfo in methodInfoArray) - { - TypeSchema[] schemaParameters; - if (this.CheckForMethodSignatureMatch(methodInfo, name, parameters, out schemaParameters)) - { - methodSchema = new AssemblyMethodSchema(this, methodInfo, schemaParameters); - this._methodCache[new MethodSignatureKey(name, schemaParameters)] = methodSchema; - break; - } - } - } - } - return methodSchema; - } - - private bool CheckForMethodSignatureMatch( - MethodBase candidateMember, - string name, - TypeSchema[] parameters, - out TypeSchema[] schemaParameters) - { - schemaParameters = null; - if (name != null && candidateMember.Name != name) - return false; - ParameterInfo[] parameters1 = candidateMember.GetParameters(); - if (parameters1.Length != parameters.Length) - return false; - TypeSchema[] typeSchemaArray = new TypeSchema[parameters1.Length]; - for (int index = 0; index < parameters.Length; ++index) - { - typeSchemaArray[index] = AssemblyLoadResult.MapType(parameters1[index].ParameterType); - if (!typeSchemaArray[index].IsAssignableFrom(parameters[index])) - return false; - } - schemaParameters = typeSchemaArray; - return true; - } - - public override EventSchema FindEvent(string name) - { - EventSchema eventSchema; - if (!this._eventCache.TryGetValue(name, out eventSchema)) - { - EventInfo eventInfo = this._type.GetEvent(name); - if (eventInfo != null) - { - eventSchema = new AssemblyEventSchema(this, eventInfo); - this._eventCache[name] = eventSchema; - } - } - return eventSchema; - } - - public override object FindCanonicalInstance(string name) - { - if (this._type.IsEnum) - { - try - { - return Enum.Parse(this._type, name); - } - catch (ArgumentException ex) - { - } - } - return null; - } - - public override PropertySchema[] Properties => PropertySchema.EmptyList; - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - if (this._isFrameworkEnum && Int32Schema.Type.IsAssignableFrom(fromType)) - { - instance = Enum.ToObject(this._type, (int)from); - return Result.Success; - } - instance = null; - return Result.Fail("Unimplemented"); - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => this._isFrameworkEnum && Int32Schema.Type.IsAssignableFrom(fromType); - - public override void EncodeBinary(ByteCodeWriter writer, object instance) - { - if (this._type.IsEnum) - { - writer.WriteInt32((int)instance); - } - else - { - if (this._type != typeof(Guid)) - return; - writer.Write(((Guid)instance).ToByteArray(), 16U); - } - } - - public override object DecodeBinary(ByteCodeReader reader) - { - object obj; - if (this._type.IsEnum) - obj = Enum.ToObject(this._type, reader.ReadInt32()); - else if (this._type == typeof(Guid)) - { - byte[] b = new byte[16]; - for (int index = 0; index < 16; ++index) - b[index] = reader.ReadByte(); - obj = new Guid(b); - } - else - obj = null; - return obj; - } - - public override bool SupportsBinaryEncoding - { - get - { - if (this._type == typeof(Guid)) - return true; - return this._type.IsEnum && Enum.GetUnderlyingType(this._type) == typeof(int); - } - } - - public override object PerformOperation(object left, object right, OperationType op) - { - bool flag = left != null ? left.Equals(right) : right == null || right.Equals(left); - return BooleanBoxes.Box(op == OperationType.RelationalEquals ? flag : !flag); - } - - public override bool SupportsOperation(OperationType op) => op == OperationType.RelationalEquals || op == OperationType.RelationalNotEquals; - - public override bool IsNullAssignable => !this._type.IsValueType; - - public override int FindTypeHint => -1; - - public bool NotifiesOnChange => this._notifiesOnChange; - - public override bool IsRuntimeImmutable => this._type.IsEnum; - - public override bool IsEnum => this._isFrameworkEnum; - } -} diff --git a/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs b/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs deleted file mode 100644 index e1368c1..0000000 --- a/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.BooleanBoxes -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class BooleanBoxes - { - public static object TrueBox = true; - public static object FalseBox = false; - - public static object Box(bool value) => value ? TrueBox : FalseBox; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs b/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs deleted file mode 100644 index 62b5101..0000000 --- a/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ByteCodeReader -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Markup -{ - public class ByteCodeReader : DisposableObject - { - private static char[] s_scratchCharArray = new char[100]; - private BinaryReader _reader; - private IntPtr _buffer; - private byte[] _bytes; - private bool _inFixedMemory; - - public unsafe ByteCodeReader(IntPtr buffer, long size, bool ownsAllocation) - { - byte[] bytes = new byte[size]; - Marshal.Copy(buffer, bytes, 0, (int)size); - _bytes = bytes; - - this._reader = new BinaryReader(new MemoryStream(_bytes)); - _buffer = buffer; - } - - public byte[] Bytes => _bytes; - - public uint Size => (uint)_reader.BaseStream.Length; - - public uint CurrentOffset - { - get => (uint)_reader.BaseStream.Position; - set => _reader.BaseStream.Seek(value <= Size ? value : throw new Exception("Invalid offset"), SeekOrigin.Begin); - } - - public unsafe IntPtr CurrentAddress => new IntPtr(_buffer.ToInt64() + _reader.BaseStream.Position); - - public bool IsInFixedMemory => this._inFixedMemory; - - public void MarkAsInFixedMemory() => this._inFixedMemory = true; - - public bool ReadBool() => _reader.ReadBoolean(); - - public unsafe byte ReadByte() => _reader.ReadByte(); - - public char ReadChar() => _reader.ReadChar(); - - public unsafe ushort ReadUInt16() => _reader.ReadUInt16(); - - public int ReadInt32() => _reader.ReadInt32(); - - public unsafe uint ReadUInt32() => _reader.ReadUInt32(); - - public static unsafe ushort ReadUInt16(IntPtr pData) - { - var reader = new ByteCodeReader(pData, sizeof(ushort), false); - return reader.ReadUInt16(); - } - - public static unsafe uint ReadUInt32(IntPtr pData) - { - var reader = new ByteCodeReader(pData, sizeof(uint), false); - return reader.ReadUInt32(); - } - - public long ReadInt64() => _reader.ReadInt64(); - - public unsafe ulong ReadUInt64() => _reader.ReadUInt64(); - - public unsafe float ReadSingle() => _reader.ReadSingle(); - - public unsafe double ReadDouble() => _reader.ReadDouble(); - - public unsafe string ReadString() - { - uint num1 = this.ReadUInt16(); - if (num1 == ushort.MaxValue) - return null; - bool flag; - uint num2; - if (((int)num1 & 32768) != 0) - { - flag = true; - num1 &= (uint)short.MaxValue; - num2 = num1; - } - else - { - flag = false; - num2 = num1 * 2U; - } - if (this.CurrentOffset + num2 > this.Size) - this.ThrowReadError(); - char[] chArray = num1 >= s_scratchCharArray.Length ? new char[num1] : s_scratchCharArray; - byte* numPtr1 = (byte*)(_buffer.ToInt32() + (int)CurrentOffset); - if (flag) - { - for (int index = 0; index < num1; ++index) - chArray[index] = (char)*numPtr1++; - } - else - { - for (int index = 0; index < num1; ++index) - { - byte* numPtr2 = numPtr1; - byte* numPtr3 = numPtr2 + 1; - byte num3 = *numPtr2; - byte* numPtr4 = numPtr3; - numPtr1 = numPtr4 + 1; - byte num4 = *numPtr4; - chArray[index] = (char)(num3 | (uint)num4 << 8); - } - } - _reader.BaseStream.Seek(num2, SeekOrigin.Current); - return new string(chArray, 0, (int)num1); - } - - public unsafe IntPtr ToIntPtr(out long size) - { - size = Size; - return _buffer; - } - - public unsafe IntPtr GetAddress(uint offset) => new IntPtr(_buffer.ToInt64() + offset); - - private void ThrowReadError() => throw new Exception("Attempted to read past the end of the buffer."); - - protected override unsafe void OnDispose() - { - base.OnDispose(); - _reader.Close(); - _buffer = IntPtr.Zero; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ByteCodeWriter.cs b/UIX/Microsoft/Iris/Markup/ByteCodeWriter.cs deleted file mode 100644 index cc97184..0000000 --- a/UIX/Microsoft/Iris/Markup/ByteCodeWriter.cs +++ /dev/null @@ -1,228 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ByteCodeWriter -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using System; -using System.Collections; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Markup -{ - public class ByteCodeWriter - { - private const int BLOCK_SIZE = 4096; - private byte[] _scratch = new byte[8]; - private uint _cbFreeInBlock; - private uint _totalSize; - private byte[] _currentBlock; - private ArrayList _blockList = new ArrayList(); - - public uint DataSize => this._totalSize; - - public void WriteByte(byte value) - { - this._scratch[0] = value; - this.Write(this._scratch, 1U); - } - - public void WriteByte(OpCode value) - { - this._scratch[0] = (byte)value; - this.Write(this._scratch, 1U); - } - - public void WriteBool(bool value) - { - this._scratch[0] = 0; - if (value) this._scratch[0] = 1; - this.Write(this._scratch, 1U); - } - - public void WriteChar(char value) - { - this._scratch[0] = (byte)value; - this._scratch[1] = (byte)((uint)value >> 8); - this.Write(this._scratch, 2U); - } - - public void WriteUInt16(ushort value) - { - this._scratch[0] = (byte)value; - this._scratch[1] = (byte)((uint)value >> 8); - this.Write(this._scratch, 2U); - } - - public void WriteUInt16(int rawValue) - { - ushort num = (ushort)rawValue; - this._scratch[0] = (byte)num; - this._scratch[1] = (byte)((uint)num >> 8); - this.Write(this._scratch, 2U); - } - - public void WriteUInt16(uint rawValue) - { - ushort num = (ushort)rawValue; - this._scratch[0] = (byte)num; - this._scratch[1] = (byte)((uint)num >> 8); - this.Write(this._scratch, 2U); - } - - public void WriteInt32(int value) - { - this._scratch[0] = (byte)value; - this._scratch[1] = (byte)(value >> 8); - this._scratch[2] = (byte)(value >> 16); - this._scratch[3] = (byte)(value >> 24); - this.Write(this._scratch, 4U); - } - - public void WriteUInt32(uint value) - { - this._scratch[0] = (byte)value; - this._scratch[1] = (byte)(value >> 8); - this._scratch[2] = (byte)(value >> 16); - this._scratch[3] = (byte)(value >> 24); - this.Write(this._scratch, 4U); - } - - public void WriteInt64(long value) => this.WriteUInt64((ulong)value); - - public void WriteUInt64(ulong value) - { - this._scratch[0] = (byte)value; - this._scratch[1] = (byte)(value >> 8); - this._scratch[2] = (byte)(value >> 16); - this._scratch[3] = (byte)(value >> 24); - this._scratch[4] = (byte)(value >> 32); - this._scratch[5] = (byte)(value >> 40); - this._scratch[6] = (byte)(value >> 48); - this._scratch[7] = (byte)(value >> 56); - this.Write(this._scratch, 8U); - } - - public unsafe void WriteSingle(float value) - { - uint num = *(uint*)&value; - this._scratch[0] = (byte)num; - this._scratch[1] = (byte)(num >> 8); - this._scratch[2] = (byte)(num >> 16); - this._scratch[3] = (byte)(num >> 24); - this.Write(this._scratch, 4U); - } - - public unsafe void WriteDouble(double value) => this.WriteInt64(*(long*)&value); - - public void WriteString(string value) - { - if (value == null) - { - this.WriteUInt16(ushort.MaxValue); - } - else - { - if (value.Length >= short.MaxValue) - throw new ArgumentException("String too long"); - bool flag = false; - foreach (char ch in value) - { - if (ch > 'ÿ') - { - flag = true; - break; - } - } - uint length = (uint)value.Length; - if (!flag) - length |= 32768U; - this.WriteUInt16((ushort)length); - foreach (char ch in value) - { - if (flag) - this.WriteChar(ch); - else - this.WriteByte((byte)ch); - } - } - } - - public void Write(ByteCodeReader value) => this.Write(value, 0U); - - public unsafe void Write(ByteCodeReader value, uint offset) - { - IntPtr intPtr = value.ToIntPtr(out long size); - if (offset > size) - throw new ArgumentOutOfRangeException(nameof(offset)); - this.Write(new IntPtr(intPtr.ToInt64() + offset), (uint)(size - offset)); - } - - public unsafe void Write(byte[] buffer, uint count) - { - fixed (byte* pbData = buffer) - this.Write(pbData, count); - } - - public unsafe void Write(IntPtr buffer, uint count) => this.Write((byte*)buffer.ToPointer(), count); - - private unsafe void Write(byte* pbData, uint cbData) - { - while (cbData > 0U) - { - if (this._cbFreeInBlock == 0U) - { - this._currentBlock = new byte[4096]; - this._blockList.Add(_currentBlock); - this._cbFreeInBlock = 4096U; - } - uint num1 = cbData <= this._cbFreeInBlock ? cbData : this._cbFreeInBlock; - uint num2 = 4096U - this._cbFreeInBlock; - Marshal.Copy(new IntPtr(pbData), this._currentBlock, (int)num2, (int)num1); - pbData += (int)num1; - cbData -= num1; - this._cbFreeInBlock -= num1; - this._totalSize += num1; - } - } - - public void Overwrite(uint offset, uint value) - { - if (offset + 4U > this._totalSize) - throw new ArgumentException("Invalid offset"); - this.OverwriteByte(offset, (byte)value); - this.OverwriteByte(offset + 1U, (byte)(value >> 8)); - this.OverwriteByte(offset + 2U, (byte)(value >> 16)); - this.OverwriteByte(offset + 3U, (byte)(value >> 24)); - } - - private void OverwriteByte(uint offset, byte value) => ((byte[])this._blockList[(int)(offset / 4096U)])[(offset % 4096U)] = value; - - private unsafe byte* ComposeFinalBuffer(out uint totalSize) - { - byte* pointer = (byte*)NativeApi.MemAlloc(this._totalSize, false).ToPointer(); - byte* numPtr = pointer; - for (int index = 0; index < this._blockList.Count - 1; ++index) - { - Marshal.Copy((byte[])this._blockList[index], 0, new IntPtr(numPtr), 4096); - numPtr += 4096; - } - uint num = 4096U - this._cbFreeInBlock; - if (this._currentBlock != null && num != 0U) - Marshal.Copy(this._currentBlock, 0, new IntPtr(numPtr), (int)num); - totalSize = this._totalSize; - this._blockList.Clear(); - this._currentBlock = null; - this._cbFreeInBlock = 0U; - this._totalSize = 0U; - return pointer; - } - - public unsafe ByteCodeReader CreateReader() - { - uint totalSize; - return new ByteCodeReader(new IntPtr(this.ComposeFinalBuffer(out totalSize)), totalSize, true); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ClassMethodSchema.cs b/UIX/Microsoft/Iris/Markup/ClassMethodSchema.cs deleted file mode 100644 index ead8285..0000000 --- a/UIX/Microsoft/Iris/Markup/ClassMethodSchema.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ClassMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class ClassMethodSchema : MarkupMethodSchema - { - public ClassMethodSchema( - ClassTypeSchema owner, - string name, - TypeSchema returnType, - TypeSchema[] parameterTypes, - string[] parameterNames) - : base(owner, name, returnType, parameterTypes, parameterNames) - { - } - - protected override IMarkupTypeBase GetMarkupTypeBase(object instance) => instance == null ? ((ClassTypeSchema)Owner).SharedInstance : (IMarkupTypeBase)instance; - - public override bool IsStatic => ((ClassTypeSchema)this.Owner).IsShared; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ClassPropertySchema.cs b/UIX/Microsoft/Iris/Markup/ClassPropertySchema.cs deleted file mode 100644 index f18249c..0000000 --- a/UIX/Microsoft/Iris/Markup/ClassPropertySchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ClassPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup -{ - public class ClassPropertySchema : MarkupPropertySchema - { - public ClassPropertySchema(MarkupTypeSchema owner, string name, TypeSchema propertyType) - : base(owner, name, propertyType) - { - } - - public override bool IsStatic => ((ClassTypeSchema)this.Owner).IsShared; - - public override object GetValue(object instance) - { - ClassTypeSchema owner = (ClassTypeSchema)this.Owner; - return (instance == null ? owner.SharedInstance : (Class)instance).GetProperty(this.Name); - } - - public override void SetValue(ref object instance, object value) - { - ClassTypeSchema owner = (ClassTypeSchema)this.Owner; - (instance == null ? owner.SharedInstance : (Class)instance).SetProperty(this.Name, value); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ClassTypeSchema.cs b/UIX/Microsoft/Iris/Markup/ClassTypeSchema.cs deleted file mode 100644 index e20398d..0000000 --- a/UIX/Microsoft/Iris/Markup/ClassTypeSchema.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ClassTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Markup -{ - public class ClassTypeSchema : MarkupTypeSchema - { - private bool _isShared; - private Class _sharedInstance; - - public ClassTypeSchema(MarkupLoadResult owner, string name) - : base(owner, name) - { - } - - protected override void OnDispose() - { - base.OnDispose(); - if (this._sharedInstance == null) - return; - this._sharedInstance.Dispose(this); - this._sharedInstance = null; - } - - public override MarkupType MarkupType => MarkupType.Class; - - protected override TypeSchema DefaultBase => ObjectSchema.Type; - - public override Type RuntimeType => typeof(Class); - - public override object ConstructDefault() => this._isShared ? SharedInstance : this.ConstructNewInstance(); - - public override void InitializeInstance(ref object instance) => this.InitializeInstance((IMarkupTypeBase)instance); - - public override bool HasInitializer => !this._isShared; - - public override bool Disposable => !this._isShared && base.Disposable; - - public bool IsShared => this._isShared; - - public void MarkShareable() => this._isShared = true; - - public Class SharedInstance - { - get - { - if (!this._isShared) - return null; - if (this._sharedInstance == null) - { - this._sharedInstance = this.ConstructNewInstance(); - this._sharedInstance.DeclareOwner(this); - this.InitializeInstance(_sharedInstance); - } - return this._sharedInstance; - } - } - - protected virtual Class ConstructNewInstance() => new Class(this); - } -} diff --git a/UIX/Microsoft/Iris/Markup/CodeListeners.cs b/UIX/Microsoft/Iris/Markup/CodeListeners.cs deleted file mode 100644 index ef3f912..0000000 --- a/UIX/Microsoft/Iris/Markup/CodeListeners.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.CodeListeners -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class CodeListeners : Listeners - { - public CodeListeners(Vector listeners) - : base(listeners) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/CompilationMessage.cs b/UIX/Microsoft/Iris/Markup/CompilationMessage.cs deleted file mode 100644 index cabef2f..0000000 --- a/UIX/Microsoft/Iris/Markup/CompilationMessage.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.CompilationMessage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class CompilationMessage - { - public const string CanOnlyCompileMarkupResources = "'{0}' is not markup, it cannot be compiled"; - public const string RemoteResourceTargetsUnsupported = "'{0}' cannot be compiled since it is not local (it is remote and requires download)"; - public const string UnableToOpenFileForWrite = "'{0}' cannot be opened for writing"; - public const string ImportDependencyFailure = "Import of '{0}' failed"; - public const string ImportMemberFailure = "Import of {0} named '{1}' from '{2}' failed"; - public const string ImportVirtualMethodFailure = "Import of virtual method with index {0} from '{1}' failed"; - public const string UnableToOpenOutputFile = "Unable to open output file '{0}'. Error code {1}"; - public const string UnableToSaveToOutputFile = "An error occurred while saving data to output file '{0}'. Error code {1}"; - public const string MultipleImportNames = "Multiple names '{0}' and '{1}' used to refer to the same entity. The first name will be used for all references to this item within compiled UIB files"; - public const string InvalidInputFileName = "'{0}' is not a valid filename"; - } -} diff --git a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoadResult.cs b/UIX/Microsoft/Iris/Markup/CompiledMarkupLoadResult.cs deleted file mode 100644 index b8bfa5f..0000000 --- a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoadResult.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.CompiledMarkupLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public class CompiledMarkupLoadResult : MarkupLoadResult - { - private Resource _resource; - private CompiledMarkupLoader _loader; - private IntPtr _addressOfLineNumberData; - - public CompiledMarkupLoadResult(Resource resource, string uri) - : base(uri) - { - this._resource = resource; - if (uri != resource.Uri) - this._uriUnderlying = resource.Uri; - this._loader = CompiledMarkupLoader.Load(this, resource); - } - - public override bool IsSource => false; - - public override MarkupConstantsTable ConstantsTable => this._binaryDataTable.ConstantsTable; - - public override MarkupImportTables ImportTables => this._binaryDataTable.ImportTables; - - public void SetAddressOfLineNumberData(IntPtr address) => this._addressOfLineNumberData = address; - - public override MarkupLineNumberTable LineNumberTable - { - get - { - if (this._lineNumberTable == null) - this._lineNumberTable = CompiledMarkupLoader.DecodeLineNumberTable(this._addressOfLineNumberData); - return this._lineNumberTable; - } - } - - public override void Load(LoadPass currentPass) - { - if (this._loader == null) - return; - ErrorManager.EnterContext(ErrorContextUri); - this._loader.Depersist(currentPass); - ErrorManager.ExitContext(); - if (currentPass != LoadPass.Done) - return; - this.LoadComplete(); - } - - private void LoadComplete() - { - if (this._resource != null) - { - this._resource.Free(); - this._resource = null; - } - this._loader = null; - if (this.Status != LoadResultStatus.Loading) - return; - this.SetStatus(LoadResultStatus.Success); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs b/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs deleted file mode 100644 index b1b12de..0000000 --- a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs +++ /dev/null @@ -1,816 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.CompiledMarkupLoader -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public class CompiledMarkupLoader - { - private const uint c_LineNumberRecordSize = 12; - private CompiledMarkupLoadResult _loadResultTarget; - private ByteCodeReader _reader; - private bool _hasErrors; - private LoadPass _currentDepersistPass; - private MarkupLoadResult _binaryDataTableLoadResult; - private MarkupBinaryDataTable _binaryDataTable; - private bool _usingSharedDataTable; - private uint _objectSectionStart; - private uint _objectSectionEnd; - private uint _lineNumberTableStart; - private uint _lineNumberTableEnd; - private TypeSchema[][] _typeSchemaArrays; - - public static CompiledMarkupLoader Load( - CompiledMarkupLoadResult loadResult, - Resource resource) - { - return new CompiledMarkupLoader(loadResult, resource); - } - - private CompiledMarkupLoader(CompiledMarkupLoadResult loadResultTarget, Resource resource) - { - this._loadResultTarget = loadResultTarget; - this._reader = new ByteCodeReader(resource.Buffer, resource.Length, false); - if (resource is DllResource) - this._reader.MarkAsInFixedMemory(); - uint num1 = this._reader.ReadUInt32(); - uint num2 = this._reader.ReadUInt32(); - if (num1 != 440551765U) - this.ReportError("Invalid compiled UIX file"); - if (num2 == 1012U) - return; - this.ReportError("Compiled UIX file '{0}' was compiled for the runtime with version {1}, but the current runtime is version {2}", resource.Uri, num2.ToString(), 1012U.ToString()); - } - - public void Depersist(LoadPass currentPass) - { - if (this._currentDepersistPass >= currentPass) - return; - this._currentDepersistPass = currentPass; - if (this._binaryDataTableLoadResult != null) - this._binaryDataTableLoadResult.Load(this._currentDepersistPass); - if (this._currentDepersistPass == LoadPass.DeclareTypes) - this.DoLoadPassDeclareTypes(); - else if (this._currentDepersistPass == LoadPass.PopulatePublicModel) - this.DoLoadPassPopulatePublicModel(); - else if (this._currentDepersistPass == LoadPass.Full) - { - this.DoLoadPassFull(); - } - else - { - foreach (MarkupTypeSchema markupTypeSchema in this._loadResultTarget.ExportTable) - markupTypeSchema.Seal(); - this._reader = null; - } - foreach (LoadResult dependency in this._loadResultTarget.Dependencies) - { - if (dependency != this._loadResultTarget) - { - dependency.Load(this._currentDepersistPass); - if (dependency.Status == LoadResultStatus.Error) - this.MarkHasErrors(); - } - } - } - - private void DoLoadPassDeclareTypes() - { - if (this.HasErrors) - return; - this.DepersistTableOfContents(); - if (this.HasErrors) - return; - this.DepersistDependencies(); - if (this.HasErrors) - return; - this.DepersistTypeExportDeclarations(); - if (!this.HasErrors) - ; - } - - private void DoLoadPassPopulatePublicModel() - { - if (this.HasErrors) - return; - this.DepersistTypeImportTable(); - if (this.HasErrors) - return; - this.DepersistTypeExportDefinitions(); - if (!this.HasErrors) - ; - } - - private void DoLoadPassFull() - { - if (this.HasErrors) - return; - this.DepersistMemberImportTables(); - if (this.HasErrors) - return; - this.DepersistDataMappingsTable(); - if (this.HasErrors) - return; - this.DepersistConstantsTable(); - if (this.HasErrors) - return; - this.DepersistLineNumberTable(); - if (this.HasErrors) - return; - this.DepersistObjectSection(); - if (!this.HasErrors) - ; - } - - private void DepersistTableOfContents() - { - this._objectSectionStart = this._reader.ReadUInt32(); - this._objectSectionEnd = this._reader.ReadUInt32(); - this._lineNumberTableStart = this._reader.ReadUInt32(); - this._lineNumberTableEnd = this._reader.ReadUInt32(); - string uri = this._reader.ReadString(); - if (uri != null) - { - this._binaryDataTableLoadResult = MarkupSystem.ResolveLoadResult(uri, this._loadResultTarget.IslandReferences) as MarkupLoadResult; - if (this._binaryDataTableLoadResult != null) - { - this._binaryDataTableLoadResult.Load(this._currentDepersistPass); - this._binaryDataTable = this._binaryDataTableLoadResult.BinaryDataTable; - this._loadResultTarget.SetBinaryDataTable(this._binaryDataTable); - if (this._binaryDataTable.SharedDependenciesTableWithBinaryDataTable == null) - this._binaryDataTable.SharedDependenciesTableWithBinaryDataTable = new LoadResult[1] - { - _binaryDataTableLoadResult - }; - this._loadResultTarget.SetDependenciesTable(this._binaryDataTable.SharedDependenciesTableWithBinaryDataTable); - this._usingSharedDataTable = true; - } - else - this.MarkHasErrors(); - } - else - this.DepersistBinaryDataTable(this._reader.ReadUInt32()); - } - - private void DepersistDependencies() - { - if (this._usingSharedDataTable) - return; - ushort num = this._reader.ReadUInt16(); - LoadResult[] dependenciesTable = new LoadResult[num]; - for (ushort index = 0; index < num; ++index) - { - this._reader.ReadBool(); - string uri = this.ReadDataTableString(); - LoadResult loadResult = MarkupSystem.ResolveLoadResult(uri, this._loadResultTarget.IslandReferences); - if (loadResult == null || loadResult.Status == LoadResultStatus.Error) - { - this.ReportError("Import of '{0}' failed", uri); - return; - } - dependenciesTable[index] = loadResult; - } - this._loadResultTarget.SetDependenciesTable(dependenciesTable); - } - - private void DepersistTypeExportDeclarations() - { - ushort num1 = this._reader.ReadUInt16(); - TypeSchema[] exportTable = new TypeSchema[num1]; - for (int index = 0; index < num1; ++index) - { - string name = this.ReadDataTableString(); - MarkupTypeSchema markupTypeSchema = MarkupTypeSchema.Build(this.MarkupTypeToDefinition((MarkupType)this._reader.ReadInt32()), _loadResultTarget, name); - exportTable[index] = markupTypeSchema; - } - this._loadResultTarget.SetExportTable(exportTable); - ushort num2 = this._reader.ReadUInt16(); - if (num2 <= 0) - return; - AliasMapping[] aliasTable = new AliasMapping[num2]; - for (int index1 = 0; index1 < num2; ++index1) - { - string alias = this.ReadDataTableString(); - ushort index2 = this._reader.ReadUInt16(); - string targetType = this.ReadDataTableString(); - LoadResult dependent = this.MapIndexToDependent(index2); - aliasTable[index1] = new AliasMapping(alias, dependent, targetType); - } - this._loadResultTarget.SetAliasTable(aliasTable); - } - - private void DepersistTypeImportTable() - { - if (this._usingSharedDataTable) - return; - MarkupImportTables importTables = new MarkupImportTables(); - this._loadResultTarget.BinaryDataTable.SetImportTables(importTables); - ushort num = this._reader.ReadUInt16(); - if (num <= 0) - return; - TypeSchema[] typeSchemaArray = new TypeSchema[num]; - for (ushort index = 0; index < num; ++index) - { - LoadResult dependent = this.MapIndexToDependent(this._reader.ReadUInt16()); - string name = this.ReadDataTableString(); - TypeSchema type = dependent.FindType(name); - if (type == null) - this.ReportError("Import of {0} named '{1}' from '{2}' failed", "type", name, dependent.Uri); - else - typeSchemaArray[index] = type; - } - importTables.TypeImports = typeSchemaArray; - } - - private void DepersistTypeExportDefinitions() - { - TypeSchema[] typeImports = this._loadResultTarget.ImportTables.TypeImports; - foreach (MarkupTypeSchema markupTypeSchema in this._loadResultTarget.ExportTable) - { - MarkupType markupType = markupTypeSchema.MarkupType; - TypeSchema definition = this.MarkupTypeToDefinition(markupType); - uint typeDepth = this._reader.ReadUInt16(); - markupTypeSchema.SetTypeDepth(typeDepth); - if (typeDepth > 1U) - { - ushort num = this._reader.ReadUInt16(); - TypeSchema typeSchema = typeImports[num]; - markupTypeSchema.SetBaseType((MarkupTypeSchema)typeSchema); - } - uint offset1 = this._reader.ReadUInt32(); - markupTypeSchema.SetInitializePropertiesOffset(offset1); - uint offset2 = this._reader.ReadUInt32(); - markupTypeSchema.SetInitializeLocalsInputOffset(offset2); - uint offset3 = this._reader.ReadUInt32(); - markupTypeSchema.SetInitializeContentOffset(offset3); - markupTypeSchema.SetInitialEvaluateOffsets(this.ReadUInt32ArrayHelper()); - markupTypeSchema.SetFinalEvaluateOffsets(this.ReadUInt32ArrayHelper()); - markupTypeSchema.SetRefreshListenerGroupOffsets(this.ReadUInt32ArrayHelper()); - uint listenerCount = this._reader.ReadUInt32(); - markupTypeSchema.SetListenerCount(listenerCount); - uint num1 = this._reader.ReadUInt32(); - if (num1 > 0U) - { - SymbolReference[] symbolTable = new SymbolReference[num1]; - for (int index = 0; index < num1; ++index) - { - SymbolReference symbolReference = new SymbolReference(this.ReadDataTableString(), (SymbolOrigin)this._reader.ReadByte()); - symbolTable[index] = symbolReference; - } - markupTypeSchema.SetSymbolReferenceTable(symbolTable); - } - this.DepersistInheritedSymbolTable(markupTypeSchema); - int totalPropertiesAndLocalsCount = this._reader.ReadInt32(); - markupTypeSchema.SetTotalPropertiesAndLocalsCount(totalPropertiesAndLocalsCount); - if (markupType == MarkupType.UI) - { - ushort num2 = this._reader.ReadUInt16(); - if (num2 > 0) - { - NamedContentRecord[] namedContentTable = new NamedContentRecord[num2]; - for (int index = 0; index < num2; ++index) - { - string name = this.ReadDataTableString(); - uint offset4 = this._reader.ReadUInt32(); - namedContentTable[index] = new NamedContentRecord(name); - namedContentTable[index].SetOffset(offset4); - } - ((UIClassTypeSchema)markupTypeSchema).SetNamedContentTable(namedContentTable); - } - } - else - { - if (this._reader.ReadBool()) - ((ClassTypeSchema)markupTypeSchema).MarkShareable(); - if (markupType == MarkupType.Effect) - { - EffectClassTypeSchema effectClassTypeSchema = (EffectClassTypeSchema)markupTypeSchema; - effectClassTypeSchema.SetTechniqueOffsets(this.ReadUInt32ArrayHelper()); - effectClassTypeSchema.SetInstancePropertyAssignments(this.ReadUInt32ArrayHelper()); - effectClassTypeSchema.SetDynamicElementAssignments(this.ReadStringArrayHelper()); - int symbolIndex = this._reader.ReadInt32(); - effectClassTypeSchema.SetDefaultElementSymbolIndex(symbolIndex); - } - if (markupType == MarkupType.DataQuery) - { - MarkupDataQuerySchema markupDataQuerySchema = (MarkupDataQuerySchema)markupTypeSchema; - markupDataQuerySchema.ProviderName = this.ReadDataTableString(); - ushort index = this._reader.ReadUInt16(); - markupDataQuerySchema.ResultType = this.MapIndexToType(index); - } - } - ushort num3 = this._reader.ReadUInt16(); - if (num3 > 0) - { - PropertySchema[] properties = new PropertySchema[num3]; - for (int index1 = 0; index1 < num3; ++index1) - { - string name = this.ReadDataTableString(); - bool requiredForCreation = this._reader.ReadBool(); - bool flag = this._reader.ReadBool(); - PropertyOverrideCriteriaTypeConstraint criteriaTypeConstraint = null; - if (flag) - { - ushort num2 = this._reader.ReadUInt16(); - ushort num4 = this._reader.ReadUInt16(); - TypeSchema constraint = typeImports[num2]; - criteriaTypeConstraint = new PropertyOverrideCriteriaTypeConstraint(typeImports[num4], constraint); - } - ushort num5 = this._reader.ReadUInt16(); - TypeSchema propertyType = typeImports[num5]; - MarkupPropertySchema markupPropertySchema = MarkupPropertySchema.Build(definition, markupTypeSchema, name, propertyType); - markupPropertySchema.SetRequiredForCreation(requiredForCreation); - markupPropertySchema.SetOverrideCriteria(criteriaTypeConstraint); - if (markupType == MarkupType.DataType) - { - MarkupDataTypePropertySchema typePropertySchema = (MarkupDataTypePropertySchema)markupPropertySchema; - ushort index2 = this._reader.ReadUInt16(); - if (index2 != ushort.MaxValue) - typePropertySchema.SetUnderlyingCollectionType(this.MapIndexToType(index2)); - } - if (markupType == MarkupType.DataQuery) - { - MarkupDataQueryPropertySchema queryPropertySchema = (MarkupDataQueryPropertySchema)markupPropertySchema; - if (this._reader.ReadBool()) - queryPropertySchema.DefaultValue = queryPropertySchema.PropertyType.DecodeBinary(this._reader); - queryPropertySchema.InvalidatesQuery = this._reader.ReadBool(); - ushort index2 = this._reader.ReadUInt16(); - if (index2 != ushort.MaxValue) - queryPropertySchema.SetUnderlyingCollectionType(this.MapIndexToType(index2)); - } - properties[index1] = markupPropertySchema; - } - markupTypeSchema.SetPropertyList(properties); - } - MethodSchema[] methods = this.ReadMarkupMethodArrayHelper(definition, markupTypeSchema); - if (methods != null) - markupTypeSchema.SetMethodList(methods); - MethodSchema[] virtualMethods = this.ReadMarkupMethodArrayHelper(definition, markupTypeSchema); - if (virtualMethods != null) - markupTypeSchema.SetVirtualMethodList(virtualMethods); - } - foreach (MarkupTypeSchema markupTypeSchema in this._loadResultTarget.ExportTable) - markupTypeSchema.BuildProperties(); - } - - private void DepersistMemberImportTables() - { - if (this._usingSharedDataTable) - return; - MarkupImportTables importTables = this._loadResultTarget.ImportTables; - ushort num1 = this._reader.ReadUInt16(); - if (num1 > 0) - { - ConstructorSchema[] constructorSchemaArray = new ConstructorSchema[num1]; - for (int index1 = 0; index1 < num1; ++index1) - { - TypeSchema type = this.MapIndexToType(this._reader.ReadUInt16()); - ushort num2 = this._reader.ReadUInt16(); - TypeSchema[] parameters = TypeSchema.EmptyList; - if (num2 > 0) - { - parameters = this.GetTempParameterArray(num2); - for (ushort index2 = 0; index2 < num2; ++index2) - { - ushort index3 = this._reader.ReadUInt16(); - parameters[index2] = this.MapIndexToType(index3); - } - } - ConstructorSchema constructor = type.FindConstructor(parameters); - if (constructor == null) - this.ReportError("Import of {0} named '{1}' from '{2}' failed", "constructor", type.Name, type.Owner.Uri); - else - constructorSchemaArray[index1] = constructor; - } - importTables.ConstructorImports = constructorSchemaArray; - } - ushort num3 = this._reader.ReadUInt16(); - if (num3 > 0) - { - PropertySchema[] propertySchemaArray = new PropertySchema[num3]; - for (int index = 0; index < num3; ++index) - { - TypeSchema type = this.MapIndexToType(this._reader.ReadUInt16()); - string name = this.ReadDataTableString(); - PropertySchema property = type.FindProperty(name); - if (property == null) - this.ReportError("Import of {0} named '{1}' from '{2}' failed", "property", name, type.Name); - else - propertySchemaArray[index] = property; - } - importTables.PropertyImports = propertySchemaArray; - } - ushort num4 = this._reader.ReadUInt16(); - if (num4 > 0) - { - MethodSchema[] methodSchemaArray = new MethodSchema[num4]; - for (int index1 = 0; index1 < num4; ++index1) - { - MethodSchema methodSchema = null; - TypeSchema type = this.MapIndexToType(this._reader.ReadUInt16()); - if (!this._reader.ReadBool()) - { - string name = this.ReadDataTableString(); - ushort num2 = this._reader.ReadUInt16(); - TypeSchema[] parameters = TypeSchema.EmptyList; - if (num2 > 0) - { - parameters = this.GetTempParameterArray(num2); - for (ushort index2 = 0; index2 < num2; ++index2) - { - ushort index3 = this._reader.ReadUInt16(); - parameters[index2] = this.MapIndexToType(index3); - } - } - methodSchema = type.FindMethod(name, parameters); - if (methodSchema == null) - this.ReportError("Import of {0} named '{1}' from '{2}' failed", "method", name, type.Name); - } - else - { - int num2 = this._reader.ReadInt32(); - if (type is MarkupTypeSchema markupTypeSchema) - { - foreach (MarkupMethodSchema virtualMethod in markupTypeSchema.VirtualMethods) - { - if (virtualMethod.VirtualId == num2) - { - methodSchema = virtualMethod; - break; - } - } - } - if (methodSchema == null) - this.ReportError("Import of virtual method with index {0} from '{1}' failed", num2.ToString(), type.Name); - } - methodSchemaArray[index1] = methodSchema; - } - importTables.MethodImports = methodSchemaArray; - } - ushort num5 = this._reader.ReadUInt16(); - if (num5 <= 0) - return; - EventSchema[] eventSchemaArray = new EventSchema[num5]; - for (int index = 0; index < num5; ++index) - { - TypeSchema type = this.MapIndexToType(this._reader.ReadUInt16()); - string name = this.ReadDataTableString(); - EventSchema eventSchema = type.FindEvent(name); - if (eventSchema == null) - this.ReportError("Import of {0} named '{1}' from '{2}' failed", "event", name, type.Name); - else - eventSchemaArray[index] = eventSchema; - } - importTables.EventImports = eventSchemaArray; - } - - private void DepersistDataMappingsTable() - { - ushort num1 = this._reader.ReadUInt16(); - if (num1 <= 0) - return; - MarkupDataMapping[] dataMappingsTable = new MarkupDataMapping[num1]; - for (int index1 = 0; index1 < num1; ++index1) - { - MarkupDataMapping markupDataMapping = new MarkupDataMapping(null); - ushort index2 = this._reader.ReadUInt16(); - markupDataMapping.TargetType = (MarkupDataTypeSchema)this.MapIndexToType(index2); - markupDataMapping.Provider = this.ReadDataTableString(); - ushort num2 = this._reader.ReadUInt16(); - markupDataMapping.Mappings = new MarkupDataMappingEntry[num2]; - for (int index3 = 0; index3 < num2; ++index3) - { - MarkupDataMappingEntry dataMappingEntry = new MarkupDataMappingEntry(); - dataMappingEntry.Source = this.ReadDataTableString(); - dataMappingEntry.Target = this.ReadDataTableString(); - ushort num3 = this._reader.ReadUInt16(); - dataMappingEntry.Property = (MarkupDataTypePropertySchema)this._loadResultTarget.ImportTables.PropertyImports[num3]; - dataMappingEntry.DefaultValue = !this._reader.ReadBool() ? MarkupDataProvider.GetDefaultValueForType(dataMappingEntry.Property.PropertyType) : dataMappingEntry.Property.PropertyType.DecodeBinary(this._reader); - markupDataMapping.Mappings[index3] = dataMappingEntry; - } - dataMappingsTable[index1] = markupDataMapping; - } - this._loadResultTarget.SetDataMappingsTable(dataMappingsTable); - } - - public static void DecodeInheritableSymbolTable( - MarkupTypeSchema typeExport, - ByteCodeReader reader, - IntPtr startAddress) - { - if (reader == null) - { - uint size = ByteCodeReader.ReadUInt32(startAddress); - reader = new ByteCodeReader(new IntPtr(startAddress.ToInt64() + 4L), size, false); - } - else - { - int num1 = (int)reader.ReadUInt32(); - } - MarkupLoadResult owner = typeExport.Owner as MarkupLoadResult; - MarkupBinaryDataTable binaryDataTable = owner.BinaryDataTable; - uint num2 = reader.ReadUInt32(); - SymbolRecord[] symbolTable; - if (num2 > 0U) - { - symbolTable = new SymbolRecord[num2]; - for (int index = 0; index < num2; ++index) - { - SymbolRecord symbolRecord = new SymbolRecord(); - symbolRecord.Name = ReadDataTableString(reader, binaryDataTable); - symbolRecord.SymbolOrigin = (SymbolOrigin)reader.ReadByte(); - ushort num3 = reader.ReadUInt16(); - symbolRecord.Type = owner.ImportTables.TypeImports[num3]; - symbolTable[index] = symbolRecord; - } - } - else - symbolTable = SymbolRecord.EmptyList; - typeExport.SetInheritableSymbolsTable(symbolTable); - } - - private void DepersistInheritedSymbolTable(MarkupTypeSchema typeExport) - { - if (this._reader.IsInFixedMemory) - { - typeExport.SetAddressOfInheritableSymbolTable(this._reader.CurrentAddress); - this._reader.CurrentOffset += this._reader.ReadUInt32(); - } - else - DecodeInheritableSymbolTable(typeExport, this._reader, IntPtr.Zero); - } - - private void DepersistConstantsTable() - { - ushort num = this._reader.ReadUInt16(); - if (num <= 0) - return; - object[] runtimeList = new object[num]; - MarkupConstantsTable constantsTable = new MarkupConstantsTable(runtimeList); - if (!this._reader.IsInFixedMemory) - { - this._reader.CurrentOffset += (uint)((num + 1) * 4); - for (int index = 0; index < num; ++index) - { - object obj = DepersistConstant(this._reader, _loadResultTarget); - runtimeList[index] = obj; - } - } - else - { - ByteCodeReader constantsTableReader = new ByteCodeReader(this._reader.CurrentAddress, ByteCodeReader.ReadUInt32(this._reader.GetAddress(this._reader.CurrentOffset + num * 4U)), false); - constantsTable.SetConstantsTableReader(constantsTableReader, _loadResultTarget); - } - this._loadResultTarget.BinaryDataTable.SetConstantsTable(constantsTable); - } - - public static object DepersistConstant(ByteCodeReader reader, MarkupLoadResult loadResult) - { - ushort num = reader.ReadUInt16(); - TypeSchema typeImport = loadResult.ImportTables.TypeImports[num]; - MarkupConstantPersistMode constantPersistMode = (MarkupConstantPersistMode)reader.ReadByte(); - object instance = null; - switch (constantPersistMode) - { - case MarkupConstantPersistMode.Binary: - instance = typeImport.DecodeBinary(reader); - break; - case MarkupConstantPersistMode.FromString: - string str = ReadDataTableString(reader, loadResult.BinaryDataTable); - typeImport.TypeConverter(str, StringSchema.Type, out instance); - break; - case MarkupConstantPersistMode.Canonical: - string name = ReadDataTableString(reader, loadResult.BinaryDataTable); - instance = typeImport.FindCanonicalInstance(name); - break; - } - return instance; - } - - private static MarkupLineNumberTable DecodeLineNumberTable( - ByteCodeReader reader) - { - ushort num = reader.ReadUInt16(); - ulong[] runtimeList = new ulong[num]; - for (int index = 0; index < num; ++index) - runtimeList[index] = reader.ReadUInt64(); - return new MarkupLineNumberTable(runtimeList); - } - - public static MarkupLineNumberTable DecodeLineNumberTable(IntPtr address) - { - uint size = (uint)(ByteCodeReader.ReadUInt16(address) * 12 + 2); - return DecodeLineNumberTable(new ByteCodeReader(address, size, false)); - } - - private void DepersistLineNumberTable() - { - if (this._reader.IsInFixedMemory) - { - this._loadResultTarget.SetAddressOfLineNumberData(this._reader.GetAddress(this._lineNumberTableStart)); - } - else - { - uint currentOffset = this._reader.CurrentOffset; - this._reader.CurrentOffset = this._lineNumberTableStart; - this._loadResultTarget.SetLineNumberTable(DecodeLineNumberTable(this._reader)); - this._reader.CurrentOffset = currentOffset; - } - } - - private void DepersistObjectSection() - { - uint num = this._objectSectionEnd - this._objectSectionStart; - ByteCodeReader reader; - if (this._reader.IsInFixedMemory) - { - reader = new ByteCodeReader(this._reader.GetAddress(this._objectSectionStart), num, false); - } - else - { - ByteCodeWriter byteCodeWriter = new ByteCodeWriter(); - byteCodeWriter.Write(this._reader.GetAddress(this._objectSectionStart), num); - reader = byteCodeWriter.CreateReader(); - } - this._loadResultTarget.SetObjectSection(reader); - } - - private void DepersistBinaryDataTable(uint binaryDataTableOffset) - { - uint currentOffset = this._reader.CurrentOffset; - this._reader.CurrentOffset = binaryDataTableOffset; - int stringCount = this._reader.ReadInt32(); - this._binaryDataTable = new MarkupBinaryDataTable(null, stringCount); - if (!this._reader.IsInFixedMemory) - { - this._reader.CurrentOffset += (uint)((stringCount + 1) * 4); - Vector strings = this._binaryDataTable.Strings; - for (int index = 0; index < stringCount; ++index) - { - string str = this._reader.ReadString(); - strings[index] = str; - } - } - else - this._binaryDataTable.SetStringTableReader(new ByteCodeReader(this._reader.CurrentAddress, ByteCodeReader.ReadUInt32(this._reader.GetAddress(this._reader.CurrentOffset + (uint)(stringCount * 4))), false)); - this._loadResultTarget.SetBinaryDataTable(this._binaryDataTable); - this._reader.CurrentOffset = currentOffset; - } - - private LoadResult MapIndexToDependent(ushort index) - { - LoadResult loadResult; - switch (index) - { - case 65533: - loadResult = _loadResultTarget; - break; - case 65534: - loadResult = MarkupSystem.UIXGlobal; - break; - default: - loadResult = this._binaryDataTableLoadResult == null ? this._loadResultTarget.Dependencies[index] : this._binaryDataTableLoadResult.Dependencies[index]; - break; - } - return loadResult; - } - - private TypeSchema MapIndexToType(ushort index) => this._loadResultTarget.ImportTables.TypeImports[index]; - - private string ReadDataTableString() => this._binaryDataTable.GetStringByIndex(this._reader.ReadInt32()); - - private static string ReadDataTableString( - ByteCodeReader reader, - MarkupBinaryDataTable binaryDataTable) - { - int index = reader.ReadInt32(); - return binaryDataTable.GetStringByIndex(index); - } - - private uint[] ReadUInt32ArrayHelper() - { - uint num = this._reader.ReadUInt32(); - if (num <= 0U) - return null; - uint[] numArray = new uint[num]; - for (int index = 0; index < num; ++index) - numArray[index] = this._reader.ReadUInt32(); - return numArray; - } - - private string[] ReadStringArrayHelper() - { - uint num = this._reader.ReadUInt32(); - if (num <= 0U) - return null; - string[] strArray = new string[num]; - for (int index = 0; index < num; ++index) - strArray[index] = this.ReadDataTableString(); - return strArray; - } - - private MethodSchema[] ReadMarkupMethodArrayHelper( - TypeSchema markupTypeDefinition, - MarkupTypeSchema typeExport) - { - MethodSchema[] methodSchemaArray = null; - ushort num1 = this._reader.ReadUInt16(); - if (num1 > 0) - { - methodSchemaArray = new MethodSchema[num1]; - for (int index1 = 0; index1 < num1; ++index1) - { - string name = this.ReadDataTableString(); - TypeSchema type = this.MapIndexToType(this._reader.ReadUInt16()); - uint num2 = this._reader.ReadUInt32(); - TypeSchema[] parameterTypes = TypeSchema.EmptyList; - if (num2 > 0U) - { - parameterTypes = new TypeSchema[num2]; - for (int index2 = 0; index2 < num2; ++index2) - { - ushort index3 = this._reader.ReadUInt16(); - parameterTypes[index2] = this.MapIndexToType(index3); - } - } - string[] parameterNames = this.ReadStringArrayHelper() ?? MarkupMethodSchema.s_emptyStringArray; - int virtualId = this._reader.ReadInt32(); - bool isVirtualThunk = this._reader.ReadBool(); - uint codeOffset = this._reader.ReadUInt32(); - MarkupMethodSchema markupMethodSchema = MarkupMethodSchema.Build(markupTypeDefinition, typeExport, name, type, parameterTypes, parameterNames, isVirtualThunk); - markupMethodSchema.SetCodeOffset(codeOffset); - markupMethodSchema.SetVirtualId(virtualId); - methodSchemaArray[index1] = markupMethodSchema; - } - } - return methodSchemaArray; - } - - private TypeSchema MarkupTypeToDefinition(MarkupType markupType) - { - switch (markupType) - { - case MarkupType.UI: - return UISchema.Type; - case MarkupType.Effect: - return EffectSchema.Type; - case MarkupType.DataType: - return DataTypeSchema.Type; - case MarkupType.DataQuery: - return DataQuerySchema.Type; - default: - return ClassSchema.Type; - } - } - - private TypeSchema[] GetTempParameterArray(int count) - { - if (this._typeSchemaArrays == null) - this._typeSchemaArrays = new TypeSchema[5][]; - if (count >= this._typeSchemaArrays.Length) - return new TypeSchema[count]; - int index = count - 1; - if (this._typeSchemaArrays[index] == null) - this._typeSchemaArrays[index] = new TypeSchema[count]; - return this._typeSchemaArrays[index]; - } - - public void ReportError(string error, string param0, string param1, string param2) => this.ReportError(string.Format(error, param0, param1, param2)); - - public void ReportError(string error, string param0, string param1) => this.ReportError(string.Format(error, param0, param1)); - - public void ReportError(string error, string param0) => this.ReportError(string.Format(error, param0)); - - public void ReportError(string error) - { - this.MarkHasErrors(); - ErrorManager.ReportError(error); - } - - public void MarkHasErrors() - { - if (this._hasErrors) - return; - this._hasErrors = true; - this._loadResultTarget.MarkLoadFailed(); - } - - public bool HasErrors => this._hasErrors; - - public static bool IsUIB(Resource resource) - { - bool flag = false; - if (resource.Length > 4U && ByteCodeReader.ReadUInt32(resource.Buffer) == 440551765U) - flag = true; - return flag; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ConstructHandler.cs b/UIX/Microsoft/Iris/Markup/ConstructHandler.cs deleted file mode 100644 index 9d39f91..0000000 --- a/UIX/Microsoft/Iris/Markup/ConstructHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ConstructHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object ConstructHandler(object[] parameters); -} diff --git a/UIX/Microsoft/Iris/Markup/ConstructorSchema.cs b/UIX/Microsoft/Iris/Markup/ConstructorSchema.cs deleted file mode 100644 index 5fcdde2..0000000 --- a/UIX/Microsoft/Iris/Markup/ConstructorSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ConstructorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public abstract class ConstructorSchema : DisposableObject - { - public static ConstructorSchema[] EmptyList = new ConstructorSchema[0]; - private TypeSchema _owner; - - public ConstructorSchema(TypeSchema owner) - { - this._owner = owner; - this.DeclareOwner(owner); - } - - public TypeSchema Owner => this._owner; - - public abstract TypeSchema[] ParameterTypes { get; } - - public abstract object Construct(object[] parameters); - } -} diff --git a/UIX/Microsoft/Iris/Markup/CreateLoadResultHandler.cs b/UIX/Microsoft/Iris/Markup/CreateLoadResultHandler.cs deleted file mode 100644 index 7f73d5e..0000000 --- a/UIX/Microsoft/Iris/Markup/CreateLoadResultHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.CreateLoadResultHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate LoadResult CreateLoadResultHandler(string uri); -} diff --git a/UIX/Microsoft/Iris/Markup/DecodeBinaryHandler.cs b/UIX/Microsoft/Iris/Markup/DecodeBinaryHandler.cs deleted file mode 100644 index b188331..0000000 --- a/UIX/Microsoft/Iris/Markup/DecodeBinaryHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.DecodeBinaryHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object DecodeBinaryHandler(ByteCodeReader reader); -} diff --git a/UIX/Microsoft/Iris/Markup/DefaultConstructHandler.cs b/UIX/Microsoft/Iris/Markup/DefaultConstructHandler.cs deleted file mode 100644 index 2ede2de..0000000 --- a/UIX/Microsoft/Iris/Markup/DefaultConstructHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.DefaultConstructHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object DefaultConstructHandler(); -} diff --git a/UIX/Microsoft/Iris/Markup/DelegateListener.cs b/UIX/Microsoft/Iris/Markup/DelegateListener.cs deleted file mode 100644 index e1d70c7..0000000 --- a/UIX/Microsoft/Iris/Markup/DelegateListener.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.DelegateListener -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class DelegateListener : Listener - { - private DelegateListener.OnNotifyCallback _onNotify; - - public DelegateListener( - INotifyObject notifier, - string watch, - DelegateListener.OnNotifyCallback callback) - { - this._watch = watch; - this._onNotify = callback; - notifier.AddListener(this); - } - - public override void Dispose() - { - base.Dispose(); - this._onNotify = null; - } - - public override void OnNotify() - { - base.OnNotify(); - this._onNotify(this); - } - - public delegate void OnNotifyCallback(DelegateListener listener); - } -} diff --git a/UIX/Microsoft/Iris/Markup/DestructiveListener.cs b/UIX/Microsoft/Iris/Markup/DestructiveListener.cs deleted file mode 100644 index 8794a97..0000000 --- a/UIX/Microsoft/Iris/Markup/DestructiveListener.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.DestructiveListener -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class DestructiveListener : MarkupListener - { - private uint _refreshId; - - public void Reset( - INotifyObject notifier, - string watch, - IMarkupTypeBase scriptHost, - uint scriptId, - uint refreshId) - { - this.Reset(notifier, watch, scriptHost, scriptId); - this._refreshId = refreshId; - } - - public override void OnNotify() - { - base.OnNotify(); - this.ScriptHost.ScheduleScriptRun(this._refreshId, true); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/EffectClassTypeSchema.cs b/UIX/Microsoft/Iris/Markup/EffectClassTypeSchema.cs deleted file mode 100644 index 0d1bdbc..0000000 --- a/UIX/Microsoft/Iris/Markup/EffectClassTypeSchema.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.EffectClassTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Markup -{ - public class EffectClassTypeSchema : ClassTypeSchema - { - private uint[] _techniqueOffsets; - private uint[] _instancePropertyAssignments; - private string[] _dynamicElementAssignments; - private int _defaultElementSymbolIndex = -1; - private IEffectTemplate _effectTemplate; - private int _templateIndexBuilt; - private PropertySchema _defaultProperty; - - public EffectClassTypeSchema(MarkupLoadResult owner, string name) - : base(owner, name) - { - } - - protected override void SealWorker() - { - base.SealWorker(); - this._defaultProperty = this.FindPropertyDeep("Default"); - } - - public override MarkupType MarkupType => MarkupType.Effect; - - protected override void OnDispose() - { - base.OnDispose(); - if (this._effectTemplate == null) - return; - this._effectTemplate.UnregisterUsage(this); - this._effectTemplate = null; - } - - protected override TypeSchema DefaultBase => EffectInstanceSchema.Type; - - public override Type RuntimeType => typeof(EffectClass); - - public string DefaultElementSymbol => this._defaultElementSymbolIndex >= 0 ? this.SymbolReferenceTable[this._defaultElementSymbolIndex].Symbol : null; - - protected override Class ConstructNewInstance() - { - this.EnsureEffectTemplate(); - return new EffectClass(this, this._effectTemplate); - } - - protected override bool RunInitialEvaluates(IMarkupTypeBase scriptHost) - { - bool flag = true; - if (this._instancePropertyAssignments != null && this._templateIndexBuilt >= 0) - { - ErrorManager.EnterContext(this); - flag = this.RunInitializeScript(scriptHost, this._instancePropertyAssignments[this._templateIndexBuilt]); - ErrorManager.ExitContext(); - } - return flag && base.RunInitialEvaluates(scriptHost); - } - - private void EnsureEffectTemplate() - { - if (this._effectTemplate != null) - return; - this._effectTemplate = UISession.Default.RenderSession.CreateEffectTemplate(this, this.Name); - ErrorManager.EnterContext(this); - Class @class = new Class(this); - @class.DeclareOwner(this); - this._templateIndexBuilt = -1; - for (int index = 0; index < this._techniqueOffsets.Length; ++index) - { - object obj = this.RunAtOffset(@class, this._techniqueOffsets[index]); - if (obj == Interpreter.ScriptError) - { - if (!ErrorManager.IgnoringErrors) - ErrorManager.ReportWarning("Script runtime failure: Scripting errors have prevented '{0}' from properly initializing and will affect its operation", Name); - } - else - { - EffectInput input = (EffectInput)obj; - if (this._dynamicElementAssignments != null) - { - foreach (string elementAssignment in this._dynamicElementAssignments) - this._effectTemplate.AddEffectProperty(elementAssignment); - } - if (this._effectTemplate.Build(input)) - { - this._templateIndexBuilt = index; - break; - } - } - } - @class.Dispose(this); - ErrorManager.ExitContext(); - } - - public uint[] TechniqueOffsets => this._techniqueOffsets; - - public uint[] InstancePropertyAssignments => this._instancePropertyAssignments; - - public string[] DynamicElementAssignments => this._dynamicElementAssignments; - - public int DefaultElementSymbolIndex => this._defaultElementSymbolIndex; - - public void SetTechniqueOffsets(uint[] techniqueOffsets) => this._techniqueOffsets = techniqueOffsets; - - public void SetInstancePropertyAssignments(uint[] instancePropertyAssignments) => this._instancePropertyAssignments = instancePropertyAssignments; - - public void SetDynamicElementAssignments(string[] dynamicElementAssignments) => this._dynamicElementAssignments = dynamicElementAssignments; - - public void SetDefaultElementSymbolIndex(int symbolIndex) => this._defaultElementSymbolIndex = symbolIndex; - } -} diff --git a/UIX/Microsoft/Iris/Markup/EncodeBinaryHandler.cs b/UIX/Microsoft/Iris/Markup/EncodeBinaryHandler.cs deleted file mode 100644 index a1f2633..0000000 --- a/UIX/Microsoft/Iris/Markup/EncodeBinaryHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.EncodeBinaryHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate void EncodeBinaryHandler(ByteCodeWriter writer, object instance); -} diff --git a/UIX/Microsoft/Iris/Markup/EnumSchema.cs b/UIX/Microsoft/Iris/Markup/EnumSchema.cs deleted file mode 100644 index 8458b71..0000000 --- a/UIX/Microsoft/Iris/Markup/EnumSchema.cs +++ /dev/null @@ -1,211 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.EnumSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using System; -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public class EnumSchema : TypeSchema - { - private string _name; - private Type _enumType; - protected Map _nameToValueMap; - private bool _isFlags; - private string[] _names; - private int[] _values; - - public EnumSchema(LoadResult owner) - : base(owner) - { - } - - protected void Initialize( - string enumName, - Type runtimeType, - bool isFlags, - string[] names, - int[] values) - { - this._name = enumName; - this._enumType = runtimeType; - this._isFlags = isFlags; - this._names = names; - this._values = values; - } - - protected virtual void InitializeNameToValueMap() - { - this._nameToValueMap = new Map(this._names.Length); - for (int index = 0; index < this._names.Length; ++index) - this._nameToValueMap[this._names[index]] = this._values[index]; - this._names = null; - this._values = null; - } - - [Conditional("DEBUG")] - protected void DEBUG_AssertInitialized() - { - } - - public Vector Names - { - get - { - Vector vector = new Vector(); - foreach (string key in this.NameToValueMap.Keys) - vector.Add(key); - return vector; - } - } - - protected Map NameToValueMap - { - get - { - if (this._nameToValueMap == null) - this.InitializeNameToValueMap(); - return this._nameToValueMap; - } - } - - protected bool IsFlags => this._isFlags; - - public override string Name => this._name; - - public override string AlternateName => (string)null; - - public override TypeSchema Base => ObjectSchema.Type; - - public override bool Contractual => false; - - public override Type RuntimeType => this._enumType; - - public override bool IsNativeAssignableFrom(object check) => this.RuntimeType.IsAssignableFrom(check.GetType()); - - public override bool IsNativeAssignableFrom(TypeSchema check) => false; - - public override bool Disposable => false; - - public override object ConstructDefault() => this.EnumValueToObject(0); - - public override bool HasDefaultConstructor => true; - - public override void InitializeInstance(ref object instance) - { - } - - public override bool HasInitializer => false; - - public override ConstructorSchema FindConstructor(TypeSchema[] parameters) => (ConstructorSchema)null; - - public override PropertySchema FindProperty(string name) => (PropertySchema)null; - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) => (MethodSchema)null; - - public override EventSchema FindEvent(string name) => (EventSchema)null; - - public override object FindCanonicalInstance(string name) - { - int num; - return this.NameToValue(name, out num) ? this.EnumValueToObject(num) : null; - } - - public bool NameToValue(string name, out int value) => this.NameToValueMap.TryGetValue(name, out value); - - protected virtual object EnumValueToObject(int value) => Enum.ToObject(this._enumType, value); - - protected virtual int ValueFromObject(object obj) => (int)obj; - - public override PropertySchema[] Properties => PropertySchema.EmptyList; - - private Result ConvertFromString(string value, out object instance) - { - instance = null; - int num1 = 0; - if (this._isFlags && value.IndexOf(',') >= 0) - { - foreach (string name in StringUtility.SplitAndTrim(',', value)) - { - int num2; - if (!this.NameToValue(name, out num2)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", name, _name); - num1 |= num2; - } - } - else if (!this.NameToValue(value, out num1)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", value, _name); - instance = this.EnumValueToObject(num1); - return Result.Success; - } - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - Result result; - if (StringSchema.Type.IsAssignableFrom(fromType)) - result = this.ConvertFromString((string)from, out instance); - else if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - instance = this.EnumValueToObject((int)from); - result = Result.Success; - } - else - { - instance = null; - result = Result.Fail("Unsupported"); - } - return result; - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType) || Int32Schema.Type.IsAssignableFrom(fromType); - - public override void EncodeBinary(ByteCodeWriter writer, object instance) => writer.WriteInt32(this.ValueFromObject(instance)); - - public override object DecodeBinary(ByteCodeReader reader) => this.EnumValueToObject(reader.ReadInt32()); - - public override bool SupportsBinaryEncoding => true; - - public override object PerformOperation(object left, object right, OperationType op) - { - bool flag = Equals(left, right); - switch (op) - { - case OperationType.RelationalEquals: - return BooleanBoxes.Box(flag); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(!flag); - default: - return null; - } - } - - public override bool SupportsOperation(OperationType op) - { - switch (op) - { - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - public override bool IsNullAssignable => false; - - public override bool IsRuntimeImmutable => true; - - public override bool IsEnum => true; - - public override int FindTypeHint => -1; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ErrorLoadResult.cs b/UIX/Microsoft/Iris/Markup/ErrorLoadResult.cs deleted file mode 100644 index 7d56d9a..0000000 --- a/UIX/Microsoft/Iris/Markup/ErrorLoadResult.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ErrorLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class ErrorLoadResult : LoadResult - { - public ErrorLoadResult(string uri) - : base(uri) - { - } - - public override TypeSchema FindType(string name) => (TypeSchema)null; - - public override LoadResultStatus Status => LoadResultStatus.Error; - } -} diff --git a/UIX/Microsoft/Iris/Markup/EventSchema.cs b/UIX/Microsoft/Iris/Markup/EventSchema.cs deleted file mode 100644 index 43339fd..0000000 --- a/UIX/Microsoft/Iris/Markup/EventSchema.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.EventSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public abstract class EventSchema : DisposableObject - { - private TypeSchema _owner; - public static EventSchema[] EmptyList = new EventSchema[0]; - - public EventSchema(TypeSchema owner) - { - this._owner = owner; - this.DeclareOwner(owner); - } - - public TypeSchema Owner => this._owner; - - public abstract string Name { get; } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ExpressionRestriction.cs b/UIX/Microsoft/Iris/Markup/ExpressionRestriction.cs deleted file mode 100644 index 5569881..0000000 --- a/UIX/Microsoft/Iris/Markup/ExpressionRestriction.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ExpressionRestriction -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum ExpressionRestriction - { - None, - ReadOnly, - NoAccess, - } -} diff --git a/UIX/Microsoft/Iris/Markup/FastReflectionInvokeHandler.cs b/UIX/Microsoft/Iris/Markup/FastReflectionInvokeHandler.cs deleted file mode 100644 index ae2caf1..0000000 --- a/UIX/Microsoft/Iris/Markup/FastReflectionInvokeHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.FastReflectionInvokeHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object FastReflectionInvokeHandler(object target, object[] paramters); -} diff --git a/UIX/Microsoft/Iris/Markup/FindCanonicalInstanceHandler.cs b/UIX/Microsoft/Iris/Markup/FindCanonicalInstanceHandler.cs deleted file mode 100644 index 370f7e9..0000000 --- a/UIX/Microsoft/Iris/Markup/FindCanonicalInstanceHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.FindCanonicalInstanceHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object FindCanonicalInstanceHandler(string name); -} diff --git a/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyPrimitiveTypeSchema.cs b/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyPrimitiveTypeSchema.cs deleted file mode 100644 index 1086c9f..0000000 --- a/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyPrimitiveTypeSchema.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.FrameworkCompatibleAssemblyPrimitiveTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public class FrameworkCompatibleAssemblyPrimitiveTypeSchema : - FrameworkCompatibleAssemblyTypeSchema - { - private TypeSchema _frameworkSchema; - - public FrameworkCompatibleAssemblyPrimitiveTypeSchema(TypeSchema frameworkSchema) - : base(frameworkSchema.RuntimeType) - => this._frameworkSchema = frameworkSchema; - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - return this._frameworkSchema.TypeConverter(from, fromType, out instance); - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => this._frameworkSchema.SupportsTypeConversion(fromType); - - public override void EncodeBinary(ByteCodeWriter writer, object instance) => this._frameworkSchema.EncodeBinary(writer, instance); - - public override object DecodeBinary(ByteCodeReader reader) => this._frameworkSchema.DecodeBinary(reader); - - public override bool SupportsBinaryEncoding => this._frameworkSchema.SupportsBinaryEncoding; - - public override bool IsRuntimeImmutable => this._frameworkSchema.IsRuntimeImmutable; - - public override object PerformOperation(object left, object right, OperationType op) => this._frameworkSchema.PerformOperation(left, right, op); - - public override bool SupportsOperation(OperationType op) => this._frameworkSchema.SupportsOperation(op); - } -} diff --git a/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyTypeSchema.cs b/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyTypeSchema.cs deleted file mode 100644 index 6919597..0000000 --- a/UIX/Microsoft/Iris/Markup/FrameworkCompatibleAssemblyTypeSchema.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.FrameworkCompatibleAssemblyTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class FrameworkCompatibleAssemblyTypeSchema : AssemblyTypeSchema - { - private Type _frameworkType; - private Type _constructDefaultType; - - public FrameworkCompatibleAssemblyTypeSchema(Type assemblyType) - : this(assemblyType, assemblyType, null, null) - { - } - - public FrameworkCompatibleAssemblyTypeSchema(Type assemblyType, Type frameworkType) - : this(assemblyType, frameworkType, null, null) - { - } - - public FrameworkCompatibleAssemblyTypeSchema( - Type assemblyType, - Type frameworkType, - Type constructDefaultType) - : this(assemblyType, frameworkType, constructDefaultType, null) - { - } - - public FrameworkCompatibleAssemblyTypeSchema( - Type assemblyType, - Type frameworkType, - Type constructDefaultType, - TypeSchema baseType) - : base(assemblyType, baseType) - { - this._frameworkType = frameworkType; - this._constructDefaultType = constructDefaultType; - } - - public override Type RuntimeType => this._frameworkType; - - public override bool HasDefaultConstructor => base.HasDefaultConstructor || this._constructDefaultType != null; - - public override object ConstructDefault() => base.HasDefaultConstructor ? base.ConstructDefault() : AssemblyLoadResult.WrapObject(this, Activator.CreateInstance(this._constructDefaultType)); - } -} diff --git a/UIX/Microsoft/Iris/Markup/GetValueHandler.cs b/UIX/Microsoft/Iris/Markup/GetValueHandler.cs deleted file mode 100644 index 3a1fd27..0000000 --- a/UIX/Microsoft/Iris/Markup/GetValueHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.GetValueHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object GetValueHandler(object instance); -} diff --git a/UIX/Microsoft/Iris/Markup/IDynamicConstructionSchema.cs b/UIX/Microsoft/Iris/Markup/IDynamicConstructionSchema.cs deleted file mode 100644 index 12f8c38..0000000 --- a/UIX/Microsoft/Iris/Markup/IDynamicConstructionSchema.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.IDynamicConstructionSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public interface IDynamicConstructionSchema - { - object ConstructDefault(TypeSchema replacedType); - } -} diff --git a/UIX/Microsoft/Iris/Markup/IMarkupTypeBase.cs b/UIX/Microsoft/Iris/Markup/IMarkupTypeBase.cs deleted file mode 100644 index 514cbd9..0000000 --- a/UIX/Microsoft/Iris/Markup/IMarkupTypeBase.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.IMarkupTypeBase -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup -{ - public interface IMarkupTypeBase : IDisposableOwner - { - TypeSchema TypeSchema { get; } - - void NotifyInitialized(); - - object GetProperty(string name); - - void SetProperty(string name, object value); - - object ReadSymbol(SymbolReference symbolRef); - - void WriteSymbol(SymbolReference symbolRef, object value); - - MarkupListeners Listeners { get; set; } - - void ScheduleScriptRun(uint scriptId, bool ignoreErrors); - - object RunScript(uint scriptId, bool ignoreErrors, ParameterContext parameterContext); - - bool ScriptEnabled { get; } - - void NotifyScriptErrors(); - - Dictionary Storage { get; } - } -} diff --git a/UIX/Microsoft/Iris/Markup/INotifyObject.cs b/UIX/Microsoft/Iris/Markup/INotifyObject.cs deleted file mode 100644 index 7920d8b..0000000 --- a/UIX/Microsoft/Iris/Markup/INotifyObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.INotifyObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public interface INotifyObject - { - void AddListener(Listener listener); - } -} diff --git a/UIX/Microsoft/Iris/Markup/ISchemaInfo.cs b/UIX/Microsoft/Iris/Markup/ISchemaInfo.cs deleted file mode 100644 index 478c0a0..0000000 --- a/UIX/Microsoft/Iris/Markup/ISchemaInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ISchemaInfo -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public interface ISchemaInfo - { - TypeSchema TypeSchema { get; } - } -} diff --git a/UIX/Microsoft/Iris/Markup/Int32Boxes.cs b/UIX/Microsoft/Iris/Markup/Int32Boxes.cs deleted file mode 100644 index 2cfd797..0000000 --- a/UIX/Microsoft/Iris/Markup/Int32Boxes.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.Int32Boxes -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class Int32Boxes - { - public static object ZeroBox = 0; - public static object MinValueBox = int.MinValue; - public static object MaxValueBox = int.MaxValue; - } -} diff --git a/UIX/Microsoft/Iris/Markup/Int64Boxes.cs b/UIX/Microsoft/Iris/Markup/Int64Boxes.cs deleted file mode 100644 index 9f1c63c..0000000 --- a/UIX/Microsoft/Iris/Markup/Int64Boxes.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.Int64Boxes -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class Int64Boxes - { - public static object ZeroBox = 0L; - public static object MinValueBox = long.MinValue; - public static object MaxValueBox = long.MaxValue; - } -} diff --git a/UIX/Microsoft/Iris/Markup/Interpreter.cs b/UIX/Microsoft/Iris/Markup/Interpreter.cs deleted file mode 100644 index 8455706..0000000 --- a/UIX/Microsoft/Iris/Markup/Interpreter.cs +++ /dev/null @@ -1,819 +0,0 @@ -using System; -using System.Collections; -using Microsoft.Iris.Debug; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup -{ - // Token: 0x0200018B RID: 395 - public class Interpreter - { - // Token: 0x06000F21 RID: 3873 RVA: 0x00029E78 File Offset: 0x00028E78 - public static object Run(InterpreterContext context) - { - object result = null; - ByteCodeReader byteCodeReader = null; - long num = -1L; - bool flag = true; - ErrorManager.EnterContext(context); - try - { - byteCodeReader = context.LoadResult.ObjectSection; - num = (long)((ulong)byteCodeReader.CurrentOffset); - byteCodeReader.CurrentOffset = context.InitialBytecodeOffset; - result = Run(context, byteCodeReader); - flag = false; - } - finally - { - if (flag) - { - ExceptionContext = context.ToString(); - } - ErrorManager.ExitContext(); - if (byteCodeReader != null && num != -1L) - { - byteCodeReader.CurrentOffset = (uint)num; - } - } - return result; - } - - // Token: 0x06000F22 RID: 3874 RVA: 0x00029EF8 File Offset: 0x00028EF8 - private static object Run(InterpreterContext context, ByteCodeReader reader) - { - MarkupLoadResult loadResult = context.LoadResult; - IMarkupTypeBase instance = context.Instance; - MarkupImportTables importTables = loadResult.ImportTables; - MarkupConstantsTable constantsTable = loadResult.ConstantsTable; - SymbolReference[] symbolReferenceTable = context.MarkupType.SymbolReferenceTable; - Trace.IsCategoryEnabled(TraceCategory.Markup); - Stack stack = _stack; - int count = stack.Count; - if (instance != null) - { - stack.Push(instance); - } - ErrorWatermark watermark = ErrorManager.Watermark; - bool flag = false; - object result = null; - bool wasInDebugState = false; - while (!flag) - { - OpCode opCode = (OpCode)reader.ReadByte(); - switch (opCode) - { - case OpCode.ConstructObject: - { - int num = reader.ReadUInt16(); - TypeSchema typeSchema = importTables.TypeImports[num]; - object obj = typeSchema.ConstructDefault(); - ReportErrorOnNull(obj, "Construction", typeSchema.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - RegisterDisposable(obj, typeSchema, instance); - stack.Push(obj); - } - break; - } - case OpCode.ConstructObjectIndirect: - { - int num2 = reader.ReadUInt16(); - TypeSchema typeSchema2 = importTables.TypeImports[num2]; - TypeSchema typeSchema3 = (TypeSchema)stack.Pop(); - if (!typeSchema2.IsAssignableFrom(typeSchema3)) - { - ErrorManager.ReportError("Script runtime failure: Dynamic construction type override failed. Attempting to construct '{0}' in place of '{1}'", (typeSchema3 != null) ? typeSchema3.Name : "null", typeSchema2.Name); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - break; - } - } - IDynamicConstructionSchema dynamicConstructionSchema = typeSchema3 as IDynamicConstructionSchema; - object obj2; - if (dynamicConstructionSchema != null) - { - obj2 = dynamicConstructionSchema.ConstructDefault(typeSchema2); - } - else - { - obj2 = typeSchema3.ConstructDefault(); - } - ReportErrorOnNull(obj2, "Construction", typeSchema3.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - RegisterDisposable(obj2, typeSchema3, instance); - stack.Push(obj2); - } - break; - } - case OpCode.ConstructObjectParam: - { - int num3 = reader.ReadUInt16(); - TypeSchema typeSchema4 = importTables.TypeImports[num3]; - int num4 = reader.ReadUInt16(); - ConstructorSchema constructorSchema = importTables.ConstructorImports[num4]; - int i = constructorSchema.ParameterTypes.Length; - object[] array = ParameterListAllocator.Alloc(i); - for (i--; i >= 0; i--) - { - array[i] = stack.Pop(); - } - object obj3 = constructorSchema.Construct(array); - ReportErrorOnNull(obj3, "Construction", typeSchema4.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - RegisterDisposable(obj3, typeSchema4, instance); - stack.Push(obj3); - ParameterListAllocator.Free(array); - } - break; - } - case OpCode.ConstructFromString: - { - int num5 = reader.ReadUInt16(); - TypeSchema typeSchema5 = importTables.TypeImports[num5]; - int index = reader.ReadUInt16(); - string from = (string)constantsTable.Get(index); - object obj4; - typeSchema5.TypeConverter(from, StringSchema.Type, out obj4); - ReportErrorOnNull(obj4, "Construction", typeSchema5.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - RegisterDisposable(obj4, typeSchema5, instance); - stack.Push(obj4); - } - break; - } - case OpCode.ConstructFromBinary: - { - int num6 = reader.ReadUInt16(); - TypeSchema typeSchema6 = importTables.TypeImports[num6]; - object obj5 = typeSchema6.DecodeBinary(reader); - ReportErrorOnNull(obj5, "Construction", typeSchema6.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - RegisterDisposable(obj5, typeSchema6, instance); - stack.Push(obj5); - } - break; - } - case OpCode.InitializeInstance: - { - int num7 = reader.ReadUInt16(); - TypeSchema typeSchema7 = importTables.TypeImports[num7]; - object obj6 = stack.Pop(); - typeSchema7.InitializeInstance(ref obj6); - ReportErrorOnNull(obj6, "Initialize", typeSchema7.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(obj6); - } - break; - } - case OpCode.InitializeInstanceIndirect: - { - TypeSchema typeSchema8 = (TypeSchema)stack.Pop(); - object obj7 = stack.Pop(); - typeSchema8.InitializeInstance(ref obj7); - ReportErrorOnNull(obj7, "Initialize", typeSchema8.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(obj7); - } - break; - } - case OpCode.LookupSymbol: - { - int num8 = reader.ReadUInt16(); - SymbolReference symbolRef = symbolReferenceTable[num8]; - object obj8 = context.ReadSymbol(symbolRef); - stack.Push(obj8); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.WriteSymbol: - case OpCode.WriteSymbolPeek: - { - object value = (opCode == OpCode.WriteSymbolPeek) ? stack.Peek() : stack.Pop(); - int num9 = reader.ReadUInt16(); - SymbolReference symbolRef2 = symbolReferenceTable[num9]; - context.WriteSymbol(symbolRef2, value); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.ClearSymbol: - { - int num10 = reader.ReadUInt16(); - SymbolReference symbolRef3 = symbolReferenceTable[num10]; - context.ClearSymbol(symbolRef3); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.PropertyInitialize: - case OpCode.PropertyInitializeIndirect: - { - bool flag2 = opCode == OpCode.PropertyInitializeIndirect; - TypeSchema typeSchema9 = null; - if (flag2) - { - typeSchema9 = (TypeSchema)stack.Pop(); - } - int num11 = reader.ReadUInt16(); - PropertySchema propertySchema = importTables.PropertyImports[num11]; - object obj9 = stack.Pop(); - object obj10 = stack.Pop(); - ReportErrorOnNull(obj10, "Property Set", propertySchema.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - if (flag2) - { - PropertySchema propertySchema2 = typeSchema9.FindPropertyDeep(propertySchema.Name); - if (propertySchema2 != propertySchema) - { - TypeSchema propertyType = propertySchema2.PropertyType; - if (!propertyType.IsAssignableFrom(obj9)) - { - string param = TypeSchema.NameFromInstance(obj9); - ErrorManager.ReportError("Script runtime failure: Incompatible value for property '{0}' supplied (expecting values of type '{1}' but got '{2}') while constructing runtime replacement type '{3}' (original type '{4}')", propertySchema.Name, propertyType.Name, param, typeSchema9.Name, propertySchema.Owner.Name); - result = ScriptError; - } - if (ErrorsDetected(watermark, ref result, ref flag)) - { - break; - } - } - } - propertySchema.SetValue(ref obj10, obj9); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(obj10); - } - } - break; - } - case OpCode.PropertyListAdd: - { - int propertyIndex = reader.ReadUInt16(); - object value2 = stack.Pop(); - object collection = GetCollection(stack.Peek(), importTables, propertyIndex); - ReportErrorOnNull(collection, "List Add"); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - ((IList)collection).Add(value2); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - } - } - break; - } - case OpCode.PropertyDictionaryAdd: - { - int propertyIndex2 = reader.ReadUInt16(); - int index2 = reader.ReadUInt16(); - string key = (string)constantsTable.Get(index2); - object value3 = stack.Pop(); - object collection2 = GetCollection(stack.Peek(), importTables, propertyIndex2); - ReportErrorOnNull(collection2, "Dictionary Add"); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - ((IDictionary)collection2)[key] = value3; - if (ErrorsDetected(watermark, ref result, ref flag)) - { - } - } - break; - } - case OpCode.PropertyAssign: - case OpCode.PropertyAssignStatic: - { - int num12 = reader.ReadUInt16(); - PropertySchema propertySchema3 = importTables.PropertyImports[num12]; - object instance2 = null; - if (opCode == OpCode.PropertyAssign) - { - instance2 = stack.Pop(); - ReportErrorOnNullOrDisposed(instance2, "Property Set", propertySchema3.Name, propertySchema3.Owner); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - break; - } - } - object value4 = stack.Peek(); - propertySchema3.SetValue(ref instance2, value4); - if (!ErrorsDetected(watermark, ref result, ref flag) && Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.PropertyGet: - case OpCode.PropertyGetPeek: - case OpCode.PropertyGetStatic: - { - int num13 = reader.ReadUInt16(); - PropertySchema propertySchema4 = importTables.PropertyImports[num13]; - object instance3 = null; - if (opCode != OpCode.PropertyGetStatic) - { - instance3 = ((opCode == OpCode.PropertyGet) ? stack.Pop() : stack.Peek()); - ReportErrorOnNullOrDisposed(instance3, "Property Get", propertySchema4.Name, propertySchema4.Owner); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - break; - } - } - object value5 = propertySchema4.GetValue(instance3); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(value5); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - } - break; - } - case OpCode.MethodInvoke: - case OpCode.MethodInvokePeek: - case OpCode.MethodInvokeStatic: - case OpCode.MethodInvokePushLastParam: - case OpCode.MethodInvokeStaticPushLastParam: - { - int num14 = reader.ReadUInt16(); - MethodSchema methodSchema = importTables.MethodImports[num14]; - int j = methodSchema.ParameterTypes.Length; - object[] array2 = ParameterListAllocator.Alloc(j); - for (j--; j >= 0; j--) - { - array2[j] = stack.Pop(); - } - object instance4 = null; - bool flag3 = opCode != OpCode.MethodInvokeStatic && opCode != OpCode.MethodInvokeStaticPushLastParam; - bool flag4 = opCode == OpCode.MethodInvokePeek; - bool flag5 = opCode == OpCode.MethodInvokePushLastParam || opCode == OpCode.MethodInvokeStaticPushLastParam; - if (flag3) - { - if (!flag4) - { - instance4 = stack.Pop(); - } - else - { - instance4 = stack.Peek(); - } - ReportErrorOnNullOrDisposed(instance4, "Method Invoke", methodSchema.Name, methodSchema.Owner); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - break; - } - } - object obj11 = methodSchema.Invoke(instance4, array2); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - if (!flag5) - { - if (methodSchema.ReturnType != VoidSchema.Type) - { - stack.Push(obj11); - } - } - else - { - stack.Push(array2[array2.Length - 1]); - } - ParameterListAllocator.Free(array2); - } - break; - } - case OpCode.VerifyTypeCast: - { - int num15 = reader.ReadUInt16(); - TypeSchema typeSchema10 = importTables.TypeImports[num15]; - object obj12 = stack.Peek(); - if (obj12 != null) - { - if (!typeSchema10.IsAssignableFrom(obj12)) - { - string param2 = TypeSchema.NameFromInstance(obj12); - string name = typeSchema10.Name; - ErrorManager.ReportError("Script runtime failure: Invalid type cast while attempting to cast an instance with a runtime type of '{0}' to '{1}'", param2, name); - result = ScriptError; - } - if (ErrorsDetected(watermark, ref result, ref flag)) - { - } - } - else if (!typeSchema10.IsNullAssignable) - { - ReportErrorOnNull(obj12, "Verify Type Cast", typeSchema10.Name); - if (ErrorsDetected(watermark, ref result, ref flag)) - { - } - } - break; - } - case OpCode.ConvertType: - { - int num16 = reader.ReadUInt16(); - TypeSchema typeSchema11 = importTables.TypeImports[num16]; - int num17 = reader.ReadUInt16(); - TypeSchema fromType = importTables.TypeImports[num17]; - object obj13 = stack.Pop(); - ReportErrorOnNull(obj13, "Type Conversion", typeSchema11.Name); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - object obj14; - Result result2 = typeSchema11.TypeConverter(obj13, fromType, out obj14); - if (result2.Failed) - { - ErrorManager.ReportError("Script runtime failure: Type conversion failed while attempting to convert to '{0}' ({1})", typeSchema11.Name, result2.Error); - } - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(obj14); - } - } - break; - } - case OpCode.Operation: - { - int num18 = reader.ReadUInt16(); - TypeSchema typeSchema12 = importTables.TypeImports[num18]; - OperationType op = (OperationType)reader.ReadByte(); - object right = null; - if (!TypeSchema.IsUnaryOperation(op)) - { - right = stack.Pop(); - } - object left = stack.Pop(); - object obj15 = typeSchema12.PerformOperationDeep(left, right, op); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - stack.Push(obj15); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - } - break; - } - case OpCode.IsCheck: - { - int num19 = reader.ReadUInt16(); - TypeSchema typeSchema13 = importTables.TypeImports[num19]; - object obj16 = stack.Pop(); - bool value6 = false; - if (obj16 != null) - { - value6 = typeSchema13.IsAssignableFrom(obj16); - } - stack.Push(BooleanBoxes.Box(value6)); - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.As: - { - int num20 = reader.ReadUInt16(); - TypeSchema typeSchema14 = importTables.TypeImports[num20]; - object obj17 = stack.Peek(); - if (obj17 != null && !typeSchema14.IsAssignableFrom(obj17)) - { - stack.Pop(); - stack.Push(null); - } - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.TypeOf: - { - int num21 = reader.ReadUInt16(); - TypeSchema obj18 = importTables.TypeImports[num21]; - stack.Push(obj18); - break; - } - case OpCode.PushNull: - stack.Push(null); - break; - case OpCode.PushConstant: - { - int index3 = reader.ReadUInt16(); - object obj19 = constantsTable.Get(index3); - stack.Push(obj19); - break; - } - case OpCode.PushThis: - stack.Push(instance); - break; - case OpCode.DiscardValue: - stack.Pop(); - break; - case OpCode.ReturnValue: - { - object obj20 = stack.Pop(); - result = obj20; - flag = true; - break; - } - case OpCode.ReturnVoid: - result = VoidReturnValue; - flag = true; - break; - case OpCode.JumpIfFalse: - case OpCode.JumpIfFalsePeek: - case OpCode.JumpIfTruePeek: - { - uint currentOffset = reader.ReadUInt32(); - object obj21 = (opCode == OpCode.JumpIfFalse) ? stack.Pop() : stack.Peek(); - bool flag6 = (bool)obj21; - bool flag7 = opCode == OpCode.JumpIfTruePeek; - Trace.IsCategoryEnabled(TraceCategory.Markup); - if (flag7 == flag6) - { - reader.CurrentOffset = currentOffset; - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - } - break; - } - case OpCode.JumpIfDictionaryContains: - { - ushort propertyIndex3 = reader.ReadUInt16(); - ushort index4 = reader.ReadUInt16(); - uint currentOffset2 = reader.ReadUInt32(); - string key2 = (string)constantsTable.Get(index4); - object collection3 = GetCollection(stack.Peek(), importTables, propertyIndex3); - ReportErrorOnNull(collection3, "Dictionary Contains"); - if (!ErrorsDetected(watermark, ref result, ref flag)) - { - bool flag8 = ((IDictionary)collection3).Contains(key2); - Trace.IsCategoryEnabled(TraceCategory.Markup); - if (flag8) - { - reader.CurrentOffset = currentOffset2; - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - } - } - break; - } - case OpCode.JumpIfNullPeek: - { - uint currentOffset3 = reader.ReadUInt32(); - object obj22 = stack.Peek(); - Trace.IsCategoryEnabled(TraceCategory.Markup); - if (obj22 == null) - { - reader.CurrentOffset = currentOffset3; - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - } - break; - } - case OpCode.Jump: - { - uint currentOffset4 = reader.ReadUInt32(); - reader.CurrentOffset = currentOffset4; - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.ConstructListenerStorage: - { - int listenerCount = reader.ReadUInt16(); - if (instance.Listeners == null) - { - MarkupListeners markupListeners = new MarkupListeners(listenerCount); - markupListeners.DeclareOwner(instance); - instance.Listeners = markupListeners; - } - else - { - instance.Listeners.AddEntries(listenerCount); - } - if (Trace.IsCategoryEnabled(TraceCategory.Markup)) - { - } - break; - } - case OpCode.Listen: - case OpCode.DestructiveListen: - { - int index5 = reader.ReadUInt16(); - ListenerType listenerType = (ListenerType)reader.ReadByte(); - int num22 = reader.ReadUInt16(); - uint scriptOffset = reader.ReadUInt32(); - uint refreshOffset = uint.MaxValue; - if (opCode == OpCode.DestructiveListen) - { - refreshOffset = reader.ReadUInt32(); - } - string watch = null; - switch (listenerType) - { - case ListenerType.Property: - watch = importTables.PropertyImports[num22].Name; - break; - case ListenerType.Event: - watch = importTables.EventImports[num22].Name; - break; - case ListenerType.Symbol: - watch = symbolReferenceTable[num22].Symbol; - break; - } - object obj23 = stack.Peek(); - if (obj23 != null) - { - INotifyObject notifier = (INotifyObject)obj23; - Trace.IsCategoryEnabled(TraceCategory.Markup); - MarkupListeners listeners = instance.Listeners; - listeners.RefreshListener(index5, notifier, watch, instance, scriptOffset, refreshOffset); - } - else - { - Trace.IsCategoryEnabled(TraceCategory.Markup); - } - break; - } - case OpCode.EnterDebugState: - { - int breakpointIndex = reader.ReadInt32(); - if (MarkupSystem.IsDebuggingEnabled(2)) - { - wasInDebugState = MarkupDebugHelper.EnterDebugState(wasInDebugState, loadResult, breakpointIndex, instance.Storage); - } - break; - } - } - } - while (stack.Count > count) - { - stack.Pop(); - } - return result; - } - - // Token: 0x06000F23 RID: 3875 RVA: 0x0002ADA7 File Offset: 0x00029DA7 - private static bool ErrorsDetected(ErrorWatermark watermark, ref object result, ref bool done) - { - if (watermark.ErrorsDetected) - { - result = ScriptError; - done = true; - return true; - } - return false; - } - - // Token: 0x06000F24 RID: 3876 RVA: 0x0002ADC0 File Offset: 0x00029DC0 - private static void RegisterDisposable(object instance, TypeSchema type, IMarkupTypeBase root) - { - if (type.Disposable && root != null) - { - IDisposableObject disposableObject = (IDisposableObject)instance; - root.RegisterDisposable(disposableObject); - disposableObject.DeclareOwner(root); - } - } - - // Token: 0x06000F25 RID: 3877 RVA: 0x0002ADF0 File Offset: 0x00029DF0 - private static object GetCollection(object stackInstance, MarkupImportTables importTables, int propertyIndex) - { - object result = null; - if (propertyIndex == 65535) - { - result = stackInstance; - } - else - { - PropertySchema propertySchema = importTables.PropertyImports[propertyIndex]; - ReportErrorOnNull(stackInstance, "Property Get", propertySchema.Name); - if (stackInstance != null) - { - result = propertySchema.GetValue(stackInstance); - } - } - return result; - } - - // Token: 0x06000F26 RID: 3878 RVA: 0x0002AE31 File Offset: 0x00029E31 - private static void ReportErrorOnNull(object instance, string operation, string member) - { - if (instance == null) - { - ErrorManager.ReportError("Script runtime failure: Null-reference while attempting a '{0}' of '{1}' on a null instance", operation, member); - } - } - - // Token: 0x06000F27 RID: 3879 RVA: 0x0002AE42 File Offset: 0x00029E42 - private static void ReportErrorOnNull(object instance, string operation) - { - if (instance == null) - { - ErrorManager.ReportError("Script runtime failure: Null-reference while attempting a '{0}'", operation); - } - } - - // Token: 0x06000F28 RID: 3880 RVA: 0x0002AE54 File Offset: 0x00029E54 - private static void ReportErrorOnNullOrDisposed(object instance, string operation, string member, TypeSchema typeSchema) - { - if (instance == null) - { - ErrorManager.ReportError("Script runtime failure: Null-reference while attempting a '{0}' of '{1}' on a null instance", operation, member); - return; - } - if (typeSchema.Disposable) - { - IDisposableObject disposableObject = (IDisposableObject)instance; - if (disposableObject.IsDisposed) - { - ErrorManager.ReportError("Script runtime failure: Attempting a '{0}' of '{1}' on an object '{2}' that has already been disposed", operation, member, TypeSchema.NameFromInstance(instance)); - } - } - } - - // Token: 0x04000947 RID: 2375 - public const uint InvalidOffset = 4294967295U; - - // Token: 0x04000948 RID: 2376 - private static object VoidReturnValue = new object(); - - // Token: 0x04000949 RID: 2377 - private static Stack _stack = new Stack(); - - // Token: 0x0400094A RID: 2378 - public static object ScriptError = new Interpreter.ScriptErrorObject(); - - // Token: 0x0400094B RID: 2379 - public static string ExceptionContext; - - // Token: 0x0200018C RID: 396 - private class ScriptErrorObject - { - } - - // Token: 0x0200018D RID: 397 - private struct ParameterListAllocator - { - // Token: 0x06000F2C RID: 3884 RVA: 0x0002AECC File Offset: 0x00029ECC - public static object[] Alloc(int count) - { - object[] array; - if (count == 0) - { - array = s_params0; - } - else if (count < 20) - { - array = s_cachedLists[count]; - if (array != null) - { - s_cachedLists[count] = null; - } - else - { - array = new object[count]; - } - } - else - { - array = new object[count]; - } - return array; - } - - // Token: 0x06000F2D RID: 3885 RVA: 0x0002AF10 File Offset: 0x00029F10 - public static void Free(object[] paramList) - { - int num = paramList.Length; - if (num != 0 && num < 20 && s_cachedLists[num] == null) - { - Array.Clear(paramList, 0, paramList.Length); - s_cachedLists[num] = paramList; - } - } - - // Token: 0x0400094C RID: 2380 - private const int MAX_CACHED_LIST_SIZE = 20; - - // Token: 0x0400094D RID: 2381 - private static object[] s_params0 = new object[0]; - - // Token: 0x0400094E RID: 2382 - private static object[][] s_cachedLists = new object[20][]; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/InterpreterContext.cs b/UIX/Microsoft/Iris/Markup/InterpreterContext.cs deleted file mode 100644 index 70e16a3..0000000 --- a/UIX/Microsoft/Iris/Markup/InterpreterContext.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.InterpreterContext -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System.Collections; - -namespace Microsoft.Iris.Markup -{ - public class InterpreterContext : IErrorContextSource - { - private MarkupTypeSchema _type; - private IMarkupTypeBase _instance; - private MarkupLoadResult _loadResult; - private uint _initialBytecodeOffset; - private ParameterContext _parameterContext; - private Map _scopedLocals; - private static Stack s_cache = new Stack(); - - private InterpreterContext() - { - } - - string IErrorContextSource.GetErrorContextDescription() => this._type.Owner.ErrorContextUri; - - void IErrorContextSource.GetErrorPosition(ref int line, ref int column) - { - uint currentOffset = this._loadResult.ObjectSection.CurrentOffset; - if (currentOffset > 0U) - --currentOffset; - this._loadResult.LineNumberTable.Lookup(currentOffset, out line, out column); - } - - public IMarkupTypeBase Instance => this._instance; - - public MarkupTypeSchema MarkupType => this._type; - - public uint InitialBytecodeOffset => this._initialBytecodeOffset; - - public MarkupLoadResult LoadResult => this._loadResult; - - public object ReadSymbol(SymbolReference symbolRef) - { - object obj = null; - switch (symbolRef.Origin) - { - case SymbolOrigin.ScopedLocal: - this._scopedLocals.TryGetValue(symbolRef.Symbol, out obj); - break; - case SymbolOrigin.Parameter: - obj = this._parameterContext.ReadParameter(symbolRef.Symbol); - break; - default: - obj = this._instance.ReadSymbol(symbolRef); - break; - } - return obj; - } - - public void WriteSymbol(SymbolReference symbolRef, object value) - { - switch (symbolRef.Origin) - { - case SymbolOrigin.ScopedLocal: - if (this._scopedLocals == null) - this._scopedLocals = new Map(); - this._scopedLocals[symbolRef.Symbol] = value; - break; - case SymbolOrigin.Parameter: - this._parameterContext.WriteParameter(symbolRef.Symbol, value); - break; - default: - this._instance.WriteSymbol(symbolRef, value); - break; - } - } - - public void ClearSymbol(SymbolReference symbolRef) - { - if (symbolRef.Origin != SymbolOrigin.ScopedLocal) - return; - this._scopedLocals.Remove(symbolRef.Symbol); - } - - public static InterpreterContext Acquire( - IMarkupTypeBase instance, - MarkupTypeSchema type, - uint initialBytecodeOffset, - ParameterContext parameterContext) - { - InterpreterContext interpreterContext = null; - if (s_cache.Count != 0) - interpreterContext = (InterpreterContext)s_cache.Pop(); - if (interpreterContext == null) - interpreterContext = new InterpreterContext(); - interpreterContext._instance = instance; - interpreterContext._initialBytecodeOffset = initialBytecodeOffset; - interpreterContext._type = type; - interpreterContext._loadResult = (MarkupLoadResult)type.Owner; - interpreterContext._parameterContext = parameterContext; - return interpreterContext; - } - - public static void Release(InterpreterContext context) - { - context._instance = null; - context._type = null; - context._loadResult = null; - context._initialBytecodeOffset = 0U; - context._parameterContext = new ParameterContext(null, null); - if (context._scopedLocals != null) - context._scopedLocals.Clear(); - s_cache.Push(context); - } - - public override string ToString() - { - int line = 0; - int column = 0; - ((IErrorContextSource)this).GetErrorPosition(ref line, ref column); - return string.Format("{0} ({1}, {2})", ((IErrorContextSource)this).GetErrorContextDescription(), line, column); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/InvokeHandler.cs b/UIX/Microsoft/Iris/Markup/InvokeHandler.cs deleted file mode 100644 index 5c250f5..0000000 --- a/UIX/Microsoft/Iris/Markup/InvokeHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.InvokeHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object InvokeHandler(object instance, object[] parameters); -} diff --git a/UIX/Microsoft/Iris/Markup/Listener.cs b/UIX/Microsoft/Iris/Markup/Listener.cs deleted file mode 100644 index 15430b6..0000000 --- a/UIX/Microsoft/Iris/Markup/Listener.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.Listener -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class Listener : ListenerNodeBase - { - protected string _watch; - - public string Watch => this._watch; - - public override void Dispose() - { - this._watch = null; - base.Dispose(); - } - - public virtual void OnNotify() - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ListenerEncodeMode.cs b/UIX/Microsoft/Iris/Markup/ListenerEncodeMode.cs deleted file mode 100644 index c6c5b7b..0000000 --- a/UIX/Microsoft/Iris/Markup/ListenerEncodeMode.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ListenerEncodeMode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.Validation; - -namespace Microsoft.Iris.Markup -{ - public class ListenerEncodeMode - { - public TriggerRecord TriggerContainer; - private uint _totalListenersOnBaseType; - private MarkupTypeSchema _typeSchema; - - public ListenerEncodeMode(MarkupTypeSchema typeSchema) - { - this._typeSchema = typeSchema; - if (typeSchema.MarkupTypeBase == null) - return; - this._totalListenersOnBaseType = typeSchema.MarkupTypeBase.TotalListenerCount; - } - - public uint SequentialListenerIndex(uint localListenerIndex) => this._totalListenersOnBaseType + localListenerIndex; - - public uint ScriptId => this._typeSchema.EncodeScriptOffsetAsId(this.TriggerContainer.ActionCode.EncodeStartOffset); - - public uint RefreshId => this._typeSchema.EncodeScriptOffsetAsId(this.TriggerContainer.SourceExpression.EncodeStartOffset); - - public bool RunOnNonTailTrigger => this.TriggerContainer.SourceExpression.ExpressionType != ExpressionType.Call || ((ValidateExpressionCall)this.TriggerContainer.SourceExpression).FoundMemberType != SchemaType.Event; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ListenerNodeBase.cs b/UIX/Microsoft/Iris/Markup/ListenerNodeBase.cs deleted file mode 100644 index 24b0b00..0000000 --- a/UIX/Microsoft/Iris/Markup/ListenerNodeBase.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ListenerNodeBase -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public class ListenerNodeBase - { - protected ListenerNodeBase _next; - protected ListenerNodeBase _prev; - - protected ListenerNodeBase() - { - this._next = null; - this._prev = null; - } - - public virtual void Dispose() - { - if (!this.IsLinked) - return; - this.Unlink(); - } - - public ListenerNodeBase Next => this._next; - - public bool IsLinked => this._next != null && this._prev != null; - - public void AddPrevious(ListenerNodeBase node) - { - if (this._prev == null) - { - this._prev = this; - this._next = this; - } - node._prev = this._prev; - node._next = this; - this._prev._next = node; - this._prev = node; - } - - public void Unlink() - { - if (this._prev == this._next) - { - this._prev._next = null; - this._prev._prev = null; - } - else - { - this._prev._next = this._next; - this._next._prev = this._prev; - } - this._prev = null; - this._next = null; - } - - [Conditional("DEBUG")] - private void DEBUG_ValidateList() - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ListenerRootNode.cs b/UIX/Microsoft/Iris/Markup/ListenerRootNode.cs deleted file mode 100644 index 1802023..0000000 --- a/UIX/Microsoft/Iris/Markup/ListenerRootNode.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ListenerRootNode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class ListenerRootNode : ListenerNodeBase - { - public override string ToString() => "ListenerRoot"; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ListenerType.cs b/UIX/Microsoft/Iris/Markup/ListenerType.cs deleted file mode 100644 index 78c1617..0000000 --- a/UIX/Microsoft/Iris/Markup/ListenerType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ListenerType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum ListenerType - { - Property, - Event, - Symbol, - } -} diff --git a/UIX/Microsoft/Iris/Markup/Listeners.cs b/UIX/Microsoft/Iris/Markup/Listeners.cs deleted file mode 100644 index cf9ea3d..0000000 --- a/UIX/Microsoft/Iris/Markup/Listeners.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.Listeners -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public class Listeners : DisposableObject - { - protected Vector _listenerList; - - protected Listeners(Vector listeners) => this._listenerList = listeners; - - protected Listeners(int listenerCount) => this.AddEntries(listenerCount); - - public void AddEntries(int listenerCount) - { - if (this._listenerList == null) - this._listenerList = new Vector(listenerCount); - else - this._listenerList.Capacity += listenerCount; - for (int index = 0; index < listenerCount; ++index) - this._listenerList.Add(null); - } - - protected override void OnDispose() - { - base.OnDispose(); - for (int index = 0; index < this._listenerList.Count; ++index) - this._listenerList[index]?.Dispose(); - this._listenerList = null; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/LoadPass.cs b/UIX/Microsoft/Iris/Markup/LoadPass.cs deleted file mode 100644 index 4accbca..0000000 --- a/UIX/Microsoft/Iris/Markup/LoadPass.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.LoadPass -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum LoadPass - { - Invalid, - DeclareTypes, - PopulatePublicModel, - Full, - Done, - } -} diff --git a/UIX/Microsoft/Iris/Markup/LoadResult.cs b/UIX/Microsoft/Iris/Markup/LoadResult.cs deleted file mode 100644 index 4182e62..0000000 --- a/UIX/Microsoft/Iris/Markup/LoadResult.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.LoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public abstract class LoadResult : SharedDisposableObject - { - private string _uri; - protected string _uriUnderlying; - private uint _islandReferences; - private string _compilerReferenceName; - public static LoadResult[] EmptyList = new LoadResult[0]; - - public LoadResult(string uri) => this._uri = uri; - - protected override void OnDispose() => base.OnDispose(); - - public string Uri => this._uri; - - public string UnderlyingUri => this._uriUnderlying; - - public string ErrorContextUri => this._uriUnderlying == null ? this._uri : this._uriUnderlying; - - public uint IslandReferences => this._islandReferences; - - public void AddReference(uint islandId) - { - if (((int)this._islandReferences & (int)islandId) != 0) - return; - if (this._islandReferences == 0U) - this.RegisterUsage(this); - this._islandReferences |= islandId; - foreach (LoadResult dependency in this.Dependencies) - { - if (dependency != this) - dependency.AddReference(islandId); - } - } - - public void RemoveReferenceDeep(uint islandId) - { - if ((this._islandReferences & islandId) <= 0U) - return; - this._islandReferences &= ~islandId; - foreach (LoadResult dependency in this.Dependencies) - { - if (dependency != this) - dependency.RemoveReferenceDeep(islandId); - } - if (this._islandReferences != 0U) - return; - this.UnregisterUsage(this); - foreach (LoadResult dependency in this.Dependencies) - { - if (dependency != this) - dependency.UnregisterUsage(this); - } - } - - public void RemoveAllReferences() => this.RemoveReferenceDeep(this.IslandReferences); - - protected void RegisterDependenciesUsage() - { - foreach (LoadResult dependency in this.Dependencies) - { - if (dependency != this) - { - dependency.RegisterUsage(this); - dependency.AddReference(this._islandReferences); - } - } - } - - public void RegisterProxyUsage() => this.RegisterUsage(this); - - public void UnregisterProxyUsage() => this.UnregisterUsage(this); - - public virtual void Load(LoadPass pass) - { - } - - public abstract TypeSchema FindType(string name); - - public abstract LoadResultStatus Status { get; } - - public virtual LoadResult[] Dependencies => EmptyList; - - public virtual TypeSchema[] ExportTable => TypeSchema.EmptyList; - - public virtual bool Cachable => true; - - public void SetCompilerReferenceName(string name) - { - if (this._compilerReferenceName == null) - { - this._compilerReferenceName = name; - } - else - { - if (name.Equals(this._compilerReferenceName, StringComparison.OrdinalIgnoreCase)) - return; - ErrorManager.ReportWarning("Multiple names '{0}' and '{1}' used to refer to the same entity. The first name will be used for all references to this item within compiled UIB files", _compilerReferenceName, name); - } - } - - public virtual string GetCompilerReferenceName() => this._compilerReferenceName; - - public override string ToString() => this._uri; - } -} diff --git a/UIX/Microsoft/Iris/Markup/LoadResultCache.cs b/UIX/Microsoft/Iris/Markup/LoadResultCache.cs deleted file mode 100644 index 42a9619..0000000 --- a/UIX/Microsoft/Iris/Markup/LoadResultCache.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.LoadResultCache -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup -{ - public static class LoadResultCache - { - private static Dictionary s_cache = new Dictionary(InvariantString.OrdinalIgnoreCaseComparer); - - public static LoadResult Read(string uri) - { - LoadResult loadResult; - s_cache.TryGetValue(uri, out loadResult); - return loadResult; - } - - public static void Write(string uri, LoadResult loadResult) - { - s_cache[uri] = loadResult; - loadResult.RegisterUsage(s_cache); - } - - public static void Remove(uint islandId) - { - Vector vector = new Vector(); - foreach (KeyValuePair keyValuePair in s_cache) - { - LoadResult loadResult = keyValuePair.Value; - if ((loadResult.IslandReferences & islandId) > 0U) - loadResult.RemoveReferenceDeep(islandId); - if (loadResult.IslandReferences == 0U) - { - loadResult.UnregisterUsage(s_cache); - vector.Add(keyValuePair.Key); - } - } - foreach (string key in vector) - s_cache.Remove(key); - } - - public static void Clear() - { - foreach (LoadResult loadResult in s_cache.Values) - { - loadResult.RemoveAllReferences(); - loadResult.UnregisterUsage(s_cache); - } - s_cache.Clear(); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/LoadResultStatus.cs b/UIX/Microsoft/Iris/Markup/LoadResultStatus.cs deleted file mode 100644 index 6909c77..0000000 --- a/UIX/Microsoft/Iris/Markup/LoadResultStatus.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.LoadResultStatus -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum LoadResultStatus - { - Loading, - Success, - Error, - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupBinaryDataTable.cs b/UIX/Microsoft/Iris/Markup/MarkupBinaryDataTable.cs deleted file mode 100644 index 2325cf3..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupBinaryDataTable.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupBinaryDataTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupBinaryDataTable - { - private string _uri; - private Vector _strings; - private MarkupConstantsTable _constantsTable; - private MarkupImportTables _importTables; - private LoadResult[] _sharedDependenciesTable; - private SourceMarkupImportTables _sourceMarkupImportTables; - private ByteCodeReader _stringTableReader; - - public MarkupBinaryDataTable(string uri, int stringCount) - { - this._uri = uri; - this._strings = new Vector(stringCount); - this._strings.ExpandTo(stringCount); - } - - public MarkupBinaryDataTable(string uri) - : this(uri, 0) - { - } - - public void SetStringTableReader(ByteCodeReader stringTableReader) => this._stringTableReader = stringTableReader; - - public string Uri => this._uri; - - public int GetIndexOrAdd(string s) - { - int num = this._strings.IndexOf(s); - if (num == -1) - { - this._strings.Add(s); - num = this._strings.Count - 1; - } - return num; - } - - public string GetStringByIndex(int index) - { - string str = this._strings[index]; - if (str == null) - { - this._stringTableReader.CurrentOffset = (uint)(index * 4); - this._stringTableReader.CurrentOffset = this._stringTableReader.ReadUInt32(); - str = this._stringTableReader.ReadString(); - this._strings[index] = str; - } - return str; - } - - public Vector Strings => this._strings; - - public MarkupConstantsTable ConstantsTable => this._constantsTable; - - public MarkupImportTables ImportTables => this._importTables; - - public SourceMarkupImportTables SourceMarkupImportTables => this._sourceMarkupImportTables; - - public void SetConstantsTable(MarkupConstantsTable constantsTable) => this._constantsTable = constantsTable; - - public void SetImportTables(MarkupImportTables importTables) => this._importTables = importTables; - - public void SetSourceMarkupImportTables(SourceMarkupImportTables sourceMarkupImportTables) => this._sourceMarkupImportTables = sourceMarkupImportTables; - - public LoadResult[] SharedDependenciesTableWithBinaryDataTable - { - get => this._sharedDependenciesTable; - set => this._sharedDependenciesTable = value; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs b/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs deleted file mode 100644 index 432a322..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs +++ /dev/null @@ -1,603 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupCompiler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.Iris.Markup -{ - public class MarkupCompiler - { - private ByteCodeWriter _writer; - private MarkupLoadResult _loadResult; - private MarkupBinaryDataTable _binaryDataTable; - private bool _usingSharedBinaryDataTable; - private uint _objectSectionStartFixup; - private uint _objectSectionEndFixup; - private uint _lineNumberTableStartFixup; - private uint _lineNumberTableEndFixup; - private uint _binaryDataTableSectionOffsetFixup = uint.MaxValue; - private bool _binaryDataTablePersisted; - - private MarkupCompiler() - { - } - - public static bool Compile(CompilerInput[] compilands, CompilerInput dataTableCompiland) - { - ErrorWatermark watermark1 = ErrorManager.Watermark; - MarkupBinaryDataTable markupBinaryDataTable = null; - if (dataTableCompiland.SourceFileName != null) - { - markupBinaryDataTable = new MarkupBinaryDataTable(dataTableCompiland.SourceFileName); - MarkupConstantsTable constantsTable = new MarkupConstantsTable(); - markupBinaryDataTable.SetConstantsTable(constantsTable); - markupBinaryDataTable.SetSourceMarkupImportTables(new SourceMarkupImportTables()); - } - Vector vector = new Vector(); - foreach (CompilerInput compiland in compilands) - { - if (compiland.SourceFileName.IndexOf("://", StringComparison.Ordinal) != -1) - ErrorManager.ReportError($"'{compiland.SourceFileName}' is not a valid filename"); - string uri = "file://" + compiland.SourceFileName; - LoadResult loadResult = MarkupSystem.ResolveLoadResult(uri, MarkupSystem.RootIslandId); - if (loadResult != null && loadResult.Status != LoadResultStatus.Error) - { - if (!(loadResult is MarkupLoadResult markupLoadResult) || !markupLoadResult.IsSource) - { - ErrorManager.ReportError($"'{uri}' is not markup, it cannot be compiled"); - } - else - { - vector.Add(loadResult); - if (compiland.IdentityUri != null) - loadResult.SetCompilerReferenceName(compiland.IdentityUri); - if (markupBinaryDataTable != null) - markupLoadResult.SetBinaryDataTable(markupBinaryDataTable); - } - } - } - foreach (LoadResult loadResult in vector) - MarkupSystem.Load(loadResult.Uri, MarkupSystem.RootIslandId); - if (!watermark1.ErrorsDetected) - { - for (int index = 0; index < compilands.Length; ++index) - { - ErrorWatermark watermark2 = ErrorManager.Watermark; - ByteCodeWriter writer = Run((MarkupLoadResult)vector[index], markupBinaryDataTable); - if (!watermark2.ErrorsDetected) - SaveCompiledOutput(writer, compilands[index].OutputFileName); - } - if (markupBinaryDataTable != null) - SaveCompiledOutput(CompileBinaryDataTable(markupBinaryDataTable), dataTableCompiland.OutputFileName); - } - return !watermark1.ErrorsDetected; - } - - private static void SaveCompiledOutput(ByteCodeWriter writer, string outputFile) - { - ErrorWatermark watermark = ErrorManager.Watermark; - IntPtr invalidHandleValue = Win32Api.INVALID_HANDLE_VALUE; - ByteCodeReader reader = writer.CreateReader(); - reader.DeclareOwner(typeof(MarkupSystem)); - IntPtr file = Win32Api.CreateFile(outputFile, 1073741824U, 0U, IntPtr.Zero, 2U, 0U, IntPtr.Zero); - if (file == Win32Api.INVALID_HANDLE_VALUE) - ErrorManager.ReportError("Unable to open output file '{0}'. Error code {1}", outputFile, Marshal.GetLastWin32Error()); - if (!watermark.ErrorsDetected) - { - long size = 0; - IntPtr intPtr = reader.ToIntPtr(out size); - uint lpNumberOfBytesWritten = 0; - if (!Win32Api.WriteFile(file, intPtr, (uint)size, out lpNumberOfBytesWritten, IntPtr.Zero)) - ErrorManager.ReportError("An error occurred while saving data to output file '{0}'. Error code {1}", outputFile, Marshal.GetLastWin32Error()); - } - if (file != Win32Api.INVALID_HANDLE_VALUE) - Win32Api.CloseHandle(file); - reader?.Dispose(typeof(MarkupSystem)); - } - - public static ByteCodeWriter Run( - MarkupLoadResult loadResult, - MarkupBinaryDataTable sharedBinaryDataTable) - { - return new MarkupCompiler().InternalRun(loadResult, sharedBinaryDataTable); - } - - private ByteCodeWriter InternalRun( - MarkupLoadResult loadResult, - MarkupBinaryDataTable sharedBinaryDataTable) - { - this._writer = new ByteCodeWriter(); - this._loadResult = loadResult; - this.PersistHeader(); - this.PersistTableOfContents(sharedBinaryDataTable); - this.PersistDependencies(); - this.PersistTypeExportDeclarations(); - this.PersistTypeImportTable(); - this.PersistTypeExportDefinitions(); - this.PersistMemberImportTables(); - this.PersistDataMappingsTable(); - this.PersistConstantsTable(); - this.PersistBinaryDataTable(); - this.PersistObjectSection(); - this.PersistLineNumberTable(); - return this._writer; - } - - private void PersistHeader() - { - this._writer.WriteUInt32(440551765U); - this._writer.WriteUInt32(1012U); - } - - private void PersistTableOfContents(MarkupBinaryDataTable sharedBinaryDataTable) - { - this._objectSectionStartFixup = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - this._objectSectionEndFixup = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - this._lineNumberTableStartFixup = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - this._lineNumberTableEndFixup = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - if (sharedBinaryDataTable != null) - { - this._binaryDataTable = sharedBinaryDataTable; - this._writer.WriteString(this._binaryDataTable.Uri); - this._usingSharedBinaryDataTable = true; - } - else - { - this._writer.WriteString(null); - this._usingSharedBinaryDataTable = false; - this._binaryDataTable = this._loadResult.BinaryDataTable; - if (this._binaryDataTable == null) - this._binaryDataTable = new MarkupBinaryDataTable(null, 0); - this._binaryDataTableSectionOffsetFixup = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - } - } - - private void PersistDependencies() - { - if (this._usingSharedBinaryDataTable) - return; - this._writer.WriteUInt16(this._loadResult.Dependencies.Length); - foreach (LoadResult dependency in this._loadResult.Dependencies) - { - this._writer.WriteBool(dependency is MarkupLoadResult); - this.WriteDataTableString(dependency.GetCompilerReferenceName() ?? dependency.Uri); - } - } - - private void PersistTypeExportDeclarations() - { - this._writer.WriteUInt16(this._loadResult.ExportTable.Length); - foreach (MarkupTypeSchema markupTypeSchema in this._loadResult.ExportTable) - { - MarkupType markupType = markupTypeSchema.MarkupType; - this.WriteDataTableString(markupTypeSchema.Name); - this._writer.WriteInt32((int)markupType); - } - if (this._loadResult.AliasTable == null) - { - this._writer.WriteUInt16(0); - } - else - { - this._writer.WriteUInt16(this._loadResult.AliasTable.Length); - foreach (AliasMapping aliasMapping in this._loadResult.AliasTable) - { - this.WriteDataTableString(aliasMapping.Alias); - this._writer.WriteUInt16(this.MapDependentToIndex(aliasMapping.LoadResult)); - this.WriteDataTableString(aliasMapping.TargetType); - } - } - } - - private void PersistTypeImportTable() - { - if (this._usingSharedBinaryDataTable) - return; - this._writer.WriteUInt16(this._loadResult.ImportTables.TypeImports.Length); - foreach (TypeSchema typeImport in this._loadResult.ImportTables.TypeImports) - { - this._writer.WriteUInt16(this.MapDependentToIndex(typeImport.Owner)); - this.WriteDataTableString(typeImport.Name); - } - } - - private void PersistTypeExportDefinitions() - { - foreach (MarkupTypeSchema markupTypeSchema in this._loadResult.ExportTable) - { - MarkupType markupType = markupTypeSchema.MarkupType; - this._writer.WriteUInt16(markupTypeSchema.TypeDepth); - if (markupTypeSchema.TypeDepth > 1U) - this._writer.WriteUInt16(this.MapTypeToIndex(markupTypeSchema.Base)); - this._writer.WriteUInt32(markupTypeSchema.InitializePropertiesOffset); - this._writer.WriteUInt32(markupTypeSchema.InitializeLocalsInputOffset); - this._writer.WriteUInt32(markupTypeSchema.InitializeContentOffset); - this.WriteUInt32ArrayHelper(markupTypeSchema.InitialEvaluateOffsets, "InitialEvaluateOffsets"); - this.WriteUInt32ArrayHelper(markupTypeSchema.FinalEvaluateOffsets, "FinalEvaluateOffsets"); - this.WriteUInt32ArrayHelper(markupTypeSchema.RefreshGroupOffsets, "RefreshGroupOffsets"); - this._writer.WriteUInt32(markupTypeSchema.ListenerCount); - uint num1 = 0; - if (markupTypeSchema.SymbolReferenceTable != null) - num1 = (uint)markupTypeSchema.SymbolReferenceTable.Length; - this._writer.WriteUInt32(num1); - if (num1 != 0U) - { - foreach (SymbolReference symbolReference in markupTypeSchema.SymbolReferenceTable) - { - this.WriteDataTableString(symbolReference.Symbol); - this._writer.WriteByte((byte)symbolReference.Origin); - } - } - uint dataSize1 = this._writer.DataSize; - this._writer.WriteUInt32(uint.MaxValue); - uint dataSize2 = this._writer.DataSize; - uint num2 = 0; - if (markupTypeSchema.InheritableSymbolsTable != null) - num2 = (uint)markupTypeSchema.InheritableSymbolsTable.Length; - this._writer.WriteUInt32(num2); - if (num2 != 0U) - { - foreach (SymbolRecord symbolRecord in markupTypeSchema.InheritableSymbolsTable) - { - this.WriteDataTableString(symbolRecord.Name); - this._writer.WriteByte((byte)symbolRecord.SymbolOrigin); - this._writer.WriteUInt16(this.MapTypeToIndex(symbolRecord.Type)); - } - } - uint num3 = this._writer.DataSize - dataSize2; - this._writer.Overwrite(dataSize1, num3); - this._writer.WriteInt32(markupTypeSchema.TotalPropertiesAndLocalsCount); - if (markupType == MarkupType.UI) - { - UIClassTypeSchema uiClassTypeSchema = (UIClassTypeSchema)markupTypeSchema; - ushort num4 = 0; - if (uiClassTypeSchema.NamedContentTable != null) - num4 = (ushort)uiClassTypeSchema.NamedContentTable.Length; - this._writer.WriteUInt16(num4); - if (num4 != 0) - { - foreach (NamedContentRecord namedContentRecord in uiClassTypeSchema.NamedContentTable) - { - this.WriteDataTableString(namedContentRecord.Name); - this._writer.WriteUInt32(namedContentRecord.Offset); - } - } - } - else - { - this._writer.WriteBool(((ClassTypeSchema)markupTypeSchema).IsShared); - if (markupType == MarkupType.Effect) - { - EffectClassTypeSchema effectClassTypeSchema = (EffectClassTypeSchema)markupTypeSchema; - this.WriteUInt32ArrayHelper(effectClassTypeSchema.TechniqueOffsets, "TechniqueOffsets"); - this.WriteUInt32ArrayHelper(effectClassTypeSchema.InstancePropertyAssignments, "InstancePropertyAssignments"); - this.WriteStringArrayHelper(effectClassTypeSchema.DynamicElementAssignments, "DynamicElementAssignments"); - this._writer.WriteInt32(effectClassTypeSchema.DefaultElementSymbolIndex); - } - if (markupType == MarkupType.DataQuery) - { - MarkupDataQuerySchema markupDataQuerySchema = (MarkupDataQuerySchema)markupTypeSchema; - this.WriteDataTableString(markupDataQuerySchema.ProviderName); - this._writer.WriteUInt16(this.MapTypeToIndex(markupDataQuerySchema.ResultType)); - } - } - PropertySchema[] properties = markupTypeSchema.Properties; - this._writer.WriteUInt16(properties.Length); - foreach (MarkupPropertySchema markupPropertySchema in properties) - { - this.WriteDataTableString(markupPropertySchema.Name); - this._writer.WriteBool(markupPropertySchema.RequiredForCreation); - if (markupPropertySchema.OverrideCriteria != null) - { - PropertyOverrideCriteriaTypeConstraint overrideCriteria = (PropertyOverrideCriteriaTypeConstraint)markupPropertySchema.OverrideCriteria; - this._writer.WriteBool(true); - ushort index1 = this.MapTypeToIndex(overrideCriteria.Constraint); - ushort index2 = this.MapTypeToIndex(overrideCriteria.Use); - this._writer.WriteUInt16(index1); - this._writer.WriteUInt16(index2); - } - else - this._writer.WriteBool(false); - this._writer.WriteUInt16(this.MapTypeToIndex(markupPropertySchema.PropertyType)); - if (markupType == MarkupType.DataType) - { - MarkupDataTypePropertySchema typePropertySchema = (MarkupDataTypePropertySchema)markupPropertySchema; - this._writer.WriteUInt16(typePropertySchema.AlternateType != null ? this.MapTypeToIndex(typePropertySchema.AlternateType) : ushort.MaxValue); - } - if (markupType == MarkupType.DataQuery) - { - MarkupDataQueryPropertySchema queryPropertySchema = (MarkupDataQueryPropertySchema)markupPropertySchema; - if (queryPropertySchema.DefaultValue != null) - { - this._writer.WriteBool(true); - queryPropertySchema.PropertyType.EncodeBinary(this._writer, queryPropertySchema.DefaultValue); - } - else - this._writer.WriteBool(false); - this._writer.WriteBool(queryPropertySchema.InvalidatesQuery); - this._writer.WriteUInt16(queryPropertySchema.AlternateType != null ? this.MapTypeToIndex(queryPropertySchema.AlternateType) : ushort.MaxValue); - } - } - this.WriteMarkupMethodArrayHelper(markupTypeSchema.Methods, "METHODS"); - this.WriteMarkupMethodArrayHelper(markupTypeSchema.VirtualMethods, "VIRTUAL METHODS"); - } - } - - private void PersistMemberImportTables() - { - if (this._usingSharedBinaryDataTable) - return; - this._writer.WriteUInt16(this._loadResult.ImportTables.ConstructorImports.Length); - foreach (ConstructorSchema constructorImport in this._loadResult.ImportTables.ConstructorImports) - { - this._writer.WriteUInt16(this.MapTypeToIndex(constructorImport.Owner)); - this._writer.WriteUInt16(constructorImport.ParameterTypes.Length); - foreach (TypeSchema parameterType in constructorImport.ParameterTypes) - this._writer.WriteUInt16(this.MapTypeToIndex(parameterType)); - } - this._writer.WriteUInt16(this._loadResult.ImportTables.PropertyImports.Length); - foreach (PropertySchema propertyImport in this._loadResult.ImportTables.PropertyImports) - { - this._writer.WriteUInt16(this.MapTypeToIndex(propertyImport.Owner)); - this.WriteDataTableString(propertyImport.Name); - } - this._writer.WriteUInt16(this._loadResult.ImportTables.MethodImports.Length); - foreach (MethodSchema methodImport in this._loadResult.ImportTables.MethodImports) - { - this._writer.WriteUInt16(this.MapTypeToIndex(methodImport.Owner)); - bool flag = false; - MarkupMethodSchema markupMethodSchema = null; - if (methodImport is MarkupMethodSchema) - { - markupMethodSchema = (MarkupMethodSchema)methodImport; - flag = markupMethodSchema.IsVirtual && !markupMethodSchema.IsVirtualThunk; - } - this._writer.WriteBool(flag); - if (!flag) - { - this.WriteDataTableString(methodImport.Name); - this._writer.WriteUInt16(methodImport.ParameterTypes.Length); - foreach (TypeSchema parameterType in methodImport.ParameterTypes) - this._writer.WriteUInt16(this.MapTypeToIndex(parameterType)); - } - else - this._writer.WriteInt32(markupMethodSchema.VirtualId); - } - this._writer.WriteUInt16(this._loadResult.ImportTables.EventImports.Length); - foreach (EventSchema eventImport in this._loadResult.ImportTables.EventImports) - { - this._writer.WriteUInt16(this.MapTypeToIndex(eventImport.Owner)); - this.WriteDataTableString(eventImport.Name); - } - } - - private void PersistDataMappingsTable() - { - if (this._loadResult.DataMappingsTable == null) - { - this._writer.WriteUInt16(0); - } - else - { - this._writer.WriteUInt16(this._loadResult.DataMappingsTable.Length); - foreach (MarkupDataMapping markupDataMapping in this._loadResult.DataMappingsTable) - { - this._writer.WriteUInt16(this.MapTypeToIndex(markupDataMapping.TargetType)); - this.WriteDataTableString(markupDataMapping.Provider); - this._writer.WriteUInt16(markupDataMapping.Mappings.Length); - foreach (MarkupDataMappingEntry mapping in markupDataMapping.Mappings) - { - this.WriteDataTableString(mapping.Source); - this.WriteDataTableString(mapping.Target); - this._writer.WriteUInt16(this.MapPropertyToIndex(mapping.Property)); - if (mapping.DefaultValue != null && mapping.Property.PropertyType.SupportsBinaryEncoding) - { - this._writer.WriteBool(true); - mapping.Property.PropertyType.EncodeBinary(this._writer, mapping.DefaultValue); - } - else - this._writer.WriteBool(false); - } - } - } - } - - private void PersistConstantsTable() - { - if (!this._usingSharedBinaryDataTable) - { - int length = this._loadResult.ConstantsTable.PersistList.Length; - this._writer.WriteUInt16(length); - uint dataSize = this._writer.DataSize; - uint offset = dataSize; - for (int index = 0; index <= length; ++index) - this._writer.WriteUInt32(uint.MaxValue); - foreach (MarkupConstantPersist persist in this._loadResult.ConstantsTable.PersistList) - { - this._writer.Overwrite(offset, this._writer.DataSize - dataSize); - offset += 4U; - ushort index = this.MapTypeToIndex(persist.Type); - MarkupConstantPersistMode constantPersistMode = persist.Mode; - if (persist.Type == StringSchema.Type) - constantPersistMode = MarkupConstantPersistMode.FromString; - this._writer.WriteUInt16(index); - this._writer.WriteByte((byte)constantPersistMode); - switch (constantPersistMode) - { - case MarkupConstantPersistMode.Binary: - this._loadResult.ImportTables.TypeImports[index].EncodeBinary(this._writer, persist.Data); - break; - case MarkupConstantPersistMode.FromString: - case MarkupConstantPersistMode.Canonical: - this.WriteDataTableString((string)persist.Data); - break; - } - } - this._writer.Overwrite(offset, this._writer.DataSize - dataSize); - } - else - this._writer.WriteUInt16(0); - } - - private void PersistBinaryDataTable() - { - if (this._binaryDataTableSectionOffsetFixup != uint.MaxValue) - { - uint dataSize1 = this._writer.DataSize; - Vector strings = this._binaryDataTable.Strings; - this._writer.WriteInt32(strings.Count); - uint dataSize2 = this._writer.DataSize; - uint offset = dataSize2; - for (int index = 0; index <= strings.Count; ++index) - this._writer.WriteUInt32(uint.MaxValue); - foreach (string str in strings) - { - this._writer.Overwrite(offset, this._writer.DataSize - dataSize2); - offset += 4U; - this._writer.WriteString(str); - } - this._writer.Overwrite(offset, this._writer.DataSize - dataSize2); - this._writer.Overwrite(this._binaryDataTableSectionOffsetFixup, dataSize1); - } - this._binaryDataTablePersisted = true; - } - - private void PersistLineNumberTable() - { - this._writer.Overwrite(this._lineNumberTableStartFixup, this._writer.DataSize); - this._writer.WriteUInt16(this._loadResult.LineNumberTable.PersistList.Length); - foreach (ulong persist in this._loadResult.LineNumberTable.PersistList) - this._writer.WriteUInt64(persist); - this._writer.Overwrite(this._lineNumberTableEndFixup, this._writer.DataSize); - } - - private void PersistObjectSection() - { - this._writer.Overwrite(this._objectSectionStartFixup, this._writer.DataSize); - this._writer.Write(this._loadResult.ObjectSection); - this._loadResult.ObjectSection.ToIntPtr(out long _); - this._writer.Overwrite(this._objectSectionEndFixup, this._writer.DataSize); - } - - private ushort MapDependentToIndex(LoadResult dependent) - { - if (dependent == MarkupSystem.UIXGlobal) - return 65534; - if (dependent == this._loadResult) - return 65533; - int num = this._usingSharedBinaryDataTable ? this._binaryDataTable.SourceMarkupImportTables.ImportedLoadResults.IndexOf(dependent) : Array.IndexOf(this._loadResult.Dependencies, dependent); - return num >= 0 ? (ushort)num : ushort.MaxValue; - } - - private ushort MapTypeToIndex(TypeSchema type) - { - for (ushort index = 0; index < (ushort)this._loadResult.ImportTables.TypeImports.Length; ++index) - { - TypeSchema typeImport = this._loadResult.ImportTables.TypeImports[index]; - if (type == typeImport) - return index; - } - return ushort.MaxValue; - } - - private ushort MapPropertyToIndex(PropertySchema property) - { - for (ushort index = 0; index < (ushort)this._loadResult.ImportTables.PropertyImports.Length; ++index) - { - PropertySchema propertyImport = this._loadResult.ImportTables.PropertyImports[index]; - if (property == propertyImport) - return index; - } - return ushort.MaxValue; - } - - private ushort MapMethodToIndex(MethodSchema method) - { - for (ushort index = 0; index < (ushort)this._loadResult.ImportTables.MethodImports.Length; ++index) - { - MethodSchema methodImport = this._loadResult.ImportTables.MethodImports[index]; - if (method == methodImport) - return index; - } - return ushort.MaxValue; - } - - private void WriteDataTableString(string s) => this._writer.WriteInt32(this._binaryDataTable.GetIndexOrAdd(s)); - - private void WriteUInt32ArrayHelper(uint[] array, string debugName) - { - uint num1 = 0; - if (array != null) - num1 = (uint)array.Length; - this._writer.WriteUInt32(num1); - if (num1 == 0U) - return; - foreach (uint num2 in array) - this._writer.WriteUInt32(num2); - } - - private void WriteStringArrayHelper(string[] array, string debugName) - { - uint num = 0; - if (array != null) - num = (uint)array.Length; - this._writer.WriteUInt32(num); - if (num == 0U) - return; - foreach (string s in array) - this.WriteDataTableString(s); - } - - private void WriteMarkupMethodArrayHelper(MethodSchema[] methods, string debugName) - { - this._writer.WriteUInt16(methods.Length); - foreach (MarkupMethodSchema method in methods) - { - this.WriteDataTableString(method.Name); - this._writer.WriteUInt16(this.MapTypeToIndex(method.ReturnType)); - this._writer.WriteInt32(method.ParameterTypes.Length); - foreach (TypeSchema parameterType in method.ParameterTypes) - this._writer.WriteUInt16(this.MapTypeToIndex(parameterType)); - this.WriteStringArrayHelper(method.ParameterNames, "ParameterNames"); - this._writer.WriteInt32(method.VirtualId); - this._writer.WriteBool(method.IsVirtualThunk); - this._writer.WriteUInt32(method.CodeOffset); - } - } - - public static ByteCodeWriter CompileBinaryDataTable( - MarkupBinaryDataTable binaryDataTable) - { - SourceMarkupLoadResult markupLoadResult = new SourceMarkupLoadResult(binaryDataTable.Uri); - markupLoadResult.RegisterUsage(markupLoadResult); - binaryDataTable.ConstantsTable.PrepareForRuntimeUse(); - MarkupImportTables importTables = binaryDataTable.SourceMarkupImportTables.PrepareImportTables(); - Vector importedLoadResults = binaryDataTable.SourceMarkupImportTables.ImportedLoadResults; - LoadResult[] dependenciesTable = new LoadResult[importedLoadResults.Count]; - for (int index = 0; index < dependenciesTable.Length; ++index) - dependenciesTable[index] = (LoadResult)importedLoadResults[index]; - markupLoadResult.SetBinaryDataTable(binaryDataTable); - markupLoadResult.SetConstantsTable(binaryDataTable.ConstantsTable); - markupLoadResult.SetDependenciesTable(dependenciesTable, false); - markupLoadResult.SetImportTables(importTables); - markupLoadResult.SetLineNumberTable(new MarkupLineNumberTable()); - markupLoadResult.LineNumberTable.PrepareForRuntimeUse(); - markupLoadResult.SetObjectSection(new ByteCodeWriter().CreateReader()); - ByteCodeWriter byteCodeWriter = Run(markupLoadResult, null); - markupLoadResult.UnregisterUsage(markupLoadResult); - return byteCodeWriter; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupConstantPersist.cs b/UIX/Microsoft/Iris/Markup/MarkupConstantPersist.cs deleted file mode 100644 index 62a4184..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupConstantPersist.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupConstantPersist -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public struct MarkupConstantPersist - { - public MarkupConstantPersistMode Mode; - public object Data; - public TypeSchema Type; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupConstantPersistMode.cs b/UIX/Microsoft/Iris/Markup/MarkupConstantPersistMode.cs deleted file mode 100644 index 2cb8d97..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupConstantPersistMode.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupConstantPersistMode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum MarkupConstantPersistMode - { - Binary, - FromString, - Canonical, - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupConstantsTable.cs b/UIX/Microsoft/Iris/Markup/MarkupConstantsTable.cs deleted file mode 100644 index 6c7a83d..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupConstantsTable.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupConstantsTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections.Generic; -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public class MarkupConstantsTable - { - private object[] _runtimeList; - private MarkupConstantPersist[] _persistList; - private Dictionary _lookupTable; - private ByteCodeReader _constantsTableReader; - private MarkupLoadResult _loadResultOwner; - - public MarkupConstantsTable() => this._lookupTable = new Dictionary(new MarkupConstantsTable.MarkupConstantEqualityComparer()); - - public MarkupConstantsTable(object[] runtimeList) => this._runtimeList = runtimeList; - - public void SetConstantsTableReader( - ByteCodeReader constantsTableReader, - MarkupLoadResult loadResultOwner) - { - this._constantsTableReader = constantsTableReader; - this._loadResultOwner = loadResultOwner; - } - - public int Add(TypeSchema type, object value, MarkupConstantPersistMode persistMode) => this.Add(type, value, persistMode, value); - - public int Add( - TypeSchema type, - object value, - MarkupConstantPersistMode persistMode, - object persistData) - { - MarkupConstantsTable.MarkupConstant key; - key.Type = type; - key.Value = value; - key.HashCode = value.GetHashCode(); - if (MarkupSystem.CompileMode) - { - key.Persist.Mode = persistMode; - key.Persist.Data = persistData; - key.Persist.Type = type; - } - else - { - key.Persist.Mode = MarkupConstantPersistMode.Binary; - key.Persist.Data = null; - key.Persist.Type = null; - } - int count; - if (!this._lookupTable.TryGetValue(key, out count)) - { - count = this._lookupTable.Count; - this._lookupTable.Add(key, count); - } - return count; - } - - public object Get(int index) - { - object obj = this._runtimeList[index]; - if (obj == null) - { - this._constantsTableReader.CurrentOffset = (uint)(index * 4); - this._constantsTableReader.CurrentOffset = this._constantsTableReader.ReadUInt32(); - obj = CompiledMarkupLoader.DepersistConstant(this._constantsTableReader, this._loadResultOwner); - this._runtimeList[index] = obj; - } - return obj; - } - - public void PrepareForRuntimeUse() - { - this._runtimeList = new object[this._lookupTable.Count]; - if (MarkupSystem.CompileMode) - this._persistList = new MarkupConstantPersist[this._lookupTable.Count]; - foreach (KeyValuePair keyValuePair in this._lookupTable) - { - this._runtimeList[keyValuePair.Value] = keyValuePair.Key.Value; - if (MarkupSystem.CompileMode) - this._persistList[keyValuePair.Value] = keyValuePair.Key.Persist; - } - this._lookupTable = null; - } - - public MarkupConstantPersist[] PersistList => this._persistList; - - [Conditional("DEBUG")] - public void DEBUG_DumpTable() - { - } - - private class MarkupConstantEqualityComparer : - IEqualityComparer - { - bool IEqualityComparer.Equals( - MarkupConstantsTable.MarkupConstant x, - MarkupConstantsTable.MarkupConstant y) - { - bool flag = false; - if (x.Type == y.Type) - flag = (bool)x.Type.PerformOperationDeep(x.Value, y.Value, OperationType.RelationalEquals); - return flag; - } - - int IEqualityComparer.GetHashCode( - MarkupConstantsTable.MarkupConstant obj) - { - return obj.HashCode; - } - } - - private struct MarkupConstant - { - public TypeSchema Type; - public object Value; - public int HashCode; - public MarkupConstantPersist Persist; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataMapping.cs b/UIX/Microsoft/Iris/Markup/MarkupDataMapping.cs deleted file mode 100644 index 40edd5e..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataMapping.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataMapping -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataMapping - { - private string _name; - private MarkupDataMappingEntry[] _mappings; - private MarkupDataTypeSchema _targetType; - private string _provider; - private object _assemblyDataProviderCookie; - - public MarkupDataMapping(string name) => this._name = name; - - public MarkupDataTypeSchema TargetType - { - get => this._targetType; - set => this._targetType = value; - } - - public string Provider - { - get => this._provider; - set => this._provider = value; - } - - public MarkupDataMappingEntry[] Mappings - { - get => this._mappings; - set => this._mappings = value; - } - - public object AssemblyDataProviderCookie - { - get => this._assemblyDataProviderCookie; - set => this._assemblyDataProviderCookie = value; - } - - public override string ToString() => string.Format("({0}, {1})", _provider, _targetType); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataMappingEntry.cs b/UIX/Microsoft/Iris/Markup/MarkupDataMappingEntry.cs deleted file mode 100644 index ef9c1f5..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataMappingEntry.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataMappingEntry -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataMappingEntry - { - private string _source; - private string _target; - private MarkupDataTypePropertySchema _property; - private object _defaultValue; - - public string Source - { - get => this._source; - set => this._source = value; - } - - public string Target - { - get => this._target; - set => this._target = value; - } - - public MarkupDataTypePropertySchema Property - { - get => this._property; - set => this._property = value; - } - - public object DefaultValue - { - get => this._defaultValue; - set => this._defaultValue = value; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs b/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs deleted file mode 100644 index c35fa13..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataProvider -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup -{ - public static class MarkupDataProvider - { - private static Map s_mappings = new Map(); - private static Dictionary s_providers = new Dictionary(); - - public static void AddDataMapping(MarkupDataMapping mapping) - { - MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(mapping.TargetType, mapping.Provider); - if (!s_mappings.ContainsKey(key)) - s_mappings[key] = mapping; - else - ErrorManager.ReportError("Data mapping already defined for type '{0}', provider '{1}'", mapping.TargetType.Name, mapping.Provider); - } - - public static void RemoveDataMapping(MarkupDataMapping mapping) - { - MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(mapping.TargetType, mapping.Provider); - s_mappings.Remove(key); - } - - public static MarkupDataMapping FindDataMapping( - string providerName, - MarkupDataTypeSchema typeSchema) - { - MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(typeSchema, providerName); - MarkupDataMapping markupDataMapping; - if (!s_mappings.TryGetValue(key, out markupDataMapping)) - { - markupDataMapping = new MarkupDataMapping(null); - markupDataMapping.Provider = providerName; - markupDataMapping.TargetType = typeSchema; - markupDataMapping.Mappings = FillInDefaultMappings(typeSchema, null); - s_mappings[key] = markupDataMapping; - } - return markupDataMapping; - } - - public static void RegisterDataProvider(IDataProvider provider) => s_providers[provider.Name] = provider; - - public static IDataProvider GetDataProvider(string providerName) - { - IDataProvider dataProvider; - return s_providers.TryGetValue(providerName, out dataProvider) ? dataProvider : null; - } - - public static object GetDefaultValueForType(TypeSchema type) => type.IsNullAssignable ? null : type.ConstructDefault(); - - public static MarkupDataMappingEntry[] FillInDefaultMappings( - MarkupDataTypeSchema targetType, - Map entries) - { - if (entries == null) - entries = new Map(); - for (MarkupDataTypeSchema markupDataTypeSchema = targetType; markupDataTypeSchema != null; markupDataTypeSchema = markupDataTypeSchema.Base as MarkupDataTypeSchema) - { - foreach (MarkupDataTypePropertySchema property in markupDataTypeSchema.Properties) - { - if (!entries.ContainsKey(property.Name)) - entries[property.Name] = new MarkupDataMappingEntry() - { - Property = property, - DefaultValue = GetDefaultValueForType(property.PropertyType) - }; - } - } - MarkupDataMappingEntry[] dataMappingEntryArray = new MarkupDataMappingEntry[entries.Count]; - int num = 0; - foreach (MarkupDataMappingEntry dataMappingEntry in entries.Values) - dataMappingEntryArray[num++] = dataMappingEntry; - return dataMappingEntryArray; - } - - private struct MappingKey - { - private MarkupDataTypeSchema _targetType; - private string _provider; - - public MappingKey(MarkupDataTypeSchema targetType, string provider) - { - this._targetType = targetType; - this._provider = provider; - } - - public override bool Equals(object rhs) => rhs is MarkupDataProvider.MappingKey mappingKey && this._targetType == mappingKey._targetType && this._provider == mappingKey._provider; - - public override int GetHashCode() => this._targetType.GetHashCode() ^ this._provider.GetHashCode(); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQuery.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQuery.cs deleted file mode 100644 index 180d1ad..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQuery.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataQuery -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupDataQuery : MarkupDataTypeBaseObject - { - private MarkupDataQuerySchema _owner; - - public MarkupDataQuery(MarkupDataQuerySchema type) - : base(type) - => this._owner = type; - - protected void ApplyDefaultValues() - { - Map map = null; - for (MarkupDataQuerySchema owner = this._owner; owner != null; owner = owner.Base as MarkupDataQuerySchema) - { - foreach (MarkupDataQueryPropertySchema property in owner.Properties) - { - if (property.DefaultValue != null && (map == null || !map.ContainsKey(property.Name))) - { - object instance = this; - property.SetValue(ref instance, property.DefaultValue); - if (map == null) - map = new Map(); - map[property.Name] = null; - } - } - } - } - - public abstract void Refresh(); - - public abstract object Result { get; set; } - - public abstract DataProviderQueryStatus Status { get; } - - public abstract bool Enabled { get; set; } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQueryPreDefinedPropertySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQueryPreDefinedPropertySchema.cs deleted file mode 100644 index fe4f304..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQueryPreDefinedPropertySchema.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataQueryPreDefinedPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataQueryPreDefinedPropertySchema : MarkupDataQueryPropertySchema - { - private GetValueHandler _getValueHandler; - private SetValueHandler _setValueHandler; - - public MarkupDataQueryPreDefinedPropertySchema( - MarkupDataQuerySchema owner, - TypeSchema propertyType, - string name, - GetValueHandler getValueHandler, - SetValueHandler setValueHandler) - : base(owner, name, propertyType) - { - this.InvalidatesQuery = false; - this._getValueHandler = getValueHandler; - this._setValueHandler = setValueHandler; - } - - public override bool CanWrite => this._setValueHandler != null; - - public override ExpressionRestriction ExpressionRestriction => !this.CanWrite ? ExpressionRestriction.ReadOnly : ExpressionRestriction.None; - - public override object GetValue(object instance) => this._getValueHandler(instance); - - public override void SetValue(ref object instance, object value) => this._setValueHandler(ref instance, value); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQueryPropertySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQueryPropertySchema.cs deleted file mode 100644 index 714a948..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQueryPropertySchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataQueryPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataQueryPropertySchema : ClassPropertySchema - { - private object _defaultValue; - private bool _invalidatesQuery = true; - private TypeSchema _underlyingCollectionType; - - public MarkupDataQueryPropertySchema( - MarkupTypeSchema owner, - string name, - TypeSchema propertyType) - : base(owner, name, propertyType) - { - } - - public object DefaultValue - { - get => this._defaultValue; - set => this._defaultValue = value; - } - - public bool InvalidatesQuery - { - get => this._invalidatesQuery; - set => this._invalidatesQuery = value; - } - - public override TypeSchema AlternateType => this._underlyingCollectionType; - - public void SetUnderlyingCollectionType(TypeSchema underlyingCollectionType) => this._underlyingCollectionType = underlyingCollectionType; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQueryRefreshMethodSchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQueryRefreshMethodSchema.cs deleted file mode 100644 index b072e6e..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQueryRefreshMethodSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataQueryRefreshMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataQueryRefreshMethodSchema : MethodSchema - { - public MarkupDataQueryRefreshMethodSchema(MarkupDataQuerySchema owner) - : base(owner) - { - } - - public override string Name => "Refresh"; - - public override TypeSchema[] ParameterTypes => TypeSchema.EmptyList; - - public override TypeSchema ReturnType => VoidSchema.Type; - - public override bool IsStatic => false; - - public override object Invoke(object instance, object[] parameters) - { - ((MarkupDataQuery)instance).Refresh(); - return null; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs deleted file mode 100644 index 1bc0f89..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataQuerySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataQuerySchema : ClassTypeSchema - { - private TypeSchema _resultType; - private string _providerName; - private MarkupDataQueryPreDefinedPropertySchema _resultProperty; - private MarkupDataQueryPreDefinedPropertySchema[] _predefinedProperties; - private MarkupDataQueryRefreshMethodSchema _refreshMethod; - - public MarkupDataQuerySchema(MarkupLoadResult owner, string name) - : base(owner, name) - { - } - - protected override void OnDispose() - { - base.OnDispose(); - if (this._predefinedProperties != null) - { - foreach (DisposableObject predefinedProperty in this._predefinedProperties) - predefinedProperty.Dispose(this); - } - if (this._refreshMethod == null) - return; - this._refreshMethod.Dispose(this); - } - - public override void BuildProperties() - { - base.BuildProperties(); - this._predefinedProperties = new MarkupDataQueryPreDefinedPropertySchema[3] - { - this._resultProperty = new MarkupDataQueryPreDefinedPropertySchema(this, this._resultType != null ? this._resultType : ObjectSchema.Type, "Result", new GetValueHandler(GetResultProperty), null), - new MarkupDataQueryPreDefinedPropertySchema(this, UIXLoadResultExports.DataQueryStatusType, "Status", new GetValueHandler(GetStatusProperty), null), - new MarkupDataQueryPreDefinedPropertySchema(this, BooleanSchema.Type, "Enabled", new GetValueHandler(GetEnabledProperty), new SetValueHandler(SetEnabledProperty)) - }; - this._refreshMethod = new MarkupDataQueryRefreshMethodSchema(this); - } - - public override MarkupType MarkupType => MarkupType.DataQuery; - - protected override TypeSchema DefaultBase => MarkupDataQueryInstanceSchema.Type; - - public override Type RuntimeType => typeof(MarkupDataQuery); - - public override object ConstructDefault() - { - IDataProvider dataProvider = MarkupDataProvider.GetDataProvider(this._providerName); - if (dataProvider != null) - return dataProvider.Build(this); - ErrorManager.ReportError("Could not find provider '{0}'; verify that it has been registered", _providerName); - return null; - } - - public override PropertySchema FindProperty(string name) - { - foreach (PropertySchema predefinedProperty in this._predefinedProperties) - { - if (name == predefinedProperty.Name) - return predefinedProperty; - } - return base.FindProperty(name); - } - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) => this._refreshMethod.Name == name && parameters.Length == 0 ? _refreshMethod : base.FindMethod(name, parameters); - - public string ProviderName - { - get => this._providerName; - set => this._providerName = value; - } - - public TypeSchema ResultType - { - get => this._resultType; - set => this._resultType = value; - } - - public bool InvalidatesQuery(string propertyName) => this.FindPropertyDeep(propertyName) is MarkupDataQueryPropertySchema propertyDeep && propertyDeep.InvalidatesQuery; - - private static object GetResultProperty(object instance) => ((MarkupDataQuery)instance).Result; - - private static object GetStatusProperty(object instance) => ((MarkupDataQuery)instance).Status; - - private static object GetEnabledProperty(object instance) => ((MarkupDataQuery)instance).Enabled; - - private static void SetEnabledProperty(ref object instance, object value) => ((MarkupDataQuery)instance).Enabled = (bool)value; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataType.cs b/UIX/Microsoft/Iris/Markup/MarkupDataType.cs deleted file mode 100644 index 999fb67..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataType.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupDataType : MarkupDataTypeBaseObject - { - public MarkupDataType(MarkupDataTypeSchema type) - : base(type) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataTypeBaseObject.cs b/UIX/Microsoft/Iris/Markup/MarkupDataTypeBaseObject.cs deleted file mode 100644 index 6241df2..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataTypeBaseObject.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataTypeBaseObject -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupDataTypeBaseObject : - Class, - AssemblyObjectProxyHelper.IAssemblyProxyObject - { - protected MarkupDataTypeBaseObject(MarkupTypeSchema type) - : base(type) - { - } - - public override object ReadSymbol(SymbolReference symbolRef) - { - object obj; - return symbolRef.Origin == SymbolOrigin.Properties && this.ExternalObjectGetProperty(symbolRef.Symbol, out obj) ? obj : base.ReadSymbol(symbolRef); - } - - public override void WriteSymbol(SymbolReference symbolRef, object value) - { - if (symbolRef.Origin == SymbolOrigin.Properties && this.ExternalObjectSetProperty(symbolRef.Symbol, value)) - return; - base.WriteSymbol(symbolRef, value); - } - - public override object GetProperty(string name) - { - object obj; - return this.ExternalObjectGetProperty(name, out obj) ? obj : base.GetProperty(name); - } - - public override void SetProperty(string name, object value) - { - if (this.ExternalObjectSetProperty(name, value)) - return; - base.SetProperty(name, value); - } - - public void FireNotificationThreadSafe(string property) - { - property = NotifyService.CanonicalizeString(property); - this._notifier.FireThreadSafe(property); - } - - protected virtual bool ExternalObjectGetProperty(string propertyName, out object value) - { - value = null; - return false; - } - - protected virtual bool ExternalObjectSetProperty(string propertyName, object value) => false; - - protected abstract IDataProviderBaseObject ExternalAssemblyObject { get; } - - object AssemblyObjectProxyHelper.IAssemblyProxyObject.AssemblyObject => ExternalAssemblyObject; - - public abstract IntPtr ExternalNativeObject { get; } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataTypePropertySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataTypePropertySchema.cs deleted file mode 100644 index 046bb11..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataTypePropertySchema.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataTypePropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataTypePropertySchema : ClassPropertySchema - { - private TypeSchema _underlyingCollectionType; - - public MarkupDataTypePropertySchema( - MarkupTypeSchema owner, - string name, - TypeSchema propertyType) - : base(owner, name, propertyType) - { - } - - public override TypeSchema AlternateType => this._underlyingCollectionType; - - public void SetUnderlyingCollectionType(TypeSchema underlyingCollectionType) => this._underlyingCollectionType = underlyingCollectionType; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataTypeSchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataTypeSchema.cs deleted file mode 100644 index 44a2853..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDataTypeSchema.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDataTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; -using System; - -namespace Microsoft.Iris.Markup -{ - public class MarkupDataTypeSchema : ClassTypeSchema - { - public MarkupDataTypeSchema(MarkupLoadResult owner, string name) - : base(owner, name) - { - } - - public override object ConstructDefault() => new ProviderlessMarkupDataType(this); - - public override MarkupType MarkupType => MarkupType.DataType; - - protected override TypeSchema DefaultBase => MarkupDataTypeInstanceSchema.Type; - - public override Type RuntimeType => typeof(MarkupDataType); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupDebugHelper.cs b/UIX/Microsoft/Iris/Markup/MarkupDebugHelper.cs deleted file mode 100644 index 08044e1..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupDebugHelper.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupDebugHelper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public static class MarkupDebugHelper - { - [Conditional("ENABLE_STATEDBG")] - public static void Shutdown() - { - } - - public static bool EnterDebugState( - bool wasInDebugState, - MarkupLoadResult loadResult, - int breakpointIndex, - IDictionary storage) - { - return false; - } - - [Conditional("ENABLE_STATEDBG")] - public static void LeaveDebugState() - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs b/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs deleted file mode 100644 index d731dbd..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs +++ /dev/null @@ -1,903 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupEncoder -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Debug; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Markup.Validation; -using System.Collections; -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public class MarkupEncoder - { - private ByteCodeWriter _writer; - private MarkupConstantsTable _constantsTable; - private MarkupLineNumberTable _lineNumberTable; - private string _sourceFilePathBestGuess; - - public MarkupEncoder( - MarkupImportTables importTables, - MarkupConstantsTable constantsTable, - MarkupLineNumberTable lineNumberTable) - { - this._constantsTable = constantsTable; - this._lineNumberTable = lineNumberTable; - } - - public ByteCodeReader EncodeOBJECTSection( - ParseResult parseResult, - string uri, - string sourceFilePathBestGuess) - { - this._sourceFilePathBestGuess = sourceFilePathBestGuess; - this._writer = new ByteCodeWriter(); - if (parseResult.ClassList.Count > 0) - { - for (int index = 0; index < parseResult.ClassList.Count; ++index) - this.EncodeClass(parseResult.ClassList[index]); - } - ByteCodeReader reader = this._writer.CreateReader(); - this._writer = null; - return reader; - } - - private void EncodeClass(ValidateClass cls) - { - ValidateUI ui = null; - if (cls.ObjectType == UISchema.Type) - ui = (ValidateUI)cls; - ValidateEffect validateEffect = null; - if (cls.ObjectType == EffectSchema.Type) - validateEffect = (ValidateEffect)cls; - if (cls.IndirectedObject == null) - { - int totalInitialEvaluates = 0; - int totalFinalEvaluates = 0; - if (cls.ActionList.Count > 0) - this.EncodeScript(cls.ActionList, out totalInitialEvaluates, out totalFinalEvaluates); - if (cls.TriggerList.Count > 0) - this.EncodeListenerGroupRefresh(cls); - if (cls.MethodList != null && cls.MethodList.Count > 0) - this.EncodeMethods(cls.TypeExport, cls.MethodList); - if (cls.FoundPropertiesValidateProperty != null) - { - uint offset = this.GetOffset(); - cls.TypeExport.SetInitializePropertiesOffset(offset); - this.EncodeInitializeProperty(cls.FoundPropertiesValidateProperty); - cls.RemoveProperty(cls.FoundPropertiesValidateProperty); - this._writer.WriteByte(OpCode.ReturnVoid); - } - if (ui != null && ui.FoundContentValidateProperty != null) - { - uint offset = this.GetOffset(); - cls.TypeExport.SetInitializeContentOffset(offset); - this.EncodeInitializeProperty(ui.FoundContentValidateProperty); - cls.RemoveProperty(ui.FoundContentValidateProperty); - this._writer.WriteByte(OpCode.ReturnVoid); - } - if (validateEffect != null) - this.EncodeTechniquesProperty((EffectClassTypeSchema)cls.TypeExport, validateEffect); - uint offset1 = this.GetOffset(); - cls.TypeExport.SetInitializeLocalsInputOffset(offset1); - for (ValidateProperty property = cls.PropertyList; property != null; property = property.Next) - this.EncodeInitializeProperty(property); - if (cls.TypeExport.ListenerCount > 0U) - this.EncodeListenerInitialize(cls); - if (totalInitialEvaluates > 0) - this.EstablishInitialOrFinalEvaluateOffsets(cls, totalInitialEvaluates, true); - if (totalFinalEvaluates > 0) - this.EstablishInitialOrFinalEvaluateOffsets(cls, totalFinalEvaluates, false); - this._writer.WriteByte(OpCode.ReturnVoid); - if (ui == null) - return; - this.EncodeNamedContent(ui); - } - else - { - this.EncodeObjectBySource(cls.IndirectedObject); - this._writer.WriteByte(OpCode.ReturnValue); - } - } - - private void EncodeConstructObject(ValidateObjectTag objectTag) - { - if (objectTag.IndirectedObject == null) - { - if (objectTag.DynamicConstructionType != null) - { - this.EncodeObjectBySource(objectTag.DynamicConstructionType); - this._writer.WriteByte(OpCode.ConstructObjectIndirect); - this._writer.WriteUInt16(objectTag.FoundTypeIndex); - bool forceVerifyValues = objectTag.FoundType is MarkupTypeSchema; - this.EncodeInitializeProperties(objectTag, forceVerifyValues); - this.EncodeObjectBySource(objectTag.DynamicConstructionType); - if (!objectTag.FoundType.HasInitializer) - return; - this._writer.WriteByte(OpCode.InitializeInstanceIndirect); - } - else - { - this._writer.WriteByte(OpCode.ConstructObject); - this._writer.WriteUInt16(objectTag.FoundTypeIndex); - this.EncodeInitializeProperties(objectTag); - this.EncodeInitializeInstance(objectTag.FoundType, objectTag.FoundTypeIndex); - } - } - else - this.EncodeObjectBySource(objectTag.IndirectedObject); - } - - private void EncodeInitializeProperties(ValidateObjectTag objectTag) => this.EncodeInitializeProperties(objectTag, false); - - private void EncodeInitializeProperties(ValidateObjectTag objectTag, bool forceVerifyValues) - { - if (objectTag.PropertyCount <= 0) - return; - for (ValidateProperty property = objectTag.PropertyList; property != null; property = property.Next) - this.EncodeInitializeProperty(property, objectTag.DynamicConstructionType); - } - - private void EncodeInitializeInstance(TypeSchema type, int typeIndex) - { - if (!type.HasInitializer) - return; - this._writer.WriteByte(OpCode.InitializeInstance); - this._writer.WriteUInt16(typeIndex); - } - - private void EncodeInitializeProperty(ValidateProperty property) => this.EncodeInitializeProperty(property, null); - - private void EncodeInitializeProperty( - ValidateProperty property, - ValidateObject dynamicConstructionType) - { - if (property.IsPseudo) - return; - if (property.ValueApplyMode == ValueApplyMode.SingleValueSet) - { - this.EncodeObjectBySource(property.Value); - this.RecordLineNumber(property); - if (dynamicConstructionType == null) - { - this._writer.WriteByte(OpCode.PropertyInitialize); - this._writer.WriteUInt16(property.FoundPropertyIndex); - } - else - { - this.EncodeObjectBySource(dynamicConstructionType); - this._writer.WriteByte(OpCode.PropertyInitializeIndirect); - this._writer.WriteUInt16(property.FoundPropertyIndex); - } - } - else - { - if ((property.ValueApplyMode & ValueApplyMode.CollectionPopulateAndSet) != ValueApplyMode.SingleValueSet) - { - this._writer.WriteByte(OpCode.ConstructObject); - this._writer.WriteUInt16(property.FoundPropertyTypeIndex); - } - for (ValidateObjectTag next = (ValidateObjectTag)property.Value; next != null; next = next.Next) - { - if (!next.PropertyIsRequiredForCreation) - { - uint fixUpLocation = uint.MaxValue; - if (property.ShouldSkipDictionaryAddIfContains) - { - this._writer.WriteByte(OpCode.JumpIfDictionaryContains); - this._writer.WriteUInt16((property.ValueApplyMode & ValueApplyMode.CollectionAdd) != ValueApplyMode.SingleValueSet ? property.FoundPropertyIndex : -1); - this._writer.WriteUInt16(this._constantsTable.Add(StringSchema.Type, next.Name, MarkupConstantPersistMode.Binary)); - fixUpLocation = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - } - this.EncodeConstructObject(next); - if ((property.ValueApplyMode & ValueApplyMode.MultiValueDictionary) != ValueApplyMode.SingleValueSet) - { - this._writer.WriteByte(OpCode.PropertyDictionaryAdd); - this._writer.WriteUInt16((property.ValueApplyMode & ValueApplyMode.CollectionAdd) != ValueApplyMode.SingleValueSet ? property.FoundPropertyIndex : -1); - this._writer.WriteUInt16(this._constantsTable.Add(StringSchema.Type, next.Name, MarkupConstantPersistMode.Binary)); - } - else - { - this._writer.WriteByte(OpCode.PropertyListAdd); - this._writer.WriteUInt16((property.ValueApplyMode & ValueApplyMode.CollectionAdd) != ValueApplyMode.SingleValueSet ? property.FoundPropertyIndex : -1); - } - if (fixUpLocation != uint.MaxValue) - this.FixUpJumpOffset(fixUpLocation); - } - } - if ((property.ValueApplyMode & ValueApplyMode.CollectionPopulateAndSet) == ValueApplyMode.SingleValueSet) - return; - if (dynamicConstructionType == null) - { - this._writer.WriteByte(OpCode.PropertyInitialize); - this._writer.WriteUInt16(property.FoundPropertyIndex); - } - else - { - this.EncodeObjectBySource(dynamicConstructionType); - this.RecordLineNumber(property); - this._writer.WriteByte(OpCode.PropertyInitializeIndirect); - this._writer.WriteUInt16(property.FoundPropertyIndex); - } - } - } - - private void EncodeObjectBySource(ValidateObject obj) - { - switch (obj.ObjectSourceType) - { - case ObjectSourceType.ObjectTag: - this.EncodeConstructObject((ValidateObjectTag)obj); - break; - case ObjectSourceType.FromString: - this.EncodeFromString((ValidateFromString)obj); - break; - case ObjectSourceType.Code: - this.EncodeCode((ValidateCode)obj); - break; - case ObjectSourceType.Expression: - this.EncodeExpression((ValidateExpression)obj, null); - break; - } - } - - private void EncodeFromString(ValidateFromString fromString) - { - if (fromString.ObjectType.IsRuntimeImmutable) - { - MarkupConstantPersistMode persistMode; - object persistData; - if (fromString.ObjectType.SupportsBinaryEncoding) - { - persistMode = MarkupConstantPersistMode.Binary; - persistData = fromString.FromStringInstance; - } - else - { - persistMode = MarkupConstantPersistMode.FromString; - persistData = fromString.FromString; - } - int rawValue = this._constantsTable.Add(fromString.ObjectType, fromString.FromStringInstance, persistMode, persistData); - this._writer.WriteByte(OpCode.PushConstant); - this._writer.WriteUInt16(rawValue); - } - else if (fromString.ObjectType.SupportsBinaryEncoding) - { - this._writer.WriteByte(OpCode.ConstructFromBinary); - this._writer.WriteUInt16(fromString.TypeHintIndex); - fromString.ObjectType.EncodeBinary(this._writer, fromString.FromStringInstance); - } - else - { - int rawValue = this._constantsTable.Add(StringSchema.Type, fromString.FromString, MarkupConstantPersistMode.FromString); - this._writer.WriteByte(OpCode.ConstructFromString); - this._writer.WriteUInt16(fromString.TypeHintIndex); - this._writer.WriteUInt16(rawValue); - } - } - - private void EncodeCanonicalInstance(object instance, TypeSchema type, string memberName) - { - int rawValue = this._constantsTable.Add(type, instance, MarkupConstantPersistMode.Canonical, memberName); - this._writer.WriteByte(OpCode.PushConstant); - this._writer.WriteUInt16(rawValue); - } - - private void EncodeNamedContent(ValidateUI ui) - { - if (ui.FoundNamedContentProperties == null) - return; - NamedContentRecord[] namedContentTable = ((UIClassTypeSchema)ui.TypeExport).NamedContentTable; - int index = 0; - foreach (ValidateProperty namedContentProperty in ui.FoundNamedContentProperties) - { - uint offset = this.GetOffset(); - namedContentTable[index].SetOffset(offset); - this.EncodeObjectBySource(namedContentProperty.Value); - this._writer.WriteByte(OpCode.ReturnValue); - ++index; - } - } - - private void EncodeCode(ValidateCode code) - { - uint offset = this.GetOffset(); - code.TrackEncodingOffset(offset); - this.EncodeStatement(code.StatementCompound); - if (code.ReturnStatements != null) - { - foreach (ValidateStatementReturn returnStatement in code.ReturnStatements) - { - if (!returnStatement.IsTrailingReturn) - this.FixUpJumpOffset(returnStatement.JumpFixupOffset); - } - } - if (code.Embedded) - return; - if (code.ObjectType != VoidSchema.Type) - this._writer.WriteByte(OpCode.ReturnValue); - else - this._writer.WriteByte(OpCode.ReturnVoid); - } - - private void EncodeStatement(ValidateStatement statement) - { - this.RecordLineNumber(statement); - if (statement.StatementType != StatementType.Compound) - this.DeclareDebugPoint(statement.Line, statement.Column); - switch (statement.StatementType) - { - case StatementType.Assignment: - ValidateStatementAssignment statementAssignment = (ValidateStatementAssignment)statement; - if (statementAssignment.DeclaredScopedLocal != null) - this.EncodeStatement(statementAssignment.DeclaredScopedLocal); - this.EncodeExpression(statementAssignment.RValue); - this.EncodeExpression(statementAssignment.LValue); - this._writer.WriteByte(OpCode.DiscardValue); - break; - case StatementType.Expression: - ValidateStatementExpression statementExpression = (ValidateStatementExpression)statement; - this.EncodeExpression(statementExpression.Expression); - if (statementExpression.Expression.ObjectType == VoidSchema.Type) - break; - this._writer.WriteByte(OpCode.DiscardValue); - break; - case StatementType.ForEach: - ValidateStatementForEach statementForEach = (ValidateStatementForEach)statement; - this.EncodeScopedLocal(statementForEach.ScopedLocal); - this.EncodeExpression(statementForEach.Expression); - this._writer.WriteByte(OpCode.MethodInvoke); - this._writer.WriteUInt16(statementForEach.FoundGetEnumeratorIndex); - uint offset1 = this.GetOffset(); - this._writer.WriteByte(OpCode.MethodInvokePeek); - this._writer.WriteUInt16(statementForEach.FoundMoveNextIndex); - this._writer.WriteByte(OpCode.JumpIfFalse); - uint offset2 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this._writer.WriteByte(OpCode.PropertyGetPeek); - this._writer.WriteUInt16(statementForEach.FoundCurrentIndex); - this._writer.WriteByte(OpCode.VerifyTypeCast); - this._writer.WriteUInt16(statementForEach.ScopedLocal.FoundTypeIndex); - this._writer.WriteByte(OpCode.WriteSymbol); - this._writer.WriteUInt16(statementForEach.ScopedLocal.FoundSymbolIndex); - this.EncodeStatement(statementForEach.StatementCompound); - this._writer.WriteByte(OpCode.Jump); - this._writer.WriteUInt32(offset1); - this.FixUpJumpOffset(offset2); - uint offset3 = this.GetOffset(); - this._writer.WriteByte(OpCode.DiscardValue); - this.EncodeScopedLocalsWipe(statementForEach.ScopedLocalsToClear); - foreach (ValidateStatementBreak breakStatement in statementForEach.BreakStatements) - { - if (breakStatement.IsContinue) - this.FixUpJumpOffset(breakStatement.JumpFixupOffset, offset1); - else - this.FixUpJumpOffset(breakStatement.JumpFixupOffset, offset3); - } - break; - case StatementType.While: - ValidateStatementWhile validateStatementWhile = (ValidateStatementWhile)statement; - uint offset4 = this.GetOffset(); - if (validateStatementWhile.IsDoWhile) - this.EncodeStatement(validateStatementWhile.Body); - this.EncodeExpression(validateStatementWhile.Condition); - this._writer.WriteByte(OpCode.JumpIfFalse); - uint offset5 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - if (!validateStatementWhile.IsDoWhile) - this.EncodeStatement(validateStatementWhile.Body); - this._writer.WriteByte(OpCode.Jump); - this._writer.WriteUInt32(offset4); - this.FixUpJumpOffset(offset5); - uint offset6 = this.GetOffset(); - foreach (ValidateStatementBreak breakStatement in validateStatementWhile.BreakStatements) - { - if (breakStatement.IsContinue) - this.FixUpJumpOffset(breakStatement.JumpFixupOffset, offset4); - else - this.FixUpJumpOffset(breakStatement.JumpFixupOffset, offset6); - } - break; - case StatementType.If: - ValidateStatementIf validateStatementIf = (ValidateStatementIf)statement; - this.EncodeExpression(validateStatementIf.Condition); - this._writer.WriteByte(OpCode.JumpIfFalse); - uint offset7 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.EncodeStatement(validateStatementIf.StatementCompound); - this.FixUpJumpOffset(offset7); - break; - case StatementType.IfElse: - ValidateStatementIfElse validateStatementIfElse = (ValidateStatementIfElse)statement; - this.EncodeExpression(validateStatementIfElse.Condition); - this._writer.WriteByte(OpCode.JumpIfFalse); - uint offset8 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.EncodeStatement(validateStatementIfElse.StatementCompoundTrue); - this._writer.WriteByte(OpCode.Jump); - uint offset9 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.FixUpJumpOffset(offset8); - this.EncodeStatement(validateStatementIfElse.StatementCompoundFalse); - this.FixUpJumpOffset(offset9); - break; - case StatementType.Return: - ValidateStatementReturn validateStatementReturn = (ValidateStatementReturn)statement; - if (validateStatementReturn.Expression != null) - this.EncodeExpression(validateStatementReturn.Expression); - if (validateStatementReturn.IsTrailingReturn) - break; - this.EncodeScopedLocalsWipe(validateStatementReturn.ScopedLocalsToClear); - this._writer.WriteByte(OpCode.Jump); - uint offset10 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - validateStatementReturn.TrackJumpFixupOffset(offset10); - break; - case StatementType.ScopedLocal: - this.EncodeScopedLocal((ValidateStatementScopedLocal)statement); - break; - case StatementType.Compound: - ValidateStatementCompound statementCompound = (ValidateStatementCompound)statement; - for (ValidateStatement statement1 = statementCompound.StatementList; statement1 != null; statement1 = statement1.Next) - this.EncodeStatement(statement1); - this.EncodeScopedLocalsWipe(statementCompound.ScopedLocalsToClear); - break; - case StatementType.Break: - ValidateStatementBreak validateStatementBreak = (ValidateStatementBreak)statement; - this.EncodeScopedLocalsWipe(validateStatementBreak.ScopedLocalsToClear); - this._writer.WriteByte(OpCode.Jump); - uint offset11 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - validateStatementBreak.TrackJumpFixupOffset(offset11); - break; - } - } - - private void EncodeExpression(ValidateExpression expression) => this.EncodeExpression(expression, null); - - private void EncodeExpression( - ValidateExpression expression, - ListenerEncodeMode listenerEncodeMode) - { - this.RecordLineNumber(expression); - expression.TrackEncodingOffset(this.GetOffset()); - switch (expression.ExpressionType) - { - case ExpressionType.Assignment: - ValidateExpressionAssignment expressionAssignment = (ValidateExpressionAssignment)expression; - if (!expressionAssignment.IsIndexAssignment) - this.EncodeExpression(expressionAssignment.RValue); - this.EncodeExpression(expressionAssignment.LValue); - break; - case ExpressionType.Symbol: - bool flag1 = true; - ValidateExpressionSymbol expressionSymbol = (ValidateExpressionSymbol)expression; - if (expressionSymbol.NotifyIndex >= 0 && listenerEncodeMode != null) - { - this.EncodeListenerHookup(listenerEncodeMode, expressionSymbol.NotifyIndex, ListenerType.Symbol, expressionSymbol.FoundSymbolIndex, expressionSymbol.IsNotifierRoot); - flag1 = !expressionSymbol.IsNotifierRoot; - } - if (!flag1) - break; - this._writer.WriteByte(expressionSymbol.Usage != ExpressionUsage.RValue ? OpCode.WriteSymbolPeek : OpCode.LookupSymbol); - this._writer.WriteUInt16(expressionSymbol.FoundSymbolIndex); - break; - case ExpressionType.Call: - ValidateExpressionCall validateExpressionCall = (ValidateExpressionCall)expression; - bool flag2 = false; - if (validateExpressionCall.Target != null) - { - this.EncodeExpression(validateExpressionCall.Target, listenerEncodeMode); - flag2 = true; - } - switch (validateExpressionCall.FoundMemberType) - { - case SchemaType.Property: - bool flag3 = true; - if (validateExpressionCall.NotifyIndex >= 0 && listenerEncodeMode != null) - { - this.EncodeListenerHookup(listenerEncodeMode, validateExpressionCall.NotifyIndex, ListenerType.Property, validateExpressionCall.FoundMemberIndex, validateExpressionCall.IsNotifierRoot); - flag3 = !validateExpressionCall.IsNotifierRoot; - } - if (!flag3) - return; - OpCode opCode = validateExpressionCall.Usage != ExpressionUsage.RValue ? (flag2 ? OpCode.PropertyAssign : OpCode.PropertyAssignStatic) : (flag2 ? OpCode.PropertyGet : OpCode.PropertyGetStatic); - this.RecordLineNumber(expression); - this._writer.WriteByte(opCode); - this._writer.WriteUInt16(validateExpressionCall.FoundMemberIndex); - return; - case SchemaType.Method: - if (validateExpressionCall.ParameterList != ValidateParameter.EmptyList) - { - for (ValidateParameter validateParameter = validateExpressionCall.ParameterList; validateParameter != null; validateParameter = validateParameter.Next) - this.EncodeExpression(validateParameter.Expression); - } - this.RecordLineNumber(expression); - this._writer.WriteByte(validateExpressionCall.IsIndexAssignment ? (flag2 ? OpCode.MethodInvokePushLastParam : OpCode.MethodInvokeStaticPushLastParam) : (flag2 ? OpCode.MethodInvoke : OpCode.MethodInvokeStatic)); - this._writer.WriteUInt16(validateExpressionCall.FoundMemberIndex); - return; - case SchemaType.Event: - if (validateExpressionCall.NotifyIndex < 0 || listenerEncodeMode == null) - return; - this.EncodeListenerHookup(listenerEncodeMode, validateExpressionCall.NotifyIndex, ListenerType.Event, validateExpressionCall.FoundMemberIndex, validateExpressionCall.IsNotifierRoot); - return; - case SchemaType.CanonicalInstance: - this.EncodeCanonicalInstance(validateExpressionCall.FoundCanonicalInstance, validateExpressionCall.ObjectType, validateExpressionCall.MemberName); - return; - default: - return; - } - case ExpressionType.Cast: - ValidateExpressionCast validateExpressionCast = (ValidateExpressionCast)expression; - this.EncodeExpression(validateExpressionCast.Castee, listenerEncodeMode); - this.RecordLineNumber(expression); - if (validateExpressionCast.FoundCastMethod == CastMethod.Cast) - { - this._writer.WriteByte(OpCode.VerifyTypeCast); - this._writer.WriteUInt16(validateExpressionCast.FoundTypeCastIndex); - break; - } - this._writer.WriteByte(OpCode.ConvertType); - this._writer.WriteUInt16(validateExpressionCast.FoundTypeCastIndex); - this._writer.WriteUInt16(validateExpressionCast.FoundCasteeTypeIndex); - break; - case ExpressionType.New: - ValidateExpressionNew validateExpressionNew = (ValidateExpressionNew)expression; - if (!validateExpressionNew.IsParameterizedConstruction) - { - this._writer.WriteByte(OpCode.ConstructObject); - this._writer.WriteUInt16(validateExpressionNew.FoundConstructTypeIndex); - } - else - { - for (ValidateParameter validateParameter = validateExpressionNew.ParameterList; validateParameter != null; validateParameter = validateParameter.Next) - this.EncodeExpression(validateParameter.Expression); - this.RecordLineNumber(expression); - this._writer.WriteByte(OpCode.ConstructObjectParam); - this._writer.WriteUInt16(validateExpressionNew.FoundConstructTypeIndex); - this._writer.WriteUInt16(validateExpressionNew.FoundParameterizedConstructorIndex); - } - this.EncodeInitializeInstance(validateExpressionNew.FoundConstructType, validateExpressionNew.FoundConstructTypeIndex); - break; - case ExpressionType.Operation: - ValidateExpressionOperation expressionOperation = (ValidateExpressionOperation)expression; - this.EncodeExpression(expressionOperation.LeftSide); - uint fixUpLocation = uint.MaxValue; - if (expressionOperation.FoundOperationTargetType == BooleanSchema.Type && (expressionOperation.Op == OperationType.LogicalAnd || expressionOperation.Op == OperationType.LogicalOr)) - { - this.RecordLineNumber(expression); - this._writer.WriteByte(expressionOperation.Op == OperationType.LogicalOr ? OpCode.JumpIfTruePeek : OpCode.JumpIfFalsePeek); - fixUpLocation = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - } - if (expressionOperation.RightSide != null) - this.EncodeExpression(expressionOperation.RightSide); - this.RecordLineNumber(expression); - this._writer.WriteByte(OpCode.Operation); - this._writer.WriteUInt16(expressionOperation.FoundOperationTargetTypeIndex); - this._writer.WriteByte((byte)expressionOperation.Op); - if (fixUpLocation == uint.MaxValue) - break; - this.FixUpJumpOffset(fixUpLocation); - break; - case ExpressionType.IsCheck: - ValidateExpressionIsCheck expressionIsCheck = (ValidateExpressionIsCheck)expression; - this.EncodeExpression(expressionIsCheck.Expression); - this.RecordLineNumber(expression); - this._writer.WriteByte(OpCode.IsCheck); - this._writer.WriteUInt16(expressionIsCheck.TypeIdentifier.FoundTypeIndex); - break; - case ExpressionType.As: - ValidateExpressionAs validateExpressionAs = (ValidateExpressionAs)expression; - this.EncodeExpression(validateExpressionAs.Expression); - this.RecordLineNumber(expression); - this._writer.WriteByte(OpCode.As); - this._writer.WriteUInt16(validateExpressionAs.TypeIdentifier.FoundTypeIndex); - break; - case ExpressionType.Constant: - ValidateExpressionConstant expressionConstant = (ValidateExpressionConstant)expression; - if (expressionConstant.ConstantType != ConstantType.Null) - { - int rawValue = this._constantsTable.Add(expressionConstant.ObjectType, expressionConstant.FoundConstant, MarkupConstantPersistMode.Binary); - this._writer.WriteByte(OpCode.PushConstant); - this._writer.WriteUInt16(rawValue); - break; - } - this._writer.WriteByte(OpCode.PushNull); - break; - case ExpressionType.DeclareTrigger: - this.EncodeExpression(((ValidateExpressionDeclareTrigger)expression).Expression); - break; - case ExpressionType.TypeOf: - ValidateExpressionTypeOf expressionTypeOf = (ValidateExpressionTypeOf)expression; - this._writer.WriteByte(OpCode.TypeOf); - this._writer.WriteUInt16(expressionTypeOf.TypeIdentifier.FoundTypeIndex); - break; - case ExpressionType.List: - ArrayList expressions = ((ValidateExpressionList)expression).Expressions; - for (int index = 0; index < expressions.Count; ++index) - { - ValidateExpression expression1 = (ValidateExpression)expressions[index]; - this.EncodeExpression(expression1); - if (index < expressions.Count - 1 && expression1.ObjectType != VoidSchema.Type) - this._writer.WriteByte(OpCode.DiscardValue); - } - break; - case ExpressionType.Index: - this.EncodeExpression(((ValidateExpressionIndex)expression).CallExpression); - break; - case ExpressionType.Ternary: - ValidateExpressionTernary expressionTernary = (ValidateExpressionTernary)expression; - this.EncodeExpression(expressionTernary.Condition); - this._writer.WriteByte(OpCode.JumpIfFalse); - uint offset1 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.EncodeExpression(expressionTernary.TrueClause); - this._writer.WriteByte(OpCode.Jump); - uint offset2 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.FixUpJumpOffset(offset1); - this.EncodeExpression(expressionTernary.FalseClause); - this.FixUpJumpOffset(offset2); - break; - case ExpressionType.NullCoalescing: - ValidateExpressionNullCoalescing expressionNullCoalescing = (ValidateExpressionNullCoalescing)expression; - this.EncodeExpression(expressionNullCoalescing.Condition); - this._writer.WriteByte(OpCode.JumpIfNullPeek); - uint offset3 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this._writer.WriteByte(OpCode.Jump); - uint offset4 = this.GetOffset(); - this._writer.WriteUInt32(uint.MaxValue); - this.FixUpJumpOffset(offset3); - this._writer.WriteByte(OpCode.DiscardValue); - this.EncodeExpression(expressionNullCoalescing.NullClause); - this.FixUpJumpOffset(offset4); - break; - case ExpressionType.This: - case ExpressionType.BaseClass: - this._writer.WriteByte(OpCode.PushThis); - break; - } - } - - private void EncodeScopedLocal(ValidateStatementScopedLocal statementScopedLocal) - { - if (statementScopedLocal.HasInitialAssignment) - return; - if (!statementScopedLocal.FoundType.IsNullAssignable) - { - this._writer.WriteByte(OpCode.ConstructObject); - this._writer.WriteUInt16(statementScopedLocal.FoundTypeIndex); - } - else - this._writer.WriteByte(OpCode.PushNull); - this._writer.WriteByte(OpCode.WriteSymbol); - this._writer.WriteUInt16(statementScopedLocal.FoundSymbolIndex); - } - - private void EncodeScopedLocalsWipe(Vector scopedLocalsToClear) - { - if (scopedLocalsToClear == null) - return; - foreach (int rawValue in scopedLocalsToClear) - { - this._writer.WriteByte(OpCode.ClearSymbol); - this._writer.WriteUInt16(rawValue); - } - } - - private bool EncodeListenerHookup( - ListenerEncodeMode listenerEncodeMode, - int localListenerIndex, - ListenerType listenerType, - int targetIndex, - bool isRoot) - { - uint rawValue = listenerEncodeMode.SequentialListenerIndex((uint)localListenerIndex); - if (isRoot) - { - this._writer.WriteByte(OpCode.Listen); - this._writer.WriteUInt16(rawValue); - this._writer.WriteByte((byte)listenerType); - this._writer.WriteUInt16(targetIndex); - this._writer.WriteUInt32(listenerEncodeMode.ScriptId); - } - else - { - uint num = listenerEncodeMode.RunOnNonTailTrigger ? listenerEncodeMode.ScriptId : uint.MaxValue; - this._writer.WriteByte(OpCode.DestructiveListen); - this._writer.WriteUInt16(rawValue); - this._writer.WriteByte((byte)listenerType); - this._writer.WriteUInt16(targetIndex); - this._writer.WriteUInt32(num); - this._writer.WriteUInt32(listenerEncodeMode.RefreshId); - } - return isRoot; - } - - private void EncodeScript( - Vector actionList, - out int totalInitialEvaluates, - out int totalFinalEvaluates) - { - totalInitialEvaluates = 0; - totalFinalEvaluates = 0; - foreach (ValidateCode action in actionList) - { - if (action.InitialEvaluate) - ++totalInitialEvaluates; - if (action.FinalEvaluate) - ++totalFinalEvaluates; - this.EncodeCode(action); - } - } - - private void EncodeMethods(MarkupTypeSchema typeSchema, ArrayList methodList) - { - foreach (ValidateMethod method in methodList) - { - uint offset = this.GetOffset(); - this.EncodeCode(method.Body); - uint codeOffset = typeSchema.EncodeScriptOffsetAsId(offset); - method.MethodExport.SetCodeOffset(codeOffset); - } - } - - private void EncodeListenerGroupRefresh(ValidateClass cls) - { - Vector triggerList = cls.TriggerList; - ListenerEncodeMode listenerEncodeMode = new ListenerEncodeMode(cls.TypeExport); - foreach (TriggerRecord triggerRecord in triggerList) - { - listenerEncodeMode.TriggerContainer = triggerRecord; - this.EncodeExpression(triggerRecord.SourceExpression, listenerEncodeMode); - this._writer.WriteByte(37); - } - } - - private void EncodeListenerInitialize(ValidateClass cls) - { - this._writer.WriteByte(OpCode.ConstructListenerStorage); - this._writer.WriteUInt16(cls.TypeExport.ListenerCount); - Vector triggerList = cls.TriggerList; - uint[] refreshGroupOffsets = new uint[triggerList.Count]; - for (int index = 0; index < triggerList.Count; ++index) - { - TriggerRecord triggerRecord = triggerList[index]; - refreshGroupOffsets[index] = triggerRecord.SourceExpression.EncodeStartOffset; - } - cls.TypeExport.SetRefreshListenerGroupOffsets(refreshGroupOffsets); - } - - private void EstablishInitialOrFinalEvaluateOffsets( - ValidateClass cls, - int totalEvaluates, - bool isInitialEvaluate) - { - Vector actionList = cls.ActionList; - uint[] numArray = new uint[totalEvaluates]; - int num = 0; - foreach (ValidateCode validateCode in actionList) - { - if (isInitialEvaluate && validateCode.InitialEvaluate || !isInitialEvaluate && validateCode.FinalEvaluate) - numArray[num++] = validateCode.EncodeStartOffset; - } - if (isInitialEvaluate) - cls.TypeExport.SetInitialEvaluateOffsets(numArray); - else - cls.TypeExport.SetFinalEvaluateOffsets(numArray); - } - - private void EncodeTechniquesProperty( - EffectClassTypeSchema typeExport, - ValidateEffect validateEffect) - { - ValidateProperty validateProperty = validateEffect.FoundTechniquesValidateProperty; - if (validateProperty == null) - return; - int length = 0; - ValidateObjectTag validateObjectTag1 = validateProperty.Value as ValidateObjectTag; - for (ValidateObjectTag validateObjectTag2 = validateObjectTag1; validateObjectTag2 != null; validateObjectTag2 = validateObjectTag2.Next) - ++length; - uint[] techniqueOffsets = new uint[length]; - int num = 0; - for (ValidateObjectTag objectTag = validateObjectTag1; objectTag != null; objectTag = objectTag.Next) - { - techniqueOffsets[num++] = this.GetOffset(); - this.EncodeConstructObject(objectTag); - this._writer.WriteByte(OpCode.ReturnValue); - } - typeExport.SetTechniqueOffsets(techniqueOffsets); - validateEffect.RemoveProperty(validateEffect.FoundTechniquesValidateProperty); - if (validateEffect.FoundInstancePropertyAssignments == null) - return; - uint[] instancePropertyAssignments = new uint[length]; - for (int index = 0; index < length; ++index) - instancePropertyAssignments[index] = this.GetOffset(); - foreach (KeyValueEntry propertyAssignment in validateEffect.FoundInstancePropertyAssignments) - { - int elementSymbolIndex = validateEffect.GetElementSymbolIndex(propertyAssignment.Key); - this._writer.WriteByte(OpCode.LookupSymbol); - this._writer.WriteUInt16(elementSymbolIndex); - for (ValidateProperty next = propertyAssignment.Value; next != null; next = next.Next) - this.EncodeInitializeProperty(next); - this._writer.WriteByte(OpCode.DiscardValue); - } - this._writer.WriteByte(OpCode.ReturnVoid); - typeExport.SetInstancePropertyAssignments(instancePropertyAssignments); - } - - private uint GetOffset() => this._writer.DataSize; - - private void FixUpJumpOffset(uint fixUpLocation, uint fixedOffset) => this._writer.Overwrite(fixUpLocation, fixedOffset); - - private void FixUpJumpOffset(uint fixUpLocation) => this.FixUpJumpOffset(fixUpLocation, this.GetOffset()); - - private void RecordLineNumber(Validate validate) => this._lineNumberTable.AddRecord(this.GetOffset(), validate.Line, validate.Column); - - [Conditional("DEBUG")] - private void DEBUG_EmitStart() - { - } - - [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - - [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - - [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param, object param2) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - - [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param, object param2, object param3) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - - [Conditional("DEBUG")] - private void DEBUG_EmitStop( - OpCode opCode, - object param, - object param2, - object param3, - object param4) - { - Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - } - - [Conditional("DEBUG")] - private void DEBUG_EmitStop( - OpCode opCode, - object param, - object param2, - object param3, - object param4, - object param5) - { - Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); - } - - [Conditional("DEBUG")] - private void DEBUG_EmitStopWorker( - OpCode opCode, - object data0, - object data1, - object data2, - object data3, - object data4) - { - } - - [Conditional("DEBUG")] - private void DEBUG_ReportFixup(uint fixupLocation, uint value) - { - } - - private void DeclareDebugPoint(int line, int column) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupError.cs b/UIX/Microsoft/Iris/Markup/MarkupError.cs deleted file mode 100644 index 4985445..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupError.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupError -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup -{ - public class MarkupError - { - private ErrorRecord _error; - private string _context; - - public MarkupError(ErrorRecord error) - { - this._error = error; - this._context = error.Context; - if (this._context == null || error.Line == -1) - return; - if (error.Column != -1) - this._context = string.Format("{0} ({1},{2})", _context, error.Line, error.Column); - else - this._context = string.Format("{0} ({1})", _context, error.Line); - } - - public bool IsError => !this._error.Warning; - - public string Message => this._error.Message; - - public string Context => this._context; - - public string Uri => this._error.Context; - - public int Line => this._error.Line; - - public int Column => this._error.Column; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupImportTables.cs b/UIX/Microsoft/Iris/Markup/MarkupImportTables.cs deleted file mode 100644 index 1a3fa49..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupImportTables.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupImportTables -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupImportTables - { - public TypeSchema[] TypeImports = TypeSchema.EmptyList; - public ConstructorSchema[] ConstructorImports = ConstructorSchema.EmptyList; - public PropertySchema[] PropertyImports = PropertySchema.EmptyList; - public MethodSchema[] MethodImports = MethodSchema.EmptyList; - public EventSchema[] EventImports = EventSchema.EmptyList; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs b/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs deleted file mode 100644 index 25f0ab5..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupLineNumberTable -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public class MarkupLineNumberTable - { - private const ulong OFFSET_MASK = 4194303; - private const uint OFFSET_MAX = 4194303; - private const ulong LINE_MASK = 8796088827904; - private const int LINE_SHIFT = 22; - private const uint LINE_MAX = 2097151; - private const ulong COLUMN_MASK = 18446735277616529408; - private const int COLUMN_SHIFT = 43; - private const uint COLUMN_MAX = 2097151; - private Vector _lookupTable; - private ulong[] _runtimeList; - - public MarkupLineNumberTable() => this._lookupTable = new Vector(); - - public MarkupLineNumberTable(ulong[] runtimeList) => this._runtimeList = runtimeList; - - public void AddRecord(uint offset, int line, int column) - { - ulong num = Pack(offset, line, column); - if (this._lookupTable.Count > 0 && (int)UnpackOffset(this._lookupTable[this._lookupTable.Count - 1]) == (int)offset) - this._lookupTable[this._lookupTable.Count - 1] = num; - else - this._lookupTable.Add(num); - } - - public void PrepareForRuntimeUse() - { - this._runtimeList = new ulong[this._lookupTable.Count]; - for (int index = 0; index < this._lookupTable.Count; ++index) - this._runtimeList[index] = this._lookupTable[index]; - this._lookupTable = null; - } - - public void Lookup(uint offset, out int line, out int column) - { - int length = this._runtimeList.Length; - int index = 0; - while (index < length && (offset < UnpackOffset(this._runtimeList[index]) || index != length - 1 && offset >= UnpackOffset(this._runtimeList[index + 1]))) - ++index; - if (index < length) - { - line = UnpackLine(this._runtimeList[index]); - column = UnpackColumn(this._runtimeList[index]); - } - else - { - line = -1; - column = -1; - } - } - - public ulong[] PersistList => this._runtimeList; - - [Conditional("DEBUG")] - public void DEBUG_DumpTable() - { - } - - private static ulong Pack(uint offset, int line, int column) => (ulong)(offset | (long)line << 22 | (long)column << 43); - - private static uint UnpackOffset(ulong value) => (uint)(value & 4194303UL); - - private static int UnpackLine(ulong value) => (int)((value & 8796088827904UL) >> 22); - - private static int UnpackColumn(ulong value) => (int)((value & 18446735277616529408UL) >> 43); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupListener.cs b/UIX/Microsoft/Iris/Markup/MarkupListener.cs deleted file mode 100644 index c047816..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupListener.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupListener -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupListener : Listener - { - protected IMarkupTypeBase _scriptHost; - protected uint _scriptId = uint.MaxValue; - - public MarkupListener() - { - } - - public void Reset( - INotifyObject notifier, - string watch, - IMarkupTypeBase scriptHost, - uint scriptId) - { - this._watch = watch; - this._scriptHost = scriptHost; - this._scriptId = scriptId; - this._watch = NotifyService.CanonicalizeString(this._watch); - notifier.AddListener(this); - } - - public override void Dispose() - { - this._scriptHost = null; - this._scriptId = uint.MaxValue; - base.Dispose(); - } - - public IMarkupTypeBase ScriptHost => this._scriptHost; - - public override void OnNotify() - { - base.OnNotify(); - if (this._scriptId == uint.MaxValue) - return; - this._scriptHost.ScheduleScriptRun(this._scriptId, false); - } - - public override string ToString() => string.Format("{0}{4}: {1}->0x{2:X8} on '{3}'", this.GetType().Name, _watch, _scriptId, _scriptHost, ""); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupListeners.cs b/UIX/Microsoft/Iris/Markup/MarkupListeners.cs deleted file mode 100644 index 2c2fb25..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupListeners.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupListeners -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class MarkupListeners : Listeners - { - public MarkupListeners(int listenerCount) - : base(listenerCount) - { - } - - public void RefreshListener( - int index, - INotifyObject notifier, - string watch, - IMarkupTypeBase scriptHost, - uint scriptOffset, - uint refreshOffset) - { - MarkupListener markupListener = null; - if (this._listenerList[index] is MarkupListener) - { - markupListener = (MarkupListener)_listenerList[index]; - markupListener.Dispose(); - } - if (refreshOffset == uint.MaxValue) - { - if (markupListener == null) - markupListener = new MarkupListener(); - markupListener.Reset(notifier, watch, scriptHost, scriptOffset); - } - else - { - if (markupListener == null) - markupListener = new DestructiveListener(); - ((DestructiveListener)markupListener).Reset(notifier, watch, scriptHost, scriptOffset, refreshOffset); - } - this._listenerList[index] = markupListener; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs b/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs deleted file mode 100644 index 1806485..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupLoadResult : LoadResult - { - private LoadResult[] _dependenciesTable = EmptyList; - private ByteCodeReader _reader; - protected MarkupBinaryDataTable _binaryDataTable; - protected MarkupLineNumberTable _lineNumberTable; - private TypeSchema[] _exportTable = TypeSchema.EmptyList; - private AliasMapping[] _aliasTable; - private Map _resolvedAliases; - private MarkupDataMapping[] _dataMappingsTable; - private LoadResultStatus _status; - - public static LoadResult Create(string uri, Resource resource) => !CompiledMarkupLoader.IsUIB(resource) ? new SourceMarkupLoadResult(resource, uri) : (LoadResult)new CompiledMarkupLoadResult(resource, uri); - - public MarkupLoadResult(string uri) - : base(uri) - => this._status = LoadResultStatus.Loading; - - private void OnLoaded() - { - if (this._dataMappingsTable == null) - return; - foreach (MarkupDataMapping mapping in this._dataMappingsTable) - MarkupDataProvider.AddDataMapping(mapping); - } - - protected override void OnDispose() - { - base.OnDispose(); - if (this._dataMappingsTable != null) - { - foreach (MarkupDataMapping mapping in this._dataMappingsTable) - MarkupDataProvider.RemoveDataMapping(mapping); - } - if (this._reader != null) - this._reader.Dispose(this); - foreach (DisposableObject disposableObject in this._exportTable) - disposableObject.Dispose(this); - this._exportTable = null; - } - - public override TypeSchema FindType(string name) - { - TypeSchema typeSchema = this.FindTypeWorker(name); - if (typeSchema == null) - { - typeSchema = this.ResolveAlias(name); - if (typeSchema != null) - this._resolvedAliases[name] = typeSchema; - } - return typeSchema; - } - - private TypeSchema FindTypeWorker(string name) - { - for (int index = 0; index < this._exportTable.Length; ++index) - { - TypeSchema typeSchema = this._exportTable[index]; - if (name == typeSchema.Name) - return typeSchema; - } - TypeSchema typeSchema1; - return this._resolvedAliases != null && this._resolvedAliases.TryGetValue(name, out typeSchema1) ? typeSchema1 : null; - } - - private TypeSchema ResolveAlias(string name) - { - int num = 100; - var markupLoadResult = this; - while (num-- > 0) - { - AliasMapping aliasMapping1 = null; - if (markupLoadResult._aliasTable != null) - { - foreach (AliasMapping aliasMapping2 in markupLoadResult._aliasTable) - { - if (aliasMapping2.Alias == name) - { - aliasMapping1 = aliasMapping2; - break; - } - } - } - if (aliasMapping1 != null) - { - if (!(aliasMapping1.LoadResult is MarkupLoadResult)) - return aliasMapping1.LoadResult.FindType(aliasMapping1.TargetType); - markupLoadResult = (MarkupLoadResult)aliasMapping1.LoadResult; - TypeSchema typeWorker = markupLoadResult.FindTypeWorker(aliasMapping1.TargetType); - if (typeWorker != null) - return typeWorker; - name = aliasMapping1.TargetType; - } - else - break; - } - if (num <= 0) - ErrorManager.ReportError("Alias cycle detected: {0} {1}", this.ToString(), name); - return null; - } - - public abstract bool IsSource { get; } - - public override LoadResult[] Dependencies => this._dependenciesTable; - - public abstract MarkupImportTables ImportTables { get; } - - public ByteCodeReader ObjectSection => this._reader; - - public override TypeSchema[] ExportTable => this._exportTable; - - public AliasMapping[] AliasTable => this._aliasTable; - - public MarkupDataMapping[] DataMappingsTable => this._dataMappingsTable; - - public MarkupBinaryDataTable BinaryDataTable => this._binaryDataTable; - - public abstract MarkupConstantsTable ConstantsTable { get; } - - public virtual MarkupLineNumberTable LineNumberTable => this._lineNumberTable; - - public void SetDependenciesTable(LoadResult[] dependenciesTable, bool registerDependencies) - { - this._dependenciesTable = dependenciesTable; - if (!registerDependencies) - return; - this.RegisterDependenciesUsage(); - } - - public void SetDependenciesTable(LoadResult[] dependenciesTable) => this.SetDependenciesTable(dependenciesTable, true); - - public void SetObjectSection(ByteCodeReader reader) - { - reader.DeclareOwner(this); - this._reader = reader; - } - - public void SetBinaryDataTable(MarkupBinaryDataTable binaryDataTable) => this._binaryDataTable = binaryDataTable; - - public void SetLineNumberTable(MarkupLineNumberTable lineNumberTable) => this._lineNumberTable = lineNumberTable; - - public void SetExportTable(TypeSchema[] exportTable) => this._exportTable = exportTable; - - public void SetAliasTable(AliasMapping[] aliasTable) - { - this._aliasTable = aliasTable; - if (this._aliasTable == null) - return; - this._resolvedAliases = new Map(this._aliasTable.Length); - } - - public void SetDataMappingsTable(MarkupDataMapping[] dataMappingsTable) => this._dataMappingsTable = dataMappingsTable; - - public override LoadResultStatus Status => this._status; - - public void SetStatus(LoadResultStatus status) - { - if (this._status == status) - return; - this._status = status; - if (this._status != LoadResultStatus.Success) - return; - this.OnLoaded(); - } - - public virtual void MarkLoadFailed() => this._status = LoadResultStatus.Error; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs b/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs deleted file mode 100644 index 692e533..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupMethodSchema : MethodSchema - { - private string _name; - private TypeSchema _returnType; - private TypeSchema[] _parameterTypes; - private string[] _parameterNames; - protected uint _codeOffset = uint.MaxValue; - private int _virtualId = -1; - private bool _isVirtualThunk; - public static readonly string[] s_emptyStringArray = new string[0]; - public static readonly MarkupMethodSchema[] EmptyMethodList = new MarkupMethodSchema[0]; - - public static MarkupMethodSchema Build( - TypeSchema markupTypeBase, - MarkupTypeSchema owner, - string name, - TypeSchema returnType, - TypeSchema[] parameterTypes, - string[] parameterNames, - bool isVirtualThunk) - { - MarkupMethodSchema markupMethodSchema = null; - if (markupTypeBase == ClassSchema.Type || markupTypeBase == EffectSchema.Type) - markupMethodSchema = new ClassMethodSchema((ClassTypeSchema)owner, name, returnType, parameterTypes, parameterNames); - else if (markupTypeBase == UISchema.Type) - markupMethodSchema = new UIClassMethodSchema((UIClassTypeSchema)owner, name, returnType, parameterTypes, parameterNames); - markupMethodSchema._isVirtualThunk = isVirtualThunk; - return markupMethodSchema; - } - - public static MarkupMethodSchema Build( - TypeSchema markupTypeBase, - MarkupTypeSchema owner, - string name, - TypeSchema returnType, - TypeSchema[] parameterTypes, - string[] parameterNames) - { - return Build(markupTypeBase, owner, name, returnType, parameterTypes, parameterNames, false); - } - - public static MarkupMethodSchema BuildVirtualThunk( - TypeSchema markupTypeBase, - MarkupMethodSchema virtualMethod) - { - return Build(markupTypeBase, (MarkupTypeSchema)virtualMethod.Owner, virtualMethod.Name, virtualMethod.ReturnType, virtualMethod.ParameterTypes, virtualMethod.ParameterNames, true); - } - - protected MarkupMethodSchema( - MarkupTypeSchema owner, - string name, - TypeSchema returnType, - TypeSchema[] parameterTypes, - string[] parameterNames) - : base(owner) - { - this._name = name; - this._returnType = returnType; - this._parameterTypes = parameterTypes; - this._parameterNames = parameterNames; - for (int index = 0; index < this._parameterNames.Length; ++index) - this._parameterNames[index] = NotifyService.CanonicalizeString(this._parameterNames[index]); - } - - public override string Name => this._name; - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public string[] ParameterNames => this._parameterNames; - - public override TypeSchema ReturnType => this._returnType; - - public override bool IsStatic => false; - - public bool IsVirtual => this._virtualId >= 0; - - public int VirtualId => this._virtualId; - - public bool IsVirtualThunk => this._isVirtualThunk; - - public uint CodeOffset => this._codeOffset; - - public void SetCodeOffset(uint codeOffset) => this._codeOffset = codeOffset; - - public void SetVirtualId(int virtualId) => this._virtualId = virtualId; - - public override object Invoke(object instance, object[] parameters) - { - IMarkupTypeBase markupTypeBase = this.GetMarkupTypeBase(instance); - if (markupTypeBase == null) - return null; - return this._isVirtualThunk ? this.CallVirt(markupTypeBase, parameters) : this.CallDirect(markupTypeBase, parameters); - } - - private object CallVirt(IMarkupTypeBase markupInstance, object[] parameters) - { - MarkupTypeSchema typeSchema = (MarkupTypeSchema)markupInstance.TypeSchema; - MarkupMethodSchema markupMethodSchema = null; - while (true) - { - foreach (MarkupMethodSchema virtualMethod in typeSchema.VirtualMethods) - { - if (virtualMethod.VirtualId == this._virtualId) - { - markupMethodSchema = virtualMethod; - break; - } - } - if (markupMethodSchema == null) - typeSchema = (MarkupTypeSchema)typeSchema.Base; - else - break; - } - return markupMethodSchema.CallDirect(markupInstance, parameters); - } - - private object CallDirect(IMarkupTypeBase markupInstance, object[] parameters) => markupInstance.RunScript(this._codeOffset, false, new ParameterContext(this._parameterNames, parameters)); - - protected abstract IMarkupTypeBase GetMarkupTypeBase(object instance); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupPropertySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupPropertySchema.cs deleted file mode 100644 index 5053e00..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupPropertySchema.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupPropertySchema : PropertySchema - { - private string _name; - protected TypeSchema _propertyType; - private PropertyOverrideCriteria _overrideCriteria; - private bool _requiredForCreation; - - public static MarkupPropertySchema Build( - TypeSchema markupTypeBase, - MarkupTypeSchema owner, - string name, - TypeSchema propertyType) - { - if (markupTypeBase == ClassSchema.Type || markupTypeBase == EffectSchema.Type) - return new ClassPropertySchema(owner, name, propertyType); - if (markupTypeBase == UISchema.Type) - return new UIClassPropertySchema((UIClassTypeSchema)owner, name, propertyType); - if (markupTypeBase == DataTypeSchema.Type) - return new MarkupDataTypePropertySchema(owner, name, propertyType); - return markupTypeBase == DataQuerySchema.Type ? new MarkupDataQueryPropertySchema(owner, name, propertyType) : null; - } - - protected MarkupPropertySchema(MarkupTypeSchema owner, string name, TypeSchema propertyType) - : base(owner) - { - this._name = NotifyService.CanonicalizeString(name); - this._propertyType = propertyType; - } - - public void SetOverrideCriteria(PropertyOverrideCriteria overrideCriteria) => this._overrideCriteria = overrideCriteria; - - public void SetRequiredForCreation(bool requiredForCreation) => this._requiredForCreation = requiredForCreation; - - public override string Name => this._name; - - public override TypeSchema PropertyType => this._propertyType; - - public override TypeSchema AlternateType => (TypeSchema)null; - - public PropertyOverrideCriteria OverrideCriteria => this._overrideCriteria; - - public override bool CanRead => true; - - public override bool CanWrite => true; - - public override bool IsStatic => false; - - public override ExpressionRestriction ExpressionRestriction => ExpressionRestriction.None; - - public override bool RequiredForCreation => this._requiredForCreation; - - public override RangeValidator RangeValidator => (RangeValidator)null; - - public override bool NotifiesOnChange => true; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupServices.cs b/UIX/Microsoft/Iris/Markup/MarkupServices.cs deleted file mode 100644 index 2820bf8..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupServices.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupServices -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using System.Collections; - -namespace Microsoft.Iris.Markup -{ - public sealed class MarkupServices : INotifyObject - { - private static MarkupServices s_instance; - private NotifyList _errors = new NotifyList(); - private bool _warningsOnly = true; - private NotifyService _notifier = new NotifyService(); - - private MarkupServices() => ErrorManager.OnErrors += new NotifyErrorBatch(this.OnErrorBatch); - - public static MarkupServices Instance - { - get - { - if (s_instance == null) - s_instance = new MarkupServices(); - return s_instance; - } - } - - private void OnErrorBatch(IList errors) - { - foreach (ErrorRecord error in errors) - { - if (!error.Warning) - this._warningsOnly = false; - this._errors.Add(new MarkupError(error)); - } - this.FireNotification(NotificationID.ErrorsDetected); - } - - public IList Errors => _errors; - - public bool WarningsOnly => this._warningsOnly; - - public void ClearErrors() - { - this._errors.Clear(); - this._warningsOnly = true; - } - - void INotifyObject.AddListener(Listener listener) => this._notifier.AddListener(listener); - - private void FireNotification(string id) => this._notifier.Fire(id); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupSystem.cs b/UIX/Microsoft/Iris/Markup/MarkupSystem.cs deleted file mode 100644 index c2d751c..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupSystem.cs +++ /dev/null @@ -1,261 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupSystem -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.CodeModel.Cpp; -using Microsoft.Iris.Data; -using Microsoft.Iris.Debug; -using Microsoft.Iris.Markup.Validation; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; - -namespace Microsoft.Iris.Markup -{ - public static class MarkupSystem - { - public const string RootTag = "UIX"; - public const string SchemaVersion = "http://schemas.microsoft.com/2007/uix"; - public const string DataSchemaRootTag = "DataSchema"; - public const string DataSchemaVersion = "http://schemas.microsoft.com/2007/uixdata"; - public static UIXLoadResult UIXGlobal; - public static RootLoadResult RootGlobal; - public static bool CompileMode; - public static bool TrackAdditionalMetadata; - public static bool MarkupSystemActive; - private static Vector s_factoriesByProtocol; - private static Vector s_factoriesByExtension; - private static Vector s_importRedirectsFrom; - private static Vector s_importRedirectsTo; - private static uint s_rootIslandId; - private static uint s_activeIslands; - - public static void Startup(bool compileMode) - { - MarkupSystemActive = true; - CompileMode = compileMode; - s_factoriesByProtocol = new Vector(); - s_factoriesByExtension = new Vector(); - s_rootIslandId = AllocateIslandId(); - UIXGlobal = new UIXLoadResult("http://schemas.microsoft.com/2007/uix"); - UIXGlobal.RegisterUsage(typeof(MarkupSystem)); - UIXLoadResult.InitializeStatics(); - ValidateContext.InitializeStatics(); - ValidateUI.InitializeStatics(); - ValidateClass.InitializeStatics(); - ValidateStatementForEach.InitializeStatics(); - ValidateParameter.InitializeStatics(); - TypeRestriction.InitializeStatics(); - NativeMarkupDataQuery.InitializeStatics(); - NativeMarkupDataType.InitializeStatics(); - RootGlobal = new RootLoadResult("Root"); - RootGlobal.RegisterUsage(typeof(MarkupSystem)); - AssemblyLoadResult.Startup(); - DllLoadResult.Startup(); - ResourceManager.Instance.RegisterSource("res", DllResources.Instance); - HttpResources.Startup(); - ResourceManager.Instance.RegisterSource("file", FileResources.Instance); - } - - public static void Shutdown() - { - UnloadAll(); - AssemblyLoadResult.Shutdown(); - DllLoadResult.Shutdown(); - RootGlobal.UnregisterUsage(typeof(MarkupSystem)); - RootGlobal = null; - UIXGlobal.UnregisterUsage(typeof(MarkupSystem)); - UIXGlobal = null; - HttpResources.Shutdown(); - if (s_factoriesByProtocol != null) - s_factoriesByProtocol.Clear(); - if (s_factoriesByExtension != null) - s_factoriesByExtension.Clear(); - MarkupSystemActive = false; - } - - public static void EnableMetadataTracking() => TrackAdditionalMetadata = true; - - public static LoadResult Load(string uri, uint islandId) - { - ErrorManager.EnterContext(uri); - LoadResult loadResult = ResolveLoadResult(uri, islandId); - if (loadResult != null) - { - loadResult.Load(LoadPass.DeclareTypes); - loadResult.Load(LoadPass.PopulatePublicModel); - loadResult.Load(LoadPass.Full); - loadResult.Load(LoadPass.Done); - } - ErrorManager.ExitContext(); - return loadResult; - } - - public static LoadResult ResolveLoadResult(string uri, uint islandId) - { - ErrorManager.EnterContext(uri); - uri = ApplyImportRedirects(uri); - LoadResult loadResult = LoadResultCache.Read(uri); - if (loadResult == null) - { - bool flag = false; - bool cacheResult = true; - foreach (MarkupSystem.Factory factory in s_factoriesByProtocol) - { - if (uri.StartsWith(factory.key, StringComparison.Ordinal)) - { - loadResult = factory.handler(uri); - flag = true; - break; - } - } - if (!flag) - { - foreach (MarkupSystem.Factory factory in s_factoriesByExtension) - { - if (uri.EndsWith(factory.key, StringComparison.Ordinal)) - { - loadResult = factory.handler(uri); - flag = true; - break; - } - } - } - if (!flag) - loadResult = CreateMarkupLoadResult(uri, ref cacheResult); - if (loadResult == null) - loadResult = new ErrorLoadResult(uri); - if (cacheResult && loadResult.Cachable) - { - LoadResultCache.Write(uri, loadResult); - if (loadResult.UnderlyingUri != null) - LoadResultCache.Write(loadResult.UnderlyingUri, loadResult); - } - } - loadResult?.AddReference(islandId); - ErrorManager.ExitContext(); - return loadResult; - } - - private static LoadResult CreateMarkupLoadResult(string uri, ref bool cacheResult) - { - Resource resource = ResourceManager.AcquireResource(uri); - if (resource == null) - return null; - ErrorManager.EnterContext(resource.Uri); - LoadResult loadResult = LoadResultCache.Read(resource.Uri); - if (loadResult != null) - { - cacheResult = false; - LoadResultCache.Write(uri, loadResult); - } - else - { - loadResult = MarkupLoadResult.Create(uri, resource); - if (loadResult != null) - resource = null; - } - resource?.Free(); - ErrorManager.ExitContext(); - return loadResult; - } - - public static uint RootIslandId => s_rootIslandId; - - public static uint AllocateIslandId() - { - int num1 = ~(int)s_activeIslands; - uint num2 = (uint)(num1 & -num1); - s_activeIslands |= num2; - return num2; - } - - public static void FreeIslandId(uint islandId) => s_activeIslands &= ~islandId; - - public static void UnloadIsland(uint islandId) => LoadResultCache.Remove(islandId); - - public static void UnloadAll() => LoadResultCache.Clear(); - - public static bool RegisterFactoryByProtocol(string protocol, CreateLoadResultHandler handler) - { - if (protocol.EndsWith("://", StringComparison.Ordinal)) - protocol = protocol.Substring(0, protocol.Length - 3); - bool flag = !ResourceManager.Instance.IsRegisteredSource(protocol); - protocol += "://"; - if (flag) - { - foreach (MarkupSystem.Factory factory in s_factoriesByProtocol) - { - if (factory.key == protocol) - flag = false; - } - } - if (flag) - s_factoriesByProtocol.Add(new MarkupSystem.Factory() - { - key = protocol, - handler = handler - }); - return flag; - } - - public static bool RegisterFactoryByExtension(string extension, CreateLoadResultHandler handler) - { - bool flag = true; - if (!extension.StartsWith(".", StringComparison.Ordinal)) - extension = "." + extension; - foreach (MarkupSystem.Factory factory in s_factoriesByExtension) - { - if (factory.key == extension) - flag = false; - } - if (flag) - s_factoriesByExtension.Add(new MarkupSystem.Factory() - { - handler = handler, - key = extension - }); - return flag; - } - - public static void AddImportRedirect(string fromPrefix, string toPrefix) - { - if (s_importRedirectsFrom == null) - { - s_importRedirectsFrom = new Vector(); - s_importRedirectsTo = new Vector(); - } - s_importRedirectsFrom.Add(fromPrefix); - s_importRedirectsTo.Add(toPrefix); - } - - private static string ApplyImportRedirects(string uri) - { - if (s_importRedirectsFrom != null) - { - for (int index = 0; index < s_importRedirectsFrom.Count; ++index) - { - string str = s_importRedirectsFrom[index]; - if (uri.StartsWith(str, StringComparison.Ordinal)) - { - uri = uri.Substring(str.Length); - uri = s_importRedirectsTo[index] + uri; - break; - } - } - } - return uri; - } - - public static bool IsDebuggingEnabled(byte level) => !CompileMode && Trace.IsCategoryEnabled(TraceCategory.MarkupDebug, level); - - public class Factory - { - public CreateLoadResultHandler handler; - public string key; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupType.cs b/UIX/Microsoft/Iris/Markup/MarkupType.cs deleted file mode 100644 index 1d99187..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum MarkupType - { - None, - UI, - Class, - Effect, - DataType, - DataQuery, - } -} diff --git a/UIX/Microsoft/Iris/Markup/MarkupTypeSchema.cs b/UIX/Microsoft/Iris/Markup/MarkupTypeSchema.cs deleted file mode 100644 index 361be81..0000000 --- a/UIX/Microsoft/Iris/Markup/MarkupTypeSchema.cs +++ /dev/null @@ -1,389 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MarkupTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public abstract class MarkupTypeSchema : TypeSchema - { - private const int c_TypeDepthShift = 27; - private const uint c_ScriptOffsetMask = 134217727; - public const uint InvalidScriptId = 4294967295; - private MarkupLoadResult _owner; - private string _name; - private MarkupTypeSchema _baseType; - private uint _typeDepth; - private int _totalPropertiesAndLocalsCount; - private PropertySchema[] _properties = PropertySchema.EmptyList; - private MethodSchema[] _methods = MethodSchema.EmptyList; - private Map _methodLookupTable; - private MethodSchema[] _virtualMethods = MethodSchema.EmptyList; - private SymbolReference[] _symbolReferenceTable; - private IntPtr _addressOfInheritableSymbolsTable; - private SymbolRecord[] _inheritableSymbolsTable; - private uint _initializePropertiesOffset = uint.MaxValue; - private uint _initializeLocalsInputOffset = uint.MaxValue; - private uint _initializeContentOffset = uint.MaxValue; - private uint[] _refreshGroupOffsets; - private uint[] _initialEvaluateOffsets; - private uint[] _finalEvaluateOffsets; - private uint _listenerCount; - private bool _sealed; - private object _loadData; - private static object[] EmptyParameterList = new object[0]; - - public static MarkupTypeSchema Build( - TypeSchema markupTypeDefinition, - MarkupLoadResult owner, - string name) - { - if (markupTypeDefinition == ClassSchema.Type) - return new ClassTypeSchema(owner, name); - if (markupTypeDefinition == UISchema.Type) - return new UIClassTypeSchema(owner, name); - if (markupTypeDefinition == EffectSchema.Type) - return new EffectClassTypeSchema(owner, name); - if (markupTypeDefinition == DataTypeSchema.Type) - return new MarkupDataTypeSchema(owner, name); - return markupTypeDefinition == DataQuerySchema.Type ? new MarkupDataQuerySchema(owner, name) : null; - } - - public MarkupTypeSchema(MarkupLoadResult owner, string name) - : base(owner) - { - this._owner = owner; - this._name = name; - } - - public abstract MarkupType MarkupType { get; } - - public void SetBaseType(MarkupTypeSchema baseType) => this._baseType = baseType; - - public object LoadData - { - get => this._loadData; - set => this._loadData = value; - } - - public virtual void BuildProperties() - { - } - - public void Seal() - { - if (this._sealed) - return; - this.SealWorker(); - } - - protected virtual void SealWorker() - { - this._sealed = true; - this._loadData = null; - if (this._baseType == null) - { - this._typeDepth = 1U; - } - else - { - this._baseType.Seal(); - this._typeDepth = this._baseType._typeDepth + 1U; - } - } - - public bool Sealed => this._sealed; - - protected override void OnDispose() - { - base.OnDispose(); - foreach (DisposableObject property in this._properties) - property.Dispose(this); - foreach (DisposableObject method in this._methods) - method.Dispose(this); - foreach (DisposableObject virtualMethod in this._virtualMethods) - virtualMethod.Dispose(this); - } - - public override string Name => this._name; - - public override string AlternateName => (string)null; - - public override TypeSchema Base => this._baseType == null ? this.DefaultBase : _baseType; - - public override bool Contractual => false; - - public override bool IsNativeAssignableFrom(object check) => false; - - public override bool IsNativeAssignableFrom(TypeSchema checkSchema) => false; - - public MarkupTypeSchema MarkupTypeBase => this._baseType; - - protected abstract TypeSchema DefaultBase { get; } - - public override bool Disposable => true; - - public override bool HasDefaultConstructor => true; - - public object Run( - IMarkupTypeBase markupType, - uint scriptId, - bool ignoreErrors, - ParameterContext parameterContext) - { - ErrorManager.EnterContext(markupType.TypeSchema.Owner.ErrorContextUri, ignoreErrors); - MarkupTypeSchema markupTypeSchema = this; - uint num = scriptId >> 27; - while ((int)num != (int)markupTypeSchema._typeDepth) - markupTypeSchema = markupTypeSchema._baseType; - object obj = markupTypeSchema.RunAtOffset(markupType, scriptId & 134217727U, parameterContext); - ErrorManager.ExitContext(); - return obj; - } - - protected object RunAtOffset( - IMarkupTypeBase markupType, - uint scriptOffset, - ParameterContext parameterContext) - { - object obj = null; - if (markupType.ScriptEnabled) - { - InterpreterContext context = InterpreterContext.Acquire(markupType, this, scriptOffset, parameterContext); - obj = Interpreter.Run(context); - if (context != null) - InterpreterContext.Release(context); - } - if (obj == Interpreter.ScriptError && !ErrorManager.IgnoringErrors) - markupType.NotifyScriptErrors(); - return obj; - } - - protected object RunAtOffset(IMarkupTypeBase markupType, uint scriptOffset) => this.RunAtOffset(markupType, scriptOffset, new ParameterContext()); - - public override ConstructorSchema FindConstructor(TypeSchema[] parameters) => (ConstructorSchema)null; - - public override PropertySchema FindProperty(string name) - { - for (int index = 0; index < this._properties.Length; ++index) - { - PropertySchema property = this._properties[index]; - if (name == property.Name) - return property; - } - return null; - } - - public override PropertySchema[] Properties => this._properties; - - public override MethodSchema[] Methods => this._methods; - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) - { - MethodSchema methodSchema = null; - if (this._methodLookupTable != null) - this._methodLookupTable.TryGetValue(new MethodSignatureKey(name, parameters), out methodSchema); - return methodSchema; - } - - public MethodSchema[] VirtualMethods => this._virtualMethods; - - public override bool HasInitializer => true; - - protected void InitializeInstance(IMarkupTypeBase classBase) - { - if (!this.InitializePropertiesLocalsInputContent(classBase, true)) - return; - this.RefreshAllListeners(classBase); - if (!this.RunInitialEvaluates(classBase)) - return; - classBase.NotifyInitialized(); - } - - private bool InitializePropertiesLocalsInputContent( - IMarkupTypeBase classBase, - bool shouldInitializeContent) - { - ErrorManager.EnterContext(this); - try - { - if (!this.RunInitializeScript(classBase, this._initializePropertiesOffset)) - return false; - if (this._baseType != null) - { - bool shouldInitializeContent1 = shouldInitializeContent && this._initializeContentOffset == uint.MaxValue; - if (!this._baseType.InitializePropertiesLocalsInputContent(classBase, shouldInitializeContent1)) - return false; - } - if (!this.RunInitializeScript(classBase, this._initializeLocalsInputOffset)) - return false; - if (shouldInitializeContent) - { - if (!this.RunInitializeScript(classBase, this._initializeContentOffset)) - return false; - } - } - finally - { - ErrorManager.ExitContext(); - } - return true; - } - - private void RefreshAllListeners(IMarkupTypeBase scriptHost) - { - if (this._baseType != null) - this._baseType.RefreshAllListeners(scriptHost); - this.RunOffsets(scriptHost, this._refreshGroupOffsets, true); - } - - protected virtual bool RunInitialEvaluates(IMarkupTypeBase scriptHost) => (this._baseType == null || this._baseType.RunInitialEvaluates(scriptHost)) && this.RunOffsets(scriptHost, this._initialEvaluateOffsets); - - public bool RunFinalEvaluates(IMarkupTypeBase scriptHost) => (this._baseType == null || this._baseType.RunFinalEvaluates(scriptHost)) && this.RunOffsets(scriptHost, this._finalEvaluateOffsets); - - private bool RunOffsets(IMarkupTypeBase scriptHost, uint[] scriptOffsets) => this.RunOffsets(scriptHost, scriptOffsets, false); - - private bool RunOffsets(IMarkupTypeBase scriptHost, uint[] scriptOffsets, bool ignoreErrors) - { - bool flag = true; - if (scriptOffsets != null) - { - ErrorManager.EnterContext(this, ignoreErrors); - foreach (uint scriptOffset in scriptOffsets) - { - if (!this.RunInitializeScript(scriptHost, scriptOffset)) - { - flag = false; - break; - } - } - ErrorManager.ExitContext(); - } - return flag; - } - - protected bool RunInitializeScript(IMarkupTypeBase scriptHost, uint scriptOffset) - { - if (scriptOffset == uint.MaxValue || this.RunAtOffset(scriptHost, scriptOffset) != Interpreter.ScriptError || ErrorManager.IgnoringErrors) - return true; - ErrorManager.ReportWarning("Script runtime failure: Scripting errors have prevented '{0}' from properly initializing and will affect its operation", _name); - return false; - } - - public override EventSchema FindEvent(string name) => (EventSchema)null; - - public override object FindCanonicalInstance(string name) => (object)null; - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - instance = null; - return Result.Fail("Type conversion is not available for '{0}'", _name); - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => false; - - public override bool SupportsBinaryEncoding => false; - - public override void EncodeBinary(ByteCodeWriter writer, object instance) - { - } - - public override object DecodeBinary(ByteCodeReader reader) => (object)null; - - public override object PerformOperation(object left, object right, OperationType op) => (object)null; - - public override bool SupportsOperation(OperationType op) => false; - - public override bool IsNullAssignable => true; - - public override bool IsRuntimeImmutable => false; - - public override int FindTypeHint => -1; - - public SymbolReference[] SymbolReferenceTable => this._symbolReferenceTable; - - public SymbolRecord[] InheritableSymbolsTable - { - get - { - if (this._inheritableSymbolsTable == null) - { - if (this._addressOfInheritableSymbolsTable != IntPtr.Zero) - CompiledMarkupLoader.DecodeInheritableSymbolTable(this, null, this._addressOfInheritableSymbolsTable); - else - this._inheritableSymbolsTable = SymbolRecord.EmptyList; - } - return this._inheritableSymbolsTable; - } - } - - public uint TypeDepth => this._typeDepth; - - public int TotalPropertiesAndLocalsCount => this._totalPropertiesAndLocalsCount; - - public uint InitializePropertiesOffset => this._initializePropertiesOffset; - - public uint InitializeLocalsInputOffset => this._initializeLocalsInputOffset; - - public uint InitializeContentOffset => this._initializeContentOffset; - - public uint[] RefreshGroupOffsets => this._refreshGroupOffsets; - - public uint[] InitialEvaluateOffsets => this._initialEvaluateOffsets; - - public uint[] FinalEvaluateOffsets => this._finalEvaluateOffsets; - - public uint ListenerCount => this._listenerCount; - - public uint TotalListenerCount => this._listenerCount + (this._baseType == null ? 0U : this._baseType.TotalListenerCount); - - public uint EncodeScriptOffsetAsId(uint scriptOffset) => scriptOffset | this._typeDepth << 27; - - public string LocallyUniqueId => this._typeDepth.ToString(); - - public void SetTypeDepth(uint typeDepth) => this._typeDepth = typeDepth; - - public void SetPropertyList(PropertySchema[] properties) => this._properties = properties; - - public void SetMethodList(MethodSchema[] methods) - { - this._methods = methods; - this._methodLookupTable = new Map(methods.Length); - foreach (MethodSchema method in this._methods) - this._methodLookupTable[new MethodSignatureKey(method.Name, method.ParameterTypes)] = method; - } - - public void SetVirtualMethodList(MethodSchema[] virtualMethods) => this._virtualMethods = virtualMethods; - - public void SetSymbolReferenceTable(SymbolReference[] symbolTable) => this._symbolReferenceTable = symbolTable; - - public void SetInheritableSymbolsTable(SymbolRecord[] symbolTable) => this._inheritableSymbolsTable = symbolTable; - - public void SetAddressOfInheritableSymbolTable(IntPtr address) => this._addressOfInheritableSymbolsTable = address; - - public void SetRefreshListenerGroupOffsets(uint[] refreshGroupOffsets) => this._refreshGroupOffsets = refreshGroupOffsets; - - public void SetInitialEvaluateOffsets(uint[] initialEvaluateOffsets) => this._initialEvaluateOffsets = initialEvaluateOffsets; - - public void SetFinalEvaluateOffsets(uint[] finalEvaluateOffsets) => this._finalEvaluateOffsets = finalEvaluateOffsets; - - public void SetListenerCount(uint listenerCount) => this._listenerCount = listenerCount; - - public void SetTotalPropertiesAndLocalsCount(int totalPropertiesAndLocalsCount) => this._totalPropertiesAndLocalsCount = totalPropertiesAndLocalsCount; - - public void SetInitializePropertiesOffset(uint offset) => this._initializePropertiesOffset = offset; - - public void SetInitializeLocalsInputOffset(uint offset) => this._initializeLocalsInputOffset = offset; - - public void SetInitializeContentOffset(uint offset) => this._initializeContentOffset = offset; - } -} diff --git a/UIX/Microsoft/Iris/Markup/MethodSchema.cs b/UIX/Microsoft/Iris/Markup/MethodSchema.cs deleted file mode 100644 index b5e4eca..0000000 --- a/UIX/Microsoft/Iris/Markup/MethodSchema.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public abstract class MethodSchema : DisposableObject - { - private TypeSchema _owner; - public static MethodSchema[] EmptyList = new MethodSchema[0]; - - public MethodSchema(TypeSchema owner) - { - this._owner = owner; - this.DeclareOwner(owner); - } - - public TypeSchema Owner => this._owner; - - public abstract string Name { get; } - - public abstract TypeSchema[] ParameterTypes { get; } - - public abstract TypeSchema ReturnType { get; } - - public abstract bool IsStatic { get; } - - public abstract object Invoke(object instance, object[] parameters); - } -} diff --git a/UIX/Microsoft/Iris/Markup/MethodSignatureKey.cs b/UIX/Microsoft/Iris/Markup/MethodSignatureKey.cs deleted file mode 100644 index 9eda881..0000000 --- a/UIX/Microsoft/Iris/Markup/MethodSignatureKey.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.MethodSignatureKey -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public struct MethodSignatureKey - { - private string _name; - private TypeSchema[] _parameters; - - public MethodSignatureKey(TypeSchema[] parameters) - : this(null, parameters) - { - } - - public MethodSignatureKey(string name, TypeSchema[] parameters) - { - this._name = name; - this._parameters = parameters; - } - - public override bool Equals(object obj) - { - MethodSignatureKey methodSignatureKey = (MethodSignatureKey)obj; - if (this._name != methodSignatureKey._name || this._parameters.Length != methodSignatureKey._parameters.Length) - return false; - for (int index = 0; index < this._parameters.Length; ++index) - { - if (!this._parameters[index].IsAssignableFrom(methodSignatureKey._parameters[index])) - return false; - } - return true; - } - - public override int GetHashCode() - { - int num = 0; - if (this._name != null) - num ^= this._name.GetHashCode(); - return num ^ this._parameters.Length; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/NamedContentRecord.cs b/UIX/Microsoft/Iris/Markup/NamedContentRecord.cs deleted file mode 100644 index c2c6f1b..0000000 --- a/UIX/Microsoft/Iris/Markup/NamedContentRecord.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NamedContentRecord -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class NamedContentRecord - { - public string Name; - public uint Offset = uint.MaxValue; - - public NamedContentRecord(string name) => this.Name = name; - - public void SetOffset(uint offset) => this.Offset = offset; - } -} diff --git a/UIX/Microsoft/Iris/Markup/NativeCodeModelMessage.cs b/UIX/Microsoft/Iris/Markup/NativeCodeModelMessage.cs deleted file mode 100644 index b66ee17..0000000 --- a/UIX/Microsoft/Iris/Markup/NativeCodeModelMessage.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NativeCodeModelMessage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class NativeCodeModelMessage - { - public const string NativeChangeNotificationIDInvalid = "ChangeNotification received for ID '0x{0:X8}' which isn't a property or event on '{1}'"; - public const string NativeTypeIDInvalid = "Unable to find type with ID '0x{0:X8}' in '{1}'"; - public const string SchemaAPIFailed = "Schema API failure: A method on '{0}' failed with code '0x{1:X8}'"; - public const string SchemaParameterlessConstructor = "IUIXConstructors must have parameters"; - public const string SchemaCreationFailed = "Unable to create IUIXSchema from '{0}'"; - public const string SchemaDuplicateID = "Duplicate ID '0x{0:X8}' found in schema from '{1}'"; - public const string SchemaFactoryCreationFailed = "Unable to create IUIXSchemaFactory from '{0}'"; - public const string SchemaIDMismatch = "Schema component on ID '0x{0:X8}' doesn't match schema's ID '0x{1:X8}' on '{2}'"; - public const string SchemaInvalidHandleValue = "IUIXObject::GetStateCache retrieved unexpected value"; - public const string SchemaInvalidChangeNotificationID = "Invalid UIXID '0x{0:X8}' passed to NotifyChange"; - public const string SchemaInvalidMarshalAs = "Invalid MarshalAs '{0}' returned from IUIXType::MarshalAs"; - public const string SchemaInterfaceNotImplemented = "Object didn't implement expected interface '{0}'"; - public const string SchemaMultipleMarshalAs = "Invalid MarshalAs '{0}' on type '{1}'. Only a single MarshalAs value is permitted through a type heirarchy, and '{2}' was already declared."; - public const string SchemaNativeObjectNull = "NULL object returned from {0}"; - public const string MethodInvokeFailed = "Error 0x{0:X8} occurred invoking method {1}.{2} from {3}."; - public const string PropertyGetFailed = "Error 0x{0:X8} occurred reading property {1}.{2} from {3}."; - public const string PropertySetFailed = "Error 0x{0:X8} occurred writing property {1}.{2} from {3}."; - public const string ToStringFailed = "Error 0x{0:X8} occurred invoking ToString on type {1} from {2}."; - public const string ConstructFailed = "Error 0x{0:X8} occurred constructing object of type {1} from {2}."; - } -} diff --git a/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs b/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs deleted file mode 100644 index 91d8362..0000000 --- a/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NativeMarkupDataQuery -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.CodeModel.Cpp; -using Microsoft.Iris.OS; -using System; - -namespace Microsoft.Iris.Markup -{ - public class NativeMarkupDataQuery : MarkupDataQuery - { - private IntPtr _externalQuery; - private ulong _handleToMe; - private ulong _typeHandle; - private ulong _resultTypeHandle; - private static MarkupDataQueryHandleTable s_handleTable; - - public static void InitializeStatics() => s_handleTable = new MarkupDataQueryHandleTable(); - - public NativeMarkupDataQuery(MarkupDataQuerySchema type, NativeDataProviderWrapper provider) - : base(type) - { - this._handleToMe = s_handleTable.RegisterProxy(this); - this._typeHandle = type.UniqueId; - this._resultTypeHandle = type.ResultType.UniqueId; - this._externalQuery = provider.ConstructQuery(type.ProviderName, this._typeHandle, this._resultTypeHandle, this._handleToMe); - this.ApplyDefaultValues(); - } - - public override void NotifyInitialized() - { - base.NotifyInitialized(); - int num = (int)NativeApi.SpDataQueryNotifyInitialized(this._externalQuery); - } - - protected override void OnDispose() - { - base.OnDispose(); - s_handleTable.ReleaseProxy(this._handleToMe); - int num = (int)NativeApi.SpDataBaseObjectSetInternalHandle(this._externalQuery, 0UL); - NativeApi.SpReleaseExternalObject(this._externalQuery); - } - - public override void Refresh() - { - int num = (int)NativeApi.SpDataQueryRefresh(this._externalQuery); - } - - public override unsafe object Result - { - get - { - UIXVariant propertyValue; - int resultProperty = (int)NativeApi.SpDataQueryGetResultProperty(this._externalQuery, out propertyValue); - return UIXVariant.GetValue(propertyValue, this.TypeSchema.Owner); - } - set - { - UIXVariant* uixVariantPtr = stackalloc UIXVariant[sizeof(UIXVariant)]; - UIXVariant.MarshalObject(value, uixVariantPtr); - int num = (int)NativeApi.SpDataQuerySetResultProperty(this._externalQuery, uixVariantPtr); - } - } - - public override DataProviderQueryStatus Status - { - get - { - DataProviderQueryStatus propertyValue; - int statusProperty = (int)NativeApi.SpDataQueryGetStatusProperty(this._externalQuery, out propertyValue); - return propertyValue; - } - } - - public override bool Enabled - { - get - { - bool propertyValue; - int enabledProperty = (int)NativeApi.SpDataQueryGetEnabledProperty(this._externalQuery, out propertyValue); - return propertyValue; - } - set - { - int num = (int)NativeApi.SpDataQuerySetEnabledProperty(this._externalQuery, value); - } - } - - protected override bool ExternalObjectGetProperty(string propertyName, out object value) - { - UIXVariant propertyValue; - int property = (int)NativeApi.SpDataBaseObjectGetProperty(this._externalQuery, propertyName, out propertyValue); - this.TypeSchema.FindPropertyDeep(propertyName); - value = UIXVariant.GetValue(propertyValue, this.TypeSchema.Owner); - return true; - } - - protected override unsafe bool ExternalObjectSetProperty(string propertyName, object value) - { - // ISSUE: untyped stack allocation - UIXVariant* uixVariantPtr = stackalloc UIXVariant[sizeof(UIXVariant)]; - UIXVariant.MarshalObject(value, uixVariantPtr); - int num = (int)NativeApi.SpDataBaseObjectSetProperty(this._externalQuery, propertyName, uixVariantPtr); - return true; - } - - protected override IDataProviderBaseObject ExternalAssemblyObject => (IDataProviderBaseObject)null; - - public override IntPtr ExternalNativeObject => this._externalQuery; - - public ulong Handle => this._handleToMe; - - public static MarkupDataQuery LookupByHandle(ulong handle) - { - MarkupDataQuery markupDataQuery; - s_handleTable.LookupByHandle(handle, out markupDataQuery); - return markupDataQuery; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs b/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs deleted file mode 100644 index 59b7ae4..0000000 --- a/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs +++ /dev/null @@ -1,164 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NativeMarkupDataType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.CodeModel.Cpp; -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup -{ - public class NativeMarkupDataType : MarkupDataType - { - private IntPtr _externalObject; - private ulong _handleToMe; - private ulong _typeHandle; - private static object s_finalizeLock; - private static bool s_pendingAppThreadRelease; - private static Vector s_pendingReleases; - private static SimpleCallback s_releaseOnAppThread; - private static MarkupDataTypeHandleTable s_handleTable; - - public static void InitializeStatics() - { - s_handleTable = new MarkupDataTypeHandleTable(); - s_finalizeLock = new object(); - s_pendingAppThreadRelease = false; - s_releaseOnAppThread = new SimpleCallback(ReleaseFinalizedObjects); - } - - private NativeMarkupDataType(MarkupDataTypeSchema type, IntPtr externalObject) - : base(type) - { - this._externalObject = externalObject; - this._handleToMe = s_handleTable.RegisterProxy(this); - this._typeHandle = type.UniqueId; - NativeApi.SpAddRefExternalObject(this._externalObject); - int num = (int)NativeApi.SpDataBaseObjectSetInternalHandle(this._externalObject, this._handleToMe); - this.TypeSchema.Owner.RegisterProxyUsage(); - } - - protected override void OnDispose() - { - ReleaseNativeObject(this._externalObject, this._handleToMe, this._typeHandle); - GC.SuppressFinalize(this); - base.OnDispose(); - } - - ~NativeMarkupDataType() - { - lock (s_finalizeLock) - { - if (s_pendingReleases == null) - s_pendingReleases = new Vector(); - s_pendingReleases.Add(new NativeMarkupDataType.AppThreadReleaseEntry(this._externalObject, this._handleToMe, this._typeHandle)); - if (s_pendingAppThreadRelease) - return; - s_pendingAppThreadRelease = true; - DeferredCall.Post(DispatchPriority.Idle, s_releaseOnAppThread); - } - } - - protected override bool ExternalObjectGetProperty(string propertyName, out object value) - { - UIXVariant propertyValue; - int property = (int)NativeApi.SpDataBaseObjectGetProperty(this._externalObject, propertyName, out propertyValue); - this.TypeSchema.FindPropertyDeep(propertyName); - value = UIXVariant.GetValue(propertyValue, this.TypeSchema.Owner); - return true; - } - - protected override unsafe bool ExternalObjectSetProperty(string propertyName, object value) - { - // ISSUE: untyped stack allocation - UIXVariant* uixVariantPtr = stackalloc UIXVariant[sizeof(UIXVariant)]; - UIXVariant.MarshalObject(value, uixVariantPtr); - int num = (int)NativeApi.SpDataBaseObjectSetProperty(this._externalObject, propertyName, uixVariantPtr); - return true; - } - - protected override IDataProviderBaseObject ExternalAssemblyObject => (IDataProviderBaseObject)null; - - public override IntPtr ExternalNativeObject => this._externalObject; - - public static NativeMarkupDataType LookupByHandle(ulong handle) - { - MarkupDataType markupDataType; - s_handleTable.LookupByHandle(handle, out markupDataType); - return (NativeMarkupDataType)markupDataType; - } - - public static NativeMarkupDataType Create( - ulong typeHandle, - IntPtr nativeObject) - { - return new NativeMarkupDataType((MarkupDataTypeSchema)TypeSchema.LookupById(typeHandle), nativeObject); - } - - public static void ReleaseOutstandingProxies() - { - s_pendingAppThreadRelease = true; - GC.Collect(); - GC.WaitForPendingFinalizers(); - foreach (IDisposableObject disposableObject in s_handleTable) - disposableObject.Dispose(disposableObject); - ReleaseFinalizedObjects(); - } - - private static void ReleaseFinalizedObjects() - { - Vector pendingReleases; - lock (s_finalizeLock) - { - pendingReleases = s_pendingReleases; - s_pendingReleases = null; - s_pendingAppThreadRelease = false; - } - if (pendingReleases == null || pendingReleases.Count == 0) - return; - foreach (NativeMarkupDataType.AppThreadReleaseEntry threadReleaseEntry in pendingReleases) - ReleaseNativeObject(threadReleaseEntry._nativeObject, threadReleaseEntry._handle, threadReleaseEntry._typeHandle); - lock (s_finalizeLock) - { - if (s_pendingAppThreadRelease) - return; - pendingReleases.Clear(); - s_pendingReleases = pendingReleases; - } - } - - private static void ReleaseNativeObject( - IntPtr nativeObject, - ulong proxyHandle, - ulong typeHandle) - { - s_handleTable.ReleaseProxy(proxyHandle); - ulong frameworkQuery; - int internalHandle = (int)NativeApi.SpDataBaseObjectGetInternalHandle(nativeObject, out frameworkQuery); - if ((long)proxyHandle == (long)frameworkQuery) - { - int num = (int)NativeApi.SpDataBaseObjectSetInternalHandle(nativeObject, 0UL); - } - NativeApi.SpReleaseExternalObject(nativeObject); - TypeSchema.LookupById(typeHandle).Owner.UnregisterProxyUsage(); - } - - public struct AppThreadReleaseEntry - { - public IntPtr _nativeObject; - public ulong _handle; - public ulong _typeHandle; - - public AppThreadReleaseEntry(IntPtr nativeObject, ulong handle, ulong typeHandle) - { - this._nativeObject = nativeObject; - this._handle = handle; - this._typeHandle = typeHandle; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/NotificationID.cs b/UIX/Microsoft/Iris/Markup/NotificationID.cs deleted file mode 100644 index f8cc237..0000000 --- a/UIX/Microsoft/Iris/Markup/NotificationID.cs +++ /dev/null @@ -1,314 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NotificationID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class NotificationID - { - public static readonly string AcceptsEnter = NotifyService.CanonicalizeString(nameof(AcceptsEnter)); - public static readonly string AcceptsTab = NotifyService.CanonicalizeString(nameof(AcceptsTab)); - public static readonly string AcquiringImage = NotifyService.CanonicalizeString(nameof(AcquiringImage)); - public static readonly string Active = NotifyService.CanonicalizeString(nameof(Active)); - public static readonly string ActiveModifiers = NotifyService.CanonicalizeString(nameof(ActiveModifiers)); - public static readonly string Alignment = NotifyService.CanonicalizeString(nameof(Alignment)); - public static readonly string AllowDoubleClicks = NotifyService.CanonicalizeString(nameof(AllowDoubleClicks)); - public static readonly string AllowedDropActions = NotifyService.CanonicalizeString(nameof(AllowedDropActions)); - public static readonly string Alpha = NotifyService.CanonicalizeString(nameof(Alpha)); - public static readonly string AlwaysOnTop = NotifyService.CanonicalizeString(nameof(AlwaysOnTop)); - public static readonly string Anchor = NotifyService.CanonicalizeString(nameof(Anchor)); - public static readonly string At = NotifyService.CanonicalizeString(nameof(At)); - public static readonly string AtAnimation = NotifyService.CanonicalizeString(nameof(AtAnimation)); - public static readonly string AutoRepeat = NotifyService.CanonicalizeString(nameof(AutoRepeat)); - public static readonly string Available = NotifyService.CanonicalizeString(nameof(Available)); - public static readonly string Background = NotifyService.CanonicalizeString(nameof(Background)); - public static readonly string BeginDragPolicy = NotifyService.CanonicalizeString(nameof(BeginDragPolicy)); - public static readonly string BeginPadding = NotifyService.CanonicalizeString(nameof(BeginPadding)); - public static readonly string BeginPaddingRelativeTo = NotifyService.CanonicalizeString(nameof(BeginPaddingRelativeTo)); - public static readonly string BeginPosition = NotifyService.CanonicalizeString(nameof(BeginPosition)); - public static readonly string BlinkTime = NotifyService.CanonicalizeString(nameof(BlinkTime)); - public static readonly string Bold = NotifyService.CanonicalizeString(nameof(Bold)); - public static readonly string BoundsType = NotifyService.CanonicalizeString(nameof(BoundsType)); - public static readonly string Camera = NotifyService.CanonicalizeString(nameof(Camera)); - public static readonly string CanScrollDown = NotifyService.CanonicalizeString(nameof(CanScrollDown)); - public static readonly string CanScrollUp = NotifyService.CanonicalizeString(nameof(CanScrollUp)); - public static readonly string CanSearch = NotifyService.CanonicalizeString(nameof(CanSearch)); - public static readonly string CancelCursor = NotifyService.CanonicalizeString(nameof(CancelCursor)); - public static readonly string CancelOnEscape = NotifyService.CanonicalizeString(nameof(CancelOnEscape)); - public static readonly string Canceled = NotifyService.CanonicalizeString(nameof(Canceled)); - public static readonly string Caption = NotifyService.CanonicalizeString(nameof(Caption)); - public static readonly string CaretInfo = NotifyService.CanonicalizeString(nameof(CaretInfo)); - public static readonly string CenterPointPercent = NotifyService.CanonicalizeString(nameof(CenterPointPercent)); - public static readonly string CharacterSpacing = NotifyService.CanonicalizeString(nameof(CharacterSpacing)); - public static readonly string ChildAlignment = NotifyService.CanonicalizeString(nameof(ChildAlignment)); - public static readonly string ChosenIndex = NotifyService.CanonicalizeString(nameof(ChosenIndex)); - public static readonly string ChosenValue = NotifyService.CanonicalizeString(nameof(ChosenValue)); - public static readonly string ClickCount = NotifyService.CanonicalizeString(nameof(ClickCount)); - public static readonly string ClickType = NotifyService.CanonicalizeString(nameof(ClickType)); - public static readonly string Clicking = NotifyService.CanonicalizeString(nameof(Clicking)); - public static readonly string ClientSize = NotifyService.CanonicalizeString(nameof(ClientSize)); - public static readonly string Clipped = NotifyService.CanonicalizeString(nameof(Clipped)); - public static readonly string Color = NotifyService.CanonicalizeString(nameof(Color)); - public static readonly string ColorMask = NotifyService.CanonicalizeString(nameof(ColorMask)); - public static readonly string ColorScheme = NotifyService.CanonicalizeString(nameof(ColorScheme)); - public static readonly string Command = NotifyService.CanonicalizeString(nameof(Command)); - public static readonly string Completed = NotifyService.CanonicalizeString(nameof(Completed)); - public static readonly string Content = NotifyService.CanonicalizeString(nameof(Content)); - public static readonly string ContentName = NotifyService.CanonicalizeString(nameof(ContentName)); - public static readonly string ContentPositioningBehavior = NotifyService.CanonicalizeString(nameof(ContentPositioningBehavior)); - public static readonly string ContentSelectors = NotifyService.CanonicalizeString(nameof(ContentSelectors)); - public static readonly string ContributesToWidth = NotifyService.CanonicalizeString(nameof(ContributesToWidth)); - public static readonly string Copied = NotifyService.CanonicalizeString(nameof(Copied)); - public static readonly string CopyCommand = NotifyService.CanonicalizeString(nameof(CopyCommand)); - public static readonly string CopyCursor = NotifyService.CanonicalizeString(nameof(CopyCursor)); - public static readonly string Count = NotifyService.CanonicalizeString(nameof(Count)); - public static readonly string CreateInterestOnFocus = NotifyService.CanonicalizeString(nameof(CreateInterestOnFocus)); - public static readonly string Current = NotifyService.CanonicalizeString(nameof(Current)); - public static readonly string CurrentDropAction = NotifyService.CanonicalizeString(nameof(CurrentDropAction)); - public static readonly string CurrentPage = NotifyService.CanonicalizeString(nameof(CurrentPage)); - public static readonly string Cursor = NotifyService.CanonicalizeString(nameof(Cursor)); - public static readonly string CutCommand = NotifyService.CanonicalizeString(nameof(CutCommand)); - public static readonly string Data = NotifyService.CanonicalizeString(nameof(Data)); - public static readonly string DebugOutline = NotifyService.CanonicalizeString(nameof(DebugOutline)); - public static readonly string DefaultAction = NotifyService.CanonicalizeString(nameof(DefaultAction)); - public static readonly string DefaultActionCommand = NotifyService.CanonicalizeString(nameof(DefaultActionCommand)); - public static readonly string DefaultFocusIndex = NotifyService.CanonicalizeString(nameof(DefaultFocusIndex)); - public static readonly string DefaultIndex = NotifyService.CanonicalizeString(nameof(DefaultIndex)); - public static readonly string DeleteCommand = NotifyService.CanonicalizeString(nameof(DeleteCommand)); - public static readonly string Description = NotifyService.CanonicalizeString(nameof(Description)); - public static readonly string DetectUrls = NotifyService.CanonicalizeString(nameof(DetectUrls)); - public static readonly string DirectKeyFocus = NotifyService.CanonicalizeString(nameof(DirectKeyFocus)); - public static readonly string DirectMouseFocus = NotifyService.CanonicalizeString(nameof(DirectMouseFocus)); - public static readonly string DisableIme = NotifyService.CanonicalizeString(nameof(DisableIme)); - public static readonly string DisallowedModifiers = NotifyService.CanonicalizeString(nameof(DisallowedModifiers)); - public static readonly string DiscardOffscreenVisuals = NotifyService.CanonicalizeString(nameof(DiscardOffscreenVisuals)); - public static readonly string DividerName = NotifyService.CanonicalizeString(nameof(DividerName)); - public static readonly string DownInvoked = NotifyService.CanonicalizeString(nameof(DownInvoked)); - public static readonly string DragCursor = NotifyService.CanonicalizeString(nameof(DragCursor)); - public static readonly string DragEnter = NotifyService.CanonicalizeString(nameof(DragEnter)); - public static readonly string DragLeave = NotifyService.CanonicalizeString(nameof(DragLeave)); - public static readonly string DragOver = NotifyService.CanonicalizeString(nameof(DragOver)); - public static readonly string Dragging = NotifyService.CanonicalizeString(nameof(Dragging)); - public static readonly string Dropped = NotifyService.CanonicalizeString(nameof(Dropped)); - public static readonly string EditableTextData = NotifyService.CanonicalizeString(nameof(EditableTextData)); - public static readonly string Effect = NotifyService.CanonicalizeString(nameof(Effect)); - public static readonly string EnableKerning = NotifyService.CanonicalizeString(nameof(EnableKerning)); - public static readonly string Enabled = NotifyService.CanonicalizeString(nameof(Enabled)); - public static readonly string EndIndex = NotifyService.CanonicalizeString(nameof(EndIndex)); - public static readonly string EndPadding = NotifyService.CanonicalizeString(nameof(EndPadding)); - public static readonly string EndPaddingRelativeTo = NotifyService.CanonicalizeString(nameof(EndPaddingRelativeTo)); - public static readonly string EndPosition = NotifyService.CanonicalizeString(nameof(EndPosition)); - public static readonly string Ended = NotifyService.CanonicalizeString(nameof(Ended)); - public static readonly string ErrorImage = NotifyService.CanonicalizeString(nameof(ErrorImage)); - public static readonly string ErrorsDetected = NotifyService.CanonicalizeString(nameof(ErrorsDetected)); - public static readonly string EventContext = NotifyService.CanonicalizeString(nameof(EventContext)); - public static readonly string Eye = NotifyService.CanonicalizeString(nameof(Eye)); - public static readonly string EyeAnimation = NotifyService.CanonicalizeString(nameof(EyeAnimation)); - public static readonly string FadeAmount = NotifyService.CanonicalizeString(nameof(FadeAmount)); - public static readonly string FadeSize = NotifyService.CanonicalizeString(nameof(FadeSize)); - public static readonly string FarOffset = NotifyService.CanonicalizeString(nameof(FarOffset)); - public static readonly string FarPercent = NotifyService.CanonicalizeString(nameof(FarPercent)); - public static readonly string Flippable = NotifyService.CanonicalizeString(nameof(Flippable)); - public static readonly string FlippedHorizontally = NotifyService.CanonicalizeString(nameof(FlippedHorizontally)); - public static readonly string FlippedVertically = NotifyService.CanonicalizeString(nameof(FlippedVertically)); - public static readonly string FocusInterestTarget = NotifyService.CanonicalizeString(nameof(FocusInterestTarget)); - public static readonly string FocusInterestTargetMargins = NotifyService.CanonicalizeString(nameof(FocusInterestTargetMargins)); - public static readonly string FocusOrder = NotifyService.CanonicalizeString(nameof(FocusOrder)); - public static readonly string FocusedItemDiscarded = NotifyService.CanonicalizeString(nameof(FocusedItemDiscarded)); - public static readonly string Font = NotifyService.CanonicalizeString(nameof(Font)); - public static readonly string FontFace = NotifyService.CanonicalizeString(nameof(FontFace)); - public static readonly string FontSize = NotifyService.CanonicalizeString(nameof(FontSize)); - public static readonly string Fragment = NotifyService.CanonicalizeString(nameof(Fragment)); - public static readonly string Fragments = NotifyService.CanonicalizeString(nameof(Fragments)); - public static readonly string FullyEnabled = NotifyService.CanonicalizeString(nameof(FullyEnabled)); - public static readonly string GainedEventContext = NotifyService.CanonicalizeString(nameof(GainedEventContext)); - public static readonly string GainedFocus = NotifyService.CanonicalizeString(nameof(GainedFocus)); - public static readonly string Handle = NotifyService.CanonicalizeString(nameof(Handle)); - public static readonly string HandleDirectionalKeys = NotifyService.CanonicalizeString(nameof(HandleDirectionalKeys)); - public static readonly string HandleHomeEndKeys = NotifyService.CanonicalizeString(nameof(HandleHomeEndKeys)); - public static readonly string HandleMouseWheel = NotifyService.CanonicalizeString(nameof(HandleMouseWheel)); - public static readonly string HandlePageCommands = NotifyService.CanonicalizeString(nameof(HandlePageCommands)); - public static readonly string HandlePageKeys = NotifyService.CanonicalizeString(nameof(HandlePageKeys)); - public static readonly string HandlerStage = NotifyService.CanonicalizeString(nameof(HandlerStage)); - public static readonly string HandlerTransition = NotifyService.CanonicalizeString(nameof(HandlerTransition)); - public static readonly string HasNextValue = NotifyService.CanonicalizeString(nameof(HasNextValue)); - public static readonly string HasPopup = NotifyService.CanonicalizeString(nameof(HasPopup)); - public static readonly string HasPreviousValue = NotifyService.CanonicalizeString(nameof(HasPreviousValue)); - public static readonly string HasSelection = NotifyService.CanonicalizeString(nameof(HasSelection)); - public static readonly string Help = NotifyService.CanonicalizeString(nameof(Help)); - public static readonly string HelpTopic = NotifyService.CanonicalizeString(nameof(HelpTopic)); - public static readonly string HideMouseOnIdle = NotifyService.CanonicalizeString(nameof(HideMouseOnIdle)); - public static readonly string HighlightColor = NotifyService.CanonicalizeString(nameof(HighlightColor)); - public static readonly string HorizontalAlignment = NotifyService.CanonicalizeString(nameof(HorizontalAlignment)); - public static readonly string HorizontalScrollModel = NotifyService.CanonicalizeString(nameof(HorizontalScrollModel)); - public static readonly string HostOutlineColor = NotifyService.CanonicalizeString(nameof(HostOutlineColor)); - public static readonly string IdealWidth = NotifyService.CanonicalizeString(nameof(IdealWidth)); - public static readonly string InImeCompositionMode = NotifyService.CanonicalizeString(nameof(InImeCompositionMode)); - public static readonly string InputEnabled = NotifyService.CanonicalizeString(nameof(InputEnabled)); - public static readonly string Interval = NotifyService.CanonicalizeString(nameof(Interval)); - public static readonly string Invoked = NotifyService.CanonicalizeString(nameof(Invoked)); - public static readonly string IsAnimated = NotifyService.CanonicalizeString(nameof(IsAnimated)); - public static readonly string IsBusy = NotifyService.CanonicalizeString(nameof(IsBusy)); - public static readonly string IsChecked = NotifyService.CanonicalizeString(nameof(IsChecked)); - public static readonly string IsCollapsed = NotifyService.CanonicalizeString(nameof(IsCollapsed)); - public static readonly string IsDefault = NotifyService.CanonicalizeString(nameof(IsDefault)); - public static readonly string IsExpanded = NotifyService.CanonicalizeString(nameof(IsExpanded)); - public static readonly string IsMarquee = NotifyService.CanonicalizeString(nameof(IsMarquee)); - public static readonly string IsMixed = NotifyService.CanonicalizeString(nameof(IsMixed)); - public static readonly string IsMultiSelectable = NotifyService.CanonicalizeString(nameof(IsMultiSelectable)); - public static readonly string IsPressed = NotifyService.CanonicalizeString(nameof(IsPressed)); - public static readonly string IsProtected = NotifyService.CanonicalizeString(nameof(IsProtected)); - public static readonly string IsRightToLeft = NotifyService.CanonicalizeString(nameof(IsRightToLeft)); - public static readonly string IsSelectable = NotifyService.CanonicalizeString(nameof(IsSelectable)); - public static readonly string IsSelected = NotifyService.CanonicalizeString(nameof(IsSelected)); - public static readonly string IsTraversed = NotifyService.CanonicalizeString(nameof(IsTraversed)); - public static readonly string IsUnavailable = NotifyService.CanonicalizeString(nameof(IsUnavailable)); - public static readonly string Italic = NotifyService.CanonicalizeString(nameof(Italic)); - public static readonly string Key = NotifyService.CanonicalizeString(nameof(Key)); - public static readonly string KeyFocus = NotifyService.CanonicalizeString(nameof(KeyFocus)); - public static readonly string KeyFocusImage = NotifyService.CanonicalizeString(nameof(KeyFocusImage)); - public static readonly string KeyFocusOnMouseDown = NotifyService.CanonicalizeString(nameof(KeyFocusOnMouseDown)); - public static readonly string KeyFocusOnMouseEnter = NotifyService.CanonicalizeString(nameof(KeyFocusOnMouseEnter)); - public static readonly string KeyInteractive = NotifyService.CanonicalizeString(nameof(KeyInteractive)); - public static readonly string KeyInteractiveImage = NotifyService.CanonicalizeString(nameof(KeyInteractiveImage)); - public static readonly string KeyboardShortcut = NotifyService.CanonicalizeString(nameof(KeyboardShortcut)); - public static readonly string LastLineBounds = NotifyService.CanonicalizeString(nameof(LastLineBounds)); - public static readonly string Layout = NotifyService.CanonicalizeString(nameof(Layout)); - public static readonly string LayoutInput = NotifyService.CanonicalizeString(nameof(LayoutInput)); - public static readonly string LetterboxColor = NotifyService.CanonicalizeString(nameof(LetterboxColor)); - public static readonly string LineAlignment = NotifyService.CanonicalizeString(nameof(LineAlignment)); - public static readonly string LineSpacing = NotifyService.CanonicalizeString(nameof(LineSpacing)); - public static readonly string LinkClicked = NotifyService.CanonicalizeString(nameof(LinkClicked)); - public static readonly string LinkClickedParameter = NotifyService.CanonicalizeString(nameof(LinkClickedParameter)); - public static readonly string LinkColor = NotifyService.CanonicalizeString(nameof(LinkColor)); - public static readonly string LocalDragSize = NotifyService.CanonicalizeString(nameof(LocalDragSize)); - public static readonly string Locked = NotifyService.CanonicalizeString(nameof(Locked)); - public static readonly string LockedAlignment = NotifyService.CanonicalizeString(nameof(LockedAlignment)); - public static readonly string LockedPosition = NotifyService.CanonicalizeString(nameof(LockedPosition)); - public static readonly string LostEventContext = NotifyService.CanonicalizeString(nameof(LostEventContext)); - public static readonly string LostFocus = NotifyService.CanonicalizeString(nameof(LostFocus)); - public static readonly string MaintainFocusedItemOnSourceChanges = NotifyService.CanonicalizeString(nameof(MaintainFocusedItemOnSourceChanges)); - public static readonly string Margins = NotifyService.CanonicalizeString(nameof(Margins)); - public static readonly string MaxLength = NotifyService.CanonicalizeString(nameof(MaxLength)); - public static readonly string MaxValue = NotifyService.CanonicalizeString(nameof(MaxValue)); - public static readonly string MaximizeMode = NotifyService.CanonicalizeString(nameof(MaximizeMode)); - public static readonly string MaximumLines = NotifyService.CanonicalizeString(nameof(MaximumLines)); - public static readonly string MaximumSize = NotifyService.CanonicalizeString(nameof(MaximumSize)); - public static readonly string MinValue = NotifyService.CanonicalizeString(nameof(MinValue)); - public static readonly string MinimumSize = NotifyService.CanonicalizeString(nameof(MinimumSize)); - public static readonly string MouseActive = NotifyService.CanonicalizeString(nameof(MouseActive)); - public static readonly string MouseFocus = NotifyService.CanonicalizeString(nameof(MouseFocus)); - public static readonly string MouseFocusImage = NotifyService.CanonicalizeString(nameof(MouseFocusImage)); - public static readonly string MouseIdleTimeout = NotifyService.CanonicalizeString(nameof(MouseIdleTimeout)); - public static readonly string MouseInteractive = NotifyService.CanonicalizeString(nameof(MouseInteractive)); - public static readonly string MouseInteractiveImage = NotifyService.CanonicalizeString(nameof(MouseInteractiveImage)); - public static readonly string MoveCursor = NotifyService.CanonicalizeString(nameof(MoveCursor)); - public static readonly string Moved = NotifyService.CanonicalizeString(nameof(Moved)); - public static readonly string Name = NotifyService.CanonicalizeString(nameof(Name)); - public static readonly string NamedStyles = NotifyService.CanonicalizeString(nameof(NamedStyles)); - public static readonly string Navigation = NotifyService.CanonicalizeString(nameof(Navigation)); - public static readonly string NearOffset = NotifyService.CanonicalizeString(nameof(NearOffset)); - public static readonly string NearPercent = NotifyService.CanonicalizeString(nameof(NearPercent)); - public static readonly string NewContentOnTop = NotifyService.CanonicalizeString(nameof(NewContentOnTop)); - public static readonly string ObjectValue = NotifyService.CanonicalizeString(nameof(ObjectValue)); - public static readonly string Options = NotifyService.CanonicalizeString(nameof(Options)); - public static readonly string Orientation = NotifyService.CanonicalizeString(nameof(Orientation)); - public static readonly string OutlineColor = NotifyService.CanonicalizeString(nameof(OutlineColor)); - public static readonly string OutlineLabel = NotifyService.CanonicalizeString(nameof(OutlineLabel)); - public static readonly string OutlineScope = NotifyService.CanonicalizeString(nameof(OutlineScope)); - public static readonly string Overtype = NotifyService.CanonicalizeString(nameof(Overtype)); - public static readonly string Padding = NotifyService.CanonicalizeString(nameof(Padding)); - public static readonly string PageSizedScrollStep = NotifyService.CanonicalizeString(nameof(PageSizedScrollStep)); - public static readonly string PageStep = NotifyService.CanonicalizeString(nameof(PageStep)); - public static readonly string PasswordMask = NotifyService.CanonicalizeString(nameof(PasswordMask)); - public static readonly string PasteCommand = NotifyService.CanonicalizeString(nameof(PasteCommand)); - public static readonly string Perspective = NotifyService.CanonicalizeString(nameof(Perspective)); - public static readonly string Playing = NotifyService.CanonicalizeString(nameof(Playing)); - public static readonly string Position = NotifyService.CanonicalizeString(nameof(Position)); - public static readonly string Prefetch = NotifyService.CanonicalizeString(nameof(Prefetch)); - public static readonly string PreloadContent = NotifyService.CanonicalizeString(nameof(PreloadContent)); - public static readonly string Pressing = NotifyService.CanonicalizeString(nameof(Pressing)); - public static readonly string PreventInterruption = NotifyService.CanonicalizeString(nameof(PreventInterruption)); - public static readonly string Priority = NotifyService.CanonicalizeString(nameof(Priority)); - public static readonly string Range = NotifyService.CanonicalizeString(nameof(Range)); - public static readonly string ReadOnly = NotifyService.CanonicalizeString(nameof(ReadOnly)); - public static readonly string Reason = NotifyService.CanonicalizeString(nameof(Reason)); - public static readonly string RelativeDragSize = NotifyService.CanonicalizeString(nameof(RelativeDragSize)); - public static readonly string RelativeTo = NotifyService.CanonicalizeString(nameof(RelativeTo)); - public static readonly string Repeat = NotifyService.CanonicalizeString(nameof(Repeat)); - public static readonly string RepeatDelay = NotifyService.CanonicalizeString(nameof(RepeatDelay)); - public static readonly string RepeatRate = NotifyService.CanonicalizeString(nameof(RepeatRate)); - public static readonly string RequiredModifiers = NotifyService.CanonicalizeString(nameof(RequiredModifiers)); - public static readonly string Result = NotifyService.CanonicalizeString(nameof(Result)); - public static readonly string Role = NotifyService.CanonicalizeString(nameof(Role)); - public static readonly string Root = NotifyService.CanonicalizeString(nameof(Root)); - public static readonly string Rotation = NotifyService.CanonicalizeString(nameof(Rotation)); - public static readonly string Scale = NotifyService.CanonicalizeString(nameof(Scale)); - public static readonly string ScreenDragSize = NotifyService.CanonicalizeString(nameof(ScreenDragSize)); - public static readonly string ScrollModel = NotifyService.CanonicalizeString(nameof(ScrollModel)); - public static readonly string ScrollStep = NotifyService.CanonicalizeString(nameof(ScrollStep)); - public static readonly string SelectAllCommand = NotifyService.CanonicalizeString(nameof(SelectAllCommand)); - public static readonly string SelectedIndex = NotifyService.CanonicalizeString(nameof(SelectedIndex)); - public static readonly string SelectedIndices = NotifyService.CanonicalizeString(nameof(SelectedIndices)); - public static readonly string SelectedItem = NotifyService.CanonicalizeString(nameof(SelectedItem)); - public static readonly string SelectedItems = NotifyService.CanonicalizeString(nameof(SelectedItems)); - public static readonly string SelectionRange = NotifyService.CanonicalizeString(nameof(SelectionRange)); - public static readonly string SharedSize = NotifyService.CanonicalizeString(nameof(SharedSize)); - public static readonly string SharedSizePolicy = NotifyService.CanonicalizeString(nameof(SharedSizePolicy)); - public static readonly string Shortcut = NotifyService.CanonicalizeString(nameof(Shortcut)); - public static readonly string ShowFar = NotifyService.CanonicalizeString(nameof(ShowFar)); - public static readonly string ShowInTaskbar = NotifyService.CanonicalizeString(nameof(ShowInTaskbar)); - public static readonly string ShowNear = NotifyService.CanonicalizeString(nameof(ShowNear)); - public static readonly string ShowWindowFrame = NotifyService.CanonicalizeString(nameof(ShowWindowFrame)); - public static readonly string SingleSelect = NotifyService.CanonicalizeString(nameof(SingleSelect)); - public static readonly string Size = NotifyService.CanonicalizeString(nameof(Size)); - public static readonly string SizingPolicy = NotifyService.CanonicalizeString(nameof(SizingPolicy)); - public static readonly string Source = NotifyService.CanonicalizeString(nameof(Source)); - public static readonly string SourceList = NotifyService.CanonicalizeString(nameof(SourceList)); - public static readonly string SourceType = NotifyService.CanonicalizeString(nameof(SourceType)); - public static readonly string SourceValue = NotifyService.CanonicalizeString(nameof(SourceValue)); - public static readonly string StartIndex = NotifyService.CanonicalizeString(nameof(StartIndex)); - public static readonly string Started = NotifyService.CanonicalizeString(nameof(Started)); - public static readonly string Status = NotifyService.CanonicalizeString(nameof(Status)); - public static readonly string Step = NotifyService.CanonicalizeString(nameof(Step)); - public static readonly string StopRoute = NotifyService.CanonicalizeString(nameof(StopRoute)); - public static readonly string StretchingPolicy = NotifyService.CanonicalizeString(nameof(StretchingPolicy)); - public static readonly string Style = NotifyService.CanonicalizeString(nameof(Style)); - public static readonly string SubmitOnEnter = NotifyService.CanonicalizeString(nameof(SubmitOnEnter)); - public static readonly string Submitted = NotifyService.CanonicalizeString(nameof(Submitted)); - public static readonly string SuggestedSize = NotifyService.CanonicalizeString(nameof(SuggestedSize)); - public static readonly string TextColor = NotifyService.CanonicalizeString(nameof(TextColor)); - public static readonly string TextDisplay = NotifyService.CanonicalizeString(nameof(TextDisplay)); - public static readonly string TextFont = NotifyService.CanonicalizeString(nameof(TextFont)); - public static readonly string TextHighlightColor = NotifyService.CanonicalizeString(nameof(TextHighlightColor)); - public static readonly string TextSharpness = NotifyService.CanonicalizeString(nameof(TextSharpness)); - public static readonly string Tick = NotifyService.CanonicalizeString(nameof(Tick)); - public static readonly string TotalPages = NotifyService.CanonicalizeString(nameof(TotalPages)); - public static readonly string TrackInvokedKeys = NotifyService.CanonicalizeString(nameof(TrackInvokedKeys)); - public static readonly string TreatEscapeAsBackspace = NotifyService.CanonicalizeString(nameof(TreatEscapeAsBackspace)); - public static readonly string Type = NotifyService.CanonicalizeString(nameof(Type)); - public static readonly string TypingInputRejected = NotifyService.CanonicalizeString(nameof(TypingInputRejected)); - public static readonly string Underline = NotifyService.CanonicalizeString(nameof(Underline)); - public static readonly string UndoCommand = NotifyService.CanonicalizeString(nameof(UndoCommand)); - public static readonly string Unloadable = NotifyService.CanonicalizeString(nameof(Unloadable)); - public static readonly string Up = NotifyService.CanonicalizeString(nameof(Up)); - public static readonly string UpAnimation = NotifyService.CanonicalizeString(nameof(UpAnimation)); - public static readonly string UpInvoked = NotifyService.CanonicalizeString(nameof(UpInvoked)); - public static readonly string UseFocusBehavior = NotifyService.CanonicalizeString(nameof(UseFocusBehavior)); - public static readonly string UsePasswordMask = NotifyService.CanonicalizeString(nameof(UsePasswordMask)); - public static readonly string Value = NotifyService.CanonicalizeString(nameof(Value)); - public static readonly string VerticalAlignment = NotifyService.CanonicalizeString(nameof(VerticalAlignment)); - public static readonly string VerticalScrollModel = NotifyService.CanonicalizeString(nameof(VerticalScrollModel)); - public static readonly string VideoStream = NotifyService.CanonicalizeString(nameof(VideoStream)); - public static readonly string ViewFar = NotifyService.CanonicalizeString(nameof(ViewFar)); - public static readonly string ViewNear = NotifyService.CanonicalizeString(nameof(ViewNear)); - public static readonly string Visible = NotifyService.CanonicalizeString(nameof(Visible)); - public static readonly string WindowState = NotifyService.CanonicalizeString(nameof(WindowState)); - public static readonly string WordWrap = NotifyService.CanonicalizeString(nameof(WordWrap)); - public static readonly string Wrap = NotifyService.CanonicalizeString(nameof(Wrap)); - public static readonly string Zn = NotifyService.CanonicalizeString(nameof(Zn)); - public static readonly string ZnAnimation = NotifyService.CanonicalizeString(nameof(ZnAnimation)); - } -} diff --git a/UIX/Microsoft/Iris/Markup/NotifyService.cs b/UIX/Microsoft/Iris/Markup/NotifyService.cs deleted file mode 100644 index 794a43c..0000000 --- a/UIX/Microsoft/Iris/Markup/NotifyService.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.NotifyService -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System.Diagnostics; - -namespace Microsoft.Iris.Markup -{ - public struct NotifyService - { - private ListenerRootNode _listenerRoot; - private static Map s_canonicalizedStrings = new Map(2048); - - public void Fire(string id) - { - if (this._listenerRoot == null || this._listenerRoot.Next == null) - return; - for (ListenerNodeBase next = this._listenerRoot.Next; next != this._listenerRoot; next = next.Next) - { - Listener listener = (Listener)next; - if (ReferenceEquals(listener.Watch, id)) - listener.OnNotify(); - } - } - - public void FireThreadSafe(string id) - { - id = CanonicalizeString(id); - if (UIDispatcher.IsUIThread) - this.Fire(id); - else - DeferredCall.Post(DispatchPriority.AppEvent, new DeferredHandler(this.FireThreadSafeMarshalHandler), id); - } - - public void FireThreadSafeMarshalHandler(object arg) => this.Fire((string)arg); - - public bool HasListeners => this._listenerRoot != null && this._listenerRoot.Next != null; - - public void AddListener(Listener listener) - { - if (this._listenerRoot == null) - this._listenerRoot = new ListenerRootNode(); - this._listenerRoot.AddPrevious(listener); - } - - public void ClearListeners() - { - if (this._listenerRoot == null) - return; - while (this._listenerRoot.Next != null) - this._listenerRoot.Next.Unlink(); - this._listenerRoot.Dispose(); - this._listenerRoot = null; - } - - public static string CanonicalizeString(string value) => GetCanonicalizedString(value, true); - - private static string GetCanonicalizedString(string value, bool addIfNotFound) - { - object obj = null; - if (!s_canonicalizedStrings.TryGetValue(value, out obj) && addIfNotFound) - { - s_canonicalizedStrings[value] = value; - obj = value; - } - return (string)obj; - } - - [Conditional("DEBUG")] - public static void AssertIsCanonicalized(string value) => GetCanonicalizedString(value, false); - } -} diff --git a/UIX/Microsoft/Iris/Markup/ObjectSourceType.cs b/UIX/Microsoft/Iris/Markup/ObjectSourceType.cs deleted file mode 100644 index e170178..0000000 --- a/UIX/Microsoft/Iris/Markup/ObjectSourceType.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ObjectSourceType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum ObjectSourceType - { - ObjectTag = 1, - FromString = 2, - Code = 3, - Expression = 4, - } -} diff --git a/UIX/Microsoft/Iris/Markup/OpCode.cs b/UIX/Microsoft/Iris/Markup/OpCode.cs deleted file mode 100644 index d8deb6f..0000000 --- a/UIX/Microsoft/Iris/Markup/OpCode.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.OpCode -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum OpCode : byte - { - ConstructObject = 1, - ConstructObjectIndirect = 2, - ConstructObjectParam = 3, - ConstructFromString = 4, - ConstructFromBinary = 5, - InitializeInstance = 6, - InitializeInstanceIndirect = 7, - LookupSymbol = 8, - WriteSymbol = 9, - WriteSymbolPeek = 10, // 0x0A - ClearSymbol = 11, // 0x0B - PropertyInitialize = 12, // 0x0C - PropertyInitializeIndirect = 13, // 0x0D - PropertyListAdd = 14, // 0x0E - PropertyDictionaryAdd = 15, // 0x0F - PropertyAssign = 16, // 0x10 - PropertyAssignStatic = 17, // 0x11 - PropertyGet = 18, // 0x12 - PropertyGetPeek = 19, // 0x13 - PropertyGetStatic = 20, // 0x14 - MethodInvoke = 21, // 0x15 - MethodInvokePeek = 22, // 0x16 - MethodInvokeStatic = 23, // 0x17 - MethodInvokePushLastParam = 24, // 0x18 - MethodInvokeStaticPushLastParam = 25, // 0x19 - VerifyTypeCast = 26, // 0x1A - ConvertType = 27, // 0x1B - Operation = 28, // 0x1C - IsCheck = 29, // 0x1D - As = 30, // 0x1E - TypeOf = 31, // 0x1F - PushNull = 32, // 0x20 - PushConstant = 33, // 0x21 - PushThis = 34, // 0x22 - DiscardValue = 35, // 0x23 - ReturnValue = 36, // 0x24 - ReturnVoid = 37, // 0x25 - JumpIfFalse = 38, // 0x26 - JumpIfFalsePeek = 39, // 0x27 - JumpIfTruePeek = 40, // 0x28 - JumpIfDictionaryContains = 41, // 0x29 - JumpIfNullPeek = 42, // 0x2A - Jump = 43, // 0x2B - ConstructListenerStorage = 44, // 0x2C - Listen = 45, // 0x2D - DestructiveListen = 46, // 0x2E - EnterDebugState = 47, // 0x2F - } -} diff --git a/UIX/Microsoft/Iris/Markup/OperationType.cs b/UIX/Microsoft/Iris/Markup/OperationType.cs deleted file mode 100644 index 15b8e2e..0000000 --- a/UIX/Microsoft/Iris/Markup/OperationType.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.OperationType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum OperationType - { - MathAdd = 1, - MathSubtract = 2, - MathMultiply = 3, - MathDivide = 4, - MathModulus = 5, - LogicalAnd = 6, - LogicalOr = 7, - RelationalEquals = 8, - RelationalNotEquals = 9, - RelationalLessThan = 10, // 0x0000000A - RelationalGreaterThan = 11, // 0x0000000B - RelationalLessThanEquals = 12, // 0x0000000C - RelationalGreaterThanEquals = 13, // 0x0000000D - RelationalIs = 14, // 0x0000000E - LogicalNot = 15, // 0x0000000F - MathNegate = 16, // 0x00000010 - PostIncrement = 17, // 0x00000011 - PostDecrement = 18, // 0x00000012 - } -} diff --git a/UIX/Microsoft/Iris/Markup/ParameterContext.cs b/UIX/Microsoft/Iris/Markup/ParameterContext.cs deleted file mode 100644 index b86c39d..0000000 --- a/UIX/Microsoft/Iris/Markup/ParameterContext.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ParameterContext -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public struct ParameterContext - { - private string[] _parameterNames; - private object[] _parameterValues; - - public ParameterContext(string[] parameterNames, object[] parameterValues) - { - this._parameterNames = parameterNames; - this._parameterValues = parameterValues; - } - - public object ReadParameter(string name) - { - int length = this._parameterNames.Length; - for (int index = 0; index < length; ++index) - { - if (this._parameterNames[index] == name) - return this._parameterValues[index]; - } - return null; - } - - public void WriteParameter(string name, object value) - { - int length = this._parameterNames.Length; - for (int index = 0; index < length; ++index) - { - if (this._parameterNames[index] == name) - { - this._parameterValues[index] = value; - break; - } - } - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/ParseResult.cs b/UIX/Microsoft/Iris/Markup/ParseResult.cs deleted file mode 100644 index 68f095e..0000000 --- a/UIX/Microsoft/Iris/Markup/ParseResult.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ParseResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.Validation; - -namespace Microsoft.Iris.Markup -{ - public class ParseResult - { - public string Root; - public string Version; - public ValidateNamespace XmlnsList; - public bool HasErrors; - public Vector ClassList = new Vector(4); - public Vector AliasList = s_EmptyAliasList; - public Vector DataMappingList = s_EmptyDataMappingList; - public static Vector s_EmptyAliasList = new Vector(0); - public static Vector s_EmptyDataMappingList = new Vector(0); - } -} diff --git a/UIX/Microsoft/Iris/Markup/Parser.cs b/UIX/Microsoft/Iris/Markup/Parser.cs deleted file mode 100644 index 86e20cb..0000000 --- a/UIX/Microsoft/Iris/Markup/Parser.cs +++ /dev/null @@ -1,380 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.Parser -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Markup.Validation; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; -using SSVParseLib; -using System.Collections; -using System.Xml; - -namespace Microsoft.Iris.Markup -{ - public class Parser - { - private static ParserLexClass s_lex; - private static ParserYaccClass s_yacc; - private static SSLexTable s_lexTable; - private static SSYaccTable s_yaccTable; - private static bool s_parserActive; - - public static ParseResult Invoke(SourceMarkupLoader owner, Resource resource) - { - ErrorWatermark watermark = ErrorManager.Watermark; - ParseResult parseResult = new ParseResult(); - Stack parseStack = new Stack(); - bool flag = false; - bool additionalMetadata = MarkupSystem.TrackAdditionalMetadata; - using (NativeXmlReader xmlReader = new NativeXmlReader(resource)) - { - try - { - string str1 = string.Empty; - while (xmlReader.Read(out XmlNodeType nodeType)) - { - if (parseResult.Root == null || parseStack.Count == 0 && nodeType == XmlNodeType.EndElement) - { - if (nodeType == XmlNodeType.Element) - { - parseResult.Root = xmlReader.Name; - while (xmlReader.ReadAttribute()) - { - string name = xmlReader.Name; - string prefix = xmlReader.Prefix; - if (name == "xmlns") - parseResult.Version = xmlReader.Value; - else if (prefix == "xmlns") - { - ValidateNamespace validateNamespace = new ValidateNamespace(owner, xmlReader.LocalName, xmlReader.Value, xmlReader.LineNumber, xmlReader.LinePosition); - if (parseResult.XmlnsList == null) - parseResult.XmlnsList = validateNamespace; - else - parseResult.XmlnsList.AppendToEnd(validateNamespace); - } - else - ReportError(xmlReader, "Unexpected attribute '{0}' on root tag", name); - } - } - } - else - { - switch (nodeType) - { - case XmlNodeType.Element: - if (flag) - { - ReportError(xmlReader, "Script tag may not contain XML elements, found: '{0}'", xmlReader.Name); - continue; - } - bool isEmptyElement = xmlReader.IsEmptyElement; - string prefix1 = xmlReader.Prefix; - string localName = xmlReader.LocalName; - if (parseStack.Count % 2 == 0) - { - if (prefix1 == "" && localName == "Script") - { - flag = true; - parseStack.Push(new Parser.ScriptBlock(xmlReader.LineNumber, xmlReader.LinePosition)); - if (xmlReader.ReadAttribute()) - ReportError(xmlReader, "Script tag may not have XML attributes"); - } - else - { - ValidateTypeIdentifier typeIdentifier = new ValidateTypeIdentifier(owner, prefix1, localName, xmlReader.LineNumber, xmlReader.LinePosition); - bool isRootTag = parseStack.Count == 0; - ValidateObjectTag objectTagValidator = owner.CreateObjectTagValidator(typeIdentifier, xmlReader.LineNumber, xmlReader.LinePosition, isRootTag); - while (xmlReader.ReadAttribute()) - { - if (xmlReader.Prefix == string.Empty) - { - ValidateObject objectFromString = CreateValidateObjectFromString(owner, xmlReader); - ValidateProperty property = new ValidateProperty(owner, xmlReader.LocalName, objectFromString, xmlReader.LineNumber, xmlReader.LinePosition); - objectTagValidator.AddProperty(property); - } - else - ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); - } - parseStack.Push(objectTagValidator); - if (additionalMetadata && !string.IsNullOrEmpty(str1)) - { - objectTagValidator.Metadata.Comments = str1; - str1 = string.Empty; - } - } - } - else - { - if (prefix1 != string.Empty) - ReportError(xmlReader, "Property tag may not be prefixed: '{0}'", xmlReader.Name); - if (localName == "Methods") - { - flag = true; - parseStack.Push(new Parser.ScriptBlock(xmlReader.LineNumber, xmlReader.LinePosition, CodeType.Methods)); - if (xmlReader.ReadAttribute()) - ReportError(xmlReader, "Script tag may not have XML attributes"); - } - else - { - ValidateProperty validateProperty = new ValidateProperty(owner, localName, xmlReader.LineNumber, xmlReader.LinePosition); - while (xmlReader.ReadAttribute()) - { - if (xmlReader.Prefix == string.Empty) - validateProperty.AddAttribute(new PropertyAttribute() - { - Name = xmlReader.LocalName, - Value = xmlReader.Value - }); - else - ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); - } - parseStack.Push(validateProperty); - } - } - if (isEmptyElement) - { - flag = false; - HandleEndElement(owner, parseResult, parseStack); - continue; - } - continue; - case XmlNodeType.Text: - case XmlNodeType.CDATA: - if (parseStack.Count == 0) - { - ReportError(xmlReader, "Text/CDATA is not allowed under root tag ('{0}')", xmlReader.Value.Trim()); - continue; - } - switch (parseStack.Peek()) - { - case ValidateProperty validateProperty: - if (validateProperty.Value == null) - { - validateProperty.Value = CreateValidateObjectFromString(owner, xmlReader); - continue; - } - if (validateProperty.Value is ValidateFromString) - { - ReportError(xmlReader, "Property tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); - continue; - } - ReportError(xmlReader, "Property tag already has objects, may not also add Text/CDATA: '{0}'", xmlReader.Value.Trim()); - continue; - case Parser.ScriptBlock scriptBlock: - if (scriptBlock.ValidateValue == null) - { - scriptBlock.ValidateValue = ParseCode(owner, xmlReader, scriptBlock.CodeType); - continue; - } - ReportError(xmlReader, "Script tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); - continue; - default: - ReportError(xmlReader, "Object tag may not contain Text/CDATA: '{0}'", xmlReader.Value.Trim()); - continue; - } - case XmlNodeType.Comment: - string str2 = null; - if (additionalMetadata) - { - str2 = xmlReader.Value; - str1 = str1 + '\n' + str2; - } - if (flag) - { - if (str2 == null) - str2 = xmlReader.Value; - ReportError(xmlReader, "Script tag may not contain XML comments, found: '{0}'", str2.Trim()); - continue; - } - continue; - case XmlNodeType.EndElement: - flag = false; - HandleEndElement(owner, parseResult, parseStack); - continue; - default: - continue; - } - } - } - } - catch (NativeXmlException ex) - { - ErrorManager.ReportError(ex.LineNumber, ex.LinePosition, ex.Message); - } - } - if (watermark.ErrorsDetected) - { - parseResult = new ParseResult(); - parseResult.HasErrors = true; - } - return parseResult; - } - - private static void HandleEndElement( - SourceMarkupLoader owner, - ParseResult parseResult, - Stack parseStack) - { - if (parseStack.Count % 2 == 1) - { - object obj = parseStack.Pop(); - bool flag = false; - ValidateObject validateObject; - // FIXME - ScriptBlock scriptBlock = null; - if (obj is Parser.ScriptBlock) - { - scriptBlock = (Parser.ScriptBlock)obj; - validateObject = (ValidateObject)scriptBlock.ValidateValue; - } - else - { - validateObject = (ValidateObject)obj; - flag = true; - } - if (parseStack.Count == 0) - { - switch (validateObject) - { - case ValidateClass validateClass: - parseResult.ClassList.Add(validateClass); - break; - case ValidateAlias validateAlias: - if (parseResult.AliasList == ParseResult.s_EmptyAliasList) - parseResult.AliasList = new Vector(4); - parseResult.AliasList.Add(validateAlias); - break; - case ValidateDataMapping validateDataMapping: - if (parseResult.DataMappingList == ParseResult.s_EmptyDataMappingList) - parseResult.DataMappingList = new Vector(4); - parseResult.DataMappingList.Add(validateDataMapping); - break; - default: - if (flag) - { - ValidateObjectTag validateObjectTag = (ValidateObjectTag)validateObject; - ErrorManager.ReportError(validateObjectTag.Line, validateObjectTag.Column, "Unexpected root element '{0}', must be , or ", validateObjectTag.TypeIdentifier.TypeName); - break; - } - ErrorManager.ReportError(scriptBlock.Line, scriptBlock.Column, "Unexpected root element '{0}', must be , or ", "Script"); - break; - } - } - else if (validateObject != null) - ((ValidateProperty)parseStack.Peek()).AddValue(validateObject); - if (!flag) - return; - ((ValidateObjectTag)validateObject).NotifyParseComplete(); - } - else - { - object obj = parseStack.Pop(); - ValidateProperty property = obj as ValidateProperty; - ValidateObjectTag validateObjectTag = (ValidateObjectTag)parseStack.Peek(); - if (property != null) - { - validateObjectTag.AddProperty(property); - } - else - { - Parser.ScriptBlock scriptBlock = (Parser.ScriptBlock)obj; - if (validateObjectTag is ValidateClass validateClass) - validateClass.NotifyFoundMethodList((ValidateMethodList)scriptBlock.ValidateValue); - else - ErrorManager.ReportError(scriptBlock.ValidateValue.Line, scriptBlock.ValidateValue.Column, "Methods allowed only on , and "); - } - } - } - - private static ValidateObject CreateValidateObjectFromString( - SourceMarkupLoader owner, - NativeXmlReader xmlReader) - { - if (xmlReader.IsInlineExpression) - return (ValidateObject)ParseCode(owner, xmlReader, CodeType.InlineExpression); - string fromString = xmlReader.Value; - bool expandEscapes = true; - if (fromString.Length > 0 && fromString[0] == '@') - { - fromString = fromString.Substring(1); - expandEscapes = false; - } - return new ValidateFromString(owner, fromString, expandEscapes, xmlReader.LineNumber, xmlReader.LinePosition); - } - - private static Validate ParseCode( - SourceMarkupLoader owner, - NativeXmlReader xmlReader, - Parser.CodeType codeType) - { - Validate validate = null; - if (s_lexTable == null) - { - s_lexTable = new ParserLexTable(); - s_yaccTable = new ParserYaccTable(); - s_lex = new ParserLexClass(s_lexTable); - s_yacc = new ParserYaccClass(s_yaccTable, s_lex); - } - string prefix; - switch (codeType) - { - case CodeType.Methods: - prefix = "%%"; - break; - case CodeType.InlineExpression: - prefix = "$$"; - break; - default: - prefix = "@@"; - break; - } - SSLexUnicodeBufferConsumer unicodeBufferConsumer = xmlReader.LexConsumerForValueWithPrefix(prefix); - s_lex.Reset(unicodeBufferConsumer); - s_yacc.Reset(owner); - s_parserActive = true; - s_yacc.parse(); - if (!s_yacc.HasErrors) - { - validate = (Validate)s_yacc.treeRoot().Object; - if (MarkupSystem.TrackAdditionalMetadata) - validate.Metadata.OriginalValue = xmlReader.Value; - } - s_lex.Reset(null); - s_yacc.Reset(null); - s_parserActive = false; - return validate; - } - - private static void ReportError(NativeXmlReader xmlReader, string message) => ErrorManager.ReportError(xmlReader.LineNumber, xmlReader.LinePosition, message); - - private static void ReportError(NativeXmlReader xmlReader, string message, params object[] parameters) => ErrorManager.ReportError(xmlReader.LineNumber, xmlReader.LinePosition, message, parameters); - - private enum CodeType - { - ScriptBlock, - Methods, - InlineExpression, - } - - private class ScriptBlock - { - public Validate ValidateValue; - public int Line; - public int Column; - public Parser.CodeType CodeType; - - public ScriptBlock(int line, int column) - { - this.Line = line; - this.Column = column; - } - - public ScriptBlock(int line, int column, Parser.CodeType codeType) - : this(line, column) - => this.CodeType = codeType; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/PerformOperationHandler.cs b/UIX/Microsoft/Iris/Markup/PerformOperationHandler.cs deleted file mode 100644 index 8851c0c..0000000 --- a/UIX/Microsoft/Iris/Markup/PerformOperationHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.PerformOperationHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate object PerformOperationHandler(object left, object right, OperationType op); -} diff --git a/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteria.cs b/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteria.cs deleted file mode 100644 index 2a257f7..0000000 --- a/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteria.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.PropertyOverrideCriteria -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public abstract class PropertyOverrideCriteria - { - public abstract Result Verify(PropertyOverrideCriteria baseCriteria); - } -} diff --git a/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteriaTypeConstraint.cs b/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteriaTypeConstraint.cs deleted file mode 100644 index efa8dbd..0000000 --- a/UIX/Microsoft/Iris/Markup/PropertyOverrideCriteriaTypeConstraint.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.PropertyOverrideCriteriaTypeConstraint -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public class PropertyOverrideCriteriaTypeConstraint : PropertyOverrideCriteria - { - private TypeSchema _use; - private TypeSchema _constraint; - - public PropertyOverrideCriteriaTypeConstraint(TypeSchema use, TypeSchema constraint) - { - this._use = use; - this._constraint = constraint; - } - - public override Result Verify(PropertyOverrideCriteria baseCriteria) - { - PropertyOverrideCriteriaTypeConstraint criteriaTypeConstraint = (PropertyOverrideCriteriaTypeConstraint)baseCriteria; - if (!criteriaTypeConstraint.Constraint.IsAssignableFrom(this._use)) - return Result.Fail(string.Format("Type parameter property '{0}' is of type '{1}' which is not compatible with the base type constraint '{2}'", "Use", _use.Name, criteriaTypeConstraint.Constraint.Name)); - return !criteriaTypeConstraint.Constraint.IsAssignableFrom(this._constraint) ? Result.Fail(string.Format("Type parameter property '{0}' is of type '{1}' which is not compatible with the base type constraint '{2}'", "Constraint", _constraint.Name, criteriaTypeConstraint.Constraint.Name)) : Result.Success; - } - - public TypeSchema Use => this._use; - - public TypeSchema Constraint => this._constraint; - } -} diff --git a/UIX/Microsoft/Iris/Markup/PropertySchema.cs b/UIX/Microsoft/Iris/Markup/PropertySchema.cs deleted file mode 100644 index 328a86b..0000000 --- a/UIX/Microsoft/Iris/Markup/PropertySchema.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.PropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public abstract class PropertySchema : DisposableObject - { - public static PropertySchema[] EmptyList = new PropertySchema[0]; - private TypeSchema _owner; - - public PropertySchema(TypeSchema owner) - { - this._owner = owner; - this.DeclareOwner(owner); - } - - public TypeSchema Owner => this._owner; - - public abstract string Name { get; } - - public abstract TypeSchema PropertyType { get; } - - public abstract TypeSchema AlternateType { get; } - - public abstract bool CanRead { get; } - - public abstract bool CanWrite { get; } - - public abstract bool IsStatic { get; } - - public abstract ExpressionRestriction ExpressionRestriction { get; } - - public abstract bool RequiredForCreation { get; } - - public abstract RangeValidator RangeValidator { get; } - - public abstract bool NotifiesOnChange { get; } - - public abstract object GetValue(object instance); - - public abstract void SetValue(ref object instance, object value); - } -} diff --git a/UIX/Microsoft/Iris/Markup/ProviderlessMarkupDataType.cs b/UIX/Microsoft/Iris/Markup/ProviderlessMarkupDataType.cs deleted file mode 100644 index 750bb14..0000000 --- a/UIX/Microsoft/Iris/Markup/ProviderlessMarkupDataType.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ProviderlessMarkupDataType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class ProviderlessMarkupDataType : MarkupDataType - { - private IDataProviderObject _externalAssemblyObject; - - public ProviderlessMarkupDataType(MarkupDataTypeSchema typeSchema) - : base(typeSchema) - { - } - - protected override IDataProviderBaseObject ExternalAssemblyObject - { - get - { - if (this._externalAssemblyObject == null) - this._externalAssemblyObject = new ProviderlessDataProviderObject(this, (MarkupDataTypeSchema)this.TypeSchema); - return _externalAssemblyObject; - } - } - - public override IntPtr ExternalNativeObject => IntPtr.Zero; - - public override object ReadSymbol(SymbolReference symbolRef) - { - lock (this.SynchronizedPropertyStorage) - return base.ReadSymbol(symbolRef); - } - - public override void WriteSymbol(SymbolReference symbolRef, object value) - { - lock (this.SynchronizedPropertyStorage) - base.WriteSymbol(symbolRef, value); - } - - public override object GetProperty(string name) - { - lock (this.SynchronizedPropertyStorage) - return base.GetProperty(name); - } - - public override void SetProperty(string name, object value) - { - lock (this.SynchronizedPropertyStorage) - base.SetProperty(name, value); - } - - private object SynchronizedPropertyStorage => _storage; - } -} diff --git a/UIX/Microsoft/Iris/Markup/RangeValidator.cs b/UIX/Microsoft/Iris/Markup/RangeValidator.cs deleted file mode 100644 index be4abe9..0000000 --- a/UIX/Microsoft/Iris/Markup/RangeValidator.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.RangeValidator -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public delegate Result RangeValidator(object value); -} diff --git a/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs b/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs deleted file mode 100644 index d05f050..0000000 --- a/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ReflectionHelper -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; -using System.Reflection; -using System.Reflection.Emit; - -namespace Microsoft.Iris.Markup -{ - public static class ReflectionHelper - { - private static System.Reflection.Emit.OpCode[] s_loadInts = new System.Reflection.Emit.OpCode[9] - { - OpCodes.Ldc_I4_0, - OpCodes.Ldc_I4_1, - OpCodes.Ldc_I4_2, - OpCodes.Ldc_I4_3, - OpCodes.Ldc_I4_4, - OpCodes.Ldc_I4_5, - OpCodes.Ldc_I4_6, - OpCodes.Ldc_I4_7, - OpCodes.Ldc_I4_8 - }; - private static Module s_irisModule = typeof(ReflectionHelper).Module; - - public static FastReflectionInvokeHandler CreateMethodInvoke( - MethodBase methodBase) - { - DynamicMethod dynamicMethod = new DynamicMethod("MethodInvoker", typeof(object), new Type[2] - { - typeof (object), - typeof (object[]) - }, s_irisModule, true); - ILGenerator ilGenerator = dynamicMethod.GetILGenerator(); - ParameterInfo[] parameters = methodBase.GetParameters(); - Type[] typeArray = new Type[parameters.Length]; - for (int index = 0; index < parameters.Length; ++index) - typeArray[index] = parameters[index].ParameterType; - MethodInfo methodInfo = null; - if (methodBase is MethodInfo && !methodInfo.IsStatic) - { - methodInfo = (MethodInfo)methodBase; - ilGenerator.Emit(OpCodes.Ldarg_0); - Type declaringType = methodInfo.DeclaringType; - EmitCastToType(ilGenerator, declaringType); - if (declaringType.IsValueType) - { - LocalBuilder local = ilGenerator.DeclareLocal(declaringType); - ilGenerator.Emit(OpCodes.Stloc_0); - ilGenerator.Emit(OpCodes.Ldloca_S, local); - } - } - for (int index = 0; index < typeArray.Length; ++index) - { - ilGenerator.Emit(OpCodes.Ldarg_1); - if (index < s_loadInts.Length) - ilGenerator.Emit(s_loadInts[index]); - else - ilGenerator.Emit(OpCodes.Ldc_I4, index); - ilGenerator.Emit(OpCodes.Ldelem_Ref); - EmitCastToType(ilGenerator, typeArray[index]); - } - Type cls; - if (methodInfo != null) - { - ilGenerator.EmitCall(methodInfo.IsStatic ? OpCodes.Call : OpCodes.Callvirt, methodInfo, null); - cls = methodInfo.ReturnType; - } - else - { - ConstructorInfo con = (ConstructorInfo)methodBase; - ilGenerator.Emit(OpCodes.Newobj, con); - cls = con.DeclaringType; - } - if (cls == typeof(void)) - ilGenerator.Emit(OpCodes.Ldnull); - else if (cls.IsValueType) - ilGenerator.Emit(OpCodes.Box, cls); - ilGenerator.Emit(OpCodes.Ret); - return (FastReflectionInvokeHandler)dynamicMethod.CreateDelegate(typeof(FastReflectionInvokeHandler)); - } - - private static void EmitCastToType(ILGenerator il, Type type) - { - if (type.IsValueType) - il.Emit(OpCodes.Unbox_Any, type); - else - il.Emit(OpCodes.Castclass, type); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/RuntimeMessage.cs b/UIX/Microsoft/Iris/Markup/RuntimeMessage.cs deleted file mode 100644 index 16aae24..0000000 --- a/UIX/Microsoft/Iris/Markup/RuntimeMessage.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.RuntimeMessage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class RuntimeMessage - { - public const string AccessibilityAccessWhenNotEnabled = "Accessibility: Script modifications to the 'Accessible' object ('{0}' property) detected even though an Accessibility client is not is use. Use 'if (Accessible.Enabled) {{ ... }}' to bypass Accessible property access in this case"; - public const string AnchorLayoutAnchorItemNotFound = "Anchor layout: {0} cannot find the '{1}' child"; - public const string AnchorLayoutInconsistentEdges = "All AnchorEdges must refer to actual positions on AnchorLayoutInput {0}."; - public const string AnchorContributesActual = "AnchorLayoutInput {0} cannot contribute to width or height."; - public const string AnimationInvalidKeyframeSingleType = "Animation must have at least 2 keyframes of each type. Attempted to play an animation that only has {0} keyframe of type '{1}'."; - public const string AnimationInvalidKeyframeNoZeroForType = "Animation must have a keyframe at time 0.0 for each type. Attempted to play an animation that has no start keyframe for type '{0}'"; - public const string AnimationInvalidKeyframeCount = "Animations must have at least 2 keyframes to play"; - public const string DepersistInvalidFile = "Invalid compiled UIX file"; - public const string DepersistWrongFileVersion = "Compiled UIX file '{0}' was compiled for the runtime with version {1}, but the current runtime is version {2}"; - public const string DisposeAttemptOnNonDisposableObject = "Attempt to dispose an object '{0}' that isn't disposable"; - public const string DisposeAttemptUnownedObject = "Attempt to dispose an object '{0}' that '{1}' doesn't own"; - public const string ExplicitResourceRedirectFailure = "Resource {0} not found, but should have been located by a markup redirect"; - public const string FileNotFound = "File not found: '{0}'"; - public const string FontResourceNotFound = "Font Resource {1} not found in module {0}"; - public const string HostCannotInvokeMethods = "Host '{0}' is currently not hosting a UI and therefore cannot invoke methods"; - public const string HostIsNotUnloadable = "UnloadAll may only be called on Unloadable hosts"; - public const string HostRequestReplacementTypeMustBeUI = "RequestSource failed: Referrenced type '{0}' is not a UI"; - public const string HostRequestSourceUriLoadFailed = "RequestSource failed: Unable to load '{0}'"; - public const string HostRequestUIDoesNotMatchTypeRestriction = "RequestSource failed: Found '{0}' within '{1}', but, it is not a '{2}'"; - public const string HostRequestUINotFoundWithinMarkupLoadResult = "RequestSource failed: Unable to find '{0}' within '{1}'"; - public const string HwndHostBackgroundSolidColor = "HwndHost.Background must be a solid color"; - public const string InterpreterChildAddOperation = "Child Add"; - public const string InterpreterConstructionOperation = "Construction"; - public const string InterpreterConversionFailed = "Script runtime failure: Type conversion failed while attempting to convert to '{0}' ({1})"; - public const string InterpreterDictionaryAddOperation = "Dictionary Add"; - public const string InterpreterDictionaryContainsOperation = "Dictionary Contains"; - public const string InterpreterDynamicConstructionTypeMismatch = "Script runtime failure: Dynamic construction type override failed. Attempting to construct '{0}' in place of '{1}'"; - public const string InterpreterInitializeOperation = "Initialize"; - public const string InterpreterInvalidCast = "Script runtime failure: Invalid type cast while attempting to cast an instance with a runtime type of '{0}' to '{1}'"; - public const string InterpreterListAddOperation = "List Add"; - public const string InterpreterMethodInvokeOperation = "Method Invoke"; - public const string InterpreterNullReferenceMember = "Script runtime failure: Null-reference while attempting a '{0}' of '{1}' on a null instance"; - public const string InterpreterNullReference = "Script runtime failure: Null-reference while attempting a '{0}'"; - public const string InterpreterObjectAlreadyDisposed = "Script runtime failure: Attempting a '{0}' of '{1}' on an object '{2}' that has already been disposed"; - public const string InterpreterPropertyGetOperation = "Property Get"; - public const string InterpreterPropertySetOperation = "Property Set"; - public const string InterpreterReplacementTypeInvalidPropertyValue = "Script runtime failure: Incompatible value for property '{0}' supplied (expecting values of type '{1}' but got '{2}') while constructing runtime replacement type '{3}' (original type '{4}')"; - public const string InterpreterTypeConversionOperation = "Type Conversion"; - public const string InterpreterVerifyTypeCastOperation = "Verify Type Cast"; - public const string InvalidResourceScheme = "Invalid resource protocol: '{0}'"; - public const string InvalidResourceUri = "Invalid resource uri: '{0}'"; - public const string KeyHandlerNeedToTrackInvokedKeys = "KeyHandler needs to be marked TrackInvokedKeys=\"true\" in order to call GetInvokedKeys()"; - public const string MarkupTypeScriptErrorsWhileBuildingNamedContent = "Script runtime failure: Scripting errors have prevented '{0}' named content from being constructed"; - public const string MarkupTypeScriptErrorsWhileInitializing = "Script runtime failure: Scripting errors have prevented '{0}' from properly initializing and will affect its operation"; - public const string MarkupTypeScriptsDisabledDueToErrors = "Script runtime failure: Scripting has been disabled for '{0}' due to runtime scripting errors"; - public const string NoValidFocusTarget = "No valid focus target found. Input from a keyboard or remote will be ignored until focus is restored"; - public const string RepeaterInvalidContent = "Repeater failed to find content to repeat. ContentName was '{0}'"; - public const string RepeaterInvalidInlineContent = "Repeater unable to create inline content"; - public const string RepeaterInvalidDividerContent = "Repeater failed to find divider content to repeat (DividerName was '{0}')"; - public const string RepeaterNoContent = "Repeater has no content to repeat"; - public const string ReplacementTypeMissingRequiredProperty = "Runtime UI replacement to '{0}' failed since required property '{1}' was never provided a value"; - public const string ReplacementTypeInvalidProperty = "Runtime UI replacement to '{0}' failed since a property named '{1}' was specified but doesn't exist on '{0}'"; - public const string ReplacementTypeInvalidPropertyValue = "Runtime UI replacement to '{0}' failed since the value specified ({1}) for the '{2}' property is incompatible (type expected is '{3}')"; - public const string ResourceAcquireFailed = "Failed to acquire resource '{0}'"; - public const string ResourceAcquireFailedNoAsync = "Failed to acquire resource '{0}'. Resources that cannot be fetched synchronously are not valid in this context"; - public const string ResourceDownloadFailed = "Failed to complete download from '{0}'"; - public const string ResourceInvalidUri = "Invalid URI: '{0}'"; - public const string ResourceHttpHostConnectionFailed = "Unable to connect to web host: '{0}'"; - public const string ResourceNotFound = "Resource not found: res://{0}!{1}"; - public const string SchemaArgumentInvalidParameter = "Script runtime failure: Invalid '{0}' value for '{1}'"; - public const string SchemaArgumentInvalidParameterListContents = "Script runtime failure: Invalid value '{0}' within list '{1}'"; - public const string SchemaArgumentNullParameter = "Script runtime failure: Invalid 'null' value for '{0}'"; - public const string SchemaArgumentOutOfRangeParameter = "Script runtime failure: Invalid '{0}' value is out of range for '{1}'"; - public const string SelectionOutsideList = "Selected Index {0} is not a valid index in SourceList of size {1}"; - public const string SelectionOperationNotSupported = "Calling {0} is not supported on a SelectionManager in single selection modes."; - public const string SelectionCannotModifySelection = "Cannot modify selection through the list returned by {0}. Use the methods on SelectionManager instead."; - public const string TextEditableComplexFormattingDisallowed = "Text: Complex formatting unsupported on text that is editable"; - public const string TextScrollModelAttachedToMultipleHandlers = "TextScrollModel can't be attached to multiple TextEditingHandlers"; - public const string TooManyUnloadableHosts = "Maximum number of Unloadable Hosts reached"; - } -} diff --git a/UIX/Microsoft/Iris/Markup/SSLexUnicodeBufferConsumer.cs b/UIX/Microsoft/Iris/Markup/SSLexUnicodeBufferConsumer.cs deleted file mode 100644 index c9cf1fe..0000000 --- a/UIX/Microsoft/Iris/Markup/SSLexUnicodeBufferConsumer.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SSLexUnicodeBufferConsumer -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using SSVParseLib; -using System; - -namespace Microsoft.Iris.Markup -{ - public class SSLexUnicodeBufferConsumer : SSLexConsumer - { - private char[] _buffer; - private uint _length; - private string _prefix; - - public SSLexUnicodeBufferConsumer(char[] buffer, uint length) - : this(buffer, length, "") - { - } - - public unsafe SSLexUnicodeBufferConsumer(char[] buffer, uint length, string prefix) - { - this._buffer = buffer; - this._length = length; - this._prefix = prefix; - } - - public override bool getNext() => this.GetCharAt(this.m_index, out this.m_current); - - public override unsafe string getSubstring(int start, int length) - { - if (start + length <= this._prefix.Length) - { - return this._prefix.Substring(start, length); - } - else - { - fixed (char* ptr = _buffer) - { - return NativeApi.PtrToStringUni(new IntPtr(ptr + start - this._prefix.Length), length); - } - } - } - - public unsafe bool GetCharAt(int position, out char ch) - { - if (position < this._prefix.Length) - { - ch = this._prefix[this.m_index]; - return true; - } - int index = position - this._prefix.Length; - if (index < _length) - { - ch = this._buffer[index]; - return true; - } - ch = char.MinValue; - return false; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/SchemaType.cs b/UIX/Microsoft/Iris/Markup/SchemaType.cs deleted file mode 100644 index cc6faa6..0000000 --- a/UIX/Microsoft/Iris/Markup/SchemaType.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SchemaType -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum SchemaType - { - None, - Type, - Constructor, - Property, - Method, - Event, - CanonicalInstance, - } -} diff --git a/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs b/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs deleted file mode 100644 index 6fc3e00..0000000 --- a/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ScriptRunScheduler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Markup -{ - public struct ScriptRunScheduler - { - private Vector _pendingList; - private static ScriptRunScheduler.RunListCache s_listCache = new ScriptRunScheduler.RunListCache(); - - public bool Pending => this._pendingList != null; - - public void ScheduleRun(uint scriptId, bool ignoreErrors) - { - if (this._pendingList == null) - this._pendingList = s_listCache.Acquire(); - int index; - for (index = 0; index < this._pendingList.Count; ++index) - { - uint scriptId1 = this._pendingList[index].ScriptId; - if ((int)scriptId == (int)scriptId1) - return; - if (scriptId < scriptId1) - break; - } - this._pendingList.Insert(index, new ScriptRunScheduler.PendingScript(scriptId, ignoreErrors)); - } - - public void Execute(IMarkupTypeBase markupTypeBase) - { - if (this._pendingList == null) - return; - Vector pendingList = this._pendingList; - this._pendingList = null; - for (int index = 0; index < pendingList.Count; ++index) - { - ScriptRunScheduler.PendingScript pendingScript = pendingList[index]; - markupTypeBase.RunScript(pendingScript.ScriptId, pendingScript.IgnoreErrors, new ParameterContext()); - } - s_listCache.Release(pendingList); - } - - public struct PendingScript - { - public uint ScriptId; - public bool IgnoreErrors; - - public PendingScript(uint scriptId, bool ignoreErrors) - { - this.ScriptId = scriptId; - this.IgnoreErrors = ignoreErrors; - } - } - - private class RunListCache - { - private const int c_MaxNumLists = 128; - private const int c_MaxListSize = 32; - private Stack _lists = new Stack(128); - - public Vector Acquire() => this._lists.Count <= 0 ? new Vector() : (Vector)this._lists.Pop(); - - public void Release(Vector list) - { - if (this._lists.Count >= 128 || list.Capacity > 32) - return; - list.Clear(); - this._lists.Push(list); - } - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/SetValueHandler.cs b/UIX/Microsoft/Iris/Markup/SetValueHandler.cs deleted file mode 100644 index a9c4213..0000000 --- a/UIX/Microsoft/Iris/Markup/SetValueHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SetValueHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate void SetValueHandler(ref object instance, object value); -} diff --git a/UIX/Microsoft/Iris/Markup/SourceMarkupImportTables.cs b/UIX/Microsoft/Iris/Markup/SourceMarkupImportTables.cs deleted file mode 100644 index cf70735..0000000 --- a/UIX/Microsoft/Iris/Markup/SourceMarkupImportTables.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SourceMarkupImportTables -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class SourceMarkupImportTables - { - public Vector ImportedLoadResults = new Vector(); - public Vector ImportedTypes = new Vector(); - public Vector ImportedConstructors = new Vector(); - public Vector ImportedProperties = new Vector(); - public Vector ImportedEvents = new Vector(); - public Vector ImportedMethods = new Vector(); - - public MarkupImportTables PrepareImportTables() - { - MarkupImportTables markupImportTables = new MarkupImportTables(); - if (this.ImportedTypes.Count > 0) - { - TypeSchema[] typeSchemaArray = new TypeSchema[this.ImportedTypes.Count]; - for (int index = 0; index < this.ImportedTypes.Count; ++index) - typeSchemaArray[index] = (TypeSchema)this.ImportedTypes[index]; - markupImportTables.TypeImports = typeSchemaArray; - } - if (this.ImportedConstructors.Count > 0) - { - ConstructorSchema[] constructorSchemaArray = new ConstructorSchema[this.ImportedConstructors.Count]; - for (int index = 0; index < this.ImportedConstructors.Count; ++index) - constructorSchemaArray[index] = (ConstructorSchema)this.ImportedConstructors[index]; - markupImportTables.ConstructorImports = constructorSchemaArray; - } - if (this.ImportedProperties.Count > 0) - { - PropertySchema[] propertySchemaArray = new PropertySchema[this.ImportedProperties.Count]; - for (int index = 0; index < this.ImportedProperties.Count; ++index) - propertySchemaArray[index] = (PropertySchema)this.ImportedProperties[index]; - markupImportTables.PropertyImports = propertySchemaArray; - } - if (this.ImportedMethods.Count > 0) - { - MethodSchema[] methodSchemaArray = new MethodSchema[this.ImportedMethods.Count]; - for (int index = 0; index < this.ImportedMethods.Count; ++index) - methodSchemaArray[index] = (MethodSchema)this.ImportedMethods[index]; - markupImportTables.MethodImports = methodSchemaArray; - } - if (this.ImportedEvents.Count > 0) - { - EventSchema[] eventSchemaArray = new EventSchema[this.ImportedEvents.Count]; - for (int index = 0; index < this.ImportedEvents.Count; ++index) - eventSchemaArray[index] = (EventSchema)this.ImportedEvents[index]; - markupImportTables.EventImports = eventSchemaArray; - } - return markupImportTables; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/SourceMarkupLoadResult.cs b/UIX/Microsoft/Iris/Markup/SourceMarkupLoadResult.cs deleted file mode 100644 index 17dfdc0..0000000 --- a/UIX/Microsoft/Iris/Markup/SourceMarkupLoadResult.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SourceMarkupLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Markup.Validation; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup -{ - public class SourceMarkupLoadResult : MarkupLoadResult - { - private MarkupConstantsTable _constantsTable; - private MarkupImportTables _importTables; - private Resource _resource; - private SourceMarkupLoader _loader; - private bool _doneWithLoader; - - public SourceMarkupLoadResult(Resource resource, string uri) - : base(uri) - { - this._resource = resource; - if (uri != resource.Uri) - this._uriUnderlying = resource.Uri; - this._loader = SourceMarkupLoader.Load(this, resource); - } - - public SourceMarkupLoadResult(string uri) - : base(uri) - { - } - - public override bool IsSource => true; - - public SourceMarkupLoader Loader => this._loader; - - public override MarkupConstantsTable ConstantsTable => this._constantsTable; - - public override MarkupImportTables ImportTables => this._importTables; - - public override void Load(LoadPass currentPass) - { - if (this._doneWithLoader) - return; - ErrorManager.EnterContext(ErrorContextUri); - this._loader.Validate(currentPass); - ErrorManager.ExitContext(); - if (currentPass != LoadPass.Done) - return; - if (!MarkupSystem.TrackAdditionalMetadata) - this._loader = null; - this._doneWithLoader = true; - } - - public void ValidateType(MarkupTypeSchema typeSchema, LoadPass currentPass) - { - ValidateClass loadData = (ValidateClass)typeSchema.LoadData; - if (loadData == null) - return; - ErrorManager.EnterContext(ErrorContextUri); - loadData.Validate(currentPass); - ErrorManager.ExitContext(); - } - - public void ValidationComplete() - { - if (this._resource != null) - { - this._resource.Free(); - this._resource = null; - } - if (this.Status == LoadResultStatus.Loading) - this.SetStatus(LoadResultStatus.Success); - foreach (MarkupTypeSchema markupTypeSchema in this.ExportTable) - markupTypeSchema.Seal(); - } - - public void SetConstantsTable(MarkupConstantsTable constantsTable) => this._constantsTable = constantsTable; - - public void SetImportTables(MarkupImportTables importTables) => this._importTables = importTables; - } -} diff --git a/UIX/Microsoft/Iris/Markup/SourceMarkupLoader.cs b/UIX/Microsoft/Iris/Markup/SourceMarkupLoader.cs deleted file mode 100644 index 14dad1d..0000000 --- a/UIX/Microsoft/Iris/Markup/SourceMarkupLoader.cs +++ /dev/null @@ -1,450 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SourceMarkupLoader -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Markup.Validation; -using Microsoft.Iris.Session; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup -{ - public class SourceMarkupLoader - { - private const string MePrefix = "me"; - public const string MeNamespace = "Me"; - private ParseResult _parseResult; - private SourceMarkupLoadResult _loadResultTarget; - private Vector _validateObjects = new Vector(); - private Vector _foundExportedTypes = new Vector(); - private Vector _foundAliasMappings; - private bool _hasErrors; - public Dictionary _importedNamespaces = new Dictionary(); - private bool _usingSharedBinaryDataTable; - private SourceMarkupImportTables _importTables; - private Dictionary _referencedNamespaces = new Dictionary(); - private LoadPass _currentValidationPass; - - public static SourceMarkupLoader Load( - SourceMarkupLoadResult loadResult, - Resource resource) - { - SourceMarkupLoader owner = new SourceMarkupLoader(loadResult); - ParseResult parseResult = Parser.Invoke(owner, resource); - if (parseResult.HasErrors) - owner.MarkHasErrors(); - else - owner.SetParseResult(parseResult); - return owner; - } - - protected SourceMarkupLoader(SourceMarkupLoadResult loadResultTarget) => this._loadResultTarget = loadResultTarget; - - public SourceMarkupLoadResult LoadResultTarget => this._loadResultTarget; - - public void SetParseResult(ParseResult parseResult) => this._parseResult = parseResult; - - public LoadResult FindDependency(string prefix) - { - if (prefix == null) - return MarkupSystem.UIXGlobal; - object obj; - this._importedNamespaces.TryGetValue(prefix, out obj); - return (LoadResult)obj; - } - - public void Validate(LoadPass currentPass) - { - if (this._currentValidationPass >= currentPass) - return; - this._currentValidationPass = currentPass; - if (this._currentValidationPass == LoadPass.DeclareTypes) - { - if (this._parseResult == null) - return; - if (this._parseResult.Root != "UIX") - { - this.ReportError("Unknown markup format. Expecting ... root markup tags", -1, -1); - return; - } - if (this._parseResult.Version != "http://schemas.microsoft.com/2007/uix") - { - this.ReportError(string.Format("Unsupported version of markup: '{0}'", _parseResult.Version), -1, -1); - return; - } - if (this._loadResultTarget.BinaryDataTable != null) - { - this._importTables = this._loadResultTarget.BinaryDataTable.SourceMarkupImportTables; - this._usingSharedBinaryDataTable = true; - } - else - this._importTables = new SourceMarkupImportTables(); - for (ValidateNamespace validateNamespace = this._parseResult.XmlnsList; validateNamespace != null; validateNamespace = validateNamespace.Next) - { - LoadResult loadResult = validateNamespace.Validate(); - if (loadResult != null) - { - this._importedNamespaces[validateNamespace.Prefix] = loadResult; - this.TrackImportedLoadResult(loadResult); - } - } - } - foreach (LoadResult loadResult in this._importedNamespaces.Values) - { - if (loadResult != this._loadResultTarget && loadResult != MarkupSystem.UIXGlobal) - { - loadResult.Load(this._currentValidationPass); - if (loadResult.Status == LoadResultStatus.Error) - this.MarkHasErrors(); - } - } - if (this._parseResult != null && currentPass != LoadPass.Done) - { - foreach (ValidateClass validateClass in this._parseResult.ClassList) - validateClass.Validate(this._currentValidationPass); - foreach (ValidateDataMapping dataMapping in this._parseResult.DataMappingList) - dataMapping.Validate(this._currentValidationPass); - foreach (ValidateAlias alias in this._parseResult.AliasList) - alias.Validate(this._currentValidationPass); - if (this._currentValidationPass == LoadPass.Full) - { - for (ValidateNamespace validateNamespace = this._parseResult.XmlnsList; validateNamespace != null; validateNamespace = validateNamespace.Next) - { - if (!this._referencedNamespaces.ContainsKey(validateNamespace.Prefix)) - ErrorManager.ReportWarning(validateNamespace.Line, validateNamespace.Column, "Unreferenced namespace {0}", validateNamespace.Prefix); - } - } - } - this.CompleteValidationPass(); - } - - public void CompleteValidationPass() - { - if (this._currentValidationPass == LoadPass.DeclareTypes) - { - this._loadResultTarget.SetExportTable(this.PrepareExportTable()); - this._loadResultTarget.SetAliasTable(this.PrepareAliasTable()); - } - else if (this._currentValidationPass == LoadPass.PopulatePublicModel) - { - if (this._parseResult == null) - return; - foreach (ValidateClass validateClass in this._parseResult.ClassList) - { - if (validateClass.TypeExport != null) - validateClass.TypeExport.BuildProperties(); - } - } - else - { - if (this._currentValidationPass != LoadPass.Full) - return; - if (this.HasErrors) - this._loadResultTarget.MarkLoadFailed(); - MarkupImportTables importTables = null; - if (this._importTables != null) - { - importTables = this._importTables.PrepareImportTables(); - this._loadResultTarget.SetImportTables(importTables); - } - MarkupLineNumberTable lineNumberTable = new MarkupLineNumberTable(); - MarkupConstantsTable constantsTable = this._loadResultTarget.BinaryDataTable == null ? new MarkupConstantsTable() : this._loadResultTarget.BinaryDataTable.ConstantsTable; - this._loadResultTarget.SetDataMappingsTable(this.PrepareDataMappingTable()); - this._loadResultTarget.ValidationComplete(); - ByteCodeReader reader = null; - if (!this.HasErrors) - reader = new MarkupEncoder(importTables, constantsTable, lineNumberTable).EncodeOBJECTSection(this._parseResult, this._loadResultTarget.Uri, null); - if (!this._usingSharedBinaryDataTable) - { - constantsTable.PrepareForRuntimeUse(); - this._loadResultTarget.SetConstantsTable(constantsTable); - } - lineNumberTable.PrepareForRuntimeUse(); - this._loadResultTarget.SetLineNumberTable(lineNumberTable); - if (reader != null) - this._loadResultTarget.SetObjectSection(reader); - this._loadResultTarget.SetDependenciesTable(this.PrepareDependenciesTable()); - if (!MarkupSystem.TrackAdditionalMetadata) - this._parseResult = null; - foreach (DisposableObject validateObject in this._validateObjects) - validateObject.Dispose(this); - } - } - - public int RegisterExportedType(MarkupTypeSchema type) - { - int count = this._foundExportedTypes.Count; - this._foundExportedTypes.Add(type); - return count; - } - - public int RegisterAlias(string alias, LoadResult loadResult, string targetType) - { - this.TrackImportedLoadResult(loadResult); - if (this._foundAliasMappings == null) - this._foundAliasMappings = new Vector(); - int count = this._foundAliasMappings.Count; - this._foundAliasMappings.Add(new AliasMapping(alias, loadResult, targetType)); - return count; - } - - public bool IsTypeNameTaken(string typeName) - { - foreach (TypeSchema foundExportedType in this._foundExportedTypes) - { - if (foundExportedType.Name == typeName) - return true; - } - if (this._foundAliasMappings != null) - { - foreach (AliasMapping foundAliasMapping in this._foundAliasMappings) - { - if (foundAliasMapping.Alias == typeName) - return true; - } - } - return false; - } - - public void TrackValidateObject(Microsoft.Iris.Markup.Validation.Validate validate) - { - this._validateObjects.Add(validate); - validate.DeclareOwner(this); - } - - public void TrackImportedLoadResult(LoadResult loadResult) - { - if (loadResult == MarkupSystem.UIXGlobal) - return; - for (int index = 0; index < this._importTables.ImportedLoadResults.Count; ++index) - { - if ((LoadResult)this._importTables.ImportedLoadResults[index] == loadResult) - return; - } - this._importTables.ImportedLoadResults.Add(loadResult); - } - - public int TrackImportedType(TypeSchema type) - { - this.TrackImportedLoadResult(type.Owner); - return this.TrackImportedSchema(this._importTables.ImportedTypes, type); - } - - public int TrackImportedConstructor(ConstructorSchema constructor) - { - int num = this.TrackImportedSchema(this._importTables.ImportedConstructors, constructor); - this.TrackImportedType(constructor.Owner); - foreach (TypeSchema parameterType in constructor.ParameterTypes) - this.TrackImportedType(parameterType); - return num; - } - - public int TrackImportedProperty(PropertySchema property) - { - int num = this.TrackImportedSchema(this._importTables.ImportedProperties, property); - this.TrackImportedType(property.Owner); - return num; - } - - public int TrackImportedMethod(MethodSchema method) - { - int num = this.TrackImportedSchema(this._importTables.ImportedMethods, method); - this.TrackImportedType(method.Owner); - foreach (TypeSchema parameterType in method.ParameterTypes) - this.TrackImportedType(parameterType); - return num; - } - - public int TrackImportedEvent(EventSchema evt) - { - int num = this.TrackImportedSchema(this._importTables.ImportedEvents, evt); - this.TrackImportedType(evt.Owner); - return num; - } - - public int TrackImportedSchema(Vector importList, object schema) - { - for (int index = 0; index < importList.Count; ++index) - { - if (importList[index] == schema) - return index; - } - int count = importList.Count; - importList.Add(schema); - return count; - } - - public void ReportError(string error, int line, int column) - { - this.MarkHasErrors(); - ErrorManager.ReportError(line, column, error); - } - - public void MarkHasErrors() - { - if (this._hasErrors) - return; - this._hasErrors = true; - this._loadResultTarget.MarkLoadFailed(); - } - - public LoadResult[] PrepareDependenciesTable() - { - LoadResult[] loadResultArray = LoadResult.EmptyList; - int length = 0; - if (this._importTables != null) - { - foreach (LoadResult importedLoadResult in this._importTables.ImportedLoadResults) - { - if (importedLoadResult != this._loadResultTarget) - ++length; - } - } - if (length != 0) - { - loadResultArray = new LoadResult[length]; - int index = 0; - foreach (LoadResult importedLoadResult in this._importTables.ImportedLoadResults) - { - if (importedLoadResult != this._loadResultTarget) - { - loadResultArray[index] = importedLoadResult; - ++index; - } - } - } - return loadResultArray; - } - - public TypeSchema[] PrepareExportTable() - { - TypeSchema[] typeSchemaArray = TypeSchema.EmptyList; - if (this._foundExportedTypes.Count > 0) - { - typeSchemaArray = new TypeSchema[this._foundExportedTypes.Count]; - for (int index = 0; index < this._foundExportedTypes.Count; ++index) - { - MarkupTypeSchema foundExportedType = (MarkupTypeSchema)this._foundExportedTypes[index]; - typeSchemaArray[index] = foundExportedType; - } - } - return typeSchemaArray; - } - - private AliasMapping[] PrepareAliasTable() - { - AliasMapping[] aliasMappingArray = null; - if (this._foundAliasMappings != null) - { - aliasMappingArray = new AliasMapping[this._foundAliasMappings.Count]; - for (int index = 0; index < this._foundAliasMappings.Count; ++index) - aliasMappingArray[index] = (AliasMapping)this._foundAliasMappings[index]; - } - return aliasMappingArray; - } - - private MarkupDataMapping[] PrepareDataMappingTable() - { - MarkupDataMapping[] dataMappingTable = null; - int length = this.PrepareDataMappingTableHelper(null); - if (length > 0) - { - dataMappingTable = new MarkupDataMapping[length]; - this.PrepareDataMappingTableHelper(dataMappingTable); - } - return dataMappingTable; - } - - private int PrepareDataMappingTableHelper(MarkupDataMapping[] dataMappingTable) - { - int dataMappingCount = 0; - if (this._parseResult != null) - { - foreach (ValidateClass validateClass in this._parseResult.ClassList) - { - if (validateClass is ValidateDataType validateDataType) - this.AddDataMappingsHelper(validateDataType.FoundDataMappingSet, dataMappingTable, ref dataMappingCount); - } - foreach (ValidateDataMapping dataMapping in this._parseResult.DataMappingList) - this.AddDataMappingsHelper(dataMapping.FoundDataMappingSet, dataMappingTable, ref dataMappingCount); - } - return dataMappingCount; - } - - private void AddDataMappingsHelper( - Vector dataMappingSet, - MarkupDataMapping[] dataMappingTable, - ref int dataMappingCount) - { - if (dataMappingSet == null) - return; - foreach (MarkupDataMapping dataMapping in dataMappingSet) - { - if (dataMappingTable != null) - dataMappingTable[dataMappingCount] = dataMapping; - ++dataMappingCount; - } - } - - public void NotifyTypeIdentifierFound(string prefix, string type) - { - if (prefix == null) - return; - this._referencedNamespaces[prefix] = null; - } - - public ValidateObjectTag CreateObjectTagValidator( - ValidateTypeIdentifier typeIdentifier, - int line, - int offset, - bool isRootTag) - { - ValidateObjectTag validateObjectTag = null; - if (isRootTag) - { - if (typeIdentifier.TypeName == ClassSchema.Type.Name) - validateObjectTag = new ValidateClass(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == UISchema.Type.Name) - validateObjectTag = new ValidateUI(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == EffectSchema.Type.Name) - validateObjectTag = new ValidateEffect(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == AliasSchema.Type.Name) - validateObjectTag = new ValidateAlias(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == DataTypeSchema.Type.Name) - validateObjectTag = new ValidateDataType(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == DataQuerySchema.Type.Name) - validateObjectTag = new ValidateDataQuery(this, typeIdentifier, line, offset); - else if (typeIdentifier.TypeName == DataMappingSchema.Type.Name) - validateObjectTag = new ValidateDataMapping(this, typeIdentifier, line, offset); - } - else if (typeIdentifier.Prefix == null) - { - if (typeIdentifier.TypeName == TypeConstraintSchema.Type.Name) - { - validateObjectTag = new ValidateTypeConstraint(this, typeIdentifier, line, offset); - } - else - { - TypeSchema type = MarkupSystem.UIXGlobal.FindType(typeIdentifier.TypeName); - if (EffectElementSchema.Type.IsAssignableFrom(type)) - validateObjectTag = new ValidateEffectElement(this, typeIdentifier, line, offset); - } - } - if (validateObjectTag == null) - validateObjectTag = new ValidateObjectTag(this, typeIdentifier, line, offset); - return validateObjectTag; - } - - public void NotifyClassParseComplete(string className) - { - } - - public bool HasErrors => this._hasErrors; - - public ParseResult ParseResult => this._parseResult; - } -} diff --git a/UIX/Microsoft/Iris/Markup/StandardAssemblyTypeSchema.cs b/UIX/Microsoft/Iris/Markup/StandardAssemblyTypeSchema.cs deleted file mode 100644 index fe0c2b7..0000000 --- a/UIX/Microsoft/Iris/Markup/StandardAssemblyTypeSchema.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.StandardAssemblyTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class StandardAssemblyTypeSchema : AssemblyTypeSchema - { - public StandardAssemblyTypeSchema(Type type) - : base(type, null) - { - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/SupportsOperationHandler.cs b/UIX/Microsoft/Iris/Markup/SupportsOperationHandler.cs deleted file mode 100644 index 66be43f..0000000 --- a/UIX/Microsoft/Iris/Markup/SupportsOperationHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SupportsOperationHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate bool SupportsOperationHandler(OperationType op); -} diff --git a/UIX/Microsoft/Iris/Markup/SupportsTypeConversionHandler.cs b/UIX/Microsoft/Iris/Markup/SupportsTypeConversionHandler.cs deleted file mode 100644 index 4545a76..0000000 --- a/UIX/Microsoft/Iris/Markup/SupportsTypeConversionHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SupportsTypeConversionHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public delegate bool SupportsTypeConversionHandler(TypeSchema fromType); -} diff --git a/UIX/Microsoft/Iris/Markup/SymbolOrigin.cs b/UIX/Microsoft/Iris/Markup/SymbolOrigin.cs deleted file mode 100644 index ae21584..0000000 --- a/UIX/Microsoft/Iris/Markup/SymbolOrigin.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SymbolOrigin -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum SymbolOrigin - { - None, - Properties, - Locals, - Input, - Content, - Techniques, - ScopedLocal, - Reserved, - Methods, - Parameter, - } -} diff --git a/UIX/Microsoft/Iris/Markup/SymbolRecord.cs b/UIX/Microsoft/Iris/Markup/SymbolRecord.cs deleted file mode 100644 index 0e3f442..0000000 --- a/UIX/Microsoft/Iris/Markup/SymbolRecord.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SymbolRecord -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class SymbolRecord - { - public string Name; - public TypeSchema Type; - public SymbolOrigin SymbolOrigin; - public static SymbolRecord[] EmptyList = new SymbolRecord[0]; - } -} diff --git a/UIX/Microsoft/Iris/Markup/SymbolReference.cs b/UIX/Microsoft/Iris/Markup/SymbolReference.cs deleted file mode 100644 index c71261b..0000000 --- a/UIX/Microsoft/Iris/Markup/SymbolReference.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.SymbolReference -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public struct SymbolReference - { - private string _symbol; - private SymbolOrigin _origin; - - public SymbolReference(string symbol, SymbolOrigin origin) - { - this._origin = origin; - this._symbol = NotifyService.CanonicalizeString(symbol); - } - - public string Symbol => this._symbol; - - public SymbolOrigin Origin => this._origin; - } -} diff --git a/UIX/Microsoft/Iris/Markup/TypeConstraint.cs b/UIX/Microsoft/Iris/Markup/TypeConstraint.cs deleted file mode 100644 index 0e0303c..0000000 --- a/UIX/Microsoft/Iris/Markup/TypeConstraint.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.TypeConstraint -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class TypeConstraint - { - private TypeSchema _constraint; - private TypeSchema _type; - - public TypeSchema Constraint - { - get => this._constraint; - set => this._constraint = value; - } - - public TypeSchema Type - { - get => this._type; - set => this._type = value; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/TypeConverterHandler.cs b/UIX/Microsoft/Iris/Markup/TypeConverterHandler.cs deleted file mode 100644 index bd6a696..0000000 --- a/UIX/Microsoft/Iris/Markup/TypeConverterHandler.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.TypeConverterHandler -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup -{ - public delegate Result TypeConverterHandler( - object from, - TypeSchema fromType, - out object instance); -} diff --git a/UIX/Microsoft/Iris/Markup/TypeSchema.cs b/UIX/Microsoft/Iris/Markup/TypeSchema.cs deleted file mode 100644 index 2cac111..0000000 --- a/UIX/Microsoft/Iris/Markup/TypeSchema.cs +++ /dev/null @@ -1,248 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.TypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; -using System; - -namespace Microsoft.Iris.Markup -{ - public abstract class TypeSchema : DisposableObject - { - private LoadResult _owner; - private ulong _id; - private Vector _equivalents; - private static ulong s_uniqueId; - private static Map s_idToTypeSchema = new Map(); - public static TypeSchema[] EmptyList = new TypeSchema[0]; - - public TypeSchema(LoadResult owner) - { - this._owner = owner; - this._id = ++s_uniqueId; - s_idToTypeSchema[this._id] = this; - this.DeclareOwner(owner); - } - - protected override void OnDispose() - { - s_idToTypeSchema.Remove(this._id); - base.OnDispose(); - } - - public LoadResult Owner => this._owner; - - public Vector Equivalents => this._equivalents; - - public abstract string Name { get; } - - public abstract string AlternateName { get; } - - public abstract TypeSchema Base { get; } - - public abstract bool Contractual { get; } - - public abstract Type RuntimeType { get; } - - public abstract bool IsNativeAssignableFrom(object check); - - public abstract bool IsNativeAssignableFrom(TypeSchema check); - - public abstract bool Disposable { get; } - - public abstract object ConstructDefault(); - - public abstract bool HasDefaultConstructor { get; } - - public abstract void InitializeInstance(ref object instance); - - public abstract bool HasInitializer { get; } - - public abstract ConstructorSchema FindConstructor(TypeSchema[] parameters); - - public abstract PropertySchema FindProperty(string name); - - public abstract MethodSchema FindMethod(string name, TypeSchema[] parameters); - - public abstract EventSchema FindEvent(string name); - - public abstract object FindCanonicalInstance(string name); - - public virtual ConstructorSchema[] Constructors => (ConstructorSchema[])null; - - public abstract PropertySchema[] Properties { get; } - - public virtual MethodSchema[] Methods => (MethodSchema[])null; - - public virtual EventSchema[] Events => (EventSchema[])null; - - public abstract Result TypeConverter( - object from, - TypeSchema fromType, - out object instance); - - public abstract bool SupportsTypeConversion(TypeSchema fromType); - - public abstract void EncodeBinary(ByteCodeWriter writer, object instance); - - public abstract object DecodeBinary(ByteCodeReader reader); - - public abstract bool SupportsBinaryEncoding { get; } - - public abstract object PerformOperation(object left, object right, OperationType op); - - public abstract bool SupportsOperation(OperationType op); - - public abstract bool IsNullAssignable { get; } - - public abstract bool IsRuntimeImmutable { get; } - - public virtual bool IsEnum => false; - - public virtual bool IsStatic => false; - - public abstract int FindTypeHint { get; } - - public bool IsAssignableFrom(object check) - { - if (check == null) - return this.IsNullAssignable; - return check is ISchemaInfo schemaInfo ? this.IsAssignableFrom(schemaInfo.TypeSchema) : this.IsNativeAssignableFrom(check); - } - - public bool IsAssignableFrom(TypeSchema checkSchema) - { - if (checkSchema == null) - return false; - if (checkSchema == NullSchema.Type && this.IsNullAssignable) - return true; - if (!this.Contractual) - { - for (TypeSchema typeSchema = checkSchema; typeSchema != null; typeSchema = typeSchema.Base) - { - if (this == typeSchema) - return true; - if (typeSchema.Equivalents != null) - { - foreach (TypeSchema equivalent in typeSchema.Equivalents) - { - if (equivalent == this) - return true; - } - } - } - } - return this.IsNativeAssignableFrom(checkSchema); - } - - public PropertySchema FindPropertyDeep(string name) - { - for (TypeSchema typeSchema = this; typeSchema != null; typeSchema = typeSchema.Base) - { - PropertySchema property = typeSchema.FindProperty(name); - if (property != null) - return property; - } - return null; - } - - public Vector FindRequiredPropertyNamesDeep() - { - Vector list = new Vector(); - this.FindRequiredPropertyNamesDeep(list); - return list; - } - - private void FindRequiredPropertyNamesDeep(Vector list) - { - if (this.Base != null) - this.Base.FindRequiredPropertyNamesDeep(list); - foreach (PropertySchema property in this.Properties) - { - int index = list.IndexOf(property.Name); - if (index != -1) - { - if (!property.RequiredForCreation) - list.RemoveAt(index); - } - else if (property.RequiredForCreation) - list.Add(property.Name); - } - } - - public MethodSchema FindMethodDeep(string name, TypeSchema[] parameters) - { - for (TypeSchema typeSchema = this; typeSchema != null; typeSchema = typeSchema.Base) - { - MethodSchema method = typeSchema.FindMethod(name, parameters); - if (method != null) - return method; - } - return null; - } - - public EventSchema FindEventDeep(string name) - { - for (TypeSchema typeSchema = this; typeSchema != null; typeSchema = typeSchema.Base) - { - EventSchema eventSchema = typeSchema.FindEvent(name); - if (eventSchema != null) - return eventSchema; - } - return null; - } - - public bool SupportsOperationDeep(OperationType op) - { - for (TypeSchema typeSchema = this; typeSchema != null; typeSchema = typeSchema.Base) - { - if (typeSchema.SupportsOperation(op)) - return true; - } - return false; - } - - public object PerformOperationDeep(object left, object right, OperationType op) - { - for (TypeSchema typeSchema = this; typeSchema != null; typeSchema = typeSchema.Base) - { - if (typeSchema.SupportsOperation(op)) - return typeSchema.PerformOperation(left, right, op); - } - return null; - } - - public static bool IsUnaryOperation(OperationType op) => op == OperationType.LogicalNot || op == OperationType.MathNegate || op == OperationType.PostIncrement || op == OperationType.PostDecrement; - - public static void RegisterOneWayEquivalence(TypeSchema producer, TypeSchema consumer) - { - if (producer._equivalents == null) - producer._equivalents = new Vector(); - producer._equivalents.Add(consumer); - } - - public static void RegisterTwoWayEquivalence(TypeSchema typeA, TypeSchema typeB) - { - RegisterOneWayEquivalence(typeA, typeB); - RegisterOneWayEquivalence(typeB, typeA); - } - - public void ShareEquivalents(Vector equivalents) => this._equivalents = equivalents; - - public virtual string ErrorContextDescription => string.Format("{0} (Owner='{1}')", Name, this.Owner.Uri ?? "Unavailable"); - - public static string NameFromInstance(object instance) => !(instance is ISchemaInfo schemaInfo) ? instance.GetType().Name : schemaInfo.TypeSchema.Name; - - public ulong UniqueId => this._id; - - public static TypeSchema LookupById(ulong id) - { - TypeSchema typeSchema; - s_idToTypeSchema.TryGetValue(id, out typeSchema); - return typeSchema; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIB.cs b/UIX/Microsoft/Iris/Markup/UIB.cs deleted file mode 100644 index e300b24..0000000 --- a/UIX/Microsoft/Iris/Markup/UIB.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIB -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class UIB - { - public const uint FileSignature = 440551765; - public const uint FileVersion = 1012; - public const ushort InvalidIndex = 65535; - public const ushort ImportIndexIntrinsic = 65534; - public const ushort ImportIndexSelf = 65533; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIClassMethodSchema.cs b/UIX/Microsoft/Iris/Markup/UIClassMethodSchema.cs deleted file mode 100644 index 4f812a6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIClassMethodSchema.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIClassMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup -{ - public class UIClassMethodSchema : MarkupMethodSchema - { - public UIClassMethodSchema( - UIClassTypeSchema owner, - string name, - TypeSchema returnType, - TypeSchema[] parameterTypes, - string[] parameterNames) - : base(owner, name, returnType, parameterTypes, parameterNames) - { - } - - protected override IMarkupTypeBase GetMarkupTypeBase(object instance) - { - if (!(instance is IMarkupTypeBase markupTypeBase)) - { - markupTypeBase = ((Host)instance).ChildUI; - if (markupTypeBase == null) - ErrorManager.ReportError("Host '{0}' is currently not hosting a UI and therefore cannot invoke methods", instance); - } - return markupTypeBase; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIClassPropertySchema.cs b/UIX/Microsoft/Iris/Markup/UIClassPropertySchema.cs deleted file mode 100644 index cefbd7e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIClassPropertySchema.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIClassPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup -{ - public class UIClassPropertySchema : MarkupPropertySchema - { - public UIClassPropertySchema(UIClassTypeSchema owner, string name, TypeSchema propertyType) - : base(owner, name, propertyType) - { - } - - public override object GetValue(object instance) => ((Host)instance).GetChildUIProperty(this.Name); - - public override void SetValue(ref object instance, object value) => ((Host)instance).SetChildUIProperty(this.Name, value); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIClassTypeSchema.cs b/UIX/Microsoft/Iris/Markup/UIClassTypeSchema.cs deleted file mode 100644 index c9160d9..0000000 --- a/UIX/Microsoft/Iris/Markup/UIClassTypeSchema.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIClassTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; -using System; - -namespace Microsoft.Iris.Markup -{ - public class UIClassTypeSchema : MarkupTypeSchema, IDynamicConstructionSchema - { - private NamedContentRecord[] _namedContentTable; - - public UIClassTypeSchema(MarkupLoadResult owner, string name) - : base(owner, name) - { - } - - public override MarkupType MarkupType => MarkupType.UI; - - protected override TypeSchema DefaultBase => HostSchema.Type; - - public override Type RuntimeType => typeof(Host); - - public override object ConstructDefault() => new Host(this); - - object IDynamicConstructionSchema.ConstructDefault( - TypeSchema replacedType) - { - return new Host((UIClassTypeSchema)replacedType, this); - } - - public UIClass ConstructUI() => new UIClass(this); - - public ViewItem ConstructNamedContent( - string name, - IMarkupTypeBase markupType, - ParameterContext parameterContext) - { - ErrorManager.EnterContext(markupType.TypeSchema.Owner.ErrorContextUri); - try - { - uint scriptOffset = uint.MaxValue; - if (this._namedContentTable != null) - { - foreach (NamedContentRecord namedContentRecord in this._namedContentTable) - { - if (namedContentRecord.Name == name) - { - scriptOffset = namedContentRecord.Offset; - break; - } - } - } - if (scriptOffset == uint.MaxValue) - { - UIClassTypeSchema markupTypeBase = (UIClassTypeSchema)this.MarkupTypeBase; - if (markupTypeBase != null) - return markupTypeBase.ConstructNamedContent(name, markupType, parameterContext); - } - if (scriptOffset != uint.MaxValue) - { - object obj = this.RunAtOffset(markupType, scriptOffset, parameterContext); - if (obj != Interpreter.ScriptError) - return (ViewItem)obj; - ErrorManager.ReportWarning("Script runtime failure: Scripting errors have prevented '{0}' named content from being constructed", name); - } - return null; - } - finally - { - ErrorManager.ExitContext(); - } - } - - public override void InitializeInstance(ref object instance) - { - Host ownerHost = instance as Host; - UIClass childUi = ownerHost.ChildUI; - childUi.DeclareHost(ownerHost); - this.InitializeInstance(ownerHost.ChildUI); - if (childUi.RootItem != null) - ownerHost.Children.Add(childUi.RootItem); - childUi.DeclareOwner(ownerHost); - } - - public NamedContentRecord[] NamedContentTable => this._namedContentTable; - - public void SetNamedContentTable(NamedContentRecord[] namedContentTable) => this._namedContentTable = namedContentTable; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs deleted file mode 100644 index 56e9240..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AccessibleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Accessibility; -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AccessibleSchema - { - public static UIXTypeSchema Type; - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).Enabled); - - private static object GetDefaultAction(object instanceObj) => ((Accessible)instanceObj).DefaultAction; - - private static void SetDefaultAction(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).DefaultAction = (string)valueObj; - - private static object GetDefaultActionCommand(object instanceObj) => ((Accessible)instanceObj).DefaultActionCommand; - - private static void SetDefaultActionCommand(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).DefaultActionCommand = (IUICommand)valueObj; - - private static object GetDescription(object instanceObj) => ((Accessible)instanceObj).Description; - - private static void SetDescription(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).Description = (string)valueObj; - - private static object GetHasPopup(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).HasPopup); - - private static void SetHasPopup(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).HasPopup = (bool)valueObj; - - private static object GetHelp(object instanceObj) => ((Accessible)instanceObj).Help; - - private static void SetHelp(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).Help = (string)valueObj; - - private static object GetHelpTopic(object instanceObj) => ((Accessible)instanceObj).HelpTopic; - - private static void SetHelpTopic(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).HelpTopic = (int)valueObj; - - private static object GetIsAnimated(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsAnimated); - - private static void SetIsAnimated(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsAnimated = (bool)valueObj; - - private static object GetIsBusy(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsBusy); - - private static void SetIsBusy(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsBusy = (bool)valueObj; - - private static object GetIsChecked(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsChecked); - - private static void SetIsChecked(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsChecked = (bool)valueObj; - - private static object GetIsCollapsed(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsCollapsed); - - private static void SetIsCollapsed(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsCollapsed = (bool)valueObj; - - private static object GetIsDefault(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsDefault); - - private static void SetIsDefault(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsDefault = (bool)valueObj; - - private static object GetIsExpanded(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsExpanded); - - private static void SetIsExpanded(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsExpanded = (bool)valueObj; - - private static object GetIsMarquee(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsMarquee); - - private static void SetIsMarquee(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsMarquee = (bool)valueObj; - - private static object GetIsMixed(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsMixed); - - private static void SetIsMixed(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsMixed = (bool)valueObj; - - private static object GetIsMultiSelectable(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsMultiSelectable); - - private static void SetIsMultiSelectable(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsMultiSelectable = (bool)valueObj; - - private static object GetIsPressed(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsPressed); - - private static void SetIsPressed(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsPressed = (bool)valueObj; - - private static object GetIsProtected(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsProtected); - - private static void SetIsProtected(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsProtected = (bool)valueObj; - - private static object GetIsSelectable(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsSelectable); - - private static void SetIsSelectable(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsSelectable = (bool)valueObj; - - private static object GetIsSelected(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsSelected); - - private static void SetIsSelected(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsSelected = (bool)valueObj; - - private static object GetIsTraversed(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsTraversed); - - private static void SetIsTraversed(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsTraversed = (bool)valueObj; - - private static object GetIsUnavailable(object instanceObj) => BooleanBoxes.Box(((Accessible)instanceObj).IsUnavailable); - - private static void SetIsUnavailable(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).IsUnavailable = (bool)valueObj; - - private static object GetKeyboardShortcut(object instanceObj) => ((Accessible)instanceObj).KeyboardShortcut; - - private static void SetKeyboardShortcut(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).KeyboardShortcut = (string)valueObj; - - private static object GetName(object instanceObj) => ((Accessible)instanceObj).Name; - - private static void SetName(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).Name = (string)valueObj; - - private static object GetRole(object instanceObj) => ((Accessible)instanceObj).Role; - - private static void SetRole(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).Role = (AccRole)valueObj; - - private static object GetValue(object instanceObj) => ((Accessible)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((Accessible)instanceObj).Value = (string)valueObj; - - private static object Construct() => new Accessible(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(0, "Accessible", null, 153, typeof(Accessible), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(0, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(0, "DefaultAction", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultAction), new SetValueHandler(SetDefaultAction), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(0, "DefaultActionCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultActionCommand), new SetValueHandler(SetDefaultActionCommand), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(0, "Description", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDescription), new SetValueHandler(SetDescription), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(0, "HasPopup", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPopup), new SetValueHandler(SetHasPopup), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(0, "Help", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHelp), new SetValueHandler(SetHelp), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(0, "HelpTopic", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHelpTopic), new SetValueHandler(SetHelpTopic), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(0, "IsAnimated", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsAnimated), new SetValueHandler(SetIsAnimated), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(0, "IsBusy", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsBusy), new SetValueHandler(SetIsBusy), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(0, "IsChecked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsChecked), new SetValueHandler(SetIsChecked), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(0, "IsCollapsed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsCollapsed), new SetValueHandler(SetIsCollapsed), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(0, "IsDefault", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsDefault), new SetValueHandler(SetIsDefault), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(0, "IsExpanded", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsExpanded), new SetValueHandler(SetIsExpanded), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(0, "IsMarquee", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMarquee), new SetValueHandler(SetIsMarquee), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(0, "IsMixed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMixed), new SetValueHandler(SetIsMixed), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(0, "IsMultiSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMultiSelectable), new SetValueHandler(SetIsMultiSelectable), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(0, "IsPressed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsPressed), new SetValueHandler(SetIsPressed), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(0, "IsProtected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsProtected), new SetValueHandler(SetIsProtected), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(0, "IsSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsSelectable), new SetValueHandler(SetIsSelectable), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(0, "IsSelected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsSelected), new SetValueHandler(SetIsSelected), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(0, "IsTraversed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsTraversed), new SetValueHandler(SetIsTraversed), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(0, "IsUnavailable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsUnavailable), new SetValueHandler(SetIsUnavailable), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(0, "KeyboardShortcut", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyboardShortcut), new SetValueHandler(SetKeyboardShortcut), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(0, "Name", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); - UIXPropertySchema uixPropertySchema25 = new UIXPropertySchema(0, "Role", 1, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRole), new SetValueHandler(SetRole), false); - UIXPropertySchema uixPropertySchema26 = new UIXPropertySchema(0, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[26] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema9, - uixPropertySchema10, - uixPropertySchema11, - uixPropertySchema12, - uixPropertySchema13, - uixPropertySchema14, - uixPropertySchema15, - uixPropertySchema16, - uixPropertySchema17, - uixPropertySchema18, - uixPropertySchema19, - uixPropertySchema20, - uixPropertySchema21, - uixPropertySchema22, - uixPropertySchema23, - uixPropertySchema24, - uixPropertySchema25, - uixPropertySchema26 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs deleted file mode 100644 index f0d71c5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AliasSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AliasSchema - { - public static UIXTypeSchema Type; - - private static void SetType(ref object instanceObj, object valueObj) - { - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(2, "Alias", null, -1, typeof(object), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(2, "Type", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetType), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs deleted file mode 100644 index 86fe7b5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AlphaKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AlphaKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new AlphaKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(4, "AlphaKeyframe", null, 130, typeof(AlphaKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(4, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs deleted file mode 100644 index 0806569..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AnchorEdgeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AnchorEdgeSchema - { - public static UIXTypeSchema Type; - - private static object GetId(object instanceObj) => ((AnchorEdge)instanceObj).Id; - - private static void SetId(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).Id = (string)valueObj; - - private static object GetPercent(object instanceObj) => ((AnchorEdge)instanceObj).Percent; - - private static void SetPercent(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).Percent = (float)valueObj; - - private static object GetOffset(object instanceObj) => ((AnchorEdge)instanceObj).Offset; - - private static void SetOffset(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).Offset = (int)valueObj; - - private static object GetMaximumPercent(object instanceObj) => ((AnchorEdge)instanceObj).MaximumPercent; - - private static void SetMaximumPercent(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).MaximumPercent = (float)valueObj; - - private static object GetMaximumOffset(object instanceObj) => ((AnchorEdge)instanceObj).MaximumOffset; - - private static void SetMaximumOffset(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).MaximumOffset = (int)valueObj; - - private static object GetMinimumPercent(object instanceObj) => ((AnchorEdge)instanceObj).MinimumPercent; - - private static void SetMinimumPercent(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).MinimumPercent = (float)valueObj; - - private static object GetMinimumOffset(object instanceObj) => ((AnchorEdge)instanceObj).MinimumOffset; - - private static void SetMinimumOffset(ref object instanceObj, object valueObj) => ((AnchorEdge)instanceObj).MinimumOffset = (int)valueObj; - - private static object Construct() => new AnchorEdge(); - - private static object ConstructIdPercent(object[] parameters) - { - object instanceObj = Construct(); - SetId(ref instanceObj, parameters[0]); - SetPercent(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringIdPercent( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result1.Error); - SetId(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result2.Error); - SetPercent(ref instance, valueObj2); - return result2; - } - - private static object ConstructIdPercentOffset(object[] parameters) - { - object instanceObj = Construct(); - SetId(ref instanceObj, parameters[0]); - SetPercent(ref instanceObj, parameters[1]); - SetOffset(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringIdPercentOffset( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result1.Error); - SetId(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result2.Error); - SetPercent(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], Int32Schema.Type, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result3.Error); - SetOffset(ref instance, valueObj3); - return result3; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - switch (splitString.Length) - { - case 2: - result = ConvertFromStringIdPercent(splitString, out instance); - if (!result.Failed) - return result; - break; - case 3: - result = ConvertFromStringIdPercentOffset(splitString, out instance); - if (!result.Failed) - return result; - break; - default: - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "AnchorEdge"); - break; - } - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(6, "AnchorEdge", null, 153, typeof(AnchorEdge), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(6, "Id", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetId), new SetValueHandler(SetId), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(6, "Percent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPercent), new SetValueHandler(SetPercent), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(6, "Offset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOffset), new SetValueHandler(SetOffset), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(6, "MaximumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaximumPercent), new SetValueHandler(SetMaximumPercent), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(6, "MaximumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaximumOffset), new SetValueHandler(SetMaximumOffset), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(6, "MinimumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumPercent), new SetValueHandler(SetMinimumPercent), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(6, "MinimumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumOffset), new SetValueHandler(SetMinimumOffset), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(6, new short[2] - { - 208, - 194 - }, new ConstructHandler(ConstructIdPercent)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(6, new short[3] - { - 208, - 194, - 115 - }, new ConstructHandler(ConstructIdPercentOffset)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] - { - constructorSchema1, - constructorSchema2 - }, new PropertySchema[7] - { - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema7, - uixPropertySchema6, - uixPropertySchema3, - uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs deleted file mode 100644 index 1a4603e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AnchorLayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AnchorLayoutInputSchema - { - public static UIXTypeSchema Type; - - private static object GetLeft(object instanceObj) => ((AnchorLayoutInput)instanceObj).Left; - - private static void SetLeft(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).Left = (AnchorEdge)valueObj; - - private static object GetTop(object instanceObj) => ((AnchorLayoutInput)instanceObj).Top; - - private static void SetTop(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).Top = (AnchorEdge)valueObj; - - private static object GetRight(object instanceObj) => ((AnchorLayoutInput)instanceObj).Right; - - private static void SetRight(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).Right = (AnchorEdge)valueObj; - - private static object GetBottom(object instanceObj) => ((AnchorLayoutInput)instanceObj).Bottom; - - private static void SetBottom(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).Bottom = (AnchorEdge)valueObj; - - private static object GetContributesToWidth(object instanceObj) => BooleanBoxes.Box(((AnchorLayoutInput)instanceObj).ContributesToWidth); - - private static void SetContributesToWidth(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).ContributesToWidth = (bool)valueObj; - - private static object GetContributesToHeight(object instanceObj) => BooleanBoxes.Box(((AnchorLayoutInput)instanceObj).ContributesToHeight); - - private static void SetContributesToHeight(ref object instanceObj, object valueObj) => ((AnchorLayoutInput)instanceObj).ContributesToHeight = (bool)valueObj; - - private static object Construct() => new AnchorLayoutInput(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string id = (string)valueObj; - instanceObj = null; - instanceObj = new AnchorLayoutInput() - { - Left = new AnchorEdge(id, 0.0f), - Top = new AnchorEdge(id, 0.0f), - Right = new AnchorEdge(id, 1f), - Bottom = new AnchorEdge(id, 1f) - }; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringAnchorLayoutInput( - object instanceObj, - object[] parameters) - { - string parameter1 = (string)parameters[0]; - AnchorLayoutInput parameter2 = (AnchorLayoutInput)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(8, "AnchorLayoutInput", null, 133, typeof(AnchorLayoutInput), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(8, "Left", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), new SetValueHandler(SetLeft), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(8, "Top", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), new SetValueHandler(SetTop), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(8, "Right", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), new SetValueHandler(SetRight), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(8, "Bottom", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), new SetValueHandler(SetBottom), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(8, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContributesToWidth), new SetValueHandler(SetContributesToWidth), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(8, "ContributesToHeight", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContributesToHeight), new SetValueHandler(SetContributesToHeight), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(8, "TryParse", new short[2] - { - 208, - 8 - }, 8, new InvokeHandler(CallTryParseStringAnchorLayoutInput), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema4, - uixPropertySchema6, - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs deleted file mode 100644 index 851d08b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AnchorLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AnchorLayoutSchema - { - public static UIXTypeSchema Type; - - private static object GetSizeToHorizontalChildren(object instanceObj) => BooleanBoxes.Box(((AnchorLayout)instanceObj).SizeToHorizontalChildren); - - private static void SetSizeToHorizontalChildren(ref object instanceObj, object valueObj) => ((AnchorLayout)instanceObj).SizeToHorizontalChildren = (bool)valueObj; - - private static object GetSizeToVerticalChildren(object instanceObj) => BooleanBoxes.Box(((AnchorLayout)instanceObj).SizeToVerticalChildren); - - private static void SetSizeToVerticalChildren(ref object instanceObj, object valueObj) => ((AnchorLayout)instanceObj).SizeToVerticalChildren = (bool)valueObj; - - private static object GetDefaultChildAlignment(object instanceObj) => ((AnchorLayout)instanceObj).DefaultChildAlignment; - - private static void SetDefaultChildAlignment(ref object instanceObj, object valueObj) => ((AnchorLayout)instanceObj).DefaultChildAlignment = (ItemAlignment)valueObj; - - private static object Construct() => new AnchorLayout(); - - private static object ConstructSizeToHorizontalChildrenSizeToVerticalChildren( - object[] parameters) - { - object instanceObj = Construct(); - SetSizeToHorizontalChildren(ref instanceObj, parameters[0]); - SetSizeToVerticalChildren(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringSizeToHorizontalChildrenSizeToVerticalChildren( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], BooleanSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorLayout", result1.Error); - SetSizeToHorizontalChildren(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], BooleanSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "AnchorLayout", result2.Error); - SetSizeToVerticalChildren(ref instance, valueObj2); - return result2; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringSizeToHorizontalChildrenSizeToVerticalChildren(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "AnchorLayout"); - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(7, "AnchorLayout", null, 132, typeof(AnchorLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(7, "SizeToHorizontalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSizeToHorizontalChildren), new SetValueHandler(SetSizeToHorizontalChildren), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(7, "SizeToVerticalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSizeToVerticalChildren), new SetValueHandler(SetSizeToVerticalChildren), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(7, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(7, new short[2] - { - 15, - 15 - }, new ConstructHandler(ConstructSizeToHorizontalChildrenSizeToVerticalChildren)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs deleted file mode 100644 index 93acad4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AnimationHandleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AnimationHandleSchema - { - public static UIXTypeSchema Type; - - private static object GetPlaying(object instanceObj) => BooleanBoxes.Box(((AnimationHandle)instanceObj).Playing); - - private static object Construct() => new AnimationHandle(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(11, "AnimationHandle", null, 153, typeof(AnimationHandle), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(11, "Playing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPlaying), null, false); - UIXEventSchema uixEventSchema = new UIXEventSchema(11, "Completed"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, new EventSchema[1] - { - uixEventSchema - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs deleted file mode 100644 index 66dd888..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.AnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class AnimationSchema - { - public static RangeValidator ValidateLoopValue = new RangeValidator(RangeValidateLoopValue); - public static UIXTypeSchema Type; - - private static object GetCenterPointPercent(object instanceObj) => ((Animation)instanceObj).CenterPointPercent; - - private static void SetCenterPointPercent(ref object instanceObj, object valueObj) => ((Animation)instanceObj).CenterPointPercent = (Vector3)valueObj; - - private static object GetDisableMouseInput(object instanceObj) => BooleanBoxes.Box(((Animation)instanceObj).DisableMouseInput); - - private static void SetDisableMouseInput(ref object instanceObj, object valueObj) => ((Animation)instanceObj).DisableMouseInput = (bool)valueObj; - - private static object GetKeyframes(object instanceObj) => ((AnimationTemplate)instanceObj).Keyframes; - - private static object GetLoop(object instanceObj) => ((AnimationTemplate)instanceObj).Loop; - - private static void SetLoop(ref object instanceObj, object valueObj) - { - Animation animation = (Animation)instanceObj; - int num = (int)valueObj; - Result result = ValidateLoopValue(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - animation.Loop = num; - } - - private static object GetRotationAxis(object instanceObj) => ((Animation)instanceObj).RotationAxis; - - private static void SetRotationAxis(ref object instanceObj, object valueObj) => ((Animation)instanceObj).RotationAxis = (Vector3)valueObj; - - private static object GetType(object instanceObj) => ((Animation)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((Animation)instanceObj).Type = (AnimationEventType)valueObj; - - private static object Construct() => new Animation(); - - private static Result RangeValidateLoopValue(object value) - { - int num = (int)value; - return num < -1 ? Result.Fail("Expecting a value no smaller than {0}, but got {1}", "-1", num.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(9, "Animation", null, 104, typeof(Animation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(9, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetCenterPointPercent), new SetValueHandler(SetCenterPointPercent), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(9, "DisableMouseInput", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDisableMouseInput), new SetValueHandler(SetDisableMouseInput), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(9, "Keyframes", 138, 130, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(9, "Loop", 115, -1, ExpressionRestriction.None, false, ValidateLoopValue, false, new GetValueHandler(GetLoop), new SetValueHandler(SetLoop), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(9, "RotationAxis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRotationAxis), new SetValueHandler(SetRotationAxis), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(9, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema6 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs deleted file mode 100644 index 21fd2cb..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BlendSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BlendSchema - { - public static UIXTypeSchema Type; - - private static object GetInput1(object instanceObj) => ((BlendElement)instanceObj).Input1; - - private static void SetInput1(ref object instanceObj, object valueObj) => ((BlendElement)instanceObj).Input1 = (EffectInput)valueObj; - - private static object GetInput2(object instanceObj) => ((BlendElement)instanceObj).Input2; - - private static void SetInput2(ref object instanceObj, object valueObj) => ((BlendElement)instanceObj).Input2 = (EffectInput)valueObj; - - private static object GetColorOperation(object instanceObj) => ((BlendElement)instanceObj).ColorOperation; - - private static void SetColorOperation(ref object instanceObj, object valueObj) => ((BlendElement)instanceObj).ColorOperation = (ColorOperation)valueObj; - - private static object GetAlphaOperation(object instanceObj) => ((BlendElement)instanceObj).AlphaOperation; - - private static void SetAlphaOperation(ref object instanceObj, object valueObj) => ((BlendElement)instanceObj).AlphaOperation = (AlphaOperation)valueObj; - - private static object Construct() => new BlendElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(13, "Blend", null, 77, typeof(BlendElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(13, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput1), new SetValueHandler(SetInput1), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(13, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput2), new SetValueHandler(SetInput2), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(13, "ColorOperation", 38, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColorOperation), new SetValueHandler(SetColorOperation), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(13, "AlphaOperation", 5, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAlphaOperation), new SetValueHandler(SetAlphaOperation), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema4, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs deleted file mode 100644 index 837e118..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BlurSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BlurSchema - { - public static UIXTypeSchema Type; - - private static object GetMode(object instanceObj) => ((GaussianBlurElement)instanceObj).Mode; - - private static void SetMode(ref object instanceObj, object valueObj) => ((GaussianBlurElement)instanceObj).Mode = (GaussianBlurMode)valueObj; - - private static object GetKernelRadius(object instanceObj) => ((GaussianBlurElement)instanceObj).KernelRadius; - - private static void SetKernelRadius(ref object instanceObj, object valueObj) => ((GaussianBlurElement)instanceObj).KernelRadius = (int)valueObj; - - private static object GetBluriness(object instanceObj) => ((GaussianBlurElement)instanceObj).Bluriness; - - private static void SetBluriness(ref object instanceObj, object valueObj) => ((GaussianBlurElement)instanceObj).Bluriness = (float)valueObj; - - private static object Construct() => new GaussianBlurElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(14, "Blur", null, 80, typeof(GaussianBlurElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(14, "Mode", 96, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMode), new SetValueHandler(SetMode), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(14, "KernelRadius", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKernelRadius), new SetValueHandler(SetKernelRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(14, "Bluriness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBluriness), new SetValueHandler(SetBluriness), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs deleted file mode 100644 index 6b71465..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BooleanChoiceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BooleanChoiceSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => BooleanBoxes.Box(((IUIChoice)instanceObj).ChosenIndex == 1); - - private static void SetValue(ref object instanceObj, object valueObj) - { - IUIBooleanChoice uiBooleanChoice = (IUIBooleanChoice)instanceObj; - if ((bool)valueObj) - uiBooleanChoice.ChosenIndex = 1; - else - uiBooleanChoice.ChosenIndex = 0; - } - - private static object Construct() => new Microsoft.Iris.ModelItems.BooleanChoice(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(16, "BooleanChoice", null, 28, typeof(IUIBooleanChoice), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(16, "Value", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs deleted file mode 100644 index c77113a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs +++ /dev/null @@ -1,173 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BooleanSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BooleanSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => BooleanBoxes.FalseBox; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - bool flag = (bool)instanceObj; - writer.WriteBool(flag); - } - - private static object DecodeBinary(ByteCodeReader reader) => BooleanBoxes.Box(reader.ReadBool()); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - bool result; - if (!bool.TryParse(str, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Boolean"); - instanceObj = BooleanBoxes.Box(result); - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num = (int)valueObj; - instanceObj = null; - bool flag = num != 0; - instanceObj = BooleanBoxes.Box(flag); - return Result.Success; - } - - private static Result ConvertFromInt64(object valueObj, out object instanceObj) - { - long num = (long)valueObj; - instanceObj = null; - bool flag = num != 0L; - instanceObj = BooleanBoxes.Box(flag); - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num = (float)valueObj; - instanceObj = null; - bool flag = num != 0.0; - instanceObj = BooleanBoxes.Box(flag); - return Result.Success; - } - - private static Result ConvertFromDouble(object valueObj, out object instanceObj) - { - double num = (double)valueObj; - instanceObj = null; - bool flag = num != 0.0; - instanceObj = BooleanBoxes.Box(flag); - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => DoubleSchema.Type.IsAssignableFrom(fromType) || Int32Schema.Type.IsAssignableFrom(fromType) || (Int64Schema.Type.IsAssignableFrom(fromType) || SingleSchema.Type.IsAssignableFrom(fromType)) || StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (DoubleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromDouble(from, out instance); - if (!result.Failed) - return result; - } - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (Int64Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt64(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.LogicalAnd: - case OperationType.LogicalOr: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.LogicalNot: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - bool flag1 = (bool)leftObj; - if (op == OperationType.LogicalNot) - return BooleanBoxes.Box(!flag1); - bool flag2 = (bool)rightObj; - switch (op - 6) - { - case 0: - return BooleanBoxes.Box(flag1 && flag2); - case OperationType.MathAdd: - return BooleanBoxes.Box(flag1 || flag2); - case OperationType.MathSubtract: - return BooleanBoxes.Box(flag1 == flag2); - case OperationType.MathMultiply: - return BooleanBoxes.Box(flag1 != flag2); - default: - return null; - } - } - - private static object CallTryParseStringBoolean(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - bool parameter2 = (bool)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(15, "Boolean", "bool", 153, typeof(bool), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(15, "TryParse", new short[2] - { - 208, - 15 - }, 15, new InvokeHandler(CallTryParseStringBoolean), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs deleted file mode 100644 index 7df34af..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BrightnessInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BrightnessInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetBrightness(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Brightness", (float)valueObj); - - private static object CallPlayBrightnessAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Brightness, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(18, "BrightnessInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(18, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetBrightness), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(18, "PlayBrightnessAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayBrightnessAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs deleted file mode 100644 index 4d85c17..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.BrightnessSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class BrightnessSchema - { - public static UIXTypeSchema Type; - - private static object GetBrightness(object instanceObj) => ((BrightnessElement)instanceObj).Brightness; - - private static void SetBrightness(ref object instanceObj, object valueObj) => ((BrightnessElement)instanceObj).Brightness = (float)valueObj; - - private static object Construct() => new BrightnessElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(17, "Brightness", null, 80, typeof(BrightnessElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(17, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBrightness), new SetValueHandler(SetBrightness), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs deleted file mode 100644 index 7d795e9..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ByteRangedValueSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ByteRangedValueSchema - { - public static UIXTypeSchema Type; - - private static object GetMinValue(object instanceObj) => (byte)((IUIRangedValue)instanceObj).MinValue; - - private static void SetMinValue(ref object instanceObj, object valueObj) - { - IUIByteRangedValue uiByteRangedValue = (IUIByteRangedValue)instanceObj; - byte num = (byte)valueObj; - if (num > (double)uiByteRangedValue.MaxValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MinValue"); - else - uiByteRangedValue.MinValue = num; - } - - private static object GetMaxValue(object instanceObj) => (byte)((IUIRangedValue)instanceObj).MaxValue; - - private static void SetMaxValue(ref object instanceObj, object valueObj) - { - IUIByteRangedValue uiByteRangedValue = (IUIByteRangedValue)instanceObj; - byte num = (byte)valueObj; - if (num < (double)uiByteRangedValue.MinValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MaxValue"); - else - uiByteRangedValue.MaxValue = num; - } - - private static object GetStep(object instanceObj) => (byte)((IUIRangedValue)instanceObj).Step; - - private static void SetStep(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Step = (byte)valueObj; - - private static object GetValue(object instanceObj) => (byte)((IUIRangedValue)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Value = (byte)valueObj; - - private static object Construct() => new Microsoft.Iris.ModelItems.ByteRangedValue(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(20, "ByteRangedValue", null, 168, typeof(IUIByteRangedValue), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(20, "MinValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(20, "MaxValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(20, "Step", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(20, "Value", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs deleted file mode 100644 index 6494e00..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ByteSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ByteSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => (byte)0; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - byte num = (byte)instanceObj; - writer.WriteByte(num); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadByte(); - - private static object CallToStringString(object instanceObj, object[] parameters) => ((byte)instanceObj).ToString((string)parameters[0]); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - byte result; - if (!byte.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Byte"); - instanceObj = result; - return Result.Success; - } - - private static Result ConvertFromBoolean(object valueObj, out object instanceObj) - { - bool flag = (bool)valueObj; - instanceObj = null; - byte num = 0; - if (flag) num = 1; - instanceObj = num; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num1 = (int)valueObj; - instanceObj = null; - byte num2 = (byte)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt64(object valueObj, out object instanceObj) - { - long num1 = (long)valueObj; - instanceObj = null; - byte num2 = (byte)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - byte num2 = (byte)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromDouble(object valueObj, out object instanceObj) - { - double num1 = (double)valueObj; - instanceObj = null; - byte num2 = (byte)num1; - instanceObj = num2; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => BooleanSchema.Type.IsAssignableFrom(fromType) || DoubleSchema.Type.IsAssignableFrom(fromType) || (Int32Schema.Type.IsAssignableFrom(fromType) || Int64Schema.Type.IsAssignableFrom(fromType)) || (SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType)); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (BooleanSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromBoolean(from, out instance); - if (!result.Failed) - return result; - } - if (DoubleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromDouble(from, out instance); - if (!result.Failed) - return result; - } - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (Int64Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt64(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.MathModulus: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.RelationalLessThan: - case OperationType.RelationalGreaterThan: - case OperationType.RelationalLessThanEquals: - case OperationType.RelationalGreaterThanEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - byte num1 = (byte)leftObj; - byte num2 = (byte)rightObj; - switch (op) - { - case OperationType.MathAdd: - return (byte)(num1 + (uint)num2); - case OperationType.MathSubtract: - return (byte)(num1 - (uint)num2); - case OperationType.MathMultiply: - return (byte)(num1 * (uint)num2); - case OperationType.MathDivide: - return (byte)(num1 / (uint)num2); - case OperationType.MathModulus: - return (byte)(num1 % (uint)num2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(num1 == num2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(num1 != num2); - case OperationType.RelationalLessThan: - return BooleanBoxes.Box(num1 < num2); - case OperationType.RelationalGreaterThan: - return BooleanBoxes.Box(num1 > num2); - case OperationType.RelationalLessThanEquals: - return BooleanBoxes.Box(num1 <= num2); - case OperationType.RelationalGreaterThanEquals: - return BooleanBoxes.Box(num1 >= num2); - default: - return null; - } - } - - private static object CallTryParseStringByte(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - byte parameter2 = (byte)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(19, "Byte", "byte", 153, typeof(byte), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(19, "ToString", new short[1] - { - 208 - }, 208, new InvokeHandler(CallToStringString), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(19, "TryParse", new short[2] - { - 208, - 19 - }, 19, new InvokeHandler(CallTryParseStringByte), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs deleted file mode 100644 index 18e1a80..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CameraAtKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CameraAtKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new CameraAtKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(22, "CameraAtKeyframe", null, 130, typeof(CameraAtKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(22, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs deleted file mode 100644 index 16ebc52..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CameraEyeKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CameraEyeKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new CameraEyeKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(23, "CameraEyeKeyframe", null, 130, typeof(CameraEyeKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(23, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs deleted file mode 100644 index c2010e0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CameraSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CameraSchema - { - public static UIXTypeSchema Type; - - private static object GetEye(object instanceObj) => ((Camera)instanceObj).Eye; - - private static void SetEye(ref object instanceObj, object valueObj) => ((Camera)instanceObj).Eye = (Vector3)valueObj; - - private static object GetAt(object instanceObj) => ((Camera)instanceObj).At; - - private static void SetAt(ref object instanceObj, object valueObj) => ((Camera)instanceObj).At = (Vector3)valueObj; - - private static object GetUp(object instanceObj) => ((Camera)instanceObj).Up; - - private static void SetUp(ref object instanceObj, object valueObj) => ((Camera)instanceObj).Up = (Vector3)valueObj; - - private static object GetZn(object instanceObj) => ((Camera)instanceObj).Zn; - - private static void SetZn(ref object instanceObj, object valueObj) => ((Camera)instanceObj).Zn = (float)valueObj; - - private static object GetEyeAnimation(object instanceObj) => ((Camera)instanceObj).EyeAnimation; - - private static void SetEyeAnimation(ref object instanceObj, object valueObj) => ((Camera)instanceObj).EyeAnimation = (IAnimationProvider)valueObj; - - private static object GetAtAnimation(object instanceObj) => ((Camera)instanceObj).AtAnimation; - - private static void SetAtAnimation(ref object instanceObj, object valueObj) => ((Camera)instanceObj).AtAnimation = (IAnimationProvider)valueObj; - - private static object GetUpAnimation(object instanceObj) => ((Camera)instanceObj).UpAnimation; - - private static void SetUpAnimation(ref object instanceObj, object valueObj) => ((Camera)instanceObj).UpAnimation = (IAnimationProvider)valueObj; - - private static object GetZnAnimation(object instanceObj) => ((Camera)instanceObj).ZnAnimation; - - private static void SetZnAnimation(ref object instanceObj, object valueObj) => ((Camera)instanceObj).ZnAnimation = (IAnimationProvider)valueObj; - - private static object GetPerspective(object instanceObj) => BooleanBoxes.Box(((Camera)instanceObj).Perspective); - - private static void SetPerspective(ref object instanceObj, object valueObj) => ((Camera)instanceObj).Perspective = (bool)valueObj; - - private static object Construct() => new Camera(); - - private static object CallPlayAnimationIAnimation(object instanceObj, object[] parameters) - { - Camera camera = (Camera)instanceObj; - IAnimationProvider parameter = (IAnimationProvider)parameters[0]; - if (parameter == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - camera.PlayAnimation(parameter, null); - return null; - } - - private static object CallPlayAnimationIAnimationAnimationHandle( - object instanceObj, - object[] parameters) - { - Camera camera = (Camera)instanceObj; - IAnimationProvider parameter1 = (IAnimationProvider)parameters[0]; - AnimationHandle parameter2 = (AnimationHandle)parameters[1]; - if (parameter1 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - if (parameter2 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "handle"); - return null; - } - camera.PlayAnimation(parameter1, parameter2); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(21, "Camera", null, 153, typeof(Camera), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(21, "Eye", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEye), new SetValueHandler(SetEye), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(21, "At", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAt), new SetValueHandler(SetAt), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(21, "Up", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUp), new SetValueHandler(SetUp), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(21, "Zn", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetZn), new SetValueHandler(SetZn), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(21, "EyeAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEyeAnimation), new SetValueHandler(SetEyeAnimation), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(21, "AtAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAtAnimation), new SetValueHandler(SetAtAnimation), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(21, "UpAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUpAnimation), new SetValueHandler(SetUpAnimation), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(21, "ZnAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetZnAnimation), new SetValueHandler(SetZnAnimation), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(21, "Perspective", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPerspective), new SetValueHandler(SetPerspective), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(21, "PlayAnimation", new short[1] - { - 104 - }, 240, new InvokeHandler(CallPlayAnimationIAnimation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(21, "PlayAnimation", new short[2] - { - 104, - 11 - }, 240, new InvokeHandler(CallPlayAnimationIAnimationAnimationHandle), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] - { - uixPropertySchema2, - uixPropertySchema6, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema9, - uixPropertySchema3, - uixPropertySchema7, - uixPropertySchema4, - uixPropertySchema8 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs deleted file mode 100644 index 11f1a8c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CameraUpKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CameraUpKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new CameraUpKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(24, "CameraUpKeyframe", null, 130, typeof(CameraUpKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(24, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs deleted file mode 100644 index 383ccad..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CameraZnKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CameraZnKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new CameraZnKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(25, "CameraZnKeyframe", null, 130, typeof(CameraZnKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(25, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs deleted file mode 100644 index e012193..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CaretInfoSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CaretInfoSchema - { - public static UIXTypeSchema Type; - - private static object GetBlinkTime(object instanceObj) => ((CaretInfo)instanceObj).BlinkTime; - - private static object GetIdealWidth(object instanceObj) => ((CaretInfo)instanceObj).IdealWidth; - - private static void SetIdealWidth(ref object instanceObj, object valueObj) => ((CaretInfo)instanceObj).IdealWidth = (int)valueObj; - - private static object GetVisible(object instanceObj) => BooleanBoxes.Box(((CaretInfo)instanceObj).Visible); - - private static object GetPosition(object instanceObj) => ((CaretInfo)instanceObj).Position; - - private static object GetSuggestedSize(object instanceObj) => ((CaretInfo)instanceObj).SuggestedSize; - - private static object Construct() => new CaretInfo(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(26, "CaretInfo", null, 153, typeof(CaretInfo), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(26, "BlinkTime", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBlinkTime), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(26, "IdealWidth", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIdealWidth), new SetValueHandler(SetIdealWidth), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(26, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(26, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPosition), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(26, "SuggestedSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSuggestedSize), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs deleted file mode 100644 index 407fb30..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CharSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CharSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => char.MinValue; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - char ch = (char)instanceObj; - writer.WriteChar(ch); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadChar(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - if (str == null || str.Length != 1) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Char"); - char ch = str[0]; - instanceObj = ch; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - char ch1 = (char)leftObj; - char ch2 = (char)rightObj; - switch (op) - { - case OperationType.RelationalEquals: - return BooleanBoxes.Box(ch1 == ch2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(ch1 != ch2); - default: - return null; - } - } - - private static object CallTryParseStringChar(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - char parameter2 = (char)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(27, "Char", "char", 153, typeof(char), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(27, "TryParse", new short[2] - { - 208, - 27 - }, 27, new InvokeHandler(CallTryParseStringChar), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs deleted file mode 100644 index c298492..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ChoiceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ChoiceSchema - { - public static UIXTypeSchema Type; - - private static object GetChosenValue(object instanceObj) => ((IUIChoice)instanceObj).ChosenValue; - - private static void SetChosenValue(ref object instanceObj, object valueObj) - { - IUIChoice uiChoice = (IUIChoice)instanceObj; - object obj = valueObj; - int index; - string error; - if (uiChoice.ValidateOption(obj, out index, out error)) - uiChoice.ChosenIndex = index; - else - ErrorManager.ReportError(error); - } - - private static object GetChosenIndex(object instanceObj) => ((IUIChoice)instanceObj).ChosenIndex; - - private static void SetChosenIndex(ref object instanceObj, object valueObj) - { - IUIChoice uiChoice = (IUIChoice)instanceObj; - int index = (int)valueObj; - string error; - if (uiChoice.ValidateIndex(index, out error)) - uiChoice.ChosenIndex = index; - else - ErrorManager.ReportError(error); - } - - private static object GetDefaultIndex(object instanceObj) => ((IUIChoice)instanceObj).DefaultIndex; - - private static void SetDefaultIndex(ref object instanceObj, object valueObj) => ((IUIChoice)instanceObj).DefaultIndex = (int)valueObj; - - private static object GetOptions(object instanceObj) => ((IUIChoice)instanceObj).Options; - - private static void SetOptions(ref object instanceObj, object valueObj) - { - IUIChoice uiChoice = (IUIChoice)instanceObj; - IList list = (IList)valueObj; - string error; - if (uiChoice.ValidateOptionsList(list, out error)) - uiChoice.Options = list; - else - ErrorManager.ReportError(error); - } - - private static object GetHasSelection(object instanceObj) => BooleanBoxes.Box(((IUIChoice)instanceObj).HasSelection); - - private static object GetWrap(object instanceObj) => BooleanBoxes.Box(((IUIChoice)instanceObj).Wrap); - - private static void SetWrap(ref object instanceObj, object valueObj) => ((IUIChoice)instanceObj).Wrap = (bool)valueObj; - - private static object GetHasPreviousValue(object instanceObj) => BooleanBoxes.Box(((IUIValueRange)instanceObj).HasPreviousValue); - - private static object GetHasNextValue(object instanceObj) => BooleanBoxes.Box(((IUIValueRange)instanceObj).HasNextValue); - - private static object Construct() => new Microsoft.Iris.ModelItems.Choice(); - - private static object CallPreviousValue(object instanceObj, object[] parameters) - { - ((IUIValueRange)instanceObj).PreviousValue(); - return null; - } - - private static object CallPreviousValueBoolean(object instanceObj, object[] parameters) - { - ((IUIChoice)instanceObj).PreviousValue((bool)parameters[0]); - return null; - } - - private static object CallNextValue(object instanceObj, object[] parameters) - { - ((IUIValueRange)instanceObj).NextValue(); - return null; - } - - private static object CallNextValueBoolean(object instanceObj, object[] parameters) - { - ((IUIChoice)instanceObj).NextValue((bool)parameters[0]); - return null; - } - - private static object CallDefaultValue(object instanceObj, object[] parameters) - { - ((IUIChoice)instanceObj).DefaultValue(); - return null; - } - - private static object CallClear(object instanceObj, object[] parameters) - { - ((IUIChoice)instanceObj).Clear(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(28, "Choice", null, 231, typeof(IUIChoice), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(28, "ChosenValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChosenValue), new SetValueHandler(SetChosenValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(28, "ChosenIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChosenIndex), new SetValueHandler(SetChosenIndex), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(28, "DefaultIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultIndex), new SetValueHandler(SetDefaultIndex), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(28, "Options", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOptions), new SetValueHandler(SetOptions), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(28, "HasSelection", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasSelection), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(28, "Wrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWrap), new SetValueHandler(SetWrap), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(28, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPreviousValue), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(28, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasNextValue), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(28, "PreviousValue", null, 240, new InvokeHandler(CallPreviousValue), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(28, "PreviousValue", new short[1] - { - 15 - }, 240, new InvokeHandler(CallPreviousValueBoolean), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(28, "NextValue", null, 240, new InvokeHandler(CallNextValue), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(28, "NextValue", new short[1] - { - 15 - }, 240, new InvokeHandler(CallNextValueBoolean), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(28, "DefaultValue", null, 240, new InvokeHandler(CallDefaultValue), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(28, "Clear", null, 240, new InvokeHandler(CallClear), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema8, - uixPropertySchema7, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema6 - }, new MethodSchema[6] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs deleted file mode 100644 index 0e869fd..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ClassSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ClassSchema - { - public static UIXTypeSchema Type; - - private static void SetShared(ref object instanceObj, object valueObj) - { - Class @class = (Class)instanceObj; - int num = (bool)valueObj ? 1 : 0; - } - - private static void SetBase(ref object instanceObj, object valueObj) - { - Class @class = (Class)instanceObj; - } - - private static object GetProperties(object instanceObj) => ((Class)instanceObj).Storage; - - private static object GetLocals(object instanceObj) => ((Class)instanceObj).Storage; - - private static object GetScripts(object instanceObj) => (object)null; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(29, "Class", null, -1, typeof(Class), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(29, "Shared", 15, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetShared), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(29, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetBase), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(29, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetProperties), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(29, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetLocals), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(29, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetScripts), null, false); - Type.Initialize(null, null, new PropertySchema[5] - { - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs deleted file mode 100644 index f56f961..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ClassStateSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ClassStateSchema - { - public static UIXTypeSchema Type; - - private static object CallDisposeOwnedObjectObject(object instanceObj, object[] parameters) - { - Class @class = (Class)instanceObj; - object parameter = parameters[0]; - if (parameter == null) - return null; - if (!(parameter is IDisposableObject disposable)) - { - ErrorManager.ReportError("Attempt to dispose an object '{0}' that isn't disposable", TypeSchema.NameFromInstance(parameter)); - return null; - } - if (!@class.UnregisterDisposable(ref disposable)) - { - ErrorManager.ReportError("Attempt to dispose an object '{0}' that '{1}' doesn't own", TypeSchema.NameFromInstance(disposable), @class.TypeSchema.Name); - return null; - } - disposable.Dispose(@class); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(30, "ClassState", null, -1, typeof(Class), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(30, "DisposeOwnedObject", new short[1] - { - 153 - }, 240, new InvokeHandler(CallDisposeOwnedObjectObject), false); - Type.Initialize(null, null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs deleted file mode 100644 index 4310b65..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ClickHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ClickHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetClicking(object instanceObj) => BooleanBoxes.Box(((ClickHandler)instanceObj).Clicking); - - private static object GetClickCount(object instanceObj) => ((ClickHandler)instanceObj).ClickCount; - - private static void SetClickCount(ref object instanceObj, object valueObj) => ((ClickHandler)instanceObj).ClickCount = (ClickCount)valueObj; - - private static object GetClickType(object instanceObj) => ((ClickHandler)instanceObj).ClickType; - - private static void SetClickType(ref object instanceObj, object valueObj) => ((ClickHandler)instanceObj).ClickType = (ClickType)valueObj; - - private static object GetCommand(object instanceObj) => ((ClickHandler)instanceObj).Command; - - private static void SetCommand(ref object instanceObj, object valueObj) => ((ClickHandler)instanceObj).Command = (IUICommand)valueObj; - - private static object GetHandle(object instanceObj) => BooleanBoxes.Box(((ClickHandler)instanceObj).Handle); - - private static void SetHandle(ref object instanceObj, object valueObj) => ((ClickHandler)instanceObj).Handle = (bool)valueObj; - - private static object GetHandlerTransition(object instanceObj) => ((ModifierInputHandler)instanceObj).HandlerTransition; - - private static void SetHandlerTransition(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).HandlerTransition = (InputHandlerTransition)valueObj; - - private static object GetRequiredModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers; - - private static void SetRequiredModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers = (InputHandlerModifiers)valueObj; - - private static object GetDisallowedModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers; - - private static void SetDisallowedModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers = (InputHandlerModifiers)valueObj; - - private static object GetRepeat(object instanceObj) => BooleanBoxes.Box(((ClickHandler)instanceObj).Repeat); - - private static void SetRepeat(ref object instanceObj, object valueObj) => ((ClickHandler)instanceObj).Repeat = (bool)valueObj; - - private static object GetRepeatDelay(object instanceObj) => ((ClickHandler)instanceObj).RepeatDelay; - - private static void SetRepeatDelay(ref object instanceObj, object valueObj) - { - ClickHandler clickHandler = (ClickHandler)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - clickHandler.RepeatDelay = num; - } - - private static object GetRepeatRate(object instanceObj) => ((ClickHandler)instanceObj).RepeatRate; - - private static void SetRepeatRate(ref object instanceObj, object valueObj) - { - ClickHandler clickHandler = (ClickHandler)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - clickHandler.RepeatRate = num; - } - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetEventContext(object instanceObj) => ((ClickHandler)instanceObj).EventContext; - - private static object Construct() => new ClickHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(32, "ClickHandler", null, 110, typeof(ClickHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(32, "Clicking", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClicking), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(32, "ClickCount", 31, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClickCount), new SetValueHandler(SetClickCount), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(32, "ClickType", 33, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClickType), new SetValueHandler(SetClickType), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(32, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(32, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(32, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerTransition), new SetValueHandler(SetHandlerTransition), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(32, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(32, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(32, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(32, "RepeatDelay", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetRepeatDelay), new SetValueHandler(SetRepeatDelay), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(32, "RepeatRate", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetRepeatRate), new SetValueHandler(SetRepeatRate), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(32, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(32, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); - UIXEventSchema uixEventSchema = new UIXEventSchema(32, "Invoked"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[13] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema13, - uixPropertySchema5, - uixPropertySchema12, - uixPropertySchema6, - uixPropertySchema9, - uixPropertySchema10, - uixPropertySchema11, - uixPropertySchema7 - }, null, new EventSchema[1] - { - uixEventSchema - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs deleted file mode 100644 index b3a55cd..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ClipSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ClipSchema - { - public static UIXTypeSchema Type; - - private static object GetChildren(object instanceObj) => ViewItemSchema.ListProxy.GetChildren((ViewItem)instanceObj); - - private static object GetOrientation(object instanceObj) => ((Clip)instanceObj).Orientation; - - private static void SetOrientation(ref object instanceObj, object valueObj) => ((Clip)instanceObj).Orientation = (Orientation)valueObj; - - private static object GetFadeSize(object instanceObj) => ((Clip)instanceObj).FadeSize; - - private static void SetFadeSize(ref object instanceObj, object valueObj) => ((Clip)instanceObj).FadeSize = (float)valueObj; - - private static object GetNearOffset(object instanceObj) => ((Clip)instanceObj).NearOffset; - - private static void SetNearOffset(ref object instanceObj, object valueObj) => ((Clip)instanceObj).NearOffset = (float)valueObj; - - private static object GetFarOffset(object instanceObj) => ((Clip)instanceObj).FarOffset; - - private static void SetFarOffset(ref object instanceObj, object valueObj) => ((Clip)instanceObj).FarOffset = (float)valueObj; - - private static object GetNearPercent(object instanceObj) => ((Clip)instanceObj).NearPercent; - - private static void SetNearPercent(ref object instanceObj, object valueObj) => ((Clip)instanceObj).NearPercent = (float)valueObj; - - private static object GetFarPercent(object instanceObj) => ((Clip)instanceObj).FarPercent; - - private static void SetFarPercent(ref object instanceObj, object valueObj) => ((Clip)instanceObj).FarPercent = (float)valueObj; - - private static object GetShowNear(object instanceObj) => BooleanBoxes.Box(((Clip)instanceObj).ShowNear); - - private static void SetShowNear(ref object instanceObj, object valueObj) => ((Clip)instanceObj).ShowNear = (bool)valueObj; - - private static object GetShowFar(object instanceObj) => BooleanBoxes.Box(((Clip)instanceObj).ShowFar); - - private static void SetShowFar(ref object instanceObj, object valueObj) => ((Clip)instanceObj).ShowFar = (bool)valueObj; - - private static object GetColorMask(object instanceObj) => ((Clip)instanceObj).ColorMask; - - private static void SetColorMask(ref object instanceObj, object valueObj) => ((Clip)instanceObj).ColorMask = (Color)valueObj; - - private static object GetFadeAmount(object instanceObj) => ((Clip)instanceObj).FadeAmount; - - private static void SetFadeAmount(ref object instanceObj, object valueObj) - { - Clip clip = (Clip)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - clip.FadeAmount = num; - } - - private static object Construct() => new Clip(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(34, "Clip", null, 239, typeof(Clip), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(34, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(34, "Orientation", 154, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(34, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFadeSize), new SetValueHandler(SetFadeSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(34, "NearOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNearOffset), new SetValueHandler(SetNearOffset), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(34, "FarOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFarOffset), new SetValueHandler(SetFarOffset), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(34, "NearPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNearPercent), new SetValueHandler(SetNearPercent), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(34, "FarPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFarPercent), new SetValueHandler(SetFarPercent), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(34, "ShowNear", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowNear), new SetValueHandler(SetShowNear), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(34, "ShowFar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowFar), new SetValueHandler(SetShowFar), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(34, "ColorMask", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColorMask), new SetValueHandler(SetColorMask), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(34, "FadeAmount", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(GetFadeAmount), new SetValueHandler(SetFadeAmount), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[11] - { - uixPropertySchema1, - uixPropertySchema10, - uixPropertySchema11, - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema4, - uixPropertySchema6, - uixPropertySchema2, - uixPropertySchema9, - uixPropertySchema8 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs deleted file mode 100644 index f0adbd2..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ColorElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ColorElementInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Color", (Color)valueObj); - - private static object CallPlayColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Color, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(37, "ColorElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(37, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetColor), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(37, "PlayColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayColorAnimationEffectColorAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs deleted file mode 100644 index 174c2fa..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ColorElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ColorElementSchema - { - public static UIXTypeSchema Type; - - private static void SetColor(ref object instanceObj, object valueObj) => ((ColorElement)instanceObj).Color = ((Color)valueObj).RenderConvert(); - - private static object Construct() => new ColorElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(36, "ColorElement", null, 77, typeof(ColorElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(36, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetColor), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs deleted file mode 100644 index b9c81ef..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs +++ /dev/null @@ -1,1030 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ColorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ColorSchema - { - private static Dictionary s_NameToColorMap; - private static readonly object s_Default = new Color(byte.MaxValue, 0, 0, 0); - public static UIXTypeSchema Type; - - private static object GetAlpha(object instanceObj) => (float)(((Color)instanceObj).A / (double)byte.MaxValue); - - private static void SetAlpha(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - { - ErrorManager.ReportError(result.Error); - } - else - { - color.A = (byte)(num * (double)byte.MaxValue); - instanceObj = color; - } - } - - private static object GetRed(object instanceObj) => (float)(((Color)instanceObj).R / (double)byte.MaxValue); - - private static void SetRed(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - { - ErrorManager.ReportError(result.Error); - } - else - { - color.R = (byte)(num * (double)byte.MaxValue); - instanceObj = color; - } - } - - private static object GetGreen(object instanceObj) => (float)(((Color)instanceObj).G / (double)byte.MaxValue); - - private static void SetGreen(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - { - ErrorManager.ReportError(result.Error); - } - else - { - color.G = (byte)(num * (double)byte.MaxValue); - instanceObj = color; - } - } - - private static object GetBlue(object instanceObj) => (float)(((Color)instanceObj).B / (double)byte.MaxValue); - - private static void SetBlue(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - { - ErrorManager.ReportError(result.Error); - } - else - { - color.B = (byte)(num * (double)byte.MaxValue); - instanceObj = color; - } - } - - private static object GetA(object instanceObj) => ((Color)instanceObj).A; - - private static void SetA(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - byte num = (byte)valueObj; - color.A = num; - instanceObj = color; - } - - private static object GetR(object instanceObj) => ((Color)instanceObj).R; - - private static void SetR(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - byte num = (byte)valueObj; - color.R = num; - instanceObj = color; - } - - private static object GetG(object instanceObj) => ((Color)instanceObj).G; - - private static void SetG(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - byte num = (byte)valueObj; - color.G = num; - instanceObj = color; - } - - private static object GetB(object instanceObj) => ((Color)instanceObj).B; - - private static void SetB(ref object instanceObj, object valueObj) - { - Color color = (Color)instanceObj; - byte num = (byte)valueObj; - color.B = num; - instanceObj = color; - } - - private static object Construct() => s_Default; - - private static object ConstructAlphaRedGreenBlue(object[] parameters) - { - object instanceObj = Construct(); - SetAlpha(ref instanceObj, parameters[0]); - SetRed(ref instanceObj, parameters[1]); - SetGreen(ref instanceObj, parameters[2]); - SetBlue(ref instanceObj, parameters[3]); - return instanceObj; - } - - private static Result ConvertFromStringAlphaRedGreenBlue( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - SetAlpha(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - SetRed(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - SetGreen(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result4.Error); - SetBlue(ref instance, valueObj4); - return result4; - } - - private static object ConstructARGB(object[] parameters) - { - object instanceObj = Construct(); - SetA(ref instanceObj, parameters[0]); - SetR(ref instanceObj, parameters[1]); - SetG(ref instanceObj, parameters[2]); - SetB(ref instanceObj, parameters[3]); - return instanceObj; - } - - private static Result ConvertFromStringARGB(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], ByteSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - SetA(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], ByteSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - SetR(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], ByteSchema.Type, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - SetG(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], ByteSchema.Type, null, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result4.Error); - SetB(ref instance, valueObj4); - return result4; - } - - private static object ConstructRedGreenBlue(object[] parameters) - { - object instanceObj = Construct(); - SetRed(ref instanceObj, parameters[0]); - SetGreen(ref instanceObj, parameters[1]); - SetBlue(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringRedGreenBlue( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - SetRed(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - SetGreen(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - SetBlue(ref instance, valueObj3); - return result3; - } - - private static object ConstructRGB(object[] parameters) - { - object instanceObj = Construct(); - SetR(ref instanceObj, parameters[0]); - SetG(ref instanceObj, parameters[1]); - SetB(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringRGB(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], ByteSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - SetR(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], ByteSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - SetG(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], ByteSchema.Type, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - SetB(ref instance, valueObj3); - return result3; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Color color = (Color)instanceObj; - writer.WriteUInt32(color.Value); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Color(reader.ReadUInt32()); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - uint num; - if (!s_NameToColorMap.TryGetValue(str.ToLowerInvariant(), out num)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Color"); - Color color = new Color(num); - instanceObj = color; - return Result.Success; - } - - private static object FindCanonicalInstance(string name) - { - uint num; - return s_NameToColorMap.TryGetValue(name.ToLowerInvariant(), out num) ? new Color(num) : (object)null; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result1 = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result1 = ConvertFromString(from, out instance); - if (!result1.Failed) - return result1; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - switch (splitString.Length) - { - case 3: - Result result2 = ConvertFromStringRedGreenBlue(splitString, out instance); - if (!result2.Failed) - return result2; - result1 = ConvertFromStringRGB(splitString, out instance); - if (!result1.Failed) - return result1; - break; - case 4: - Result result3 = ConvertFromStringAlphaRedGreenBlue(splitString, out instance); - if (!result3.Failed) - return result3; - result1 = ConvertFromStringARGB(splitString, out instance); - if (!result1.Failed) - return result1; - break; - default: - result1 = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Color"); - break; - } - } - return result1; - } - - private static object CallTryParseStringColor(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Color parameter2 = (Color)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - static ColorSchema() => s_NameToColorMap = new Dictionary(153) - { - { - "aliceblue", - 4293982463U - }, - { - "antiquewhite", - 4294634455U - }, - { - "aqua", - 4278255615U - }, - { - "aquamarine", - 4286578644U - }, - { - "azure", - 4293984255U - }, - { - "beige", - 4294309340U - }, - { - "bisque", - 4294960324U - }, - { - "black", - 4278190080U - }, - { - "blanchedalmond", - 4294962125U - }, - { - "blue", - 4278190335U - }, - { - "blueviolet", - 4287245282U - }, - { - "brown", - 4289014314U - }, - { - "burlywood", - 4292786311U - }, - { - "cadetblue", - 4284456608U - }, - { - "chartreuse", - 4286578432U - }, - { - "chocolate", - 4291979550U - }, - { - "coral", - 4294934352U - }, - { - "cornflowerblue", - 4284782061U - }, - { - "cornsilk", - 4294965468U - }, - { - "crimson", - 4292613180U - }, - { - "cyan", - 4278255615U - }, - { - "darkblue", - 4278190219U - }, - { - "darkcyan", - 4278225803U - }, - { - "darkgoldenrod", - 4290283019U - }, - { - "darkgray", - 4289309097U - }, - { - "darkgreen", - 4278215680U - }, - { - "darkgrey", - 4289309097U - }, - { - "darkkhaki", - 4290623339U - }, - { - "darkmagenta", - 4287299723U - }, - { - "darkolivegreen", - 4283788079U - }, - { - "darkorange", - 4294937600U - }, - { - "darkorchid", - 4288230092U - }, - { - "darkred", - 4287299584U - }, - { - "darksalmon", - 4293498490U - }, - { - "darkseagreen", - 4287609999U - }, - { - "darkslateblue", - 4282924427U - }, - { - "darkslategray", - 4281290575U - }, - { - "darkslategrey", - 4281290575U - }, - { - "darkturquoise", - 4278243025U - }, - { - "darkviolet", - 4287889619U - }, - { - "deeppink", - 4294907027U - }, - { - "deepskyblue", - 4278239231U - }, - { - "dimgray", - 4285098345U - }, - { - "dimgrey", - 4285098345U - }, - { - "dodgerblue", - 4280193279U - }, - { - "feldspar", - 4291924597U - }, - { - "firebrick", - 4289864226U - }, - { - "floralwhite", - 4294966000U - }, - { - "forestgreen", - 4280453922U - }, - { - "fuchsia", - 4294902015U - }, - { - "gainsboro", - 4292664540U - }, - { - "ghostwhite", - 4294506751U - }, - { - "gold", - 4294956800U - }, - { - "goldenrod", - 4292519200U - }, - { - "gray", - 4286611584U - }, - { - "green", - 4278222848U - }, - { - "greenyellow", - 4289593135U - }, - { - "grey", - 4286611584U - }, - { - "honeydew", - 4293984240U - }, - { - "hotpink", - 4294928820U - }, - { - "indianred", - 4291648604U - }, - { - "indigo", - 4283105410U - }, - { - "ivory", - 4294967280U - }, - { - "khaki", - 4293977740U - }, - { - "lavender", - 4293322490U - }, - { - "lavenderblush", - 4294963445U - }, - { - "lawngreen", - 4286381056U - }, - { - "lemonchiffon", - 4294965965U - }, - { - "lightblue", - 4289583334U - }, - { - "lightcoral", - 4293951616U - }, - { - "lightcyan", - 4292935679U - }, - { - "lightgoldenrodyellow", - 4294638290U - }, - { - "lightgray", - 4292072403U - }, - { - "lightgreen", - 4287688336U - }, - { - "lightgrey", - 4292072403U - }, - { - "lightpink", - 4294948545U - }, - { - "lightsalmon", - 4294942842U - }, - { - "lightseagreen", - 4280332970U - }, - { - "lightskyblue", - 4287090426U - }, - { - "lightslateblue", - 4286869759U - }, - { - "lightslategray", - 4286023833U - }, - { - "lightslategrey", - 4286023833U - }, - { - "lightsteelblue", - 4289774814U - }, - { - "lightyellow", - 4294967264U - }, - { - "lime", - 4278255360U - }, - { - "limegreen", - 4281519410U - }, - { - "linen", - 4294635750U - }, - { - "magenta", - 4294902015U - }, - { - "maroon", - 4286578688U - }, - { - "mediumaquamarine", - 4284927402U - }, - { - "mediumblue", - 4278190285U - }, - { - "mediumorchid", - 4290401747U - }, - { - "mediumpurple", - 4287852760U - }, - { - "mediumseagreen", - 4282168177U - }, - { - "mediumslateblue", - 4286277870U - }, - { - "mediumspringgreen", - 4278254234U - }, - { - "mediumturquoise", - 4282962380U - }, - { - "mediumvioletred", - 4291237253U - }, - { - "midnightblue", - 4279834992U - }, - { - "mintcream", - 4294311930U - }, - { - "mistyrose", - 4294960353U - }, - { - "moccasin", - 4294960309U - }, - { - "navajowhite", - 4294958765U - }, - { - "navy", - 4278190208U - }, - { - "oldlace", - 4294833638U - }, - { - "olive", - 4286611456U - }, - { - "olivedrab", - 4285238819U - }, - { - "orange", - 4294944000U - }, - { - "orangered", - 4294919424U - }, - { - "orchid", - 4292505814U - }, - { - "palegoldenrod", - 4293847210U - }, - { - "palegreen", - 4288215960U - }, - { - "paleturquoise", - 4289720046U - }, - { - "palevioletred", - 4292374675U - }, - { - "papayawhip", - 4294963157U - }, - { - "peachpuff", - 4294957753U - }, - { - "peru", - 4291659071U - }, - { - "pink", - 4294951115U - }, - { - "plum", - 4292714717U - }, - { - "powderblue", - 4289781990U - }, - { - "purple", - 4286578816U - }, - { - "red", - 4294901760U - }, - { - "rosybrown", - 4290547599U - }, - { - "royalblue", - 4282477025U - }, - { - "saddlebrown", - 4287317267U - }, - { - "salmon", - 4294606962U - }, - { - "sandybrown", - 4294222944U - }, - { - "seagreen", - 4281240407U - }, - { - "seashell", - 4294964718U - }, - { - "sienna", - 4288696877U - }, - { - "silver", - 4290822336U - }, - { - "skyblue", - 4287090411U - }, - { - "slateblue", - 4285160141U - }, - { - "slategray", - 4285563024U - }, - { - "slategrey", - 4285563024U - }, - { - "snow", - 4294966010U - }, - { - "springgreen", - 4278255487U - }, - { - "steelblue", - 4282811060U - }, - { - "tvblack", - 4279242768U - }, - { - "tvwhite", - 4293651435U - }, - { - "tan", - 4291998860U - }, - { - "teal", - 4278222976U - }, - { - "thistle", - 4292394968U - }, - { - "tomato", - 4294927175U - }, - { - "transparent", - 0U - }, - { - "turquoise", - 4282441936U - }, - { - "violet", - 4293821166U - }, - { - "violetred", - 4291829904U - }, - { - "wheat", - 4294303411U - }, - { - "white", - uint.MaxValue - }, - { - "whitesmoke", - 4294309365U - }, - { - "yellow", - 4294967040U - }, - { - "yellowgreen", - 4288335154U - } - }; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(35, "Color", null, 153, typeof(Color), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(35, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetAlpha), new SetValueHandler(SetAlpha), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(35, "Red", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetRed), new SetValueHandler(SetRed), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(35, "Green", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetGreen), new SetValueHandler(SetGreen), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(35, "Blue", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetBlue), new SetValueHandler(SetBlue), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(35, "A", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetA), new SetValueHandler(SetA), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(35, "R", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetR), new SetValueHandler(SetR), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(35, "G", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetG), new SetValueHandler(SetG), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(35, "B", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetB), new SetValueHandler(SetB), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(35, new short[4] - { - 194, - 194, - 194, - 194 - }, new ConstructHandler(ConstructAlphaRedGreenBlue)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(35, new short[4] - { - 19, - 19, - 19, - 19 - }, new ConstructHandler(ConstructARGB)); - UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(35, new short[3] - { - 194, - 194, - 194 - }, new ConstructHandler(ConstructRedGreenBlue)); - UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(35, new short[3] - { - 19, - 19, - 19 - }, new ConstructHandler(ConstructRGB)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(35, "TryParse", new short[2] - { - 208, - 35 - }, 35, new InvokeHandler(CallTryParseStringColor), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[4] - { - constructorSchema1, - constructorSchema2, - constructorSchema3, - constructorSchema4 - }, new PropertySchema[8] - { - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema8, - uixPropertySchema4, - uixPropertySchema7, - uixPropertySchema3, - uixPropertySchema6, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs deleted file mode 100644 index 61ac0d9..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.CommandSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class CommandSchema - { - public static UIXTypeSchema Type; - - private static object GetAvailable(object instanceObj) => BooleanBoxes.Box(((IUICommand)instanceObj).Available); - - private static void SetAvailable(ref object instanceObj, object valueObj) => ((IUICommand)instanceObj).Available = (bool)valueObj; - - private static object GetPriority(object instanceObj) => ((IUICommand)instanceObj).Priority; - - private static void SetPriority(ref object instanceObj, object valueObj) => ((IUICommand)instanceObj).Priority = (InvokePriority)valueObj; - - private static object Construct() => new UICommand(); - - private static object CallInvoke(object instanceObj, object[] parameters) - { - ((IUICommand)instanceObj).Invoke(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(40, "Command", null, 153, typeof(IUICommand), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(40, "Available", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAvailable), new SetValueHandler(SetAvailable), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(40, "Priority", 126, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPriority), new SetValueHandler(SetPriority), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(40, "Invoked"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(40, "Invoke", null, 240, new InvokeHandler(CallInvoke), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs deleted file mode 100644 index 44a13fb..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ContrastInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ContrastInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetContrast(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("Contrast", num); - } - - private static object CallPlayContrastAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Contrast, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(43, "ContrastInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(43, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetContrast), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(43, "PlayContrastAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayContrastAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs deleted file mode 100644 index 431d5b8..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ContrastSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ContrastSchema - { - public static UIXTypeSchema Type; - - private static object GetContrast(object instanceObj) => ((ContrastElement)instanceObj).Contrast; - - private static void SetContrast(ref object instanceObj, object valueObj) - { - ContrastElement contrastElement = (ContrastElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - contrastElement.Contrast = num; - } - - private static object Construct() => new ContrastElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(42, "Contrast", null, 80, typeof(ContrastElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(42, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetContrast), new SetValueHandler(SetContrast), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs deleted file mode 100644 index e662060..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DataMappingSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DataMappingSchema - { - public static UIXTypeSchema Type; - - private static void SetTargetType(ref object instanceObj, object valueObj) - { - } - - private static void SetProvider(ref object instanceObj, object valueObj) - { - } - - private static object GetMappings(object instanceObj) => (object)null; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(45, "DataMapping", null, -1, typeof(object), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(45, "TargetType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetTargetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(45, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(45, "Mappings", 138, 140, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetMappings), null, false); - Type.Initialize(null, null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs deleted file mode 100644 index 64ff8a0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DataQuerySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DataQuerySchema - { - public static UIXTypeSchema Type; - - private static void SetProvider(ref object instanceObj, object valueObj) - { - MarkupDataQuery markupDataQuery = (MarkupDataQuery)instanceObj; - } - - private static void SetResultType(ref object instanceObj, object valueObj) - { - MarkupDataQuery markupDataQuery = (MarkupDataQuery)instanceObj; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(46, "DataQuery", null, 29, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(46, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(46, "ResultType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetResultType), false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs deleted file mode 100644 index bbecc6a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DataTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DataTypeSchema - { - public static UIXTypeSchema Type; - - private static void SetProvider(ref object instanceObj, object valueObj) - { - MarkupDataType markupDataType = (MarkupDataType)instanceObj; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(48, "DataType", null, 29, typeof(MarkupDataType), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(48, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs deleted file mode 100644 index 97c6a0b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DebugOutlinesSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Debug; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DebugOutlinesSchema - { - public static UIXTypeSchema Type; - - private static object GetRoot(object instanceObj) => ((DebugOutlines)instanceObj).Root; - - private static void SetRoot(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).Root = (ViewItem)valueObj; - - private static object GetEnabled(object instanceObj) => DebugOutlines.Enabled; - - private static void SetEnabled(ref object instanceObj, object valueObj) - { - DebugOutlines debugOutlines = (DebugOutlines)instanceObj; - DebugOutlines.Enabled = (bool)valueObj; - } - - private static object GetOutlineLabel(object instanceObj) => ((DebugOutlines)instanceObj).OutlineLabel; - - private static void SetOutlineLabel(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).OutlineLabel = (DebugLabelFormat)valueObj; - - private static object GetOutlineScope(object instanceObj) => ((DebugOutlines)instanceObj).OutlineScope; - - private static void SetOutlineScope(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).OutlineScope = (DebugOutlineScope)valueObj; - - private static object GetOutlineColor(object instanceObj) => ((DebugOutlines)instanceObj).OutlineColor; - - private static void SetOutlineColor(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).OutlineColor = (Color)valueObj; - - private static object GetHostOutlineColor(object instanceObj) => ((DebugOutlines)instanceObj).HostOutlineColor; - - private static void SetHostOutlineColor(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).HostOutlineColor = (Color)valueObj; - - private static object GetTextColor(object instanceObj) => ((DebugOutlines)instanceObj).TextColor; - - private static void SetTextColor(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).TextColor = (Color)valueObj; - - private static object GetTextFont(object instanceObj) => ((DebugOutlines)instanceObj).TextFont; - - private static void SetTextFont(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).TextFont = (Font)valueObj; - - private static object GetMouseInteractiveImage(object instanceObj) => ((DebugOutlines)instanceObj).MouseInteractiveImage; - - private static void SetMouseInteractiveImage(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).MouseInteractiveImage = (UIImage)valueObj; - - private static object GetMouseFocusImage(object instanceObj) => ((DebugOutlines)instanceObj).MouseFocusImage; - - private static void SetMouseFocusImage(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).MouseFocusImage = (UIImage)valueObj; - - private static object GetKeyInteractiveImage(object instanceObj) => ((DebugOutlines)instanceObj).KeyInteractiveImage; - - private static void SetKeyInteractiveImage(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).KeyInteractiveImage = (UIImage)valueObj; - - private static object GetKeyFocusImage(object instanceObj) => ((DebugOutlines)instanceObj).KeyFocusImage; - - private static void SetKeyFocusImage(ref object instanceObj, object valueObj) => ((DebugOutlines)instanceObj).KeyFocusImage = (UIImage)valueObj; - - private static object Construct() => new DebugOutlines(); - - private static object CallNextScopeMode(object instanceObj, object[] parameters) - { - ((DebugOutlines)instanceObj).NextScopeMode(); - return null; - } - - private static object CallNextLabelMode(object instanceObj, object[] parameters) - { - ((DebugOutlines)instanceObj).NextLabelMode(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(52, "DebugOutlines", null, 239, typeof(DebugOutlines), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(52, "Root", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRoot), new SetValueHandler(SetRoot), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(52, "Enabled", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(52, "OutlineLabel", 50, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineLabel), new SetValueHandler(SetOutlineLabel), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(52, "OutlineScope", 51, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineScope), new SetValueHandler(SetOutlineScope), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(52, "OutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineColor), new SetValueHandler(SetOutlineColor), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(52, "HostOutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHostOutlineColor), new SetValueHandler(SetHostOutlineColor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(52, "TextColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextColor), new SetValueHandler(SetTextColor), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(52, "TextFont", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextFont), new SetValueHandler(SetTextFont), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(52, "MouseInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractiveImage), new SetValueHandler(SetMouseInteractiveImage), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(52, "MouseFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseFocusImage), new SetValueHandler(SetMouseFocusImage), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(52, "KeyInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyInteractiveImage), new SetValueHandler(SetKeyInteractiveImage), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(52, "KeyFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusImage), new SetValueHandler(SetKeyFocusImage), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(52, "NextScopeMode", null, 240, new InvokeHandler(CallNextScopeMode), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(52, "NextLabelMode", null, 240, new InvokeHandler(CallNextLabelMode), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] - { - uixPropertySchema2, - uixPropertySchema6, - uixPropertySchema12, - uixPropertySchema11, - uixPropertySchema10, - uixPropertySchema9, - uixPropertySchema5, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema7, - uixPropertySchema8 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs deleted file mode 100644 index 949d1ea..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DebugSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.OS; -using System; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DebugSchema - { - public static UIXTypeSchema Type; - - private static object CallTraceString(object instanceObj, object[] parameters) - { - NativeApi.SpLogTrace(null, (string)parameters[0], 0); - return null; - } - - private static object CallTraceStringObject(object instanceObj, object[] parameters) - { - Trace((string)parameters[0], parameters[1], null, null, null, null); - return null; - } - - private static object CallTraceStringObjectObject(object instanceObj, object[] parameters) - { - Trace((string)parameters[0], parameters[1], parameters[2], null, null, null); - return null; - } - - private static object CallTraceStringObjectObjectObject(object instanceObj, object[] parameters) - { - Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], null, null); - return null; - } - - private static object CallTraceStringObjectObjectObjectObject( - object instanceObj, - object[] parameters) - { - Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], null); - return null; - } - - private static object CallTraceStringObjectObjectObjectObjectObject( - object instanceObj, - object[] parameters) - { - Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], parameters[5]); - return null; - } - - private static void Trace( - string format, - object param1, - object param2, - object param3, - object param4, - object param5) - { - string message; - try - { - message = string.Format(format, param1, param2, param3, param4, param5); - } - catch (FormatException ex) - { - message = string.Format("Invalid format for Debug.Trace [{0}].", format); - } - NativeApi.SpLogTrace(null, message, 0); - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(49, "Debug", null, 153, typeof(object), UIXTypeFlags.Static); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(49, "Trace", new short[1] - { - 208 - }, 240, new InvokeHandler(CallTraceString), true); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(49, "Trace", new short[2] - { - 208, - 153 - }, 240, new InvokeHandler(CallTraceStringObject), true); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(49, "Trace", new short[3] - { - 208, - 153, - 153 - }, 240, new InvokeHandler(CallTraceStringObjectObject), true); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(49, "Trace", new short[4] - { - 208, - 153, - 153, - 153 - }, 240, new InvokeHandler(CallTraceStringObjectObjectObject), true); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(49, "Trace", new short[5] - { - 208, - 153, - 153, - 153, - 153 - }, 240, new InvokeHandler(CallTraceStringObjectObjectObjectObject), true); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(49, "Trace", new short[6] - { - 208, - 153, - 153, - 153, - 153, - 153 - }, 240, new InvokeHandler(CallTraceStringObjectObjectObjectObjectObject), true); - Type.Initialize(null, null, null, new MethodSchema[6] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs deleted file mode 100644 index 8e6194e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DefaultLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DefaultLayoutSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => DefaultLayout.Instance; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(53, "DefaultLayout", null, 132, typeof(DefaultLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs deleted file mode 100644 index 811ccce..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DesaturateInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DesaturateInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetDesaturate(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("Desaturate", num); - } - - private static object CallPlayDesaturateAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Desaturate, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(55, "DesaturateInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(55, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetDesaturate), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(55, "PlayDesaturateAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDesaturateAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs deleted file mode 100644 index 6be357d..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DesaturateSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DesaturateSchema - { - public static UIXTypeSchema Type; - - private static object GetDesaturate(object instanceObj) => ((DesaturateElement)instanceObj).Desaturate; - - private static void SetDesaturate(ref object instanceObj, object valueObj) - { - DesaturateElement desaturateElement = (DesaturateElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - desaturateElement.Desaturate = num; - } - - private static object Construct() => new DesaturateElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(54, "Desaturate", null, 80, typeof(DesaturateElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(54, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDesaturate), new SetValueHandler(SetDesaturate), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs deleted file mode 100644 index 772e235..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DestinationElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DestinationElementInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetDownsample(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Downsample", (float)valueObj); - - private static void SetUVOffset(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("UVOffset", (Vector2)valueObj); - - private static object CallPlayDownsampleAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Downsample, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(57, "DestinationElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(57, "Downsample", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDownsample), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(57, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetUVOffset), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(57, "PlayDownsampleAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDownsampleAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs deleted file mode 100644 index a7b26e5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DestinationElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DestinationElementSchema - { - public static UIXTypeSchema Type; - - private static object GetDownsample(object instanceObj) => ((DestinationElement)instanceObj).Downsample; - - private static void SetDownsample(ref object instanceObj, object valueObj) - { - DestinationElement destinationElement = (DestinationElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - destinationElement.Downsample = num; - } - - private static object GetUVOffset(object instanceObj) => ((DestinationElement)instanceObj).UVOffset; - - private static void SetUVOffset(ref object instanceObj, object valueObj) => ((DestinationElement)instanceObj).UVOffset = (Vector2)valueObj; - - private static object Construct() => new DestinationElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(56, "DestinationElement", null, 77, typeof(DestinationElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(56, "Downsample", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDownsample), new SetValueHandler(SetDownsample), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(56, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUVOffset), new SetValueHandler(SetUVOffset), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs deleted file mode 100644 index 9b4cca1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DictionarySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DictionarySchema - { - public static UIXTypeSchema Type; - - private static object GetSource(object instanceObj) => (IDictionary)instanceObj; - - private static object Construct() => new Dictionary(); - - private static object Callget_ItemObject(object instanceObj, object[] parameters) - { - IDictionary dictionary = (IDictionary)instanceObj; - object parameter = parameters[0]; - if (parameter != null) - return dictionary[parameter]; - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "key"); - return null; - } - - private static object CallContainsObject(object instanceObj, object[] parameters) - { - IDictionary dictionary = (IDictionary)instanceObj; - object parameter = parameters[0]; - if (parameter != null) - return BooleanBoxes.Box(dictionary.Contains(parameter)); - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "key"); - return false; - } - - private static object Callset_ItemObjectObject(object instanceObj, object[] parameters) - { - IDictionary dictionary = (IDictionary)instanceObj; - object parameter1 = parameters[0]; - object parameter2 = parameters[1]; - if (parameter1 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "key"); - return null; - } - dictionary[parameter1] = parameter2; - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(58, "Dictionary", null, 153, typeof(IDictionary), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(58, "Source", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(58, "get_Item", new short[1] - { - 153 - }, 153, new InvokeHandler(Callget_ItemObject), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(58, "Contains", new short[1] - { - 153 - }, 15, new InvokeHandler(CallContainsObject), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(58, "set_Item", new short[2] - { - 153, - 153 - }, 240, new InvokeHandler(Callset_ItemObjectObject), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[3] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs deleted file mode 100644 index aa23b9d..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DockLayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DockLayoutInputSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => DockLayoutInput.Client; - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - DockLayoutInput instance = StringToInstance(str); - if (instance == null) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "DockLayoutInput"); - instanceObj = instance; - return Result.Success; - } - - private static object FindCanonicalInstance(string name) => StringToInstance(name); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringDockLayoutInput(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - DockLayoutInput parameter2 = (DockLayoutInput)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static DockLayoutInput StringToInstance(string value) - { - if (value == "Left") - return DockLayoutInput.Left; - if (value == "Top") - return DockLayoutInput.Top; - if (value == "Right") - return DockLayoutInput.Right; - if (value == "Bottom") - return DockLayoutInput.Bottom; - return value == "Client" ? DockLayoutInput.Client : null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(60, "DockLayoutInput", null, 133, typeof(DockLayoutInput), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(60, "TryParse", new short[2] - { - 208, - 60 - }, 60, new InvokeHandler(CallTryParseStringDockLayoutInput), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs deleted file mode 100644 index 0bea86a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DockLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DockLayoutSchema - { - public static UIXTypeSchema Type; - - private static object GetDefaultLayoutInput(object instanceObj) => ((DockLayout)instanceObj).DefaultLayoutInput; - - private static void SetDefaultLayoutInput(ref object instanceObj, object valueObj) => ((DockLayout)instanceObj).DefaultLayoutInput = (DockLayoutInput)valueObj; - - private static object GetDefaultChildAlignment(object instanceObj) => ((DockLayout)instanceObj).DefaultChildAlignment; - - private static void SetDefaultChildAlignment(ref object instanceObj, object valueObj) => ((DockLayout)instanceObj).DefaultChildAlignment = (ItemAlignment)valueObj; - - private static object Construct() => new DockLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(59, "DockLayout", null, 132, typeof(DockLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(59, "DefaultLayoutInput", 60, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultLayoutInput), new SetValueHandler(SetDefaultLayoutInput), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(59, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs deleted file mode 100644 index b16c446..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs +++ /dev/null @@ -1,239 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DoubleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DoubleSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => 0.0; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - double num = (double)instanceObj; - writer.WriteDouble(num); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadDouble(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - double result; - if (!double.TryParse(s, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Double"); - instanceObj = result; - return Result.Success; - } - - private static Result ConvertFromBoolean(object valueObj, out object instanceObj) - { - bool flag = (bool)valueObj; - instanceObj = null; - double num = flag ? 1.0 : 0.0; - instanceObj = num; - return Result.Success; - } - - private static Result ConvertFromByte(object valueObj, out object instanceObj) - { - byte num1 = (byte)valueObj; - instanceObj = null; - double num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num1 = (int)valueObj; - instanceObj = null; - double num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt64(object valueObj, out object instanceObj) - { - long num1 = (long)valueObj; - instanceObj = null; - double num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - double num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static object CallToStringString(object instanceObj, object[] parameters) => ((double)instanceObj).ToString((string)parameters[0]); - - private static object CallIsNaNDouble(object instanceObj, object[] parameters) => BooleanBoxes.Box(double.IsNaN((double)parameters[0])); - - private static object CallIsNegativeInfinityDouble(object instanceObj, object[] parameters) => BooleanBoxes.Box(double.IsNegativeInfinity((double)parameters[0])); - - private static object CallIsPositiveInfinityDouble(object instanceObj, object[] parameters) => BooleanBoxes.Box(double.IsPositiveInfinity((double)parameters[0])); - - private static bool IsConversionSupported(TypeSchema fromType) => BooleanSchema.Type.IsAssignableFrom(fromType) || ByteSchema.Type.IsAssignableFrom(fromType) || (Int32Schema.Type.IsAssignableFrom(fromType) || Int64Schema.Type.IsAssignableFrom(fromType)) || (SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType)); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (BooleanSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromBoolean(from, out instance); - if (!result.Failed) - return result; - } - if (ByteSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromByte(from, out instance); - if (!result.Failed) - return result; - } - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (Int64Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt64(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.MathModulus: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.RelationalLessThan: - case OperationType.RelationalGreaterThan: - case OperationType.RelationalLessThanEquals: - case OperationType.RelationalGreaterThanEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - double num1 = (double)leftObj; - if (op == OperationType.MathNegate) - return -num1; - double num2 = (double)rightObj; - switch (op - 1) - { - case 0: - return num1 + num2; - case OperationType.MathAdd: - return num1 - num2; - case OperationType.MathSubtract: - return num1 * num2; - case OperationType.MathMultiply: - return num1 / num2; - case OperationType.MathDivide: - return num1 % num2; - case OperationType.LogicalOr: - return BooleanBoxes.Box(num1 == num2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(num1 != num2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(num1 < num2); - case OperationType.RelationalLessThan: - return BooleanBoxes.Box(num1 > num2); - case OperationType.RelationalGreaterThan: - return BooleanBoxes.Box(num1 <= num2); - case OperationType.RelationalLessThanEquals: - return BooleanBoxes.Box(num1 >= num2); - default: - return null; - } - } - - private static object CallTryParseStringDouble(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - double parameter2 = (double)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(61, "Double", "double", 153, typeof(double), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(61, "ToString", new short[1] - { - 208 - }, 208, new InvokeHandler(CallToStringString), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(61, "IsNaN", new short[1] - { - 61 - }, 15, new InvokeHandler(CallIsNaNDouble), true); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(61, "IsNegativeInfinity", new short[1] - { - 61 - }, 15, new InvokeHandler(CallIsNegativeInfinityDouble), true); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(61, "IsPositiveInfinity", new short[1] - { - 61 - }, 15, new InvokeHandler(CallIsPositiveInfinityDouble), true); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(61, "TryParse", new short[2] - { - 208, - 61 - }, 61, new InvokeHandler(CallTryParseStringDouble), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[5] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs deleted file mode 100644 index aefa494..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DragHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DragHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetBeginDragPolicy(object instanceObj) => ((DragHandler)instanceObj).BeginDragPolicy; - - private static void SetBeginDragPolicy(ref object instanceObj, object valueObj) => ((DragHandler)instanceObj).BeginDragPolicy = (BeginDragPolicy)valueObj; - - private static object GetDragging(object instanceObj) => BooleanBoxes.Box(((DragHandler)instanceObj).Dragging); - - private static object GetBeginPosition(object instanceObj) => ((DragHandler)instanceObj).BeginPosition; - - private static object GetEndPosition(object instanceObj) => ((DragHandler)instanceObj).EndPosition; - - private static object GetScreenDragSize(object instanceObj) => ((DragHandler)instanceObj).ScreenDragSize; - - private static object GetLocalDragSize(object instanceObj) => ((DragHandler)instanceObj).LocalDragSize; - - private static object GetRelativeDragSize(object instanceObj) => ((DragHandler)instanceObj).RelativeDragSize; - - private static object GetActiveModifiers(object instanceObj) => ((DragHandler)instanceObj).ActiveModifiers; - - private static object GetDragCursor(object instanceObj) => ((DragHandler)instanceObj).DragCursor; - - private static void SetDragCursor(ref object instanceObj, object valueObj) => ((DragHandler)instanceObj).DragCursor = (CursorID)valueObj; - - private static object GetCancelOnEscape(object instanceObj) => BooleanBoxes.Box(((DragHandler)instanceObj).CancelOnEscape); - - private static void SetCancelOnEscape(ref object instanceObj, object valueObj) => ((DragHandler)instanceObj).CancelOnEscape = (bool)valueObj; - - private static object GetRelativeTo(object instanceObj) => ((DragHandler)instanceObj).RelativeTo; - - private static void SetRelativeTo(ref object instanceObj, object valueObj) => ((DragHandler)instanceObj).RelativeTo = (ViewItem)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object Construct() => new DragHandler(); - - private static object CallResetDragOrigin(object instanceObj, object[] parameters) - { - ((DragHandler)instanceObj).ResetDragOrigin(); - return null; - } - - private static object CallCancelDrag(object instanceObj, object[] parameters) - { - ((DragHandler)instanceObj).CancelDrag(); - return null; - } - - private static object CallGetEventContexts(object instanceObj, object[] parameters) => ((DragHandler)instanceObj).GetEventContexts(); - - private static object CallGetAddedEventContexts(object instanceObj, object[] parameters) => ((DragHandler)instanceObj).GetAddedEventContexts(); - - private static object CallGetRemovedEventContexts(object instanceObj, object[] parameters) => ((DragHandler)instanceObj).GetRemovedEventContexts(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(62, "DragHandler", null, 110, typeof(DragHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(62, "BeginDragPolicy", 12, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginDragPolicy), new SetValueHandler(SetBeginDragPolicy), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(62, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(62, "BeginPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPosition), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(62, "EndPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPosition), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(62, "ScreenDragSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScreenDragSize), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(62, "LocalDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLocalDragSize), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(62, "RelativeDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRelativeDragSize), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(62, "ActiveModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetActiveModifiers), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(62, "DragCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragCursor), new SetValueHandler(SetDragCursor), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(62, "CancelOnEscape", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCancelOnEscape), new SetValueHandler(SetCancelOnEscape), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(62, "RelativeTo", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRelativeTo), new SetValueHandler(SetRelativeTo), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(62, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(62, "ResetDragOrigin", null, 240, new InvokeHandler(CallResetDragOrigin), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(62, "CancelDrag", null, 240, new InvokeHandler(CallCancelDrag), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(62, "GetEventContexts", null, 138, new InvokeHandler(CallGetEventContexts), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(62, "GetAddedEventContexts", null, 138, new InvokeHandler(CallGetAddedEventContexts), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(62, "GetRemovedEventContexts", null, 138, new InvokeHandler(CallGetRemovedEventContexts), false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(62, "Started"); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(62, "Canceled"); - UIXEventSchema uixEventSchema3 = new UIXEventSchema(62, "Ended"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] - { - uixPropertySchema8, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema10, - uixPropertySchema9, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema12, - uixPropertySchema6, - uixPropertySchema7, - uixPropertySchema11, - uixPropertySchema5 - }, new MethodSchema[5] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5 - }, new EventSchema[3] - { - uixEventSchema1, - uixEventSchema2, - uixEventSchema3 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs deleted file mode 100644 index 0ae5d0d..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DragSourceHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DragSourceHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetAllowedDropActions(object instanceObj) => ((DragSourceHandler)instanceObj).AllowedDropActions; - - private static void SetAllowedDropActions(ref object instanceObj, object valueObj) => ((DragSourceHandler)instanceObj).AllowedDropActions = (DropAction)valueObj; - - private static object GetCurrentDropAction(object instanceObj) => ((DragSourceHandler)instanceObj).CurrentDropAction; - - private static object GetValue(object instanceObj) => ((DragSourceHandler)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((DragSourceHandler)instanceObj).Value = valueObj; - - private static object GetDragging(object instanceObj) => BooleanBoxes.Box(((DragSourceHandler)instanceObj).Dragging); - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetMoveCursor(object instanceObj) => ((DragSourceHandler)instanceObj).MoveCursor; - - private static void SetMoveCursor(ref object instanceObj, object valueObj) => ((DragSourceHandler)instanceObj).MoveCursor = (CursorID)valueObj; - - private static object GetCopyCursor(object instanceObj) => ((DragSourceHandler)instanceObj).CopyCursor; - - private static void SetCopyCursor(ref object instanceObj, object valueObj) => ((DragSourceHandler)instanceObj).CopyCursor = (CursorID)valueObj; - - private static object GetCancelCursor(object instanceObj) => ((DragSourceHandler)instanceObj).CancelCursor; - - private static void SetCancelCursor(ref object instanceObj, object valueObj) => ((DragSourceHandler)instanceObj).CancelCursor = (CursorID)valueObj; - - private static object Construct() => new DragSourceHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(63, "DragSourceHandler", null, 110, typeof(DragSourceHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(63, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowedDropActions), new SetValueHandler(SetAllowedDropActions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(63, "CurrentDropAction", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrentDropAction), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(63, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(63, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(63, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(63, "MoveCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMoveCursor), new SetValueHandler(SetMoveCursor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(63, "CopyCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCopyCursor), new SetValueHandler(SetCopyCursor), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(63, "CancelCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCancelCursor), new SetValueHandler(SetCancelCursor), false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(63, "Started"); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(63, "Moved"); - UIXEventSchema uixEventSchema3 = new UIXEventSchema(63, "Copied"); - UIXEventSchema uixEventSchema4 = new UIXEventSchema(63, "Canceled"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema1, - uixPropertySchema8, - uixPropertySchema7, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema3 - }, null, new EventSchema[4] - { - uixEventSchema1, - uixEventSchema2, - uixEventSchema3, - uixEventSchema4 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs deleted file mode 100644 index e9da3c1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.DropTargetHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class DropTargetHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetAllowedDropActions(object instanceObj) => ((DropTargetHandler)instanceObj).AllowedDropActions; - - private static void SetAllowedDropActions(ref object instanceObj, object valueObj) => ((DropTargetHandler)instanceObj).AllowedDropActions = (DropAction)valueObj; - - private static object GetDragging(object instanceObj) => BooleanBoxes.Box(((DropTargetHandler)instanceObj).Dragging); - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetEventContext(object instanceObj) => ((DropTargetHandler)instanceObj).EventContext; - - private static object Construct() => new DropTargetHandler(); - - private static object CallGetValue(object instanceObj, object[] parameters) => ((DropTargetHandler)instanceObj).GetValue(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(65, "DropTargetHandler", null, 110, typeof(DropTargetHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(65, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowedDropActions), new SetValueHandler(SetAllowedDropActions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(65, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(65, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(65, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(65, "DragEnter"); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(65, "DragOver"); - UIXEventSchema uixEventSchema3 = new UIXEventSchema(65, "DragLeave"); - UIXEventSchema uixEventSchema4 = new UIXEventSchema(65, "Dropped"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(65, "GetValue", null, 153, new InvokeHandler(CallGetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema3 - }, new MethodSchema[1] - { - uixMethodSchema - }, new EventSchema[4] - { - uixEventSchema1, - uixEventSchema2, - uixEventSchema3, - uixEventSchema4 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs deleted file mode 100644 index b7cd80b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EdgeDetectionInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EdgeDetectionInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetEdgeLimit(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("EdgeLimit", num); - } - - private static object CallPlayEdgeLimitAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.EdgeLimit, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(67, "EdgeDetectionInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(67, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetEdgeLimit), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(67, "PlayEdgeLimitAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayEdgeLimitAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs deleted file mode 100644 index 7333aca..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EdgeDetectionSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EdgeDetectionSchema - { - public static UIXTypeSchema Type; - - private static object GetEdgeLimit(object instanceObj) => ((EdgeDetectionElement)instanceObj).EdgeLimit; - - private static void SetEdgeLimit(ref object instanceObj, object valueObj) - { - EdgeDetectionElement detectionElement = (EdgeDetectionElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - detectionElement.EdgeLimit = num; - } - - private static object Construct() => new EdgeDetectionElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(66, "EdgeDetection", null, 80, typeof(EdgeDetectionElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(66, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetEdgeLimit), new SetValueHandler(SetEdgeLimit), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs deleted file mode 100644 index 0d2ee2a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EditableTextDataSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EditableTextDataSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((EditableTextData)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((EditableTextData)instanceObj).Value = (string)valueObj; - - private static object GetMaxLength(object instanceObj) => ((EditableTextData)instanceObj).MaxLength; - - private static void SetMaxLength(ref object instanceObj, object valueObj) - { - EditableTextData editableTextData = (EditableTextData)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - editableTextData.MaxLength = num; - } - - private static object GetReadOnly(object instanceObj) => BooleanBoxes.Box(((EditableTextData)instanceObj).ReadOnly); - - private static void SetReadOnly(ref object instanceObj, object valueObj) => ((EditableTextData)instanceObj).ReadOnly = (bool)valueObj; - - private static object Construct() => new EditableTextData(); - - private static object CallSubmit(object instanceObj, object[] parameters) - { - ((EditableTextData)instanceObj).Submit(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(68, "EditableTextData", null, 153, typeof(EditableTextData), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(68, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(68, "MaxLength", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMaxLength), new SetValueHandler(SetMaxLength), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(68, "ReadOnly", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetReadOnly), new SetValueHandler(SetReadOnly), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(68, "Submitted"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(68, "Submit", null, 240, new InvokeHandler(CallSubmit), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs deleted file mode 100644 index d94b1d7..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetLoop(object instanceObj) => ((AnimationTemplate)instanceObj).Loop; - - private static void SetLoop(ref object instanceObj, object valueObj) => ((AnimationTemplate)instanceObj).Loop = (int)valueObj; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(70, "EffectAnimation", null, 153, typeof(EffectAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(70, "Loop", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLoop), new SetValueHandler(SetLoop), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs deleted file mode 100644 index 45e5217..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectColorAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectColorAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetKeyframes(object instanceObj) => ((AnimationTemplate)instanceObj).Keyframes; - - private static object Construct() => new EffectAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(71, "EffectColorAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(71, "Keyframes", 138, 72, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs deleted file mode 100644 index 828979e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectColorKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectColorKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((EffectColorKeyframe)instanceObj).Color; - - private static void SetValue(ref object instanceObj, object valueObj) => ((EffectColorKeyframe)instanceObj).Color = (Color)valueObj; - - private static object Construct() => new EffectColorKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(72, "EffectColorKeyframe", null, 130, typeof(EffectColorKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(72, "Value", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs deleted file mode 100644 index ada1962..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectElementInstanceSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(74, "EffectElementInstance", null, -1, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs deleted file mode 100644 index 0c1db84..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectElementSchema - { - public static UIXTypeSchema Type; - - private static object GetName(object instanceObj) => ((EffectElement)instanceObj).Name; - - private static void SetName(ref object instanceObj, object valueObj) => ((EffectElement)instanceObj).Name = (string)valueObj; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(73, "EffectElement", null, -1, typeof(EffectElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(73, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(GetName), new SetValueHandler(SetName), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs deleted file mode 100644 index d7a0046..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectFloatAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectFloatAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetKeyframes(object instanceObj) => ((AnimationTemplate)instanceObj).Keyframes; - - private static object Construct() => new EffectAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(75, "EffectFloatAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(75, "Keyframes", 138, 76, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs deleted file mode 100644 index 2551f9e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectFloatKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectFloatKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new EffectFloatKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(76, "EffectFloatKeyframe", null, 130, typeof(EffectFloatKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(76, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs deleted file mode 100644 index 4e304ba..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectInputSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(77, "EffectInput", null, 73, typeof(EffectInput), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs deleted file mode 100644 index 58f88bc..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectInstanceSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(78, "EffectInstance", null, 153, typeof(EffectClass), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs deleted file mode 100644 index b7c0185..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectLayerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectLayerSchema - { - public static UIXTypeSchema Type; - - private static object GetInput(object instanceObj) => ((EffectLayer)instanceObj).Input; - - private static void SetInput(ref object instanceObj, object valueObj) => ((EffectLayer)instanceObj).Input = (EffectInput)valueObj; - - private static object GetOperations(object instanceObj) => ((EffectLayer)instanceObj).Operations; - - private static void SetOperations(ref object instanceObj, object valueObj) => ((EffectLayer)instanceObj).Operations = (IList)valueObj; - - private static object Construct() => new EffectLayer(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(79, "EffectLayer", null, 77, typeof(EffectLayer), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(79, "Input", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput), new SetValueHandler(SetInput), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(79, "Operations", 138, 80, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOperations), new SetValueHandler(SetOperations), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs deleted file mode 100644 index 892153f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectOperationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectOperationSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(80, "EffectOperation", null, 73, typeof(EffectOperation), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs deleted file mode 100644 index 16d6336..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectSchema - { - public static UIXTypeSchema Type; - - private static object GetTechniques(object instanceObj) => (object)null; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(69, "Effect", null, 29, typeof(EffectClass), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(69, "Techniques", 138, 77, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetTechniques), null, false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs deleted file mode 100644 index 80533ec..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectVector3AnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectVector3AnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetKeyframes(object instanceObj) => ((AnimationTemplate)instanceObj).Keyframes; - - private static object Construct() => new EffectAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(81, "EffectVector3Animation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(81, "Keyframes", 138, 82, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs deleted file mode 100644 index 9492d36..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EffectVector3KeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EffectVector3KeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new EffectVector3Keyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(82, "EffectVector3Keyframe", null, 130, typeof(EffectVector3Keyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(82, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs deleted file mode 100644 index 3ee220f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EmbossInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EmbossInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetDirection(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Direction", (int)valueObj); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(85, "EmbossInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(85, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDirection), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs deleted file mode 100644 index f5d7635..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EmbossSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EmbossSchema - { - public static UIXTypeSchema Type; - - private static object GetDirection(object instanceObj) => ((EmbossElement)instanceObj).Direction; - - private static void SetDirection(ref object instanceObj, object valueObj) => ((EmbossElement)instanceObj).Direction = (EmbossDirection)valueObj; - - private static object Construct() => new EmbossElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(83, "Emboss", null, 80, typeof(EmbossElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(83, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDirection), new SetValueHandler(SetDirection), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs deleted file mode 100644 index b56d46e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EnumeratorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EnumeratorSchema - { - public static UIXTypeSchema Type; - - private static object GetCurrent(object instanceObj) => ((IEnumerator)instanceObj).Current; - - private static object CallMoveNext(object instanceObj, object[] parameters) => BooleanBoxes.Box(((IEnumerator)instanceObj).MoveNext()); - - private static object CallReset(object instanceObj, object[] parameters) - { - ((IEnumerator)instanceObj).Reset(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(86, "Enumerator", null, 153, typeof(IEnumerator), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(86, "Current", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrent), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(86, "MoveNext", null, 15, new InvokeHandler(CallMoveNext), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(86, "Reset", null, 240, new InvokeHandler(CallReset), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs deleted file mode 100644 index 7a108cd..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EnvironmentSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EnvironmentSchema - { - public static UIXTypeSchema Type; - - private static object GetIsRightToLeft(object instanceObj) => BooleanBoxes.Box(((Environment)instanceObj).IsRightToLeft); - - private static object GetColorScheme(object instanceObj) => ((Environment)instanceObj).ColorScheme; - - private static object GetAnimationSpeed(object instanceObj) => ((Environment)instanceObj).AnimationSpeed; - - private static void SetAnimationSpeed(ref object instanceObj, object valueObj) => ((Environment)instanceObj).AnimationSpeed = (float)valueObj; - - private static object GetAnimationUpdatesPerSecond(object instanceObj) => ((Environment)instanceObj).AnimationUpdatesPerSecond; - - private static void SetAnimationUpdatesPerSecond(ref object instanceObj, object valueObj) => ((Environment)instanceObj).AnimationUpdatesPerSecond = (int)valueObj; - - private static object GetDpiScale(object instanceObj) => Environment.DpiScale; - - private static object GetGraphicsDeviceType(object instanceObj) - { - RenderingType renderingType; - switch (UISession.Default.RenderSession.GraphicsDevice.DeviceType) - { - case GraphicsDeviceType.Gdi: - renderingType = RenderingType.GDI; - break; - case GraphicsDeviceType.Direct3D9: - case GraphicsDeviceType.XeDirectX9: - renderingType = RenderingType.DX9; - break; - default: - renderingType = RenderingType.Default; - break; - } - return renderingType; - } - - private static object Construct() => Environment.Instance; - - private static object CallAnimationAdvanceInt32(object instanceObj, object[] parameters) - { - ((Environment)instanceObj).AnimationAdvance((int)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(87, "Environment", null, 153, typeof(Environment), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(87, "IsRightToLeft", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsRightToLeft), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(87, "ColorScheme", 39, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColorScheme), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(87, "AnimationSpeed", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAnimationSpeed), new SetValueHandler(SetAnimationSpeed), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(87, "AnimationUpdatesPerSecond", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAnimationUpdatesPerSecond), new SetValueHandler(SetAnimationUpdatesPerSecond), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(87, "DpiScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDpiScale), null, true); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(87, "GraphicsDeviceType", 98, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetGraphicsDeviceType), null, true); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(87, "AnimationAdvance", new short[1] - { - 115 - }, 240, new InvokeHandler(CallAnimationAdvanceInt32), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema2, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs deleted file mode 100644 index 12602ef..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.EventContextSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class EventContextSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((EventContext)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((EventContext)instanceObj).Value = valueObj; - - private static object Construct() => new EventContext(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(88, "EventContext", null, 110, typeof(EventContext), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(88, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs deleted file mode 100644 index 6ed76df..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.FlowLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class FlowLayoutSchema - { - public static UIXTypeSchema Type; - - private static object GetOrientation(object instanceObj) => ((FlowLayout)instanceObj).Orientation; - - private static void SetOrientation(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).Orientation = (Orientation)valueObj; - - private static object GetSpacing(object instanceObj) => ((FlowLayout)instanceObj).Spacing; - - private static void SetSpacing(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).Spacing = (MajorMinor)valueObj; - - private static object GetAllowWrap(object instanceObj) => BooleanBoxes.Box(((FlowLayout)instanceObj).AllowWrap); - - private static void SetAllowWrap(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).AllowWrap = (bool)valueObj; - - private static object GetStripAlignment(object instanceObj) => ((FlowLayout)instanceObj).StripAlignment; - - private static void SetStripAlignment(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).StripAlignment = (StripAlignment)valueObj; - - private static object GetRepeat(object instanceObj) => ((FlowLayout)instanceObj).Repeat; - - private static void SetRepeat(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).Repeat = (RepeatPolicy)valueObj; - - private static object GetRepeatGap(object instanceObj) => ((FlowLayout)instanceObj).RepeatGap; - - private static void SetRepeatGap(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).RepeatGap = (MajorMinor)valueObj; - - private static object GetMissingItemPolicy(object instanceObj) => ((FlowLayout)instanceObj).MissingItemPolicy; - - private static void SetMissingItemPolicy(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).MissingItemPolicy = (MissingItemPolicy)valueObj; - - private static object GetMinimumSampleSize(object instanceObj) => ((FlowLayout)instanceObj).MinimumSampleSize; - - private static void SetMinimumSampleSize(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).MinimumSampleSize = (int)valueObj; - - private static object GetDefaultChildAlignment(object instanceObj) => ((FlowLayout)instanceObj).DefaultChildAlignment; - - private static void SetDefaultChildAlignment(ref object instanceObj, object valueObj) => ((FlowLayout)instanceObj).DefaultChildAlignment = (ItemAlignment)valueObj; - - private static object Construct() => new FlowLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(90, "FlowLayout", null, 132, typeof(FlowLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(90, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(90, "Spacing", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSpacing), new SetValueHandler(SetSpacing), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(90, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAllowWrap), new SetValueHandler(SetAllowWrap), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(90, "StripAlignment", 209, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStripAlignment), new SetValueHandler(SetStripAlignment), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(90, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(90, "RepeatGap", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeatGap), new SetValueHandler(SetRepeatGap), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(90, "MissingItemPolicy", 148, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMissingItemPolicy), new SetValueHandler(SetMissingItemPolicy), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(90, "MinimumSampleSize", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumSampleSize), new SetValueHandler(SetMinimumSampleSize), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(90, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] - { - uixPropertySchema3, - uixPropertySchema9, - uixPropertySchema8, - uixPropertySchema7, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema2, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs deleted file mode 100644 index ad11a84..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.FocusHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class FocusHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetReason(object instanceObj) => ((FocusHandler)instanceObj).Reason; - - private static void SetReason(ref object instanceObj, object valueObj) => ((FocusHandler)instanceObj).Reason = (FocusChangeReason)valueObj; - - private static object GetRequiredModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers; - - private static void SetRequiredModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers = (InputHandlerModifiers)valueObj; - - private static object GetDisallowedModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers; - - private static void SetDisallowedModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers = (InputHandlerModifiers)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetGainedEventContext(object instanceObj) => ((FocusHandler)instanceObj).GainedEventContext; - - private static object GetLostEventContext(object instanceObj) => ((FocusHandler)instanceObj).LostEventContext; - - private static object Construct() => new FocusHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(92, "FocusHandler", null, 110, typeof(FocusHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(92, "Reason", 91, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetReason), new SetValueHandler(SetReason), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(92, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(92, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(92, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(92, "GainedEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetGainedEventContext), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(92, "LostEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLostEventContext), null, false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(92, "GainedFocus"); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(92, "LostFocus"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema6, - uixPropertySchema1, - uixPropertySchema2 - }, null, new EventSchema[2] - { - uixEventSchema1, - uixEventSchema2 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs deleted file mode 100644 index 352957a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs +++ /dev/null @@ -1,337 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.FontSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.OS; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class FontSchema - { - public static RangeValidator ValidateFontName = new RangeValidator(RangeValidateFontName); - public static UIXTypeSchema Type; - - private static object GetFontName(object instanceObj) => ((Font)instanceObj).FontName; - - private static void SetFontName(ref object instanceObj, object valueObj) - { - Font font = (Font)instanceObj; - string str = (string)valueObj; - Result result = ValidateFontName(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - font.FontName = str; - } - - private static object GetFontSize(object instanceObj) => ((Font)instanceObj).FontSize; - - private static void SetFontSize(ref object instanceObj, object valueObj) - { - Font font = (Font)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - font.FontSize = num; - } - - private static object GetAltFontSize(object instanceObj) => ((Font)instanceObj).AltFontSize; - - private static void SetAltFontSize(ref object instanceObj, object valueObj) - { - Font font = (Font)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - font.AltFontSize = num; - } - - private static object GetFontStyle(object instanceObj) => ((Font)instanceObj).FontStyle; - - private static void SetFontStyle(ref object instanceObj, object valueObj) => ((Font)instanceObj).FontStyle = (FontStyles)valueObj; - - private static object Construct() => new Font(); - - private static object ConstructFontName(object[] parameters) - { - object instanceObj = Construct(); - SetFontName(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static Result ConvertFromStringFontName(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj; - Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result.Error); - SetFontName(ref instance, valueObj); - return result; - } - - private static object ConstructFontNameFontSize(object[] parameters) - { - object instanceObj = Construct(); - SetFontName(ref instanceObj, parameters[0]); - SetFontSize(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringFontNameFontSize( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - SetFontName(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - SetFontSize(ref instance, valueObj2); - return result2; - } - - private static object ConstructFontNameFontSizeAltFontSize(object[] parameters) - { - object instanceObj = Construct(); - SetFontName(ref instanceObj, parameters[0]); - SetFontSize(ref instanceObj, parameters[1]); - SetAltFontSize(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringFontNameFontSizeAltFontSize( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - SetFontName(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - SetFontSize(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - SetAltFontSize(ref instance, valueObj3); - return result3; - } - - private static object ConstructFontNameFontSizeFontStyle(object[] parameters) - { - object instanceObj = Construct(); - SetFontName(ref instanceObj, parameters[0]); - SetFontSize(ref instanceObj, parameters[1]); - SetFontStyle(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringFontNameFontSizeFontStyle( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - SetFontName(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - SetFontSize(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], UIXLoadResultExports.FontStylesType, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - SetFontStyle(ref instance, valueObj3); - return result3; - } - - private static object ConstructFontNameFontSizeAltFontSizeFontStyle(object[] parameters) - { - object instanceObj = Construct(); - SetFontName(ref instanceObj, parameters[0]); - SetFontSize(ref instanceObj, parameters[1]); - SetAltFontSize(ref instanceObj, parameters[2]); - SetFontStyle(ref instanceObj, parameters[3]); - return instanceObj; - } - - private static Result ConvertFromStringFontNameFontSizeAltFontSizeFontStyle( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - SetFontName(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - SetFontSize(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - SetAltFontSize(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], UIXLoadResultExports.FontStylesType, null, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Font", result4.Error); - SetFontStyle(ref instance, valueObj4); - return result4; - } - - private static object CallLoadFontResourceStringString(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - if (string.IsNullOrEmpty(parameter1)) - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "moduleName"); - if (string.IsNullOrEmpty(parameter2)) - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "resourceName"); - if (!NativeApi.SpLoadFontResource(parameter1, parameter2)) - ErrorManager.ReportError("Font Resource {1} not found in module {0}", parameter1, parameter2); - return null; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result1 = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - switch (splitString.Length) - { - case 1: - result1 = ConvertFromStringFontName(splitString, out instance); - if (!result1.Failed) - return result1; - break; - case 2: - result1 = ConvertFromStringFontNameFontSize(splitString, out instance); - if (!result1.Failed) - return result1; - break; - case 3: - Result result2 = ConvertFromStringFontNameFontSizeAltFontSize(splitString, out instance); - if (!result2.Failed) - return result2; - result1 = ConvertFromStringFontNameFontSizeFontStyle(splitString, out instance); - if (!result1.Failed) - return result1; - break; - case 4: - result1 = ConvertFromStringFontNameFontSizeAltFontSizeFontStyle(splitString, out instance); - if (!result1.Failed) - return result1; - break; - default: - result1 = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Font"); - break; - } - } - return result1; - } - - private static Result RangeValidateFontName(object value) - { - string str = (string)value; - if (str == null) - return Result.Fail("Script runtime failure: Invalid 'null' value for '{0}'", "FontName"); - return str.Length > 31 ? Result.Fail("\"{0}\" cannot be longer than {1} characters", str, "31") : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(93, "Font", null, 153, typeof(Font), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(93, "FontName", 208, -1, ExpressionRestriction.None, false, ValidateFontName, false, new GetValueHandler(GetFontName), new SetValueHandler(SetFontName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(93, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetFontSize), new SetValueHandler(SetFontSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(93, "AltFontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetAltFontSize), new SetValueHandler(SetAltFontSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(93, "FontStyle", 94, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFontStyle), new SetValueHandler(SetFontStyle), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(93, new short[1] - { - 208 - }, new ConstructHandler(ConstructFontName)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(93, new short[2] - { - 208, - 194 - }, new ConstructHandler(ConstructFontNameFontSize)); - UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(93, new short[3] - { - 208, - 194, - 194 - }, new ConstructHandler(ConstructFontNameFontSizeAltFontSize)); - UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(93, new short[3] - { - 208, - 194, - 94 - }, new ConstructHandler(ConstructFontNameFontSizeFontStyle)); - UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(93, new short[4] - { - 208, - 194, - 194, - 94 - }, new ConstructHandler(ConstructFontNameFontSizeAltFontSizeFontStyle)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(93, "LoadFontResource", new short[2] - { - 208, - 208 - }, 240, new InvokeHandler(CallLoadFontResourceStringString), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] - { - constructorSchema1, - constructorSchema2, - constructorSchema3, - constructorSchema4, - constructorSchema5 - }, new PropertySchema[4] - { - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema4 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs deleted file mode 100644 index bbcde3c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.FormLayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class FormLayoutInputSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new FormLayoutInput(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(95, "FormLayoutInput", null, 8, typeof(FormLayoutInput), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs deleted file mode 100644 index ea7d07e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.GraphicSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class GraphicSchema - { - public static UIXTypeSchema Type; - - private static object GetChildren(object instanceObj) => ViewItemSchema.ListProxy.GetChildren((ViewItem)instanceObj); - - private static object GetContent(object instanceObj) => ((Graphic)instanceObj).Content; - - private static void SetContent(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).Content = (UIImage)valueObj; - - private static object GetPreloadContent(object instanceObj) => ((Graphic)instanceObj).PreloadContent; - - private static void SetPreloadContent(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).PreloadContent = (UIImage)valueObj; - - private static object GetEffect(object instanceObj) => ((ViewItem)instanceObj).Effect; - - private static void SetEffect(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Effect = (EffectClass)valueObj; - - private static object GetAcquiringImage(object instanceObj) => ((Graphic)instanceObj).AcquiringImage; - - private static void SetAcquiringImage(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).AcquiringImage = (UIImage)valueObj; - - private static object GetErrorImage(object instanceObj) => ((Graphic)instanceObj).ErrorImage; - - private static void SetErrorImage(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).ErrorImage = (UIImage)valueObj; - - private static object GetSizingPolicy(object instanceObj) => ((Graphic)instanceObj).SizingPolicy; - - private static void SetSizingPolicy(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).SizingPolicy = (SizingPolicy)valueObj; - - private static object GetStretchingPolicy(object instanceObj) => ((Graphic)instanceObj).StretchingPolicy; - - private static void SetStretchingPolicy(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).StretchingPolicy = (StretchingPolicy)valueObj; - - private static object GetHorizontalAlignment(object instanceObj) => ((Graphic)instanceObj).HorizontalAlignment; - - private static void SetHorizontalAlignment(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).HorizontalAlignment = (StripAlignment)valueObj; - - private static object GetVerticalAlignment(object instanceObj) => ((Graphic)instanceObj).VerticalAlignment; - - private static void SetVerticalAlignment(ref object instanceObj, object valueObj) => ((Graphic)instanceObj).VerticalAlignment = (StripAlignment)valueObj; - - private static object Construct() => new Graphic(); - - private static object CallCommitPreload(object instanceObj, object[] parameters) - { - ((Graphic)instanceObj).CommitPreload(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(97, "Graphic", null, 239, typeof(Graphic), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(97, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(97, "Content", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(97, "PreloadContent", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPreloadContent), new SetValueHandler(SetPreloadContent), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(97, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(97, "AcquiringImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcquiringImage), new SetValueHandler(SetAcquiringImage), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(97, "ErrorImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetErrorImage), new SetValueHandler(SetErrorImage), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(97, "SizingPolicy", 199, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSizingPolicy), new SetValueHandler(SetSizingPolicy), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(97, "StretchingPolicy", 207, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStretchingPolicy), new SetValueHandler(SetStretchingPolicy), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(97, "HorizontalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHorizontalAlignment), new SetValueHandler(SetHorizontalAlignment), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(97, "VerticalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVerticalAlignment), new SetValueHandler(SetVerticalAlignment), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(97, "CommitPreload", null, 240, new InvokeHandler(CallCommitPreload), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[10] - { - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema6, - uixPropertySchema9, - uixPropertySchema3, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema10 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs deleted file mode 100644 index baa1095..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.GridLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class GridLayoutSchema - { - public static UIXTypeSchema Type; - - private static object GetOrientation(object instanceObj) => ((GridLayout)instanceObj).Orientation; - - private static void SetOrientation(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).Orientation = (Orientation)valueObj; - - private static object GetAllowWrap(object instanceObj) => BooleanBoxes.Box(((GridLayout)instanceObj).AllowWrap); - - private static void SetAllowWrap(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).AllowWrap = (bool)valueObj; - - private static object GetReferenceSize(object instanceObj) => ((GridLayout)instanceObj).ReferenceSize; - - private static void SetReferenceSize(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).ReferenceSize = (Size)valueObj; - - private static object GetSpacing(object instanceObj) => ((GridLayout)instanceObj).Spacing; - - private static void SetSpacing(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).Spacing = (Size)valueObj; - - private static object GetRows(object instanceObj) => ((GridLayout)instanceObj).Rows; - - private static void SetRows(ref object instanceObj, object valueObj) - { - GridLayout gridLayout = (GridLayout)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - gridLayout.Rows = num; - } - - private static object GetColumns(object instanceObj) => ((GridLayout)instanceObj).Columns; - - private static void SetColumns(ref object instanceObj, object valueObj) - { - GridLayout gridLayout = (GridLayout)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - gridLayout.Columns = num; - } - - private static object GetRepeat(object instanceObj) => ((GridLayout)instanceObj).Repeat; - - private static void SetRepeat(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).Repeat = (RepeatPolicy)valueObj; - - private static object GetRepeatGap(object instanceObj) => ((GridLayout)instanceObj).RepeatGap; - - private static void SetRepeatGap(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).RepeatGap = (int)valueObj; - - private static object GetDefaultChildAlignment(object instanceObj) => ((GridLayout)instanceObj).DefaultChildAlignment; - - private static void SetDefaultChildAlignment(ref object instanceObj, object valueObj) => ((GridLayout)instanceObj).DefaultChildAlignment = (ItemAlignment)valueObj; - - private static object Construct() => new GridLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(99, "GridLayout", null, 132, typeof(GridLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(99, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(99, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAllowWrap), new SetValueHandler(SetAllowWrap), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(99, "ReferenceSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetReferenceSize), new SetValueHandler(SetReferenceSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(99, "Spacing", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSpacing), new SetValueHandler(SetSpacing), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(99, "Rows", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetRows), new SetValueHandler(SetRows), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(99, "Columns", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetColumns), new SetValueHandler(SetColumns), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(99, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(99, "RepeatGap", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeatGap), new SetValueHandler(SetRepeatGap), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(99, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] - { - uixPropertySchema2, - uixPropertySchema6, - uixPropertySchema9, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema5, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs deleted file mode 100644 index f02c2a4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.GroupSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class GroupSchema - { - public static UIXTypeSchema Type; - - private static object GetStartIndex(object instanceObj) => ((IUIGroup)instanceObj).StartIndex; - - private static object GetEndIndex(object instanceObj) => ((IUIGroup)instanceObj).EndIndex; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(100, "Group", null, 138, typeof(IUIGroup), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(100, "StartIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStartIndex), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(100, "EndIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndIndex), null, false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs deleted file mode 100644 index 43fe3a4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs +++ /dev/null @@ -1,461 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.HostSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class HostSchema - { - private static object[] s_paramsList = new object[10]; - public static UIXTypeSchema Type; - - private static object GetNewContentOnTop(object instanceObj) => BooleanBoxes.Box(((Host)instanceObj).NewContentOnTop); - - private static void SetNewContentOnTop(ref object instanceObj, object valueObj) => ((Host)instanceObj).NewContentOnTop = (bool)valueObj; - - private static object GetSource(object instanceObj) => ((Host)instanceObj).Source; - - private static object GetSourceType(object instanceObj) => ((Host)instanceObj).SourceType; - - private static object GetStatus(object instanceObj) => ((Host)instanceObj).Status; - - private static object GetInputEnabled(object instanceObj) => BooleanBoxes.Box(((Host)instanceObj).InputEnabled); - - private static void SetInputEnabled(ref object instanceObj, object valueObj) => ((Host)instanceObj).InputEnabled = (bool)valueObj; - - private static object GetUnloadable(object instanceObj) => BooleanBoxes.Box(((Host)instanceObj).Unloadable); - - private static void SetUnloadable(ref object instanceObj, object valueObj) => ((Host)instanceObj).Unloadable = (bool)valueObj; - - private static object Construct() => new Host(); - - private static object CallUnloadAll(object instanceObj, object[] parameters) - { - ((Host)instanceObj).UnloadAll(); - return null; - } - - private static object CallForceRefresh(object instanceObj, object[] parameters) - { - ((Host)instanceObj).ForceRefresh(); - return null; - } - - private static object CallForceRefreshBoolean(object instanceObj, object[] parameters) - { - ((Host)instanceObj).ForceRefresh((bool)parameters[0]); - return null; - } - - private static object CallRequestSourceString(object instanceObj, object[] parameters) - { - ((Host)instanceObj).RequestSource((string)parameters[0], null, null); - return null; - } - - private static object CallRequestSourceStringStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - RequestSourceCallBuilder(instance, parameter1, null, 1); - return null; - } - - private static object CallRequestSourceStringStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - RequestSourceCallBuilder(instance, parameter1, null, 2); - return null; - } - - private static object CallRequestSourceStringStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - RequestSourceCallBuilder(instance, parameter1, null, 3); - return null; - } - - private static object CallRequestSourceStringStringObjectStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - string parameter8 = (string)parameters[7]; - object parameter9 = parameters[8]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - s_paramsList[6] = parameter8; - s_paramsList[7] = parameter9; - RequestSourceCallBuilder(instance, parameter1, null, 4); - return null; - } - - private static object CallRequestSourceStringStringObjectStringObjectStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - string parameter1 = (string)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - string parameter8 = (string)parameters[7]; - object parameter9 = parameters[8]; - string parameter10 = (string)parameters[9]; - object parameter11 = parameters[10]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - s_paramsList[6] = parameter8; - s_paramsList[7] = parameter9; - s_paramsList[8] = parameter10; - s_paramsList[9] = parameter11; - RequestSourceCallBuilder(instance, parameter1, null, 5); - return null; - } - - private static object CallRequestSourceType(object instanceObj, object[] parameters) - { - ((Host)instanceObj).RequestSource(null, (TypeSchema)parameters[0], null); - return null; - } - - private static object CallRequestSourceTypeStringObject(object instanceObj, object[] parameters) - { - Host instance = (Host)instanceObj; - TypeSchema parameter1 = (TypeSchema)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - RequestSourceCallBuilder(instance, null, parameter1, 1); - return null; - } - - private static object CallRequestSourceTypeStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - TypeSchema parameter1 = (TypeSchema)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - RequestSourceCallBuilder(instance, null, parameter1, 2); - return null; - } - - private static object CallRequestSourceTypeStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - TypeSchema parameter1 = (TypeSchema)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - RequestSourceCallBuilder(instance, null, parameter1, 3); - return null; - } - - private static object CallRequestSourceTypeStringObjectStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - TypeSchema parameter1 = (TypeSchema)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - string parameter8 = (string)parameters[7]; - object parameter9 = parameters[8]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - s_paramsList[6] = parameter8; - s_paramsList[7] = parameter9; - RequestSourceCallBuilder(instance, null, parameter1, 4); - return null; - } - - private static object CallRequestSourceTypeStringObjectStringObjectStringObjectStringObjectStringObject( - object instanceObj, - object[] parameters) - { - Host instance = (Host)instanceObj; - TypeSchema parameter1 = (TypeSchema)parameters[0]; - string parameter2 = (string)parameters[1]; - object parameter3 = parameters[2]; - string parameter4 = (string)parameters[3]; - object parameter5 = parameters[4]; - string parameter6 = (string)parameters[5]; - object parameter7 = parameters[6]; - string parameter8 = (string)parameters[7]; - object parameter9 = parameters[8]; - string parameter10 = (string)parameters[9]; - object parameter11 = parameters[10]; - s_paramsList[0] = parameter2; - s_paramsList[1] = parameter3; - s_paramsList[2] = parameter4; - s_paramsList[3] = parameter5; - s_paramsList[4] = parameter6; - s_paramsList[5] = parameter7; - s_paramsList[6] = parameter8; - s_paramsList[7] = parameter9; - s_paramsList[8] = parameter10; - s_paramsList[9] = parameter11; - RequestSourceCallBuilder(instance, null, parameter1, 5); - return null; - } - - private static void RequestSourceCallBuilder( - Host instance, - string source, - TypeSchema type, - int numPairs) - { - ErrorWatermark watermark = ErrorManager.Watermark; - Vector vector = new Vector(numPairs); - for (int index = 0; index < numPairs; ++index) - { - string name = (string)s_paramsList[index * 2]; - object obj = s_paramsList[index * 2 + 1]; - if (name == null) - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "property" + index.ToString()); - else - UIPropertyRecord.AddToList(vector, name, obj); - } - for (int index = 0; index < numPairs * 2; ++index) - s_paramsList[index] = null; - if (watermark.ErrorsDetected) - return; - instance.RequestSource(source, type, vector); - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(101, "Host", null, 239, typeof(Host), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(101, "NewContentOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNewContentOnTop), new SetValueHandler(SetNewContentOnTop), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(101, "Source", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(101, "SourceType", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSourceType), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(101, "Status", 102, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(101, "InputEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetInputEnabled), new SetValueHandler(SetInputEnabled), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(101, "Unloadable", 15, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetUnloadable), new SetValueHandler(SetUnloadable), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(101, "UnloadAll", null, 240, new InvokeHandler(CallUnloadAll), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(101, "ForceRefresh", null, 240, new InvokeHandler(CallForceRefresh), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(101, "ForceRefresh", new short[1] - { - 15 - }, 240, new InvokeHandler(CallForceRefreshBoolean), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(101, "RequestSource", new short[1] - { - 208 - }, 240, new InvokeHandler(CallRequestSourceString), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(101, "RequestSource", new short[3] - { - 208, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceStringStringObject), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(101, "RequestSource", new short[5] - { - 208, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(101, "RequestSource", new short[7] - { - 208, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(101, "RequestSource", new short[9] - { - 208, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(101, "RequestSource", new short[11] - { - 208, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObjectStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(101, "RequestSource", new short[1] - { - 225 - }, 240, new InvokeHandler(CallRequestSourceType), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(101, "RequestSource", new short[3] - { - 225, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceTypeStringObject), false); - UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(101, "RequestSource", new short[5] - { - 225, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(101, "RequestSource", new short[7] - { - 225, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema14 = new UIXMethodSchema(101, "RequestSource", new short[9] - { - 225, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObjectStringObject), false); - UIXMethodSchema uixMethodSchema15 = new UIXMethodSchema(101, "RequestSource", new short[11] - { - 225, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153, - 208, - 153 - }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObjectStringObjectStringObject), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema6 - }, new MethodSchema[15] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11, - uixMethodSchema12, - uixMethodSchema13, - uixMethodSchema14, - uixMethodSchema15 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs deleted file mode 100644 index ac34f4b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.HwndHostSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class HwndHostSchema - { - public static UIXTypeSchema Type; - - private static object GetHandle(object instanceObj) => ((HwndHost)instanceObj).Handle; - - private static object GetChildHandle(object instanceObj) => ((HwndHost)instanceObj).ChildHandle; - - private static void SetChildHandle(ref object instanceObj, object valueObj) => ((HwndHost)instanceObj).ChildHandle = (long)valueObj; - - private static object Construct() => new HwndHost(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(103, "HwndHost", null, 239, typeof(HwndHost), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(103, "Handle", 116, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetHandle), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(103, "ChildHandle", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetChildHandle), new SetValueHandler(SetChildHandle), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs deleted file mode 100644 index 6076af1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.IAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class IAnimationSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(104, "IAnimation", null, 153, typeof(IAnimationProvider), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs deleted file mode 100644 index 57612d9..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ImageElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ImageElementInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetImage(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Image", (UIImage)valueObj); - - private static void SetUVOffset(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("UVOffset", (Vector2)valueObj); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(107, "ImageElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(107, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetImage), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(107, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetUVOffset), false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs deleted file mode 100644 index 9f7adf4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ImageElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ImageElementSchema - { - public static UIXTypeSchema Type; - - private static void SetImage(ref object instanceObj, object valueObj) => ((ImageElement)instanceObj).Image = ((UIImage)valueObj)?.RenderImage; - - private static object GetUVOffset(object instanceObj) => ((ImageElement)instanceObj).UVOffset; - - private static void SetUVOffset(ref object instanceObj, object valueObj) => ((ImageElement)instanceObj).UVOffset = (Vector2)valueObj; - - private static object Construct() => new ImageElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(106, "ImageElement", null, 77, typeof(ImageElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(106, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetImage), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(106, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUVOffset), new SetValueHandler(SetUVOffset), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs deleted file mode 100644 index 856a29a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs +++ /dev/null @@ -1,334 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ImageSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ImageSchema - { - public static UIXTypeSchema Type; - - private static object GetSource(object instanceObj) => ((UIImage)instanceObj).Source; - - private static void SetSource(ref object instanceObj, object valueObj) => ((UIImage)instanceObj).Source = (string)valueObj; - - private static object GetNineGrid(object instanceObj) => ((UIImage)instanceObj).NineGrid; - - private static void SetNineGrid(ref object instanceObj, object valueObj) => ((UIImage)instanceObj).NineGrid = (Inset)valueObj; - - private static object GetMaximumSize(object instanceObj) => ((UIImage)instanceObj).MaximumSize; - - private static void SetMaximumSize(ref object instanceObj, object valueObj) - { - UIImage uiImage = (UIImage)instanceObj; - Size size = (Size)valueObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - uiImage.MaximumSize = size; - } - - private static object GetFlippable(object instanceObj) => BooleanBoxes.Box(((UIImage)instanceObj).Flippable); - - private static void SetFlippable(ref object instanceObj, object valueObj) => ((UIImage)instanceObj).Flippable = (bool)valueObj; - - private static object GetAntialiasEdges(object instanceObj) => BooleanBoxes.Box(((UIImage)instanceObj).AntialiasEdges); - - private static void SetAntialiasEdges(ref object instanceObj, object valueObj) => ((UIImage)instanceObj).AntialiasEdges = (bool)valueObj; - - private static object GetStatus(object instanceObj) => ((UIImage)instanceObj).Status; - - private static object GetWidth(object instanceObj) => ((UIImage)instanceObj).Width; - - private static object GetHeight(object instanceObj) => ((UIImage)instanceObj).Height; - - private static object Construct() => new UriImage(); - - private static object CallLoad(object instanceObj, object[] parameters) - { - ((UIImage)instanceObj).Load(); - return null; - } - - private static object ConstructSource(object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static Result ConvertFromStringSource(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj; - Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result.Error); - SetSource(ref instance, valueObj); - return result; - } - - private static object ConstructSourceNineGrid(object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - SetNineGrid(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringSourceNineGrid( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - SetSource(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - SetNineGrid(ref instance, valueObj2); - return result2; - } - - private static object ConstructSourceNineGridMaximumSize(object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - SetNineGrid(ref instanceObj, parameters[1]); - SetMaximumSize(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringSourceNineGridMaximumSize( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - SetSource(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - SetNineGrid(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - SetMaximumSize(ref instance, valueObj3); - return result3; - } - - private static object ConstructSourceNineGridMaximumSizeFlippable(object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - SetNineGrid(ref instanceObj, parameters[1]); - SetMaximumSize(ref instanceObj, parameters[2]); - SetFlippable(ref instanceObj, parameters[3]); - return instanceObj; - } - - private static Result ConvertFromStringSourceNineGridMaximumSizeFlippable( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - SetSource(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - SetNineGrid(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - SetMaximumSize(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], BooleanSchema.Type, null, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result4.Error); - SetFlippable(ref instance, valueObj4); - return result4; - } - - private static object ConstructSourceNineGridMaximumSizeFlippableAntialiasEdges( - object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - SetNineGrid(ref instanceObj, parameters[1]); - SetMaximumSize(ref instanceObj, parameters[2]); - SetFlippable(ref instanceObj, parameters[3]); - SetAntialiasEdges(ref instanceObj, parameters[4]); - return instanceObj; - } - - private static Result ConvertFromStringSourceNineGridMaximumSizeFlippableAntialiasEdges( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - SetSource(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - SetNineGrid(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - SetMaximumSize(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], BooleanSchema.Type, null, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result4.Error); - SetFlippable(ref instance, valueObj4); - object valueObj5; - Result result5 = UIXLoadResult.ValidateStringAsValue(splitString[4], BooleanSchema.Type, null, out valueObj5); - if (result5.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Image", result5.Error); - SetAntialiasEdges(ref instance, valueObj5); - return result5; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - switch (splitString.Length) - { - case 1: - result = ConvertFromStringSource(splitString, out instance); - if (!result.Failed) - return result; - break; - case 2: - result = ConvertFromStringSourceNineGrid(splitString, out instance); - if (!result.Failed) - return result; - break; - case 3: - result = ConvertFromStringSourceNineGridMaximumSize(splitString, out instance); - if (!result.Failed) - return result; - break; - case 4: - result = ConvertFromStringSourceNineGridMaximumSizeFlippable(splitString, out instance); - if (!result.Failed) - return result; - break; - case 5: - result = ConvertFromStringSourceNineGridMaximumSizeFlippableAntialiasEdges(splitString, out instance); - if (!result.Failed) - return result; - break; - default: - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Image"); - break; - } - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(105, "Image", null, 153, typeof(UIImage), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(105, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(105, "NineGrid", 114, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetNineGrid), new SetValueHandler(SetNineGrid), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(105, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, false, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(105, "Flippable", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFlippable), new SetValueHandler(SetFlippable), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(105, "AntialiasEdges", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAntialiasEdges), new SetValueHandler(SetAntialiasEdges), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(105, "Status", 108, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(105, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(105, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), null, false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(105, "Load", null, 240, new InvokeHandler(CallLoad), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(105, new short[1] - { - 208 - }, new ConstructHandler(ConstructSource)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(105, new short[2] - { - 208, - 114 - }, new ConstructHandler(ConstructSourceNineGrid)); - UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(105, new short[3] - { - 208, - 114, - 195 - }, new ConstructHandler(ConstructSourceNineGridMaximumSize)); - UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(105, new short[4] - { - 208, - 114, - 195, - 15 - }, new ConstructHandler(ConstructSourceNineGridMaximumSizeFlippable)); - UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(105, new short[5] - { - 208, - 114, - 195, - 15, - 15 - }, new ConstructHandler(ConstructSourceNineGridMaximumSizeFlippableAntialiasEdges)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] - { - constructorSchema1, - constructorSchema2, - constructorSchema3, - constructorSchema4, - constructorSchema5 - }, new PropertySchema[8] - { - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema6, - uixPropertySchema7 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs deleted file mode 100644 index 5a1b7af..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.IndexSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class IndexSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((Index)instanceObj).Value; - - private static object GetSourceValue(object instanceObj) => ((Index)instanceObj).SourceValue; - - private static object CallGetContainerIndex(object instanceObj, object[] parameters) => ((Index)instanceObj).GetContainerIndex(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(109, "Index", null, 153, typeof(Index), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(109, "Value", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetValue), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(109, "SourceValue", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetSourceValue), null, false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(109, "GetContainerIndex", null, 109, new InvokeHandler(CallGetContainerIndex), false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs deleted file mode 100644 index ebd485b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InputHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InputHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetName(object instanceObj) => ((InputHandler)instanceObj).Name; - - private static void SetName(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).Name = (string)valueObj; - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((InputHandler)instanceObj).Enabled); - - private static void SetEnabled(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).Enabled = (bool)valueObj; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(110, "InputHandler", null, -1, typeof(InputHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(110, "Name", 208, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(110, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - Type.Initialize(null, null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs deleted file mode 100644 index feaaabc..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs +++ /dev/null @@ -1,288 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InsetSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InsetSchema - { - private static readonly object s_Default = Inset.Zero; - public static UIXTypeSchema Type; - - private static object GetLeft(object instanceObj) => ((Inset)instanceObj).Left; - - private static void SetLeft(ref object instanceObj, object valueObj) - { - Inset inset = (Inset)instanceObj; - int num = (int)valueObj; - inset.Left = num; - instanceObj = inset; - } - - private static object GetTop(object instanceObj) => ((Inset)instanceObj).Top; - - private static void SetTop(ref object instanceObj, object valueObj) - { - Inset inset = (Inset)instanceObj; - int num = (int)valueObj; - inset.Top = num; - instanceObj = inset; - } - - private static object GetRight(object instanceObj) => ((Inset)instanceObj).Right; - - private static void SetRight(ref object instanceObj, object valueObj) - { - Inset inset = (Inset)instanceObj; - int num = (int)valueObj; - inset.Right = num; - instanceObj = inset; - } - - private static object GetBottom(object instanceObj) => ((Inset)instanceObj).Bottom; - - private static void SetBottom(ref object instanceObj, object valueObj) - { - Inset inset = (Inset)instanceObj; - int num = (int)valueObj; - inset.Bottom = num; - instanceObj = inset; - } - - private static object Construct() => s_Default; - - private static object ConstructInt32(object[] parameters) - { - int parameter = (int)parameters[0]; - return new Inset(parameter, parameter, parameter, parameter); - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Inset inset = (Inset)instanceObj; - writer.WriteInt32(inset.Left); - writer.WriteInt32(inset.Top); - writer.WriteInt32(inset.Right); - writer.WriteInt32(inset.Bottom); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Inset(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - int result; - if (!int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail(""); - instanceObj = new Inset() - { - Left = result, - Top = result, - Right = result, - Bottom = result - }; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num = (int)valueObj; - instanceObj = null; - instanceObj = new Inset() - { - Left = num, - Top = num, - Right = num, - Bottom = num - }; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - Inset inset = new Inset(); - int num2 = (int)num1; - inset.Left = num2; - inset.Top = num2; - inset.Right = num2; - inset.Bottom = num2; - instanceObj = inset; - return Result.Success; - } - - private static object ConstructLeftTopRightBottom(object[] parameters) - { - object instanceObj = Construct(); - SetLeft(ref instanceObj, parameters[0]); - SetTop(ref instanceObj, parameters[1]); - SetRight(ref instanceObj, parameters[2]); - SetBottom(ref instanceObj, parameters[3]); - return instanceObj; - } - - private static Result ConvertFromStringLeftTopRightBottom( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Inset", result1.Error); - SetLeft(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Inset", result2.Error); - SetTop(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], Int32Schema.Type, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Inset", result3.Error); - SetRight(ref instance, valueObj3); - object valueObj4; - Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], Int32Schema.Type, null, out valueObj4); - if (result4.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Inset", result4.Error); - SetBottom(ref instance, valueObj4); - return result4; - } - - private static bool IsConversionSupported(TypeSchema fromType) => Int32Schema.Type.IsAssignableFrom(fromType) || SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 4) - { - result = ConvertFromStringLeftTopRightBottom(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Inset"); - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - Inset inset1 = (Inset)leftObj; - if (op == OperationType.MathNegate) - return -inset1; - Inset inset2 = (Inset)rightObj; - switch (op) - { - case OperationType.MathAdd: - return inset1 + inset2; - case OperationType.MathSubtract: - return inset1 - inset2; - case OperationType.RelationalEquals: - return BooleanBoxes.Box(inset1 == inset2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(inset1 != inset2); - default: - return null; - } - } - - private static object CallTryParseStringInset(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Inset parameter2 = (Inset)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(114, "Inset", null, 153, typeof(Inset), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(114, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), new SetValueHandler(SetLeft), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(114, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), new SetValueHandler(SetTop), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(114, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), new SetValueHandler(SetRight), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(114, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), new SetValueHandler(SetBottom), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(114, new short[1] - { - 115 - }, new ConstructHandler(ConstructInt32)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(114, new short[4] - { - 115, - 115, - 115, - 115 - }, new ConstructHandler(ConstructLeftTopRightBottom)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(114, "TryParse", new short[2] - { - 208, - 114 - }, 114, new InvokeHandler(CallTryParseStringInset), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] - { - constructorSchema1, - constructorSchema2 - }, new PropertySchema[4] - { - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs deleted file mode 100644 index 8711862..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs +++ /dev/null @@ -1,239 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.Int32Schema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.CodeModel.Cpp; -using Microsoft.Iris.Library; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class Int32Schema - { - public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); - public static UIXTypeSchema Type; - - private static object GetMinValue(object instanceObj) => Int32Boxes.MinValueBox; - - private static object GetMaxValue(object instanceObj) => Int32Boxes.MaxValueBox; - - private static object Construct() => Int32Boxes.ZeroBox; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - int num = (int)instanceObj; - writer.WriteInt32(num); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadInt32(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - int result; - if (!int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Int32"); - instanceObj = result; - return Result.Success; - } - - private static Result ConvertFromBoolean(object valueObj, out object instanceObj) - { - bool flag = (bool)valueObj; - instanceObj = null; - int num = flag ? 1 : 0; - instanceObj = num; - return Result.Success; - } - - private static Result ConvertFromByte(object valueObj, out object instanceObj) - { - byte num1 = (byte)valueObj; - instanceObj = null; - int num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - int num2 = (int)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt64(object valueObj, out object instanceObj) - { - long num1 = (long)valueObj; - instanceObj = null; - int num2 = (int)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromDouble(object valueObj, out object instanceObj) - { - double num1 = (double)valueObj; - instanceObj = null; - int num2 = (int)num1; - instanceObj = num2; - return Result.Success; - } - - private static object CallToStringString(object instanceObj, object[] parameters) => ((int)instanceObj).ToString((string)parameters[0]); - - private static bool IsConversionSupported(TypeSchema fromType) => BooleanSchema.Type.IsAssignableFrom(fromType) || ByteSchema.Type.IsAssignableFrom(fromType) || (DoubleSchema.Type.IsAssignableFrom(fromType) || Int64Schema.Type.IsAssignableFrom(fromType)) || (SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType) || fromType.IsEnum); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (BooleanSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromBoolean(from, out instance); - if (!result.Failed) - return result; - } - if (ByteSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromByte(from, out instance); - if (!result.Failed) - return result; - } - if (DoubleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromDouble(from, out instance); - if (!result.Failed) - return result; - } - if (Int64Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt64(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - if (!fromType.IsEnum) - return result; - instance = !(from is DllEnumProxy dllEnumProxy) ? (int)from : (object)dllEnumProxy.Value; - return Result.Success; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.MathModulus: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.RelationalLessThan: - case OperationType.RelationalGreaterThan: - case OperationType.RelationalLessThanEquals: - case OperationType.RelationalGreaterThanEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - int num1 = (int)leftObj; - if (op == OperationType.MathNegate) - return -num1; - int num2 = (int)rightObj; - switch (op - 1) - { - case 0: - return num1 + num2; - case OperationType.MathAdd: - return num1 - num2; - case OperationType.MathSubtract: - return num1 * num2; - case OperationType.MathMultiply: - return num1 / num2; - case OperationType.MathDivide: - return num1 % num2; - case OperationType.LogicalOr: - return BooleanBoxes.Box(num1 == num2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(num1 != num2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(num1 < num2); - case OperationType.RelationalLessThan: - return BooleanBoxes.Box(num1 > num2); - case OperationType.RelationalGreaterThan: - return BooleanBoxes.Box(num1 <= num2); - case OperationType.RelationalLessThanEquals: - return BooleanBoxes.Box(num1 >= num2); - default: - return null; - } - } - - private static object CallTryParseStringInt32(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - int parameter2 = (int)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static Result RangeValidateNotNegative(object value) - { - int num = (int)value; - return num < 0 ? Result.Fail("Expecting a non-negative value, but got {0}", num.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(115, "Int32", "int", 153, typeof(int), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(115, "MinValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinValue), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(115, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxValue), null, true); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(115, "ToString", new short[1] - { - 208 - }, 208, new InvokeHandler(CallToStringString), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(115, "TryParse", new short[2] - { - 208, - 115 - }, 115, new InvokeHandler(CallTryParseStringInt32), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs deleted file mode 100644 index 830b48c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs +++ /dev/null @@ -1,228 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.Int64Schema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class Int64Schema - { - public static UIXTypeSchema Type; - - private static object GetMinValue(object instanceObj) => Int64Boxes.MinValueBox; - - private static object GetMaxValue(object instanceObj) => Int64Boxes.MaxValueBox; - - private static object Construct() => Int64Boxes.ZeroBox; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - long num = (long)instanceObj; - writer.WriteInt64(num); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadInt64(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - long result; - if (!long.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Int64"); - instanceObj = result; - return Result.Success; - } - - private static Result ConvertFromBoolean(object valueObj, out object instanceObj) - { - bool flag = (bool)valueObj; - instanceObj = null; - long num = flag ? 1L : 0L; - instanceObj = num; - return Result.Success; - } - - private static Result ConvertFromByte(object valueObj, out object instanceObj) - { - byte num1 = (byte)valueObj; - instanceObj = null; - long num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - long num2 = (long)num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num1 = (int)valueObj; - instanceObj = null; - long num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromDouble(object valueObj, out object instanceObj) - { - double num1 = (double)valueObj; - instanceObj = null; - long num2 = (long)num1; - instanceObj = num2; - return Result.Success; - } - - private static object CallToStringString(object instanceObj, object[] parameters) => ((long)instanceObj).ToString((string)parameters[0]); - - private static bool IsConversionSupported(TypeSchema fromType) => BooleanSchema.Type.IsAssignableFrom(fromType) || ByteSchema.Type.IsAssignableFrom(fromType) || (DoubleSchema.Type.IsAssignableFrom(fromType) || Int32Schema.Type.IsAssignableFrom(fromType)) || (SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType)); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (BooleanSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromBoolean(from, out instance); - if (!result.Failed) - return result; - } - if (ByteSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromByte(from, out instance); - if (!result.Failed) - return result; - } - if (DoubleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromDouble(from, out instance); - if (!result.Failed) - return result; - } - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.MathModulus: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.RelationalLessThan: - case OperationType.RelationalGreaterThan: - case OperationType.RelationalLessThanEquals: - case OperationType.RelationalGreaterThanEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - long num1 = (long)leftObj; - if (op == OperationType.MathNegate) - return -num1; - long num2 = (long)rightObj; - switch (op - 1) - { - case 0: - return num1 + num2; - case OperationType.MathAdd: - return num1 - num2; - case OperationType.MathSubtract: - return num1 * num2; - case OperationType.MathMultiply: - return num1 / num2; - case OperationType.MathDivide: - return num1 % num2; - case OperationType.LogicalOr: - return BooleanBoxes.Box(num1 == num2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(num1 != num2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(num1 < num2); - case OperationType.RelationalLessThan: - return BooleanBoxes.Box(num1 > num2); - case OperationType.RelationalGreaterThan: - return BooleanBoxes.Box(num1 <= num2); - case OperationType.RelationalLessThanEquals: - return BooleanBoxes.Box(num1 >= num2); - default: - return null; - } - } - - private static object CallTryParseStringInt64(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - long parameter2 = (long)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(116, "Int64", "long", 153, typeof(long), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(116, "MinValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinValue), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(116, "MaxValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxValue), null, true); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(116, "ToString", new short[1] - { - 208 - }, 208, new InvokeHandler(CallToStringString), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(116, "TryParse", new short[2] - { - 208, - 116 - }, 116, new InvokeHandler(CallTryParseStringInt64), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs deleted file mode 100644 index db72396..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.IntRangedValueSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class IntRangedValueSchema - { - public static UIXTypeSchema Type; - - private static object GetMinValue(object instanceObj) => (int)((IUIRangedValue)instanceObj).MinValue; - - private static void SetMinValue(ref object instanceObj, object valueObj) - { - IUIIntRangedValue uiIntRangedValue = (IUIIntRangedValue)instanceObj; - int num = (int)valueObj; - if (num > (double)uiIntRangedValue.MaxValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MinValue"); - else - uiIntRangedValue.MinValue = num; - } - - private static object GetMaxValue(object instanceObj) => (int)((IUIRangedValue)instanceObj).MaxValue; - - private static void SetMaxValue(ref object instanceObj, object valueObj) - { - IUIIntRangedValue uiIntRangedValue = (IUIIntRangedValue)instanceObj; - int num = (int)valueObj; - if (num < (double)uiIntRangedValue.MinValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MaxValue"); - else - uiIntRangedValue.MaxValue = num; - } - - private static object GetStep(object instanceObj) => (int)((IUIRangedValue)instanceObj).Step; - - private static void SetStep(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Step = (int)valueObj; - - private static object GetValue(object instanceObj) => (int)((IUIRangedValue)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Value = (int)valueObj; - - private static object Construct() => new Microsoft.Iris.ModelItems.IntRangedValue(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(117, "IntRangedValue", null, 168, typeof(IUIIntRangedValue), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(117, "MinValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(117, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(117, "Step", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(117, "Value", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs deleted file mode 100644 index 4bc906f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InterpolateElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InterpolateElementInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetValue(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("Value", num); - } - - private static object CallPlayValueAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Value, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(120, "InterpolateElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(120, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetValue), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(120, "PlayValueAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayValueAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs deleted file mode 100644 index f3bb2d5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InterpolateElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InterpolateElementSchema - { - public static UIXTypeSchema Type; - - private static object GetInput1(object instanceObj) => ((InterpolateElement)instanceObj).Input1; - - private static void SetInput1(ref object instanceObj, object valueObj) => ((InterpolateElement)instanceObj).Input1 = (EffectInput)valueObj; - - private static object GetInput2(object instanceObj) => ((InterpolateElement)instanceObj).Input2; - - private static void SetInput2(ref object instanceObj, object valueObj) => ((InterpolateElement)instanceObj).Input2 = (EffectInput)valueObj; - - private static object GetValue(object instanceObj) => ((InterpolateElement)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) - { - InterpolateElement interpolateElement = (InterpolateElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - interpolateElement.Value = num; - } - - private static object Construct() => new InterpolateElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(119, "InterpolateElement", null, 77, typeof(InterpolateElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(119, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput1), new SetValueHandler(SetInput1), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(119, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput2), new SetValueHandler(SetInput2), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(119, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs deleted file mode 100644 index 49ddf63..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InterpolationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InterpolationSchema - { - public static RangeValidator ValidateEasePercent = new RangeValidator(RangeValidateEasePercent); - public static UIXTypeSchema Type; - - private static object GetType(object instanceObj) => ((Interpolation)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((Interpolation)instanceObj).Type = (InterpolationType)valueObj; - - private static object GetWeight(object instanceObj) => ((Interpolation)instanceObj).Weight; - - private static void SetWeight(ref object instanceObj, object valueObj) - { - Interpolation interpolation = (Interpolation)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - interpolation.Weight = num; - } - - private static object GetBezierHandle1(object instanceObj) => ((Interpolation)instanceObj).BezierHandle1; - - private static void SetBezierHandle1(ref object instanceObj, object valueObj) => ((Interpolation)instanceObj).BezierHandle1 = (float)valueObj; - - private static object GetBezierHandle2(object instanceObj) => ((Interpolation)instanceObj).BezierHandle2; - - private static void SetBezierHandle2(ref object instanceObj, object valueObj) => ((Interpolation)instanceObj).BezierHandle2 = (float)valueObj; - - private static object GetEasePercent(object instanceObj) => ((Interpolation)instanceObj).EasePercent; - - private static void SetEasePercent(ref object instanceObj, object valueObj) - { - Interpolation interpolation = (Interpolation)instanceObj; - float num = (float)valueObj; - Result result = ValidateEasePercent(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - interpolation.EasePercent = num; - } - - private static object Construct() => new Interpolation(); - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Interpolation interpolation = (Interpolation)instanceObj; - writer.WriteInt32((int)interpolation.Type); - writer.WriteSingle(interpolation.Weight); - writer.WriteSingle(interpolation.BezierHandle1); - writer.WriteSingle(interpolation.BezierHandle2); - writer.WriteSingle(interpolation.EasePercent); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Interpolation() - { - Type = (InterpolationType)reader.ReadInt32(), - Weight = reader.ReadSingle(), - BezierHandle1 = reader.ReadSingle(), - BezierHandle2 = reader.ReadSingle(), - EasePercent = reader.ReadSingle() - }; - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - string[] strArray = str.Split(','); - if (strArray.Length < 1) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Interpolation"); - Interpolation interpolation = new Interpolation(); - instanceObj = interpolation; - object valueObj1; - Result result = UIXLoadResult.ValidateStringAsValue(strArray[0], UIXLoadResultExports.InterpolationTypeType, null, out valueObj1); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetType(ref instanceObj, valueObj1); - if (strArray.Length == 2) - { - object valueObj2; - result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetWeight(ref instanceObj, valueObj2); - } - else if (strArray.Length == 3) - { - if (interpolation.Type == InterpolationType.Bezier) - { - object valueObj2; - result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, null, out valueObj2); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetBezierHandle1(ref instanceObj, valueObj2); - object valueObj3; - result = UIXLoadResult.ValidateStringAsValue(strArray[2], SingleSchema.Type, null, out valueObj3); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetBezierHandle2(ref instanceObj, valueObj3); - } - else - { - object valueObj2; - result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetWeight(ref instanceObj, valueObj2); - object valueObj3; - result = UIXLoadResult.ValidateStringAsValue(strArray[2], SingleSchema.Type, ValidateEasePercent, out valueObj3); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - SetEasePercent(ref instanceObj, valueObj3); - } - } - else if (strArray.Length >= 4) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Interpolation"); - instanceObj = interpolation; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringInterpolation(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Interpolation parameter2 = (Interpolation)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static Result RangeValidateEasePercent(object value) - { - float num = (float)value; - return num <= 0.0 || num >= 1.0 ? Result.Fail("Expecting a value between {0} and {1} (exclusive), but got {2}", "0.0", "1.0", num.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(121, "Interpolation", null, 153, typeof(Interpolation), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(121, "Type", 122, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(121, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetWeight), new SetValueHandler(SetWeight), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(121, "BezierHandle1", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBezierHandle1), new SetValueHandler(SetBezierHandle1), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(121, "BezierHandle2", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBezierHandle2), new SetValueHandler(SetBezierHandle2), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(121, "EasePercent", 194, -1, ExpressionRestriction.None, false, ValidateEasePercent, false, new GetValueHandler(GetEasePercent), new SetValueHandler(SetEasePercent), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(121, "TryParse", new short[2] - { - 208, - 121 - }, 121, new InvokeHandler(CallTryParseStringInterpolation), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] - { - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs deleted file mode 100644 index 62c61f7..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InvAlphaSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InvAlphaSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new InvAlphaElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(123, "InvAlpha", null, 80, typeof(InvAlphaElement), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs deleted file mode 100644 index f89e2b6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InvColorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InvColorSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new InvColorElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(124, "InvColor", null, 80, typeof(InvColorElement), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs deleted file mode 100644 index adcad88..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.InvertSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class InvertSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new InvertElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(125, "Invert", null, 80, typeof(InvertElement), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs deleted file mode 100644 index 95987ae..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ItemAlignmentSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ItemAlignmentSchema - { - public static UIXTypeSchema Type; - - private static object GetHorizontal(object instanceObj) => ((ItemAlignment)instanceObj).Horizontal; - - private static void SetHorizontal(ref object instanceObj, object valueObj) - { - ItemAlignment itemAlignment = (ItemAlignment)instanceObj; - Alignment alignment = (Alignment)valueObj; - itemAlignment.Horizontal = alignment; - instanceObj = itemAlignment; - } - - private static object GetVertical(object instanceObj) => ((ItemAlignment)instanceObj).Vertical; - - private static void SetVertical(ref object instanceObj, object valueObj) - { - ItemAlignment itemAlignment = (ItemAlignment)instanceObj; - Alignment alignment = (Alignment)valueObj; - itemAlignment.Vertical = alignment; - instanceObj = itemAlignment; - } - - private static object Construct() => ItemAlignment.Default; - - private static object ConstructAlignment(object[] parameters) - { - Alignment parameter = (Alignment)parameters[0]; - return new ItemAlignment(parameter, parameter); - } - - private static object ConstructAlignmentAlignment(object[] parameters) => new ItemAlignment((Alignment)parameters[0], (Alignment)parameters[1]); - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - ItemAlignment itemAlignment = (ItemAlignment)instanceObj; - writer.WriteByte((byte)itemAlignment.Horizontal); - writer.WriteByte((byte)itemAlignment.Vertical); - } - - private static object DecodeBinary(ByteCodeReader reader) => new ItemAlignment((Alignment)reader.ReadByte(), (Alignment)reader.ReadByte()); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - Alignment alignment1; - Alignment alignment2; - if (str.IndexOf(',') >= 0) - { - string[] strArray = str.Split(','); - if (strArray.Length != 2) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "ItemAlignment"); - Result alignment3 = ParseAlignment(strArray[0], out alignment1); - if (alignment3.Failed) - return alignment3; - alignment3 = ParseAlignment(strArray[1], out alignment2); - if (alignment3.Failed) - return alignment3; - } - else - { - Result alignment3 = ParseAlignment(str, out alignment1); - if (alignment3.Failed) - return alignment3; - alignment2 = alignment1; - } - ItemAlignment itemAlignment = new ItemAlignment(alignment1, alignment2); - instanceObj = itemAlignment; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringItemAlignment(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - ItemAlignment parameter2 = (ItemAlignment)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static Result ParseAlignment(string value, out Alignment alignment) - { - value = value.Trim(); - alignment = Alignment.Unspecified; - if (value != "-") - { - object instance; - Result result = UIXLoadResultExports.AlignmentType.TypeConverter(value, StringSchema.Type, out instance); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "ItemAlignment", result.Error); - alignment = (Alignment)instance; - } - return Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(sbyte.MaxValue, "ItemAlignment", null, 153, typeof(ItemAlignment), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(sbyte.MaxValue, "Horizontal", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHorizontal), new SetValueHandler(SetHorizontal), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(sbyte.MaxValue, "Vertical", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetVertical), new SetValueHandler(SetVertical), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(sbyte.MaxValue, new short[1] - { - 3 - }, new ConstructHandler(ConstructAlignment)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(sbyte.MaxValue, new short[2] - { - 3, - 3 - }, new ConstructHandler(ConstructAlignmentAlignment)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(sbyte.MaxValue, "TryParse", new short[2] - { - 208, - sbyte.MaxValue - }, sbyte.MaxValue, new InvokeHandler(CallTryParseStringItemAlignment), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] - { - constructorSchema1, - constructorSchema2 - }, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs deleted file mode 100644 index 60cf363..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.KeyHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class KeyHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetCommand(object instanceObj) => ((KeyHandler)instanceObj).Command; - - private static void SetCommand(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).Command = (IUICommand)valueObj; - - private static object GetHandle(object instanceObj) => BooleanBoxes.Box(((KeyHandler)instanceObj).Handle); - - private static void SetHandle(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).Handle = (bool)valueObj; - - private static object GetStopRoute(object instanceObj) => BooleanBoxes.Box(((KeyHandler)instanceObj).StopRoute); - - private static void SetStopRoute(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).StopRoute = (bool)valueObj; - - private static object GetKey(object instanceObj) => ((KeyHandler)instanceObj).Key; - - private static void SetKey(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).Key = (KeyHandlerKey)valueObj; - - private static object GetHandlerTransition(object instanceObj) => ((ModifierInputHandler)instanceObj).HandlerTransition; - - private static void SetHandlerTransition(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).HandlerTransition = (InputHandlerTransition)valueObj; - - private static object GetRequiredModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers; - - private static void SetRequiredModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).RequiredModifiers = (InputHandlerModifiers)valueObj; - - private static object GetDisallowedModifiers(object instanceObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers; - - private static void SetDisallowedModifiers(ref object instanceObj, object valueObj) => ((ModifierInputHandler)instanceObj).DisallowedModifiers = (InputHandlerModifiers)valueObj; - - private static object GetPressing(object instanceObj) => BooleanBoxes.Box(((KeyHandler)instanceObj).Pressing); - - private static object GetRepeat(object instanceObj) => BooleanBoxes.Box(((KeyHandler)instanceObj).Repeat); - - private static void SetRepeat(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).Repeat = (bool)valueObj; - - private static object GetTrackInvokedKeys(object instanceObj) => BooleanBoxes.Box(((KeyHandler)instanceObj).TrackInvokedKeys); - - private static void SetTrackInvokedKeys(ref object instanceObj, object valueObj) => ((KeyHandler)instanceObj).TrackInvokedKeys = (bool)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetEventContext(object instanceObj) => ((KeyHandler)instanceObj).EventContext; - - private static object Construct() => new KeyHandler(); - - private static object CallGetInvokedKeys(object instanceObj, object[] parameters) - { - KeyHandler keyHandler = (KeyHandler)instanceObj; - ArrayList arrayList = new ArrayList(); - keyHandler.GetInvokedKeys(arrayList); - return arrayList; - } - - private static object CallGetInvokedKeysList(object instanceObj, object[] parameters) - { - KeyHandler keyHandler = (KeyHandler)instanceObj; - IList parameter = (IList)parameters[0]; - if (parameter != null) - keyHandler.GetInvokedKeys(parameter); - else - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "copyTo"); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(128, "KeyHandler", null, 110, typeof(KeyHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(128, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(128, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(128, "StopRoute", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStopRoute), new SetValueHandler(SetStopRoute), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(128, "Key", 129, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKey), new SetValueHandler(SetKey), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(128, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerTransition), new SetValueHandler(SetHandlerTransition), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(128, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(128, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(128, "Pressing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPressing), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(128, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(128, "TrackInvokedKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTrackInvokedKeys), new SetValueHandler(SetTrackInvokedKeys), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(128, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(128, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(128, "GetInvokedKeys", null, 138, new InvokeHandler(CallGetInvokedKeys), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(128, "GetInvokedKeys", new short[1] - { - 138 - }, 240, new InvokeHandler(CallGetInvokedKeysList), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(128, "Invoked"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] - { - uixPropertySchema1, - uixPropertySchema7, - uixPropertySchema12, - uixPropertySchema2, - uixPropertySchema11, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema9, - uixPropertySchema6, - uixPropertySchema3, - uixPropertySchema10 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs deleted file mode 100644 index 3c518e6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.KeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class KeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetTime(object instanceObj) => ((BaseKeyframe)instanceObj).Time; - - private static void SetTime(ref object instanceObj, object valueObj) => ((BaseKeyframe)instanceObj).Time = (float)valueObj; - - private static object GetRelativeTo(object instanceObj) => ((BaseKeyframe)instanceObj).RelativeTo; - - private static void SetRelativeTo(ref object instanceObj, object valueObj) => ((BaseKeyframe)instanceObj).RelativeTo = (RelativeTo)valueObj; - - private static object GetInterpolation(object instanceObj) => ((BaseKeyframe)instanceObj).Interpolation; - - private static void SetInterpolation(ref object instanceObj, object valueObj) => ((BaseKeyframe)instanceObj).Interpolation = (Interpolation)valueObj; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(130, "Keyframe", null, 153, typeof(BaseKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(130, "Time", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTime), new SetValueHandler(SetTime), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(130, "RelativeTo", 171, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRelativeTo), new SetValueHandler(SetRelativeTo), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(130, "Interpolation", 121, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInterpolation), new SetValueHandler(SetInterpolation), false); - Type.Initialize(null, null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs deleted file mode 100644 index 7f59918..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.LayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class LayoutInputSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(133, "LayoutInput", null, 153, typeof(ILayoutInput), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs deleted file mode 100644 index ee61e7b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.LayoutOutputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class LayoutOutputSchema - { - public static UIXTypeSchema Type; - - private static object GetSize(object instanceObj) => ((LayoutOutput)instanceObj).Size; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(134, "LayoutOutput", null, 153, typeof(LayoutOutput), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(134, "Size", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSize), null, false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs deleted file mode 100644 index 9072323..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.LayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System.Collections.Generic; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class LayoutSchema - { - private static Dictionary s_NameToLayoutMap = new Dictionary(10); - public static UIXTypeSchema Type; - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - object obj; - if (!s_NameToLayoutMap.TryGetValue(str.ToLowerInvariant(), out obj)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Layout"); - ILayout layout = (ILayout)obj; - instanceObj = layout; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringLayout(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - ILayout parameter2 = (ILayout)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - static LayoutSchema() - { - s_NameToLayoutMap.Add("anchor", new AnchorLayout()); - s_NameToLayoutMap.Add("default", DefaultLayout.Instance); - s_NameToLayoutMap.Add("dock", new DockLayout()); - s_NameToLayoutMap.Add("grid", new GridLayout()); - s_NameToLayoutMap.Add("scale", new ScaleLayout()); - s_NameToLayoutMap.Add("popup", new PopupLayout()); - s_NameToLayoutMap.Add("stack", new StackLayout()); - s_NameToLayoutMap.Add("form", new AnchorLayout() - { - SizeToHorizontalChildren = false, - SizeToVerticalChildren = false - }); - s_NameToLayoutMap.Add("horizontalflow", new FlowLayout() - { - Orientation = Orientation.Horizontal - }); - s_NameToLayoutMap.Add("verticalflow", new FlowLayout() - { - Orientation = Orientation.Vertical - }); - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(132, "Layout", null, 153, typeof(ILayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(132, "TryParse", new short[2] - { - 208, - 132 - }, 132, new InvokeHandler(CallTryParseStringLayout), true); - Type.Initialize(null, null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs deleted file mode 100644 index eac3b16..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.LightShaftInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class LightShaftInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Position", (Vector3)valueObj); - - private static void SetDecay(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Decay", (float)valueObj); - - private static void SetDensity(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Density", (float)valueObj); - - private static void SetFallOff(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("FallOff", (float)valueObj); - - private static void SetIntensity(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Intensity", (float)valueObj); - - private static void SetWeight(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Weight", (float)valueObj); - - private static object CallPlayPositionAnimationEffectVector3Animation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Position, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayDecayAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Decay, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayDensityAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Density, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayIntensityAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Intensity, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayFallOffAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.FallOff, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayWeightAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Weight, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(136, "LightShaftInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(136, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(136, "Decay", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDecay), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(136, "Density", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDensity), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(136, "FallOff", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetFallOff), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(136, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetIntensity), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(136, "Weight", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetWeight), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(136, "PlayPositionAnimation", new short[1] - { - 81 - }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(136, "PlayDecayAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDecayAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(136, "PlayDensityAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDensityAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(136, "PlayIntensityAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayIntensityAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(136, "PlayFallOffAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayFallOffAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(136, "PlayWeightAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayWeightAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[6] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema6 - }, new MethodSchema[6] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs deleted file mode 100644 index 3db7940..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.LightShaftSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class LightShaftSchema - { - public static UIXTypeSchema Type; - - private static object GetPosition(object instanceObj) => ((LightShaftElement)instanceObj).Position; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((LightShaftElement)instanceObj).Position = (Vector3)valueObj; - - private static object GetDecay(object instanceObj) => ((LightShaftElement)instanceObj).Decay; - - private static void SetDecay(ref object instanceObj, object valueObj) - { - LightShaftElement lightShaftElement = (LightShaftElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - lightShaftElement.Decay = num; - } - - private static object GetDensity(object instanceObj) => ((LightShaftElement)instanceObj).Density; - - private static void SetDensity(ref object instanceObj, object valueObj) - { - LightShaftElement lightShaftElement = (LightShaftElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - lightShaftElement.Density = num; - } - - private static object GetIntensity(object instanceObj) => ((LightShaftElement)instanceObj).Intensity; - - private static void SetIntensity(ref object instanceObj, object valueObj) - { - LightShaftElement lightShaftElement = (LightShaftElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - lightShaftElement.Intensity = num; - } - - private static object GetFallOff(object instanceObj) => ((LightShaftElement)instanceObj).FallOff; - - private static void SetFallOff(ref object instanceObj, object valueObj) - { - LightShaftElement lightShaftElement = (LightShaftElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - lightShaftElement.FallOff = num; - } - - private static object GetWeight(object instanceObj) => ((LightShaftElement)instanceObj).Weight; - - private static void SetWeight(ref object instanceObj, object valueObj) - { - LightShaftElement lightShaftElement = (LightShaftElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - lightShaftElement.Weight = num; - } - - private static object Construct() => new LightShaftElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(135, "LightShaft", null, 80, typeof(LightShaftElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(135, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(135, "Decay", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDecay), new SetValueHandler(SetDecay), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(135, "Density", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDensity), new SetValueHandler(SetDensity), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(135, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetIntensity), new SetValueHandler(SetIntensity), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(135, "FallOff", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetFallOff), new SetValueHandler(SetFallOff), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(135, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetWeight), new SetValueHandler(SetWeight), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema6 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs deleted file mode 100644 index 41d41c0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ListSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ListSchema - { - public static UIXTypeSchema Type; - - private static object GetCount(object instanceObj) => ((ICollection)instanceObj).Count; - - private static object GetSource(object instanceObj) => (IList)instanceObj; - - private static object GetCanSearch(object instanceObj) => (IList)instanceObj is IUIList uiList ? uiList.CanSearch : (object)false; - - private static object Construct() => new NotifyList(); - - private static object CallIsNullOrEmptyList(object instanceObj, object[] parameters) - { - IList parameter = (IList)parameters[0]; - return BooleanBoxes.Box(parameter == null || parameter.Count == 0); - } - - private static object Callget_ItemInt32(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - int parameter = (int)parameters[0]; - if (parameter >= 0 && parameter < list.Count) - return list[parameter]; - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter, "index"); - return null; - } - - private static object Callset_ItemInt32Object(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - int parameter1 = (int)parameters[0]; - object parameter2 = parameters[1]; - if (parameter1 < 0 || parameter1 >= list.Count) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter1, "index"); - return null; - } - list[parameter1] = parameter2; - return null; - } - - private static object CallClear(object instanceObj, object[] parameters) - { - ((IList)instanceObj).Clear(); - return null; - } - - private static object CallAddObject(object instanceObj, object[] parameters) - { - ((IList)instanceObj).Add(parameters[0]); - return null; - } - - private static object CallRemoveObject(object instanceObj, object[] parameters) - { - ((IList)instanceObj).Remove(parameters[0]); - return null; - } - - private static object CallContainsObject(object instanceObj, object[] parameters) => ((IList)instanceObj).Contains(parameters[0]); - - private static object CallIndexOfObject(object instanceObj, object[] parameters) => ((IList)instanceObj).IndexOf(parameters[0]); - - private static object CallInsertInt32Object(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - int parameter1 = (int)parameters[0]; - object parameter2 = parameters[1]; - if (parameter1 < 0 || parameter1 > list.Count) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter1, "index"); - return null; - } - list.Insert(parameter1, parameter2); - return null; - } - - private static object CallRemoveAtInt32(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - int parameter = (int)parameters[0]; - if (parameter < 0 || parameter >= list.Count) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter, "index"); - return null; - } - list.RemoveAt(parameter); - return null; - } - - private static object CallSearchForStringString(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - string parameter = (string)parameters[0]; - return list is IUIList uiList ? uiList.SearchForString(parameter) : (object)-1; - } - - private static object CallMoveInt32Int32(object instanceObj, object[] parameters) - { - IList list = (IList)instanceObj; - int parameter1 = (int)parameters[0]; - int parameter2 = (int)parameters[1]; - if (parameter1 < 0 || parameter1 >= list.Count) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter1, "oldIndex"); - return null; - } - if (parameter2 < 0 || parameter2 >= list.Count) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter2, "newIndex"); - return null; - } - switch (list) - { - case IUIList uiList: - uiList.Move(parameter1, parameter2); - break; - case INotifyList notifyList: - notifyList.Move(parameter1, parameter2); - break; - default: - object obj = list[parameter1]; - list.RemoveAt(parameter1); - list.Insert(parameter2, obj); - break; - } - return null; - } - - private static object CallGetEnumerator(object instanceObj, object[] parameters) => ((IEnumerable)instanceObj).GetEnumerator(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(138, "List", null, 153, typeof(IList), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(138, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCount), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(138, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(138, "CanSearch", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanSearch), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(138, "IsNullOrEmpty", new short[1] - { - 138 - }, 15, new InvokeHandler(CallIsNullOrEmptyList), true); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(138, "get_Item", new short[1] - { - 115 - }, 153, new InvokeHandler(Callget_ItemInt32), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(138, "set_Item", new short[2] - { - 115, - 153 - }, 240, new InvokeHandler(Callset_ItemInt32Object), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(138, "Clear", null, 240, new InvokeHandler(CallClear), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(138, "Add", new short[1] - { - 153 - }, 240, new InvokeHandler(CallAddObject), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(138, "Remove", new short[1] - { - 153 - }, 240, new InvokeHandler(CallRemoveObject), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(138, "Contains", new short[1] - { - 153 - }, 15, new InvokeHandler(CallContainsObject), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(138, "IndexOf", new short[1] - { - 153 - }, 115, new InvokeHandler(CallIndexOfObject), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(138, "Insert", new short[2] - { - 115, - 153 - }, 240, new InvokeHandler(CallInsertInt32Object), false); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(138, "RemoveAt", new short[1] - { - 115 - }, 240, new InvokeHandler(CallRemoveAtInt32), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(138, "SearchForString", new short[1] - { - 208 - }, 115, new InvokeHandler(CallSearchForStringString), false); - UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(138, "Move", new short[2] - { - 115, - 115 - }, 240, new InvokeHandler(CallMoveInt32Int32), false); - UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(138, "GetEnumerator", null, 86, new InvokeHandler(CallGetEnumerator), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[13] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11, - uixMethodSchema12, - uixMethodSchema13 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs deleted file mode 100644 index 7811ef0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MajorMinorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MajorMinorSchema - { - public static UIXTypeSchema Type; - - private static object GetMajor(object instanceObj) => ((MajorMinor)instanceObj).Major; - - private static void SetMajor(ref object instanceObj, object valueObj) - { - MajorMinor majorMinor = (MajorMinor)instanceObj; - int num = (int)valueObj; - majorMinor.Major = num; - instanceObj = majorMinor; - } - - private static object GetMinor(object instanceObj) => ((MajorMinor)instanceObj).Minor; - - private static void SetMinor(ref object instanceObj, object valueObj) - { - MajorMinor majorMinor = (MajorMinor)instanceObj; - int num = (int)valueObj; - majorMinor.Minor = num; - instanceObj = majorMinor; - } - - private static object Construct() => MajorMinor.Zero; - - private static object ConstructMajorMinor(object[] parameters) - { - object instanceObj = Construct(); - SetMajor(ref instanceObj, parameters[0]); - SetMinor(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringMajorMinor( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "MajorMinor", result1.Error); - SetMajor(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "MajorMinor", result2.Error); - SetMinor(ref instance, valueObj2); - return result2; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - MajorMinor majorMinor = (MajorMinor)instanceObj; - writer.WriteInt32(majorMinor.Major); - writer.WriteInt32(majorMinor.Minor); - } - - private static object DecodeBinary(ByteCodeReader reader) => new MajorMinor(reader.ReadInt32(), reader.ReadInt32()); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringMajorMinor(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "MajorMinor"); - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(139, "MajorMinor", null, 153, typeof(MajorMinor), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(139, "Major", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMajor), new SetValueHandler(SetMajor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(139, "Minor", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinor), new SetValueHandler(SetMinor), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(139, new short[2] - { - 115, - 115 - }, new ConstructHandler(ConstructMajorMinor)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs deleted file mode 100644 index c97cb13..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MappingSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MappingSchema - { - public static UIXTypeSchema Type; - - private static void SetProperty(ref object instanceObj, object valueObj) - { - } - - private static void SetSource(ref object instanceObj, object valueObj) - { - } - - private static void SetTarget(ref object instanceObj, object valueObj) - { - } - - private static void SetDefaultValue(ref object instanceObj, object valueObj) - { - } - - private static object Construct() => new object(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(140, "Mapping", null, -1, typeof(object), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(140, "Property", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProperty), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(140, "Source", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetSource), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(140, "Target", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetTarget), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(140, "DefaultValue", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetDefaultValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs deleted file mode 100644 index 16ca355..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MarkupDataQueryInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MarkupDataQueryInstanceSchema - { - public static UIXTypeSchema Type; - - private static object GetStatus(object instanceObj) => ((MarkupDataQuery)instanceObj).Status; - - private static object GetResult(object instanceObj) => ((MarkupDataQuery)instanceObj).Result; - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((MarkupDataQuery)instanceObj).Enabled); - - private static void SetEnabled(ref object instanceObj, object valueObj) => ((MarkupDataQuery)instanceObj).Enabled = (bool)valueObj; - - private static object CallRefresh(object instanceObj, object[] parameters) - { - ((MarkupDataQuery)instanceObj).Refresh(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(142, "MarkupDataQueryInstance", null, 153, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(142, "Status", 47, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(142, "Result", 143, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetResult), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(142, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(142, "Refresh", null, 240, new InvokeHandler(CallRefresh), false); - Type.Initialize(null, null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs deleted file mode 100644 index 26b1b69..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MarkupDataTypeInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MarkupDataTypeInstanceSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(143, "MarkupDataTypeInstance", null, 153, typeof(MarkupDataType), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs deleted file mode 100644 index fbdf279..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MarkupErrorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MarkupErrorSchema - { - public static UIXTypeSchema Type; - - private static object GetContext(object instanceObj) => ((MarkupError)instanceObj).Context; - - private static object GetMessage(object instanceObj) => ((MarkupError)instanceObj).Message; - - private static object GetUri(object instanceObj) => ((MarkupError)instanceObj).Uri; - - private static object GetLine(object instanceObj) => ((MarkupError)instanceObj).Line; - - private static object GetColumn(object instanceObj) => ((MarkupError)instanceObj).Column; - - private static object GetIsError(object instanceObj) => BooleanBoxes.Box(((MarkupError)instanceObj).IsError); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(144, "MarkupError", null, 153, typeof(MarkupError), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(144, "Context", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContext), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(144, "Message", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMessage), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(144, "Uri", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUri), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(144, "Line", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLine), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(144, "Column", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColumn), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(144, "IsError", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetIsError), null, false); - Type.Initialize(null, null, new PropertySchema[6] - { - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema6, - uixPropertySchema4, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs deleted file mode 100644 index 630465f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MarkupSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MarkupSchema - { - public static UIXTypeSchema Type; - - private static object GetErrors(object instanceObj) => ((MarkupServices)instanceObj).Errors; - - private static object GetWarningsOnly(object instanceObj) => BooleanBoxes.Box(((MarkupServices)instanceObj).WarningsOnly); - - private static object Construct() => MarkupServices.Instance; - - private static object CallClearErrors(object instanceObj, object[] parameters) - { - ((MarkupServices)instanceObj).ClearErrors(); - return null; - } - - private static object CallIsDisposedObject(object instanceObj, object[] parameters) - { - object parameter = parameters[0]; - return parameter == null ? true : BooleanBoxes.Box(parameter is IDisposableObject disposableObject && disposableObject.IsDisposed); - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(141, "Markup", null, 153, typeof(MarkupServices), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(141, "Errors", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetErrors), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(141, "WarningsOnly", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWarningsOnly), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(141, "ClearErrors", null, 240, new InvokeHandler(CallClearErrors), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(141, "ErrorsDetected"); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(141, "IsDisposed", new short[1] - { - 153 - }, 15, new InvokeHandler(CallIsDisposedObject), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs deleted file mode 100644 index 946cb00..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs +++ /dev/null @@ -1,288 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MathSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MathSchema - { - public static UIXTypeSchema Type; - - private static object CallMinInt32Int32(object instanceObj, object[] parameters) => (int)parameters[0] > (int)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallMinSingleSingle(object instanceObj, object[] parameters) => (float)parameters[0] > (double)(float)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallMinDoubleDouble(object instanceObj, object[] parameters) => (double)parameters[0] > (double)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallMaxInt32Int32(object instanceObj, object[] parameters) => (int)parameters[0] < (int)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallMaxSingleSingle(object instanceObj, object[] parameters) => (float)parameters[0] < (double)(float)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallMaxDoubleDouble(object instanceObj, object[] parameters) => (double)parameters[0] < (double)parameters[1] ? parameters[1] : parameters[0]; - - private static object CallAbsInt32(object instanceObj, object[] parameters) - { - int parameter = (int)parameters[0]; - int num = Math.Abs(parameter); - return num != parameter ? num : parameters[0]; - } - - private static object CallAbsSingle(object instanceObj, object[] parameters) - { - float parameter = (float)parameters[0]; - float num = Math.Abs(parameter); - return num != (double)parameter ? num : parameters[0]; - } - - private static object CallAbsDouble(object instanceObj, object[] parameters) - { - double parameter = (double)parameters[0]; - double num = Math.Abs(parameter); - return num != parameter ? num : parameters[0]; - } - - private static object CallRoundSingle(object instanceObj, object[] parameters) - { - float parameter = (float)parameters[0]; - float num = (float)Math.Round(parameter); - return num != (double)parameter ? num : parameters[0]; - } - - private static object CallRoundDouble(object instanceObj, object[] parameters) - { - double parameter = (double)parameters[0]; - double num = Math.Round(parameter); - return num != parameter ? num : parameters[0]; - } - - private static object CallFloorSingle(object instanceObj, object[] parameters) - { - float parameter = (float)parameters[0]; - float num = (float)Math.Floor(parameter); - return num != (double)parameter ? num : parameters[0]; - } - - private static object CallFloorDouble(object instanceObj, object[] parameters) - { - double parameter = (double)parameters[0]; - double num = Math.Floor(parameter); - return num != parameter ? num : parameters[0]; - } - - private static object CallCeilingSingle(object instanceObj, object[] parameters) - { - float parameter = (float)parameters[0]; - float num = (float)Math.Ceiling(parameter); - return num != (double)parameter ? num : parameters[0]; - } - - private static object CallCeilingDouble(object instanceObj, object[] parameters) - { - double parameter = (double)parameters[0]; - double num = Math.Ceiling(parameter); - return num != parameter ? num : parameters[0]; - } - - private static object CallAcosDouble(object instanceObj, object[] parameters) => Math.Acos((double)parameters[0]); - - private static object CallAsinDouble(object instanceObj, object[] parameters) => Math.Asin((double)parameters[0]); - - private static object CallAtanDouble(object instanceObj, object[] parameters) => Math.Atan((double)parameters[0]); - - private static object CallAtan2DoubleDouble(object instanceObj, object[] parameters) => Math.Atan2((double)parameters[0], (double)parameters[1]); - - private static object CallCosDouble(object instanceObj, object[] parameters) => Math.Cos((double)parameters[0]); - - private static object CallCoshDouble(object instanceObj, object[] parameters) => Math.Cosh((double)parameters[0]); - - private static object CallSinDouble(object instanceObj, object[] parameters) => Math.Sin((double)parameters[0]); - - private static object CallSinhDouble(object instanceObj, object[] parameters) => Math.Sinh((double)parameters[0]); - - private static object CallTanDouble(object instanceObj, object[] parameters) => Math.Tan((double)parameters[0]); - - private static object CallTanhDouble(object instanceObj, object[] parameters) => Math.Tanh((double)parameters[0]); - - private static object CallSqrtDouble(object instanceObj, object[] parameters) => Math.Sqrt((double)parameters[0]); - - private static object CallPowDoubleDouble(object instanceObj, object[] parameters) => Math.Pow((double)parameters[0], (double)parameters[1]); - - private static object CallLogDouble(object instanceObj, object[] parameters) => Math.Log((double)parameters[0]); - - private static object CallLogDoubleDouble(object instanceObj, object[] parameters) => Math.Log((double)parameters[0], (double)parameters[1]); - - private static object CallLog10Double(object instanceObj, object[] parameters) => Math.Log10((double)parameters[0]); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(145, "Math", null, 153, typeof(object), UIXTypeFlags.Static); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(145, "Min", new short[2] - { - 115, - 115 - }, 115, new InvokeHandler(CallMinInt32Int32), true); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(145, "Min", new short[2] - { - 194, - 194 - }, 194, new InvokeHandler(CallMinSingleSingle), true); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(145, "Min", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallMinDoubleDouble), true); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(145, "Max", new short[2] - { - 115, - 115 - }, 115, new InvokeHandler(CallMaxInt32Int32), true); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(145, "Max", new short[2] - { - 194, - 194 - }, 194, new InvokeHandler(CallMaxSingleSingle), true); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(145, "Max", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallMaxDoubleDouble), true); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(145, "Abs", new short[1] - { - 115 - }, 115, new InvokeHandler(CallAbsInt32), true); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(145, "Abs", new short[1] - { - 194 - }, 194, new InvokeHandler(CallAbsSingle), true); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(145, "Abs", new short[1] - { - 61 - }, 61, new InvokeHandler(CallAbsDouble), true); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(145, "Round", new short[1] - { - 194 - }, 194, new InvokeHandler(CallRoundSingle), true); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(145, "Round", new short[1] - { - 61 - }, 61, new InvokeHandler(CallRoundDouble), true); - UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(145, "Floor", new short[1] - { - 194 - }, 194, new InvokeHandler(CallFloorSingle), true); - UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(145, "Floor", new short[1] - { - 61 - }, 61, new InvokeHandler(CallFloorDouble), true); - UIXMethodSchema uixMethodSchema14 = new UIXMethodSchema(145, "Ceiling", new short[1] - { - 194 - }, 194, new InvokeHandler(CallCeilingSingle), true); - UIXMethodSchema uixMethodSchema15 = new UIXMethodSchema(145, "Ceiling", new short[1] - { - 61 - }, 61, new InvokeHandler(CallCeilingDouble), true); - UIXMethodSchema uixMethodSchema16 = new UIXMethodSchema(145, "Acos", new short[1] - { - 61 - }, 61, new InvokeHandler(CallAcosDouble), true); - UIXMethodSchema uixMethodSchema17 = new UIXMethodSchema(145, "Asin", new short[1] - { - 61 - }, 61, new InvokeHandler(CallAsinDouble), true); - UIXMethodSchema uixMethodSchema18 = new UIXMethodSchema(145, "Atan", new short[1] - { - 61 - }, 61, new InvokeHandler(CallAtanDouble), true); - UIXMethodSchema uixMethodSchema19 = new UIXMethodSchema(145, "Atan2", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallAtan2DoubleDouble), true); - UIXMethodSchema uixMethodSchema20 = new UIXMethodSchema(145, "Cos", new short[1] - { - 61 - }, 61, new InvokeHandler(CallCosDouble), true); - UIXMethodSchema uixMethodSchema21 = new UIXMethodSchema(145, "Cosh", new short[1] - { - 61 - }, 61, new InvokeHandler(CallCoshDouble), true); - UIXMethodSchema uixMethodSchema22 = new UIXMethodSchema(145, "Sin", new short[1] - { - 61 - }, 61, new InvokeHandler(CallSinDouble), true); - UIXMethodSchema uixMethodSchema23 = new UIXMethodSchema(145, "Sinh", new short[1] - { - 61 - }, 61, new InvokeHandler(CallSinhDouble), true); - UIXMethodSchema uixMethodSchema24 = new UIXMethodSchema(145, "Tan", new short[1] - { - 61 - }, 61, new InvokeHandler(CallTanDouble), true); - UIXMethodSchema uixMethodSchema25 = new UIXMethodSchema(145, "Tanh", new short[1] - { - 61 - }, 61, new InvokeHandler(CallTanhDouble), true); - UIXMethodSchema uixMethodSchema26 = new UIXMethodSchema(145, "Sqrt", new short[1] - { - 61 - }, 61, new InvokeHandler(CallSqrtDouble), true); - UIXMethodSchema uixMethodSchema27 = new UIXMethodSchema(145, "Pow", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallPowDoubleDouble), true); - UIXMethodSchema uixMethodSchema28 = new UIXMethodSchema(145, "Log", new short[1] - { - 61 - }, 61, new InvokeHandler(CallLogDouble), true); - UIXMethodSchema uixMethodSchema29 = new UIXMethodSchema(145, "Log", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallLogDoubleDouble), true); - UIXMethodSchema uixMethodSchema30 = new UIXMethodSchema(145, "Log10", new short[1] - { - 61 - }, 61, new InvokeHandler(CallLog10Double), true); - Type.Initialize(null, null, null, new MethodSchema[30] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11, - uixMethodSchema12, - uixMethodSchema13, - uixMethodSchema14, - uixMethodSchema15, - uixMethodSchema16, - uixMethodSchema17, - uixMethodSchema18, - uixMethodSchema19, - uixMethodSchema20, - uixMethodSchema21, - uixMethodSchema22, - uixMethodSchema23, - uixMethodSchema24, - uixMethodSchema25, - uixMethodSchema26, - uixMethodSchema27, - uixMethodSchema28, - uixMethodSchema29, - uixMethodSchema30 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs deleted file mode 100644 index 7c66e00..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MergeAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MergeAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetSources(object instanceObj) => ((MergeAnimation)instanceObj).Sources; - - private static object GetType(object instanceObj) => ((MergeAnimation)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((MergeAnimation)instanceObj).Type = (AnimationEventType)valueObj; - - private static object Construct() => new MergeAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(147, "MergeAnimation", null, 104, typeof(MergeAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(147, "Sources", 138, 104, ExpressionRestriction.NoAccess, false, null, false, new GetValueHandler(GetSources), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(147, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs deleted file mode 100644 index a06eff4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.MouseWheelHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class MouseWheelHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetHandle(object instanceObj) => BooleanBoxes.Box(((MouseWheelHandler)instanceObj).Handle); - - private static void SetHandle(ref object instanceObj, object valueObj) => ((MouseWheelHandler)instanceObj).Handle = (bool)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object Construct() => new MouseWheelHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(150, "MouseWheelHandler", null, 110, typeof(MouseWheelHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(150, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(150, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(150, "UpInvoked"); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(150, "DownInvoked"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, new EventSchema[2] - { - uixEventSchema1, - uixEventSchema2 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs deleted file mode 100644 index 65d421a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.NullSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class NullSchema - { - public static UIXTypeSchema Type; - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - object obj1 = leftObj; - object obj2 = rightObj; - switch (op) - { - case OperationType.RelationalEquals: - return BooleanBoxes.Box(obj1 == obj2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(obj1 != obj2); - default: - return null; - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(152, "Null", null, -1, typeof(object), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs deleted file mode 100644 index 4a011c8..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ObjectSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ObjectSchema - { - public static UIXTypeSchema Type; - - private static object CallToString(object instanceObj, object[] parameters) => instanceObj.ToString(); - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - object objA = leftObj; - object objB = rightObj; - switch (op) - { - case OperationType.RelationalEquals: - return BooleanBoxes.Box(Equals(objA, objB)); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(!Equals(objA, objB)); - default: - return null; - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(153, "Object", "object", -1, typeof(object), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(153, "ToString", null, 208, new InvokeHandler(CallToString), false); - Type.Initialize(null, null, null, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs deleted file mode 100644 index efe0b51..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.OrientationKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class OrientationKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseRotationKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseRotationKeyframe)instanceObj).Value = (Rotation)valueObj; - - private static object Construct() => new OrientationKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(155, "OrientationKeyframe", null, 130, typeof(OrientationKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(155, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs deleted file mode 100644 index eaa3a55..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PanelSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PanelSchema - { - public static UIXTypeSchema Type; - - private static object GetChildren(object instanceObj) => ViewItemSchema.ListProxy.GetChildren((ViewItem)instanceObj); - - private static object Construct() => new Panel(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(156, "Panel", null, 239, typeof(Panel), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(156, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs deleted file mode 100644 index 2bc7ac3..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PlacementModeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PlacementModeSchema - { - public static UIXTypeSchema Type; - - private static object GetPopupPositions(object instanceObj) => new ArrayList(((PlacementMode)instanceObj).PopupPositions); - - private static void SetPopupPositions(ref object instanceObj, object valueObj) - { - PlacementMode placementMode = (PlacementMode)instanceObj; - IList list = (IList)valueObj; - PopupPosition[] popupPositionArray = new PopupPosition[list.Count]; - for (int index = 0; index < list.Count; ++index) - popupPositionArray[index] = (PopupPosition)list[index]; - placementMode.PopupPositions = popupPositionArray; - } - - private static object GetMouseTarget(object instanceObj) => ((PlacementMode)instanceObj).MouseTarget; - - private static void SetMouseTarget(ref object instanceObj, object valueObj) => ((PlacementMode)instanceObj).MouseTarget = (MouseTarget)valueObj; - - private static object Construct() => new PlacementMode(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - PlacementMode instance = StringToInstance(str); - if (instance == null) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "PlacementMode"); - instanceObj = instance; - return Result.Success; - } - - private static object FindCanonicalInstance(string name) => StringToInstance(name); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringPlacementMode(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - PlacementMode parameter2 = (PlacementMode)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static PlacementMode StringToInstance(string value) - { - if (value == "Origin") - return PlacementMode.Origin; - if (value == "Left") - return PlacementMode.Left; - if (value == "Right") - return PlacementMode.Right; - if (value == "Top") - return PlacementMode.Top; - if (value == "Bottom") - return PlacementMode.Bottom; - if (value == "Center") - return PlacementMode.Center; - if (value == "MouseOrigin") - return PlacementMode.MouseOrigin; - if (value == "MouseBottom") - return PlacementMode.MouseBottom; - if (value == "FollowMouseOrigin") - return PlacementMode.FollowMouseOrigin; - return value == "FollowMouseBottom" ? PlacementMode.FollowMouseBottom : null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(157, "PlacementMode", null, 153, typeof(PlacementMode), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(157, "PopupPositions", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPopupPositions), new SetValueHandler(SetPopupPositions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(157, "MouseTarget", 149, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMouseTarget), new SetValueHandler(SetMouseTarget), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(157, "TryParse", new short[2] - { - 208, - 157 - }, 157, new InvokeHandler(CallTryParseStringPlacementMode), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs deleted file mode 100644 index 2f42ac0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PointLight2DInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PointLight2DInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Position", (Vector3)valueObj); - - private static void SetRadius(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Radius", (float)valueObj); - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("LightColor", (Color)valueObj); - - private static void SetAmbientColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("AmbientColor", (Color)valueObj); - - private static void SetAttenuation(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Attenuation", (Vector3)valueObj); - - private static object CallPlayPositionAnimationEffectVector3Animation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Position, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayRadiusAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Radius, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayLightColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.LightColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayAmbientColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.AmbientColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayAttenuationAnimationEffectVector3Animation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Attenuation, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(160, "PointLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(160, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(160, "Radius", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(160, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(160, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(160, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAttenuation), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(160, "PlayPositionAnimation", new short[1] - { - 81 - }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(160, "PlayRadiusAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayRadiusAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(160, "PlayLightColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(160, "PlayAmbientColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayAmbientColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(160, "PlayAttenuationAnimation", new short[1] - { - 81 - }, 240, new InvokeHandler(CallPlayAttenuationAnimationEffectVector3Animation), false); - Type.Initialize(null, null, new PropertySchema[5] - { - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[5] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs deleted file mode 100644 index 87cec36..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PointLight2DSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PointLight2DSchema - { - public static UIXTypeSchema Type; - - private static object GetPosition(object instanceObj) => ((PointLight2DElement)instanceObj).Position; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((PointLight2DElement)instanceObj).Position = (Vector3)valueObj; - - private static object GetRadius(object instanceObj) => ((PointLight2DElement)instanceObj).Radius; - - private static void SetRadius(ref object instanceObj, object valueObj) - { - PointLight2DElement pointLight2Delement = (PointLight2DElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - pointLight2Delement.Radius = num; - } - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((PointLight2DElement)instanceObj).LightColor = ((Color)valueObj).RenderConvert(); - - private static void SetAmbientColor(ref object instanceObj, object valueObj) => ((PointLight2DElement)instanceObj).AmbientColor = ((Color)valueObj).RenderConvert(); - - private static object GetAttenuation(object instanceObj) => ((PointLight2DElement)instanceObj).Attenuation; - - private static void SetAttenuation(ref object instanceObj, object valueObj) => ((PointLight2DElement)instanceObj).Attenuation = (Vector3)valueObj; - - private static object Construct() => new PointLight2DElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(159, "PointLight2D", null, 77, typeof(PointLight2DElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(159, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(159, "Radius", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetRadius), new SetValueHandler(SetRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(159, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(159, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(159, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttenuation), new SetValueHandler(SetAttenuation), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] - { - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs deleted file mode 100644 index e6df835..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PointSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PointSchema - { - public static UIXTypeSchema Type; - - private static object GetX(object instanceObj) => ((Point)instanceObj).X; - - private static void SetX(ref object instanceObj, object valueObj) - { - Point point = (Point)instanceObj; - int num = (int)valueObj; - point.X = num; - instanceObj = point; - } - - private static object GetY(object instanceObj) => ((Point)instanceObj).Y; - - private static void SetY(ref object instanceObj, object valueObj) - { - Point point = (Point)instanceObj; - int num = (int)valueObj; - point.Y = num; - instanceObj = point; - } - - private static object Construct() => Point.Zero; - - private static object ConstructXY(object[] parameters) - { - object instanceObj = Construct(); - SetX(ref instanceObj, parameters[0]); - SetY(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringXY(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Point", result1.Error); - SetX(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Point", result2.Error); - SetY(ref instance, valueObj2); - return result2; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Point point = (Point)instanceObj; - writer.WriteInt32(point.X); - writer.WriteInt32(point.Y); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Point(reader.ReadInt32(), reader.ReadInt32()); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringXY(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Point"); - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - Point point1 = (Point)leftObj; - if (op == OperationType.MathNegate) - return -point1; - Point point2 = (Point)rightObj; - switch (op) - { - case OperationType.MathAdd: - return point1 + point2; - case OperationType.MathSubtract: - return point1 - point2; - case OperationType.RelationalEquals: - return BooleanBoxes.Box(point1 == point2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(point1 != point2); - default: - return null; - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(158, "Point", null, 153, typeof(Point), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(158, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(158, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(158, new short[2] - { - 115, - 115 - }, new ConstructHandler(ConstructXY)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs deleted file mode 100644 index a987cc5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PopupLayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PopupLayoutInputSchema - { - public static UIXTypeSchema Type; - - private static object GetPlacementTarget(object instanceObj) => ((PopupLayoutInput)instanceObj).PlacementTarget; - - private static void SetPlacementTarget(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).PlacementTarget = (ViewItem)valueObj; - - private static object GetPlacement(object instanceObj) => ((PopupLayoutInput)instanceObj).Placement; - - private static void SetPlacement(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).Placement = (PlacementMode)valueObj; - - private static object GetOffset(object instanceObj) => ((PopupLayoutInput)instanceObj).Offset; - - private static void SetOffset(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).Offset = (Point)valueObj; - - private static object GetStayInBounds(object instanceObj) => BooleanBoxes.Box(((PopupLayoutInput)instanceObj).StayInBounds); - - private static void SetStayInBounds(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).StayInBounds = (bool)valueObj; - - private static object GetRespectMenuDropAlignment(object instanceObj) => BooleanBoxes.Box(((PopupLayoutInput)instanceObj).RespectMenuDropAlignment); - - private static void SetRespectMenuDropAlignment(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).RespectMenuDropAlignment = (bool)valueObj; - - private static object GetConstrainToTarget(object instanceObj) => BooleanBoxes.Box(((PopupLayoutInput)instanceObj).ConstrainToTarget); - - private static void SetConstrainToTarget(ref object instanceObj, object valueObj) => ((PopupLayoutInput)instanceObj).ConstrainToTarget = (bool)valueObj; - - private static object GetFlippedHorizontally(object instanceObj) => BooleanBoxes.Box(((PopupLayoutInput)instanceObj).FlippedHorizontally); - - private static object GetFlippedVertically(object instanceObj) => BooleanBoxes.Box(((PopupLayoutInput)instanceObj).FlippedVertically); - - private static object Construct() => new PopupLayoutInput(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(162, "PopupLayoutInput", null, 133, typeof(PopupLayoutInput), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(162, "PlacementTarget", 239, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPlacementTarget), new SetValueHandler(SetPlacementTarget), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(162, "Placement", 157, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPlacement), new SetValueHandler(SetPlacement), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(162, "Offset", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOffset), new SetValueHandler(SetOffset), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(162, "StayInBounds", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStayInBounds), new SetValueHandler(SetStayInBounds), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(162, "RespectMenuDropAlignment", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRespectMenuDropAlignment), new SetValueHandler(SetRespectMenuDropAlignment), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(162, "ConstrainToTarget", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetConstrainToTarget), new SetValueHandler(SetConstrainToTarget), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(162, "FlippedHorizontally", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippedHorizontally), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(162, "FlippedVertically", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippedVertically), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema6, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs deleted file mode 100644 index bd8229a..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PopupLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PopupLayoutSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new PopupLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(161, "PopupLayout", null, 132, typeof(PopupLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs deleted file mode 100644 index 452b13e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PopupPositionSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PopupPositionSchema - { - public static UIXTypeSchema Type; - - private static object GetTarget(object instanceObj) => ((PopupPosition)instanceObj).Target; - - private static void SetTarget(ref object instanceObj, object valueObj) - { - PopupPosition popupPosition = (PopupPosition)instanceObj; - InterestPoint interestPoint = (InterestPoint)valueObj; - popupPosition.Target = interestPoint; - instanceObj = popupPosition; - } - - private static object GetPopup(object instanceObj) => ((PopupPosition)instanceObj).Popup; - - private static void SetPopup(ref object instanceObj, object valueObj) - { - PopupPosition popupPosition = (PopupPosition)instanceObj; - InterestPoint interestPoint = (InterestPoint)valueObj; - popupPosition.Popup = interestPoint; - instanceObj = popupPosition; - } - - private static object GetFlipped(object instanceObj) => ((PopupPosition)instanceObj).Flipped; - - private static void SetFlipped(ref object instanceObj, object valueObj) - { - PopupPosition popupPosition = (PopupPosition)instanceObj; - FlipDirection flipDirection = (FlipDirection)valueObj; - popupPosition.Flipped = flipDirection; - instanceObj = popupPosition; - } - - private static object Construct() => new PopupPosition(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(163, "PopupPosition", null, 153, typeof(PopupPosition), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(163, "Target", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTarget), new SetValueHandler(SetTarget), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(163, "Popup", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPopup), new SetValueHandler(SetPopup), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(163, "Flipped", 89, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFlipped), new SetValueHandler(SetFlipped), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs deleted file mode 100644 index ef0209c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PositionKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PositionKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new PositionKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(164, "PositionKeyframe", null, 130, typeof(PositionKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(164, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs deleted file mode 100644 index 3962f6b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PositionXKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PositionXKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new PositionXKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(165, "PositionXKeyframe", null, 130, typeof(PositionXKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(165, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs deleted file mode 100644 index 560e0ae..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.PositionYKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class PositionYKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new PositionYKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(166, "PositionYKeyframe", null, 130, typeof(PositionYKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(166, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs deleted file mode 100644 index b7e4cab..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RandomSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Session; -using System; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RandomSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new Random(); - - private static object ConstructInt32(object[] parameters) => new Random((int)parameters[0]); - - private static object CallNext(object instanceObj, object[] parameters) => ((Random)instanceObj).Next(); - - private static object CallNextInt32(object instanceObj, object[] parameters) - { - Random random = (Random)instanceObj; - int parameter = (int)parameters[0]; - if (parameter >= 0) - return random.Next(parameter); - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter, "maxValue"); - return null; - } - - private static object CallNextInt32Int32(object instanceObj, object[] parameters) - { - Random random = (Random)instanceObj; - int parameter1 = (int)parameters[0]; - int parameter2 = (int)parameters[1]; - if (parameter1 <= parameter2) - return random.Next(parameter1, parameter2); - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter1, "minValue"); - return null; - } - - private static object CallNextDouble(object instanceObj, object[] parameters) => ((Random)instanceObj).NextDouble(); - - private static object CallNextDoubleDoubleDouble(object instanceObj, object[] parameters) - { - Random random = (Random)instanceObj; - double parameter1 = (double)parameters[0]; - double parameter2 = (double)parameters[1]; - return random.NextDouble() * (parameter2 - parameter1) + parameter1; - } - - private static object CallNextSingle(object instanceObj, object[] parameters) => (float)((Random)instanceObj).NextDouble(); - - private static object CallNextSingleSingleSingle(object instanceObj, object[] parameters) - { - Random random = (Random)instanceObj; - float parameter1 = (float)parameters[0]; - float parameter2 = (float)parameters[1]; - return (float)(random.NextDouble() * (parameter2 - (double)parameter1)) + parameter1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(167, "Random", null, 153, typeof(Random), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(167, new short[1] - { - 115 - }, new ConstructHandler(ConstructInt32)); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(167, "Next", null, 115, new InvokeHandler(CallNext), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(167, "Next", new short[1] - { - 115 - }, 115, new InvokeHandler(CallNextInt32), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(167, "Next", new short[2] - { - 115, - 115 - }, 115, new InvokeHandler(CallNextInt32Int32), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(167, "NextDouble", null, 61, new InvokeHandler(CallNextDouble), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(167, "NextDouble", new short[2] - { - 61, - 61 - }, 61, new InvokeHandler(CallNextDoubleDoubleDouble), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(167, "NextSingle", null, 194, new InvokeHandler(CallNextSingle), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(167, "NextSingle", new short[2] - { - 194, - 194 - }, 194, new InvokeHandler(CallNextSingleSingleSingle), false); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, null, new MethodSchema[7] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs deleted file mode 100644 index 3afac30..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RangedValueSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RangedValueSchema - { - public static UIXTypeSchema Type; - - private static object GetMinValue(object instanceObj) => ((IUIRangedValue)instanceObj).MinValue; - - private static void SetMinValue(ref object instanceObj, object valueObj) - { - IUIRangedValue uiRangedValue = (IUIRangedValue)instanceObj; - float num = (float)valueObj; - if (num > (double)uiRangedValue.MaxValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MinValue"); - else - uiRangedValue.MinValue = num; - } - - private static object GetMaxValue(object instanceObj) => ((IUIRangedValue)instanceObj).MaxValue; - - private static void SetMaxValue(ref object instanceObj, object valueObj) - { - IUIRangedValue uiRangedValue = (IUIRangedValue)instanceObj; - float num = (float)valueObj; - if (num < (double)uiRangedValue.MinValue) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", num, "MaxValue"); - else - uiRangedValue.MaxValue = num; - } - - private static object GetStep(object instanceObj) => ((IUIRangedValue)instanceObj).Step; - - private static void SetStep(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Step = (float)valueObj; - - private static object GetRange(object instanceObj) => ((IUIRangedValue)instanceObj).Range; - - private static object GetValue(object instanceObj) => ((IUIRangedValue)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((IUIRangedValue)instanceObj).Value = (float)valueObj; - - private static object Construct() => new Microsoft.Iris.ModelItems.RangedValue(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(168, "RangedValue", null, 231, typeof(IUIRangedValue), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(168, "MinValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(168, "MaxValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(168, "Step", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(168, "Range", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRange), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(168, "Value", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] - { - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema4, - uixPropertySchema3, - uixPropertySchema5 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs deleted file mode 100644 index 35681f6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs +++ /dev/null @@ -1,217 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RectangleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RectangleSchema - { - public static UIXTypeSchema Type; - - private static object GetX(object instanceObj) => ((Rectangle)instanceObj).X; - - private static void SetX(ref object instanceObj, object valueObj) - { - Rectangle rectangle = (Rectangle)instanceObj; - int num = (int)valueObj; - rectangle.X = num; - instanceObj = rectangle; - } - - private static object GetY(object instanceObj) => ((Rectangle)instanceObj).Y; - - private static void SetY(ref object instanceObj, object valueObj) - { - Rectangle rectangle = (Rectangle)instanceObj; - int num = (int)valueObj; - rectangle.Y = num; - instanceObj = rectangle; - } - - private static object GetWidth(object instanceObj) => ((Rectangle)instanceObj).Width; - - private static void SetWidth(ref object instanceObj, object valueObj) - { - Rectangle rectangle = (Rectangle)instanceObj; - int num = (int)valueObj; - rectangle.Width = num; - instanceObj = rectangle; - } - - private static object GetHeight(object instanceObj) => ((Rectangle)instanceObj).Height; - - private static void SetHeight(ref object instanceObj, object valueObj) - { - Rectangle rectangle = (Rectangle)instanceObj; - int num = (int)valueObj; - rectangle.Height = num; - instanceObj = rectangle; - } - - private static object GetLeft(object instanceObj) => ((Rectangle)instanceObj).Left; - - private static object GetTop(object instanceObj) => ((Rectangle)instanceObj).Top; - - private static object GetRight(object instanceObj) => ((Rectangle)instanceObj).Right; - - private static object GetBottom(object instanceObj) => ((Rectangle)instanceObj).Bottom; - - private static object Construct() => Rectangle.Zero; - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - int result; - if (!int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Int32"); - Rectangle rectangle1 = new Rectangle(); - Rectangle rectangle2 = Rectangle.FromLTRB(result, result, result, result); - instanceObj = rectangle2; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num1 = (int)valueObj; - instanceObj = null; - int num2 = num1; - Rectangle rectangle = Rectangle.FromLTRB(num2, num2, num2, num2); - instanceObj = rectangle; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num1 = (float)valueObj; - instanceObj = null; - int num2 = (int)num1; - Rectangle rectangle = Rectangle.FromLTRB(num2, num2, num2, num2); - instanceObj = rectangle; - return Result.Success; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Rectangle rectangle = (Rectangle)instanceObj; - writer.WriteInt32(rectangle.Left); - writer.WriteInt32(rectangle.Top); - writer.WriteInt32(rectangle.Right); - writer.WriteInt32(rectangle.Bottom); - } - - private static object DecodeBinary(ByteCodeReader reader) => Rectangle.FromLTRB(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - - private static object CallContainsPoint(object instanceObj, object[] parameters) => BooleanBoxes.Box(((Rectangle)instanceObj).Contains((Point)parameters[0])); - - private static bool IsConversionSupported(TypeSchema fromType) => Int32Schema.Type.IsAssignableFrom(fromType) || SingleSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - Rectangle rectangle1 = (Rectangle)leftObj; - Rectangle rectangle2 = (Rectangle)rightObj; - switch (op) - { - case OperationType.RelationalEquals: - return BooleanBoxes.Box(rectangle1 == rectangle2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(rectangle1 != rectangle2); - default: - return null; - } - } - - private static object CallTryParseStringRectangle(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Rectangle parameter2 = (Rectangle)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(169, "Rectangle", null, 153, typeof(Rectangle), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(169, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(169, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(169, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), new SetValueHandler(SetWidth), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(169, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), new SetValueHandler(SetHeight), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(169, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(169, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(169, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(169, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(169, "Contains", new short[1] - { - 158 - }, 15, new InvokeHandler(CallContainsPoint), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(169, "TryParse", new short[2] - { - 208, - 169 - }, 169, new InvokeHandler(CallTryParseStringRectangle), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema8, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema6, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs deleted file mode 100644 index 6377b3e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RelativeToSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RelativeToSchema - { - public static UIXTypeSchema Type; - - private static object GetSourceId(object instanceObj) => ((RelativeTo)instanceObj).SourceId; - - private static void SetSourceId(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).SourceId = (int)valueObj; - - private static object GetProperty(object instanceObj) => ((RelativeTo)instanceObj).Property; - - private static void SetProperty(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).Property = (string)valueObj; - - private static object GetSnapshot(object instanceObj) => ((RelativeTo)instanceObj).Snapshot; - - private static void SetSnapshot(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).Snapshot = (SnapshotPolicy)valueObj; - - private static object GetPower(object instanceObj) => ((RelativeTo)instanceObj).Power; - - private static void SetPower(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).Power = (int)valueObj; - - private static object GetMultiply(object instanceObj) => ((RelativeTo)instanceObj).Multiply; - - private static void SetMultiply(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).Multiply = (float)valueObj; - - private static object GetAdd(object instanceObj) => ((RelativeTo)instanceObj).Add; - - private static void SetAdd(ref object instanceObj, object valueObj) => ((RelativeTo)instanceObj).Add = (float)valueObj; - - private static object Construct() => new RelativeTo(); - - private static object ConstructSourceIdProperty(object[] parameters) - { - object instanceObj = Construct(); - SetSourceId(ref instanceObj, parameters[0]); - SetProperty(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringSourceIdProperty( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "RelativeTo", result1.Error); - SetSourceId(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], StringSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "RelativeTo", result2.Error); - SetProperty(ref instance, valueObj2); - return result2; - } - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str = (string)valueObj; - instanceObj = null; - RelativeTo instance = StringToInstance(str); - if (instance == null) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "RelativeTo"); - instanceObj = instance; - return Result.Success; - } - - private static object FindCanonicalInstance(string name) => StringToInstance(name); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringSourceIdProperty(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "RelativeTo"); - } - return result; - } - - private static object CallTryParseStringRelativeTo(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - RelativeTo parameter2 = (RelativeTo)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static RelativeTo StringToInstance(string value) - { - if (value == "Absolute") - return RelativeTo.Absolute; - if (value == "Current") - return RelativeTo.Current; - if (value == "CurrentSnapshotOnLoop") - return RelativeTo.CurrentSnapshotOnLoop; - return value == "Final" ? RelativeTo.Final : null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(171, "RelativeTo", null, 153, typeof(RelativeTo), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(171, "SourceId", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSourceId), new SetValueHandler(SetSourceId), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(171, "Property", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetProperty), new SetValueHandler(SetProperty), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(171, "Snapshot", 200, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSnapshot), new SetValueHandler(SetSnapshot), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(171, "Power", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPower), new SetValueHandler(SetPower), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(171, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMultiply), new SetValueHandler(SetMultiply), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(171, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAdd), new SetValueHandler(SetAdd), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(171, new short[2] - { - 115, - 208 - }, new ConstructHandler(ConstructSourceIdProperty)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(171, "TryParse", new short[2] - { - 208, - 171 - }, 171, new InvokeHandler(CallTryParseStringRelativeTo), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[6] - { - uixPropertySchema6, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs deleted file mode 100644 index 34d4c40..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RepeaterSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RepeaterSchema - { - public static UIXTypeSchema Type; - - private static object GetContentName(object instanceObj) => ((Repeater)instanceObj).ContentName; - - private static void SetContentName(ref object instanceObj, object valueObj) => ((Repeater)instanceObj).ContentName = (string)valueObj; - - private static object GetDividerName(object instanceObj) => ((Repeater)instanceObj).DividerName; - - private static void SetDividerName(ref object instanceObj, object valueObj) => ((Repeater)instanceObj).DividerName = (string)valueObj; - - private static object GetSource(object instanceObj) => ((Repeater)instanceObj).Source; - - private static void SetSource(ref object instanceObj, object valueObj) => ((Repeater)instanceObj).Source = (IList)valueObj; - - private static object GetDefaultFocusIndex(object instanceObj) => ((Repeater)instanceObj).DefaultFocusIndex; - - private static void SetDefaultFocusIndex(ref object instanceObj, object valueObj) => ((Repeater)instanceObj).DefaultFocusIndex = (int)valueObj; - - private static void SetContent(ref object instanceObj, object valueObj) - { - Repeater repeater = (Repeater)instanceObj; - } - - private static void SetDivider(ref object instanceObj, object valueObj) - { - Repeater repeater = (Repeater)instanceObj; - } - - private static object GetDiscardOffscreenVisuals(object instanceObj) => BooleanBoxes.Box(((ViewItem)instanceObj).DiscardOffscreenVisuals); - - private static void SetDiscardOffscreenVisuals(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).DiscardOffscreenVisuals = (bool)valueObj; - - private static object GetContentSelectors(object instanceObj) => ((Repeater)instanceObj).ContentSelectors; - - private static object GetMaintainFocusedItemOnSourceChanges(object instanceObj) => BooleanBoxes.Box(((Repeater)instanceObj).MaintainFocusedItemOnSourceChanges); - - private static void SetMaintainFocusedItemOnSourceChanges( - ref object instanceObj, - object valueObj) - { - ((Repeater)instanceObj).MaintainFocusedItemOnSourceChanges = (bool)valueObj; - } - - private static object Construct() => new Repeater(); - - private static object CallNavigateIntoIndexInt32(object instanceObj, object[] parameters) - { - ((Repeater)instanceObj).NavigateIntoIndex((int)parameters[0]); - return null; - } - - private static object CallScrollIndexIntoViewInt32(object instanceObj, object[] parameters) - { - ((Repeater)instanceObj).ScrollIndexIntoView((int)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(173, "Repeater", null, 239, typeof(Repeater), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(173, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentName), new SetValueHandler(SetContentName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(173, "DividerName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDividerName), new SetValueHandler(SetDividerName), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(173, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(173, "DefaultFocusIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultFocusIndex), new SetValueHandler(SetDefaultFocusIndex), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(173, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetContent), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(173, "Divider", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetDivider), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(173, "DiscardOffscreenVisuals", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDiscardOffscreenVisuals), new SetValueHandler(SetDiscardOffscreenVisuals), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(173, "ContentSelectors", 138, 227, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentSelectors), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(173, "MaintainFocusedItemOnSourceChanges", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaintainFocusedItemOnSourceChanges), new SetValueHandler(SetMaintainFocusedItemOnSourceChanges), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(173, "NavigateIntoIndex", new short[1] - { - 115 - }, 240, new InvokeHandler(CallNavigateIntoIndexInt32), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(173, "ScrollIndexIntoView", new short[1] - { - 115 - }, 240, new InvokeHandler(CallScrollIndexIntoViewInt32), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(173, "FocusedItemDiscarded"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] - { - uixPropertySchema5, - uixPropertySchema1, - uixPropertySchema8, - uixPropertySchema4, - uixPropertySchema7, - uixPropertySchema6, - uixPropertySchema2, - uixPropertySchema9, - uixPropertySchema3 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs deleted file mode 100644 index 2a21e71..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RotateKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RotateKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseRotationKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseRotationKeyframe)instanceObj).Value = (Rotation)valueObj; - - private static object Construct() => new RotateKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(174, "RotateKeyframe", null, 130, typeof(RotateKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(174, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs deleted file mode 100644 index f5a5117..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RotateLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RotateLayoutSchema - { - public static RangeValidator ValidateRightAngle = new RangeValidator(RangeValidateRightAngle); - public static UIXTypeSchema Type; - - private static object GetAngleDegrees(object instanceObj) => ((RotateLayout)instanceObj).AngleDegrees; - - private static void SetAngleDegrees(ref object instanceObj, object valueObj) - { - RotateLayout rotateLayout = (RotateLayout)instanceObj; - int num = (int)valueObj; - Result result = ValidateRightAngle(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - rotateLayout.AngleDegrees = num; - } - - private static object Construct() => new RotateLayout(); - - private static Result RangeValidateRightAngle(object value) - { - int num = (int)value; - switch (num) - { - case 0: - case 90: - case 180: - case 270: - return Result.Success; - default: - return Result.Fail("Expecting a value of 0, 90, 180, or 270, but got {0}", num.ToString()); - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(175, "RotateLayout", null, 132, typeof(RotateLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(175, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, ValidateRightAngle, false, new GetValueHandler(GetAngleDegrees), new SetValueHandler(SetAngleDegrees), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs deleted file mode 100644 index 49d6ab6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs +++ /dev/null @@ -1,215 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.RotationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class RotationSchema - { - public static UIXTypeSchema Type; - - private static object GetAxis(object instanceObj) => ((Rotation)instanceObj).Axis; - - private static void SetAxis(ref object instanceObj, object valueObj) - { - Rotation rotation = (Rotation)instanceObj; - Vector3 vector3 = (Vector3)valueObj; - rotation.Axis = vector3; - instanceObj = rotation; - } - - private static object GetAngleRadians(object instanceObj) => ((Rotation)instanceObj).AngleRadians; - - private static void SetAngleRadians(ref object instanceObj, object valueObj) - { - Rotation rotation = (Rotation)instanceObj; - float num = (float)valueObj; - rotation.AngleRadians = num; - instanceObj = rotation; - } - - private static object GetAngleDegrees(object instanceObj) => ((Rotation)instanceObj).AngleDegrees; - - private static void SetAngleDegrees(ref object instanceObj, object valueObj) - { - Rotation rotation = (Rotation)instanceObj; - int num = (int)valueObj; - rotation.AngleDegrees = num; - instanceObj = rotation; - } - - private static object Construct() => Rotation.Default; - - private static object ConstructAngleDegrees(object[] parameters) - { - object instanceObj = Construct(); - SetAngleDegrees(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static object ConstructAngleRadians(object[] parameters) - { - object instanceObj = Construct(); - SetAngleRadians(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static object ConstructAngleDegreesAxis(object[] parameters) - { - object instanceObj = Construct(); - SetAngleDegrees(ref instanceObj, parameters[0]); - SetAxis(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static object ConstructAngleRadiansAxis(object[] parameters) - { - object instanceObj = Construct(); - SetAngleRadians(ref instanceObj, parameters[0]); - SetAxis(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static object ConstructAxis(object[] parameters) - { - object instanceObj = Construct(); - SetAxis(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Rotation rotation = (Rotation)instanceObj; - Vector3Schema.Type.EncodeBinary(writer, rotation.Axis); - writer.WriteSingle(rotation.AngleRadians); - } - - private static object DecodeBinary(ByteCodeReader reader) - { - Vector3 axis = (Vector3)Vector3Schema.Type.DecodeBinary(reader); - return new Rotation(reader.ReadSingle(), axis); - } - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string str1 = (string)valueObj; - instanceObj = null; - Rotation rotation = Rotation.Default; - string[] strArray = str1.Split(';'); - if (strArray.Length != 2) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str1, "Rotation"); - string str2 = strArray[1]; - object instance1; - Result result1 = Vector3Schema.Type.TypeConverter(str2, StringSchema.Type, out instance1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Rotation", result1.Error); - rotation.Axis = (Vector3)instance1; - string str3 = strArray[0]; - if (str3.EndsWith("rad", StringComparison.Ordinal)) - { - string str4 = str3.Substring(0, str3.Length - 3); - object instance2; - Result result2 = SingleSchema.Type.TypeConverter(str4, StringSchema.Type, out instance2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Rotation", result2.Error); - rotation.AngleRadians = (float)instance2; - } - else if (str3.EndsWith("deg", StringComparison.Ordinal)) - { - string str4 = str3.Substring(0, str3.Length - 3); - object instance2; - Result result2 = Int32Schema.Type.TypeConverter(str4, StringSchema.Type, out instance2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Rotation", result2.Error); - rotation.AngleDegrees = (int)instance2; - } - instanceObj = rotation; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static object CallTryParseStringRotation(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Rotation parameter2 = (Rotation)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(176, "Rotation", null, 153, typeof(Rotation), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(176, "Axis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAxis), new SetValueHandler(SetAxis), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(176, "AngleRadians", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAngleRadians), new SetValueHandler(SetAngleRadians), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(176, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAngleDegrees), new SetValueHandler(SetAngleDegrees), false); - UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(176, new short[1] - { - 115 - }, new ConstructHandler(ConstructAngleDegrees)); - UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(176, new short[1] - { - 194 - }, new ConstructHandler(ConstructAngleRadians)); - UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(176, new short[2] - { - 115, - 234 - }, new ConstructHandler(ConstructAngleDegreesAxis)); - UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(176, new short[2] - { - 194, - 234 - }, new ConstructHandler(ConstructAngleRadiansAxis)); - UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(176, new short[1] - { - 234 - }, new ConstructHandler(ConstructAxis)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(176, "TryParse", new short[2] - { - 208, - 176 - }, 176, new InvokeHandler(CallTryParseStringRotation), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] - { - constructorSchema1, - constructorSchema2, - constructorSchema3, - constructorSchema4, - constructorSchema5 - }, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs deleted file mode 100644 index c982c1e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SavedKeyFocusSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SavedKeyFocusSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(177, "SavedKeyFocus", null, 153, typeof(SavedKeyFocus), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs deleted file mode 100644 index b6782d3..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScaleKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScaleKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector3Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector3Keyframe)instanceObj).Value = (Vector3)valueObj; - - private static object Construct() => new ScaleKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(178, "ScaleKeyframe", null, 130, typeof(ScaleKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(178, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs deleted file mode 100644 index 98e7bc5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScaleLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScaleLayoutSchema - { - public static UIXTypeSchema Type; - - private static object GetMinimumScale(object instanceObj) => ((ScaleLayout)instanceObj).MinimumScale; - - private static void SetMinimumScale(ref object instanceObj, object valueObj) - { - ScaleLayout scaleLayout = (ScaleLayout)instanceObj; - Vector2 vector2 = (Vector2)valueObj; - Result result = Vector2Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - scaleLayout.MinimumScale = vector2; - } - - private static object GetMaximumScale(object instanceObj) => ((ScaleLayout)instanceObj).MaximumScale; - - private static void SetMaximumScale(ref object instanceObj, object valueObj) - { - ScaleLayout scaleLayout = (ScaleLayout)instanceObj; - Vector2 vector2 = (Vector2)valueObj; - Result result = Vector2Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - scaleLayout.MaximumScale = vector2; - } - - private static object GetMaintainAspectRatio(object instanceObj) => BooleanBoxes.Box(((ScaleLayout)instanceObj).MaintainAspectRatio); - - private static void SetMaintainAspectRatio(ref object instanceObj, object valueObj) => ((ScaleLayout)instanceObj).MaintainAspectRatio = (bool)valueObj; - - private static object Construct() => new ScaleLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(179, "ScaleLayout", null, 132, typeof(ScaleLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(179, "MinimumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(GetMinimumScale), new SetValueHandler(SetMinimumScale), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(179, "MaximumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(GetMaximumScale), new SetValueHandler(SetMaximumScale), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(179, "MaintainAspectRatio", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaintainAspectRatio), new SetValueHandler(SetMaintainAspectRatio), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs deleted file mode 100644 index 672aaf1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScaleXKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScaleXKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new ScaleXKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(180, "ScaleXKeyframe", null, 130, typeof(ScaleXKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(180, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs deleted file mode 100644 index cd60fba..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScaleYKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScaleYKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new ScaleYKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(181, "ScaleYKeyframe", null, 130, typeof(ScaleYKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(181, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs deleted file mode 100644 index b532fc3..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScrollModelBaseSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScrollModelBaseSchema - { - public static UIXTypeSchema Type; - - private static object GetScrollStep(object instanceObj) => ((ScrollModelBase)instanceObj).ScrollStep; - - private static void SetScrollStep(ref object instanceObj, object valueObj) - { - ScrollModelBase scrollModelBase = (ScrollModelBase)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - scrollModelBase.ScrollStep = num; - } - - private static object GetCanScrollUp(object instanceObj) => BooleanBoxes.Box(((ScrollModelBase)instanceObj).CanScrollUp); - - private static object GetCanScrollDown(object instanceObj) => BooleanBoxes.Box(((ScrollModelBase)instanceObj).CanScrollDown); - - private static object GetCurrentPage(object instanceObj) => ((ScrollModelBase)instanceObj).CurrentPage; - - private static object GetTotalPages(object instanceObj) => ((ScrollModelBase)instanceObj).TotalPages; - - private static object GetViewNear(object instanceObj) => ((ScrollModelBase)instanceObj).ViewNear; - - private static object GetViewFar(object instanceObj) => ((ScrollModelBase)instanceObj).ViewFar; - - private static object CallScrollInt32(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).Scroll((int)parameters[0]); - return null; - } - - private static object CallScrollUp(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).ScrollUp(); - return null; - } - - private static object CallScrollDown(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).ScrollDown(); - return null; - } - - private static object CallPageUp(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).PageUp(); - return null; - } - - private static object CallPageDown(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).PageDown(); - return null; - } - - private static object CallHome(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).Home(); - return null; - } - - private static object CallEnd(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).End(); - return null; - } - - private static object CallScrollToPositionSingle(object instanceObj, object[] parameters) - { - ((ScrollModelBase)instanceObj).ScrollToPosition((float)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(183, "ScrollModelBase", null, 153, typeof(ScrollModelBase), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(183, "ScrollStep", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetScrollStep), new SetValueHandler(SetScrollStep), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(183, "CanScrollUp", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanScrollUp), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(183, "CanScrollDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanScrollDown), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(183, "CurrentPage", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrentPage), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(183, "TotalPages", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTotalPages), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(183, "ViewNear", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetViewNear), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(183, "ViewFar", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetViewFar), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(183, "Scroll", new short[1] - { - 115 - }, 240, new InvokeHandler(CallScrollInt32), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(183, "ScrollUp", null, 240, new InvokeHandler(CallScrollUp), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(183, "ScrollDown", null, 240, new InvokeHandler(CallScrollDown), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(183, "PageUp", null, 240, new InvokeHandler(CallPageUp), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(183, "PageDown", null, 240, new InvokeHandler(CallPageDown), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(183, "Home", null, 240, new InvokeHandler(CallHome), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(183, "End", null, 240, new InvokeHandler(CallEnd), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(183, "ScrollToPosition", new short[1] - { - 194 - }, 240, new InvokeHandler(CallScrollToPositionSingle), false); - Type.Initialize(null, null, new PropertySchema[7] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema6 - }, new MethodSchema[8] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs deleted file mode 100644 index d28bb69..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScrollModelSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScrollModelSchema - { - public static UIXTypeSchema Type; - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((ScrollModel)instanceObj).Enabled); - - private static void SetEnabled(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).Enabled = (bool)valueObj; - - private static object GetPageStep(object instanceObj) => ((ScrollModel)instanceObj).PageStep; - - private static void SetPageStep(ref object instanceObj, object valueObj) - { - ScrollModel scrollModel = (ScrollModel)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - scrollModel.PageStep = num; - } - - private static object GetPageSizedScrollStep(object instanceObj) => BooleanBoxes.Box(((ScrollModel)instanceObj).PageSizedScrollStep); - - private static void SetPageSizedScrollStep(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).PageSizedScrollStep = (bool)valueObj; - - private static object GetBeginPadding(object instanceObj) => ((ScrollModel)instanceObj).BeginPadding; - - private static void SetBeginPadding(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).BeginPadding = (int)valueObj; - - private static object GetEndPadding(object instanceObj) => ((ScrollModel)instanceObj).EndPadding; - - private static void SetEndPadding(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).EndPadding = (int)valueObj; - - private static object GetBeginPaddingRelativeTo(object instanceObj) => ((ScrollModel)instanceObj).BeginPaddingRelativeTo; - - private static void SetBeginPaddingRelativeTo(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).BeginPaddingRelativeTo = (RelativeEdge)valueObj; - - private static object GetEndPaddingRelativeTo(object instanceObj) => ((ScrollModel)instanceObj).EndPaddingRelativeTo; - - private static void SetEndPaddingRelativeTo(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).EndPaddingRelativeTo = (RelativeEdge)valueObj; - - private static object GetLocked(object instanceObj) => BooleanBoxes.Box(((ScrollModel)instanceObj).Locked); - - private static void SetLocked(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).Locked = (bool)valueObj; - - private static object GetLockedPosition(object instanceObj) => ((ScrollModel)instanceObj).LockedPosition; - - private static void SetLockedPosition(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).LockedPosition = (float)valueObj; - - private static object GetLockedAlignment(object instanceObj) => ((ScrollModel)instanceObj).LockedAlignment; - - private static void SetLockedAlignment(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).LockedAlignment = (float)valueObj; - - private static object GetContentPositioningBehavior(object instanceObj) => ((ScrollModel)instanceObj).ContentPositioningBehavior; - - private static void SetContentPositioningBehavior(ref object instanceObj, object valueObj) => ((ScrollModel)instanceObj).ContentPositioningBehavior = (ContentPositioningPolicy)valueObj; - - private static object Construct() => new ScrollModel(); - - private static object CallScrollFocusIntoView(object instanceObj, object[] parameters) - { - ((ScrollModel)instanceObj).ScrollFocusIntoView(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(182, "ScrollModel", null, 183, typeof(ScrollModel), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(182, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(182, "PageStep", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetPageStep), new SetValueHandler(SetPageStep), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(182, "PageSizedScrollStep", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPageSizedScrollStep), new SetValueHandler(SetPageSizedScrollStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(182, "BeginPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPadding), new SetValueHandler(SetBeginPadding), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(182, "EndPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPadding), new SetValueHandler(SetEndPadding), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(182, "BeginPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPaddingRelativeTo), new SetValueHandler(SetBeginPaddingRelativeTo), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(182, "EndPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPaddingRelativeTo), new SetValueHandler(SetEndPaddingRelativeTo), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(182, "Locked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLocked), new SetValueHandler(SetLocked), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(182, "LockedPosition", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLockedPosition), new SetValueHandler(SetLockedPosition), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(182, "LockedAlignment", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLockedAlignment), new SetValueHandler(SetLockedAlignment), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(182, "ContentPositioningBehavior", 41, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentPositioningBehavior), new SetValueHandler(SetContentPositioningBehavior), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(182, "ScrollFocusIntoView", null, 240, new InvokeHandler(CallScrollFocusIntoView), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[11] - { - uixPropertySchema4, - uixPropertySchema6, - uixPropertySchema11, - uixPropertySchema1, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema10, - uixPropertySchema9, - uixPropertySchema3, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs deleted file mode 100644 index 92499b6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScrollerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScrollerSchema - { - public static UIXTypeSchema Type; - - private static object GetScrollModel(object instanceObj) => ((Scroller)instanceObj).ScrollModel; - - private static void SetScrollModel(ref object instanceObj, object valueObj) => ((Scroller)instanceObj).ScrollModel = (ScrollModel)valueObj; - - private static object GetPrefetch(object instanceObj) => ((Scroller)instanceObj).Prefetch; - - private static void SetPrefetch(ref object instanceObj, object valueObj) - { - Scroller scroller = (Scroller)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - scroller.Prefetch = num; - } - - private static object Construct() => new Scroller(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(184, "Scroller", null, 34, typeof(Scroller), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(184, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScrollModel), new SetValueHandler(SetScrollModel), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(184, "Prefetch", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetPrefetch), new SetValueHandler(SetPrefetch), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs deleted file mode 100644 index 7b4c2c5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ScrollingHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ScrollingHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetHandleDirectionalKeys(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).HandleDirectionalKeys); - - private static void SetHandleDirectionalKeys(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).HandleDirectionalKeys = (bool)valueObj; - - private static object GetHandlePageKeys(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).HandlePageKeys); - - private static void SetHandlePageKeys(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).HandlePageKeys = (bool)valueObj; - - private static object GetHandleHomeEndKeys(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).HandleHomeEndKeys); - - private static void SetHandleHomeEndKeys(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).HandleHomeEndKeys = (bool)valueObj; - - private static object GetHandlePageCommands(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).HandlePageCommands); - - private static void SetHandlePageCommands(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).HandlePageCommands = (bool)valueObj; - - private static object GetHandleMouseWheel(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).HandleMouseWheel); - - private static void SetHandleMouseWheel(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).HandleMouseWheel = (bool)valueObj; - - private static object GetScrollModel(object instanceObj) => ((ScrollingHandler)instanceObj).ScrollModel; - - private static void SetScrollModel(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).ScrollModel = (ScrollModel)valueObj; - - private static object GetUseFocusBehavior(object instanceObj) => BooleanBoxes.Box(((ScrollingHandler)instanceObj).UseFocusBehavior); - - private static void SetUseFocusBehavior(ref object instanceObj, object valueObj) => ((ScrollingHandler)instanceObj).UseFocusBehavior = (bool)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object Construct() => new ScrollingHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(185, "ScrollingHandler", null, 110, typeof(ScrollingHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(185, "HandleDirectionalKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleDirectionalKeys), new SetValueHandler(SetHandleDirectionalKeys), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(185, "HandlePageKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlePageKeys), new SetValueHandler(SetHandlePageKeys), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(185, "HandleHomeEndKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleHomeEndKeys), new SetValueHandler(SetHandleHomeEndKeys), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(185, "HandlePageCommands", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlePageCommands), new SetValueHandler(SetHandlePageCommands), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(185, "HandleMouseWheel", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleMouseWheel), new SetValueHandler(SetHandleMouseWheel), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(185, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScrollModel), new SetValueHandler(SetScrollModel), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(185, "UseFocusBehavior", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUseFocusBehavior), new SetValueHandler(SetUseFocusBehavior), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(185, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema2, - uixPropertySchema8, - uixPropertySchema6, - uixPropertySchema7 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs deleted file mode 100644 index 691c41b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SelectionManagerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SelectionManagerSchema - { - public static UIXTypeSchema Type; - - private static object GetCount(object instanceObj) => ((SelectionManager)instanceObj).Count; - - private static object GetSourceList(object instanceObj) => ((SelectionManager)instanceObj).SourceList; - - private static void SetSourceList(ref object instanceObj, object valueObj) => ((SelectionManager)instanceObj).SourceList = (IList)valueObj; - - private static object GetAnchor(object instanceObj) => ((SelectionManager)instanceObj).Anchor; - - private static void SetAnchor(ref object instanceObj, object valueObj) => ((SelectionManager)instanceObj).Anchor = (int)valueObj; - - private static object GetSelectedIndices(object instanceObj) => ((SelectionManager)instanceObj).SelectedIndices; - - private static object GetSelectedItems(object instanceObj) => ((SelectionManager)instanceObj).SelectedItems; - - private static object GetSingleSelect(object instanceObj) => BooleanBoxes.Box(((SelectionManager)instanceObj).SingleSelect); - - private static void SetSingleSelect(ref object instanceObj, object valueObj) => ((SelectionManager)instanceObj).SingleSelect = (bool)valueObj; - - private static object GetSelectedIndex(object instanceObj) => ((SelectionManager)instanceObj).SelectedIndex; - - private static void SetSelectedIndex(ref object instanceObj, object valueObj) => ((SelectionManager)instanceObj).SelectedIndex = (int)valueObj; - - private static object GetSelectedItem(object instanceObj) => ((SelectionManager)instanceObj).SelectedItem; - - private static object Construct() => new SelectionManager(); - - private static object CallIsSelectedInt32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).IsSelected((int)parameters[0]); - - private static object CallIsRangeSelectedInt32Int32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).IsRangeSelected((int)parameters[0], (int)parameters[1]); - - private static object CallClear(object instanceObj, object[] parameters) - { - ((SelectionManager)instanceObj).Clear(); - return null; - } - - private static object CallSelectInt32Boolean(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).Select((int)parameters[0], (bool)parameters[1]); - - private static object CallSelectListBoolean(object instanceObj, object[] parameters) - { - SelectionManager selectionManager = (SelectionManager)instanceObj; - IList parameter1 = (IList)parameters[0]; - bool parameter2 = (bool)parameters[1]; - if (parameter1 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "indices"); - return null; - } - foreach (object obj in parameter1) - { - if (!(obj is int)) - { - ErrorManager.ReportError("Script runtime failure: Invalid value '{0}' within list '{1}'", obj, "indices"); - return null; - } - } - return selectionManager.Select(parameter1, parameter2); - } - - private static object CallToggleSelectInt32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).ToggleSelect((int)parameters[0]); - - private static object CallToggleSelectList(object instanceObj, object[] parameters) - { - SelectionManager selectionManager = (SelectionManager)instanceObj; - IList parameter = (IList)parameters[0]; - if (parameter == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "items"); - return null; - } - foreach (object obj in parameter) - { - if (!(obj is int)) - { - ErrorManager.ReportError("Script runtime failure: Invalid value '{0}' within list '{1}'", obj, "items"); - return null; - } - } - return selectionManager.ToggleSelect(parameter); - } - - private static object CallSelectRangeInt32Int32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).SelectRange((int)parameters[0], (int)parameters[1]); - - private static object CallSelectRangeFromAnchorInt32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).SelectRangeFromAnchor((int)parameters[0]); - - private static object CallSelectRangeFromAnchorInt32Int32( - object instanceObj, - object[] parameters) - { - return ((SelectionManager)instanceObj).SelectRangeFromAnchor((int)parameters[0], (int)parameters[1]); - } - - private static object CallToggleSelectRangeInt32Int32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).ToggleSelectRange((int)parameters[0], (int)parameters[1]); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(186, "SelectionManager", null, 153, typeof(SelectionManager), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(186, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCount), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(186, "SourceList", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSourceList), new SetValueHandler(SetSourceList), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(186, "Anchor", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAnchor), new SetValueHandler(SetAnchor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(186, "SelectedIndices", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedIndices), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(186, "SelectedItems", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedItems), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(186, "SingleSelect", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSingleSelect), new SetValueHandler(SetSingleSelect), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(186, "SelectedIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedIndex), new SetValueHandler(SetSelectedIndex), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(186, "SelectedItem", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedItem), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(186, "IsSelected", new short[1] - { - 115 - }, 15, new InvokeHandler(CallIsSelectedInt32), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(186, "IsRangeSelected", new short[2] - { - 115, - 115 - }, 15, new InvokeHandler(CallIsRangeSelectedInt32Int32), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(186, "Clear", null, 240, new InvokeHandler(CallClear), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(186, "Select", new short[2] - { - 115, - 15 - }, 15, new InvokeHandler(CallSelectInt32Boolean), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(186, "Select", new short[2] - { - 138, - 15 - }, 15, new InvokeHandler(CallSelectListBoolean), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(186, "ToggleSelect", new short[1] - { - 115 - }, 15, new InvokeHandler(CallToggleSelectInt32), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(186, "ToggleSelect", new short[1] - { - 138 - }, 15, new InvokeHandler(CallToggleSelectList), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(186, "SelectRange", new short[2] - { - 115, - 115 - }, 15, new InvokeHandler(CallSelectRangeInt32Int32), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(186, "SelectRangeFromAnchor", new short[1] - { - 115 - }, 15, new InvokeHandler(CallSelectRangeFromAnchorInt32), false); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(186, "SelectRangeFromAnchor", new short[2] - { - 115, - 115 - }, 15, new InvokeHandler(CallSelectRangeFromAnchorInt32Int32), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(186, "ToggleSelectRange", new short[2] - { - 115, - 115 - }, 15, new InvokeHandler(CallToggleSelectRangeInt32Int32), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema7, - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema2 - }, new MethodSchema[11] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs deleted file mode 100644 index 4026ac3..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SelectionRangeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SelectionRangeSchema - { - public static UIXTypeSchema Type; - - private static object GetBegin(object instanceObj) => ((Range)instanceObj).Begin; - - private static void SetBegin(ref object instanceObj, object valueObj) - { - Range range = (Range)instanceObj; - int num = (int)valueObj; - range.Begin = num; - instanceObj = range; - } - - private static object GetEnd(object instanceObj) => ((Range)instanceObj).End; - - private static void SetEnd(ref object instanceObj, object valueObj) - { - Range range = (Range)instanceObj; - int num = (int)valueObj; - range.End = num; - instanceObj = range; - } - - private static object GetIsEmpty(object instanceObj) => BooleanBoxes.Box(((Range)instanceObj).IsEmpty); - - private static object Construct() => new Range(0, 0); - - private static object ConstructBeginEnd(object[] parameters) - { - object instanceObj = Construct(); - SetBegin(ref instanceObj, parameters[0]); - SetEnd(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringBeginEnd(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "SelectionRange", result1.Error); - SetBegin(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "SelectionRange", result2.Error); - SetEnd(ref instance, valueObj2); - return result2; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringBeginEnd(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "SelectionRange"); - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(187, "SelectionRange", null, 153, typeof(Range), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(187, "Begin", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBegin), new SetValueHandler(SetBegin), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(187, "End", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetEnd), new SetValueHandler(SetEnd), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(187, "IsEmpty", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetIsEmpty), null, false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(187, new short[2] - { - 115, - 115 - }, new ConstructHandler(ConstructBeginEnd)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs deleted file mode 100644 index 3224860..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SepiaInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SepiaInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Color", (Color)valueObj); - - private static void SetDarkColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Color", (Color)valueObj); - - private static void SetDesaturate(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("Desaturate", num); - } - - private static void SetTone(ref object instanceObj, object valueObj) - { - EffectElementWrapper effectElementWrapper = (EffectElementWrapper)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - effectElementWrapper.SetProperty("Tone", num); - } - - private static object CallPlayLightColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.LightColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayDarkColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.DarkColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayDesaturateAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Desaturate, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayToneAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Tone, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(189, "SepiaInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(189, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(189, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDarkColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(189, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetDesaturate), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(189, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetTone), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(189, "PlayLightColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(189, "PlayDarkColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayDarkColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(189, "PlayDesaturateAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDesaturateAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(189, "PlayToneAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayToneAnimationEffectFloatAnimation), false); - Type.Initialize(null, null, new PropertySchema[4] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema4 - }, new MethodSchema[4] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs deleted file mode 100644 index 75aafe2..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SepiaSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SepiaSchema - { - public static UIXTypeSchema Type; - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((SepiaElement)instanceObj).LightColor = ((Color)valueObj).RenderConvert(); - - private static void SetDarkColor(ref object instanceObj, object valueObj) => ((SepiaElement)instanceObj).DarkColor = ((Color)valueObj).RenderConvert(); - - private static object GetDesaturate(object instanceObj) => ((SepiaElement)instanceObj).Desaturate; - - private static void SetDesaturate(ref object instanceObj, object valueObj) - { - SepiaElement sepiaElement = (SepiaElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - sepiaElement.Desaturate = num; - } - - private static object GetTone(object instanceObj) => ((SepiaElement)instanceObj).Tone; - - private static void SetTone(ref object instanceObj, object valueObj) - { - SepiaElement sepiaElement = (SepiaElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - sepiaElement.Tone = num; - } - - private static object Construct() => new SepiaElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(188, "Sepia", null, 80, typeof(SepiaElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(188, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(188, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDarkColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(188, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetDesaturate), new SetValueHandler(SetDesaturate), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(188, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetTone), new SetValueHandler(SetTone), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs deleted file mode 100644 index 3d2b482..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SharedSizeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SharedSizeSchema - { - public static UIXTypeSchema Type; - - private static object GetMaximumSize(object instanceObj) => ((SharedSize)instanceObj).MaximumSize; - - private static void SetMaximumSize(ref object instanceObj, object valueObj) - { - SharedSize sharedSize = (SharedSize)instanceObj; - Size size = (Size)valueObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - sharedSize.MaximumSize = size; - } - - private static object GetMinimumSize(object instanceObj) => ((SharedSize)instanceObj).MinimumSize; - - private static void SetMinimumSize(ref object instanceObj, object valueObj) - { - SharedSize sharedSize = (SharedSize)instanceObj; - Size size = (Size)valueObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - sharedSize.MinimumSize = size; - } - - private static object GetSize(object instanceObj) => ((SharedSize)instanceObj).Size; - - private static void SetSize(ref object instanceObj, object valueObj) - { - SharedSize sharedSize = (SharedSize)instanceObj; - Size size = (Size)valueObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - sharedSize.Size = size; - } - - private static object Construct() => new SharedSize(); - - private static object CallAutoSize(object instanceObj, object[] parameters) - { - ((SharedSize)instanceObj).AutoSize(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(190, "SharedSize", null, 153, typeof(SharedSize), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(190, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(190, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(190, "Size", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetSize), new SetValueHandler(SetSize), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(190, "AutoSize", null, 240, new InvokeHandler(CallAutoSize), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs deleted file mode 100644 index 9b6da85..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ShortcutHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ShortcutHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetShortcut(object instanceObj) => ((ShortcutHandler)instanceObj).Shortcut; - - private static void SetShortcut(ref object instanceObj, object valueObj) => ((ShortcutHandler)instanceObj).Shortcut = (ShortcutHandlerCommand)valueObj; - - private static object GetCommand(object instanceObj) => ((ShortcutHandler)instanceObj).Command; - - private static void SetCommand(ref object instanceObj, object valueObj) => ((ShortcutHandler)instanceObj).Command = (IUICommand)valueObj; - - private static object GetHandle(object instanceObj) => BooleanBoxes.Box(((ShortcutHandler)instanceObj).Handle); - - private static void SetHandle(ref object instanceObj, object valueObj) => ((ShortcutHandler)instanceObj).Handle = (bool)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object Construct() => new ShortcutHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(192, "ShortcutHandler", null, 110, typeof(ShortcutHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(192, "Shortcut", 193, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShortcut), new SetValueHandler(SetShortcut), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(192, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(192, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(192, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(192, "Invoked"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema1 - }, null, new EventSchema[1] - { - uixEventSchema - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs deleted file mode 100644 index 6813138..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs +++ /dev/null @@ -1,239 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SingleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SingleSchema - { - public static RangeValidator Validate0to1 = new RangeValidator(RangeValidate0to1); - public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); - public static RangeValidator ValidateNotZero = new RangeValidator(RangeValidateNotZero); - public static UIXTypeSchema Type; - - private static object Construct() => 0.0f; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - float num = (float)instanceObj; - writer.WriteSingle(num); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadSingle(); - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - float result; - if (!float.TryParse(s, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail("Unable to convert \"{0}\" to type '{1}'", s, "Single"); - instanceObj = result; - return Result.Success; - } - - private static Result ConvertFromBoolean(object valueObj, out object instanceObj) - { - bool flag = (bool)valueObj; - instanceObj = null; - float num = flag ? 1f : 0.0f; - instanceObj = num; - return Result.Success; - } - - private static Result ConvertFromByte(object valueObj, out object instanceObj) - { - byte num1 = (byte)valueObj; - instanceObj = null; - float num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt32(object valueObj, out object instanceObj) - { - int num1 = (int)valueObj; - instanceObj = null; - float num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromInt64(object valueObj, out object instanceObj) - { - long num1 = (long)valueObj; - instanceObj = null; - float num2 = num1; - instanceObj = num2; - return Result.Success; - } - - private static Result ConvertFromDouble(object valueObj, out object instanceObj) - { - double num1 = (double)valueObj; - instanceObj = null; - float num2 = (float)num1; - instanceObj = num2; - return Result.Success; - } - - private static object CallToStringString(object instanceObj, object[] parameters) => ((float)instanceObj).ToString((string)parameters[0]); - - private static bool IsConversionSupported(TypeSchema fromType) => BooleanSchema.Type.IsAssignableFrom(fromType) || ByteSchema.Type.IsAssignableFrom(fromType) || (DoubleSchema.Type.IsAssignableFrom(fromType) || Int32Schema.Type.IsAssignableFrom(fromType)) || (Int64Schema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType)); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (BooleanSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromBoolean(from, out instance); - if (!result.Failed) - return result; - } - if (ByteSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromByte(from, out instance); - if (!result.Failed) - return result; - } - if (DoubleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromDouble(from, out instance); - if (!result.Failed) - return result; - } - if (Int32Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt32(from, out instance); - if (!result.Failed) - return result; - } - if (Int64Schema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromInt64(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.MathModulus: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.RelationalLessThan: - case OperationType.RelationalGreaterThan: - case OperationType.RelationalLessThanEquals: - case OperationType.RelationalGreaterThanEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - float num1 = (float)leftObj; - if (op == OperationType.MathNegate) - return (float)-num1; - float num2 = (float)rightObj; - switch (op - 1) - { - case 0: - return (float)(num1 + (double)num2); - case OperationType.MathAdd: - return (float)(num1 - (double)num2); - case OperationType.MathSubtract: - return (float)(num1 * (double)num2); - case OperationType.MathMultiply: - return (float)(num1 / (double)num2); - case OperationType.MathDivide: - return (float)(num1 % (double)num2); - case OperationType.LogicalOr: - return BooleanBoxes.Box(num1 == (double)num2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(num1 != (double)num2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(num1 < (double)num2); - case OperationType.RelationalLessThan: - return BooleanBoxes.Box(num1 > (double)num2); - case OperationType.RelationalGreaterThan: - return BooleanBoxes.Box(num1 <= (double)num2); - case OperationType.RelationalLessThanEquals: - return BooleanBoxes.Box(num1 >= (double)num2); - default: - return null; - } - } - - private static object CallTryParseStringSingle(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - float parameter2 = (float)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static Result RangeValidate0to1(object value) - { - float num = (float)value; - return num < 0.0 || num > 1.0 ? Result.Fail("Expecting a value between {0} and {1}, but got {2}", "0.0", "1.0", num.ToString()) : Result.Success; - } - - private static Result RangeValidateNotNegative(object value) - { - float num = (float)value; - return num < 0.0 ? Result.Fail("Expecting a non-negative value, but got {0}", num.ToString()) : Result.Success; - } - - private static Result RangeValidateNotZero(object value) - { - float num = (float)value; - return num == 0.0 ? Result.Fail("Specified value '{0}' is not valid", num.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(194, "Single", "float", 153, typeof(float), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(194, "ToString", new short[1] - { - 208 - }, 208, new InvokeHandler(CallToStringString), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(194, "TryParse", new short[2] - { - 208, - 194 - }, 194, new InvokeHandler(CallTryParseStringSingle), true); - Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs deleted file mode 100644 index 6028d73..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SizeKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SizeKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseVector2Keyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseVector2Keyframe)instanceObj).Value = (Vector2)valueObj; - - private static object Construct() => new SizeKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(196, "SizeKeyframe", null, 130, typeof(SizeKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(196, "Value", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs deleted file mode 100644 index 1a29e20..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SizeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SizeSchema - { - public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); - public static UIXTypeSchema Type; - - private static object GetWidth(object instanceObj) => ((Size)instanceObj).Width; - - private static void SetWidth(ref object instanceObj, object valueObj) - { - Size size = (Size)instanceObj; - int num = (int)valueObj; - size.Width = num; - instanceObj = size; - } - - private static object GetHeight(object instanceObj) => ((Size)instanceObj).Height; - - private static void SetHeight(ref object instanceObj, object valueObj) - { - Size size = (Size)instanceObj; - int num = (int)valueObj; - size.Height = num; - instanceObj = size; - } - - private static object Construct() => Size.Zero; - - private static object ConstructWidthHeight(object[] parameters) - { - object instanceObj = Construct(); - SetWidth(ref instanceObj, parameters[0]); - SetHeight(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringWidthHeight( - string[] splitString, - out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Size", result1.Error); - SetWidth(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Size", result2.Error); - SetHeight(ref instance, valueObj2); - return result2; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Size size = (Size)instanceObj; - writer.WriteInt32(size.Width); - writer.WriteInt32(size.Height); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Size(reader.ReadInt32(), reader.ReadInt32()); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringWidthHeight(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Size"); - } - return result; - } - - private static Result RangeValidateNotNegative(object value) - { - Size size = (Size)value; - return size.Width < 0 || size.Height < 0 ? Result.Fail("Expecting a non-negative value, but got {0}", size.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(195, "Size", null, 153, typeof(Size), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(195, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), new SetValueHandler(SetWidth), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(195, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), new SetValueHandler(SetHeight), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(195, new short[2] - { - 115, - 115 - }, new ConstructHandler(ConstructWidthHeight)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs deleted file mode 100644 index abe40b2..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SizeXKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SizeXKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new SizeXKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(197, "SizeXKeyframe", null, 130, typeof(SizeXKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(197, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs deleted file mode 100644 index 0ecc0b5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SizeYKeyframeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SizeYKeyframeSchema - { - public static UIXTypeSchema Type; - - private static object GetValue(object instanceObj) => ((BaseFloatKeyframe)instanceObj).Value; - - private static void SetValue(ref object instanceObj, object valueObj) => ((BaseFloatKeyframe)instanceObj).Value = (float)valueObj; - - private static object Construct() => new SizeYKeyframe(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(198, "SizeYKeyframe", null, 130, typeof(SizeYKeyframe), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(198, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs deleted file mode 100644 index 7fa21cd..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SoundSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Audio; -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.RenderAPI.Audio; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SoundSchema - { - public static UIXTypeSchema Type; - - private static object GetSource(object instanceObj) => ((Sound)instanceObj).Source; - - private static void SetSource(ref object instanceObj, object valueObj) => ((Sound)instanceObj).Source = (string)valueObj; - - private static object GetSystemSoundEvent(object instanceObj) => ((Sound)instanceObj).SystemSoundEvent; - - private static void SetSystemSoundEvent(ref object instanceObj, object valueObj) => ((Sound)instanceObj).SystemSoundEvent = (SystemSoundEvent)valueObj; - - private static object Construct() => new Sound(); - - private static object ConstructSource(object[] parameters) - { - object instanceObj = Construct(); - SetSource(ref instanceObj, parameters[0]); - return instanceObj; - } - - private static Result ConvertFromStringSource(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj; - Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj); - if (result.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Sound", result.Error); - SetSource(ref instance, valueObj); - return result; - } - - private static object CallPlay(object instanceObj, object[] parameters) - { - ((Sound)instanceObj).Play(); - return null; - } - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 1) - { - result = ConvertFromStringSource(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Sound"); - } - return result; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(201, "Sound", null, 153, typeof(Sound), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(201, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(201, "SystemSoundEvent", 211, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSystemSoundEvent), new SetValueHandler(SetSystemSoundEvent), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(201, new short[1] - { - 208 - }, new ConstructHandler(ConstructSource)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(201, "Play", null, 240, new InvokeHandler(CallPlay), false); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs deleted file mode 100644 index 273720b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SpotLight2DInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Render; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SpotLight2DInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Position", (Vector3)valueObj); - - private static void SetDirectionAngle(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("DirectionAngle", (float)valueObj); - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("LightColor", (Color)valueObj); - - private static void SetAmbientColor(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("AmbientColor", (Color)valueObj); - - private static void SetInnerConeAngle(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("InnerConeAngle", (float)valueObj); - - private static void SetOuterConeAngle(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("OuterConeAngle", (float)valueObj); - - private static void SetIntensity(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Intensity", (float)valueObj); - - private static void SetAttenuation(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Attenuation", (Vector3)valueObj); - - private static object CallPlayPositionAnimationEffectVector3Animation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Position, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayDirectionAngleAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.DirectionAngle, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayLightColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.LightColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayAmbientColorAnimationEffectColorAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.AmbientColor, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayInnerConeAngleAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.InnerConeAngle, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayOuterConeAngleAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.OuterConeAngle, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayIntensityAnimationEffectFloatAnimation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Intensity, (EffectAnimation)parameters[0]); - return null; - } - - private static object CallPlayAttenuationAnimationEffectVector3Animation( - object instanceObj, - object[] parameters) - { - ((EffectElementWrapper)instanceObj).PlayAnimation(EffectProperty.Attenuation, (EffectAnimation)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(203, "SpotLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(203, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(203, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDirectionAngle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(203, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(203, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(203, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetInnerConeAngle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(203, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetOuterConeAngle), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(203, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetIntensity), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(203, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAttenuation), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(203, "PlayPositionAnimation", new short[1] - { - 81 - }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(203, "PlayDirectionAngleAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayDirectionAngleAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(203, "PlayLightColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(203, "PlayAmbientColorAnimation", new short[1] - { - 71 - }, 240, new InvokeHandler(CallPlayAmbientColorAnimationEffectColorAnimation), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(203, "PlayInnerConeAngleAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayInnerConeAngleAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(203, "PlayOuterConeAngleAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayOuterConeAngleAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(203, "PlayIntensityAnimation", new short[1] - { - 75 - }, 240, new InvokeHandler(CallPlayIntensityAnimationEffectFloatAnimation), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(203, "PlayAttenuationAnimation", new short[1] - { - 81 - }, 240, new InvokeHandler(CallPlayAttenuationAnimationEffectVector3Animation), false); - Type.Initialize(null, null, new PropertySchema[8] - { - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema2, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema3, - uixPropertySchema6, - uixPropertySchema1 - }, new MethodSchema[8] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs deleted file mode 100644 index 53fc586..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SpotLight2DSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SpotLight2DSchema - { - public static UIXTypeSchema Type; - - private static object GetPosition(object instanceObj) => ((SpotLight2DElement)instanceObj).Position; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((SpotLight2DElement)instanceObj).Position = (Vector3)valueObj; - - private static object GetDirectionAngle(object instanceObj) => ((SpotLight2DElement)instanceObj).DirectionAngle; - - private static void SetDirectionAngle(ref object instanceObj, object valueObj) => ((SpotLight2DElement)instanceObj).DirectionAngle = (float)valueObj; - - private static void SetLightColor(ref object instanceObj, object valueObj) => ((SpotLight2DElement)instanceObj).LightColor = ((Color)valueObj).RenderConvert(); - - private static void SetAmbientColor(ref object instanceObj, object valueObj) => ((SpotLight2DElement)instanceObj).AmbientColor = ((Color)valueObj).RenderConvert(); - - private static object GetInnerConeAngle(object instanceObj) => ((SpotLight2DElement)instanceObj).InnerConeAngle; - - private static void SetInnerConeAngle(ref object instanceObj, object valueObj) - { - SpotLight2DElement spotLight2Delement = (SpotLight2DElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - spotLight2Delement.InnerConeAngle = num; - } - - private static object GetOuterConeAngle(object instanceObj) => ((SpotLight2DElement)instanceObj).OuterConeAngle; - - private static void SetOuterConeAngle(ref object instanceObj, object valueObj) - { - SpotLight2DElement spotLight2Delement = (SpotLight2DElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - spotLight2Delement.OuterConeAngle = num; - } - - private static object GetIntensity(object instanceObj) => ((SpotLight2DElement)instanceObj).Intensity; - - private static void SetIntensity(ref object instanceObj, object valueObj) - { - SpotLight2DElement spotLight2Delement = (SpotLight2DElement)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - spotLight2Delement.Intensity = num; - } - - private static object GetAttenuation(object instanceObj) => ((SpotLight2DElement)instanceObj).Attenuation; - - private static void SetAttenuation(ref object instanceObj, object valueObj) => ((SpotLight2DElement)instanceObj).Attenuation = (Vector3)valueObj; - - private static object Construct() => new SpotLight2DElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(202, "SpotLight2D", null, 77, typeof(SpotLight2DElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(202, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(202, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDirectionAngle), new SetValueHandler(SetDirectionAngle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(202, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(202, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(202, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetInnerConeAngle), new SetValueHandler(SetInnerConeAngle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(202, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetOuterConeAngle), new SetValueHandler(SetOuterConeAngle), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(202, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetIntensity), new SetValueHandler(SetIntensity), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(202, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttenuation), new SetValueHandler(SetAttenuation), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] - { - uixPropertySchema4, - uixPropertySchema8, - uixPropertySchema2, - uixPropertySchema5, - uixPropertySchema7, - uixPropertySchema3, - uixPropertySchema6, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs deleted file mode 100644 index 67c63bc..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.StackLayoutInputSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class StackLayoutInputSchema - { - public static UIXTypeSchema Type; - - private static object GetPriority(object instanceObj) => ((StackLayoutInput)instanceObj).Priority; - - private static void SetPriority(ref object instanceObj, object valueObj) => ((StackLayoutInput)instanceObj).Priority = (StackPriority)valueObj; - - private static object GetMinimumSize(object instanceObj) => ((StackLayoutInput)instanceObj).MinimumSize; - - private static void SetMinimumSize(ref object instanceObj, object valueObj) => ((StackLayoutInput)instanceObj).MinimumSize = (Size)valueObj; - - private static object Construct() => new StackLayoutInput(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(205, "StackLayoutInput", null, 133, typeof(StackLayoutInput), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(205, "Priority", 206, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPriority), new SetValueHandler(SetPriority), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(205, "MinimumSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs deleted file mode 100644 index 4390db3..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.StackLayoutSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Layouts; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class StackLayoutSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new StackLayout(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(204, "StackLayout", null, 132, typeof(StackLayout), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs deleted file mode 100644 index fbcbf7e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.StringSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class StringSchema - { - public static UIXTypeSchema Type; - - private static object GetLength(object instanceObj) => ((string)instanceObj).Length; - - private static object Construct() => string.Empty; - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - string str = (string)instanceObj; - writer.WriteString(str); - } - - private static object DecodeBinary(ByteCodeReader reader) => reader.ReadString(); - - private static Result ConvertFromObject(object valueObj, out object instanceObj) - { - object obj = valueObj; - instanceObj = null; - string str = obj == null ? null : obj.ToString(); - instanceObj = str; - return Result.Success; - } - - private static object CallIsNullOrEmptyString(object instanceObj, object[] parameters) => BooleanBoxes.Box(string.IsNullOrEmpty((string)parameters[0])); - - private static object CallSubstringInt32(object instanceObj, object[] parameters) - { - string str = (string)instanceObj; - int parameter = (int)parameters[0]; - if (parameter >= 0 && parameter <= str.Length) - return str.Substring(parameter); - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter, "startIndex"); - return null; - } - - private static object CallSubstringInt32Int32(object instanceObj, object[] parameters) - { - string str = (string)instanceObj; - int parameter1 = (int)parameters[0]; - int parameter2 = (int)parameters[1]; - if (parameter1 < 0 || parameter1 > str.Length) - { - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter1, "startIndex"); - return null; - } - if (parameter2 >= 0 && parameter1 + parameter2 >= 0 && parameter1 + parameter2 <= str.Length) - return str.Substring(parameter1, parameter2); - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", parameter2, "length"); - return null; - } - - private static object CallTrim(object instanceObj, object[] parameters) => ((string)instanceObj).Trim(); - - private static object CallToLower(object instanceObj, object[] parameters) => ((string)instanceObj).ToLowerInvariant(); - - private static object CallToUpper(object instanceObj, object[] parameters) => ((string)instanceObj).ToUpperInvariant(); - - private static object CallFormatObject(object instanceObj, object[] parameters) - { - string format = (string)instanceObj; - object parameter = parameters[0]; - return string.Format(format, parameters); - } - - private static object CallFormatObjectObject(object instanceObj, object[] parameters) - { - string format = (string)instanceObj; - object parameter1 = parameters[0]; - object parameter2 = parameters[1]; - return string.Format(format, parameters); - } - - private static object CallFormatObjectObjectObject(object instanceObj, object[] parameters) - { - string format = (string)instanceObj; - object parameter1 = parameters[0]; - object parameter2 = parameters[1]; - object parameter3 = parameters[2]; - return string.Format(format, parameters); - } - - private static object CallFormatObjectObjectObjectObject( - object instanceObj, - object[] parameters) - { - string format = (string)instanceObj; - object parameter1 = parameters[0]; - object parameter2 = parameters[1]; - object parameter3 = parameters[2]; - object parameter4 = parameters[3]; - return string.Format(format, parameters); - } - - private static object CallFormatObjectObjectObjectObjectObject( - object instanceObj, - object[] parameters) - { - string format = (string)instanceObj; - object parameter1 = parameters[0]; - object parameter2 = parameters[1]; - object parameter3 = parameters[2]; - object parameter4 = parameters[3]; - object parameter5 = parameters[4]; - return string.Format(format, parameters); - } - - private static bool IsConversionSupported(TypeSchema fromType) => ObjectSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (ObjectSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromObject(from, out instance); - if (!result.Failed) - return result; - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - string str1 = (string)leftObj; - string str2 = (string)rightObj; - switch (op) - { - case OperationType.MathAdd: - return str1 + str2; - case OperationType.RelationalEquals: - return BooleanBoxes.Box(str1 == str2); - case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(str1 != str2); - default: - return null; - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(208, "String", "string", 153, typeof(string), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(208, "Length", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLength), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(208, "IsNullOrEmpty", new short[1] - { - 208 - }, 15, new InvokeHandler(CallIsNullOrEmptyString), true); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(208, "Substring", new short[1] - { - 115 - }, 208, new InvokeHandler(CallSubstringInt32), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(208, "Substring", new short[2] - { - 115, - 115 - }, 208, new InvokeHandler(CallSubstringInt32Int32), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(208, "Trim", null, 208, new InvokeHandler(CallTrim), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(208, "ToLower", null, 208, new InvokeHandler(CallToLower), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(208, "ToUpper", null, 208, new InvokeHandler(CallToUpper), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(208, "Format", new short[1] - { - 153 - }, 208, new InvokeHandler(CallFormatObject), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(208, "Format", new short[2] - { - 153, - 153 - }, 208, new InvokeHandler(CallFormatObjectObject), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(208, "Format", new short[3] - { - 153, - 153, - 153 - }, 208, new InvokeHandler(CallFormatObjectObjectObject), false); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(208, "Format", new short[4] - { - 153, - 153, - 153, - 153 - }, 208, new InvokeHandler(CallFormatObjectObjectObjectObject), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(208, "Format", new short[5] - { - 153, - 153, - 153, - 153, - 153 - }, 208, new InvokeHandler(CallFormatObjectObjectObjectObjectObject), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, new MethodSchema[11] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11 - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs deleted file mode 100644 index 925104d..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.SwitchAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class SwitchAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetExpression(object instanceObj) => ((SwitchAnimation)instanceObj).Expression; - - private static void SetExpression(ref object instanceObj, object valueObj) => ((SwitchAnimation)instanceObj).Expression = (IUIValueRange)valueObj; - - private static object GetOptions(object instanceObj) => ((SwitchAnimation)instanceObj).Options; - - private static object GetType(object instanceObj) => ((SwitchAnimation)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((SwitchAnimation)instanceObj).Type = (AnimationEventType)valueObj; - - private static object Construct() => new SwitchAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(210, "SwitchAnimation", null, 104, typeof(SwitchAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(210, "Expression", 231, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetExpression), new SetValueHandler(SetExpression), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(210, "Options", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetOptions), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(210, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs deleted file mode 100644 index b1987e5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextEditingHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextEditingHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetAcceptsEnter(object instanceObj) => BooleanBoxes.Box(((TextEditingHandler)instanceObj).AcceptsEnter); - - private static void SetAcceptsEnter(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).AcceptsEnter = (bool)valueObj; - - private static object GetAcceptsTab(object instanceObj) => BooleanBoxes.Box(((TextEditingHandler)instanceObj).AcceptsTab); - - private static void SetAcceptsTab(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).AcceptsTab = (bool)valueObj; - - private static object GetCaretInfo(object instanceObj) => ((TextEditingHandler)instanceObj).CaretInfo; - - private static object GetEditableTextData(object instanceObj) => ((TextEditingHandler)instanceObj).EditableTextData; - - private static void SetEditableTextData(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).EditableTextData = (EditableTextData)valueObj; - - private static object GetOvertype(object instanceObj) => BooleanBoxes.Box(((TextEditingHandler)instanceObj).Overtype); - - private static void SetOvertype(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).Overtype = (bool)valueObj; - - private static object GetTextDisplay(object instanceObj) => ((TextEditingHandler)instanceObj).TextDisplay; - - private static void SetTextDisplay(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).TextDisplay = (Text)valueObj; - - private static object GetSelectionRange(object instanceObj) => ((TextEditingHandler)instanceObj).SelectionRange; - - private static void SetSelectionRange(ref object instanceObj, object valueObj) - { - TextEditingHandler textEditingHandler = (TextEditingHandler)instanceObj; - Range range = (Range)valueObj; - int num = 0; - if (textEditingHandler.EditableTextData != null && textEditingHandler.EditableTextData.Value != null) - num = textEditingHandler.EditableTextData.Value.Length; - if (range.Begin < 0 || range.Begin > num) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", range.Begin, "SelectionRange.Begin"); - if (range.End < 0 || range.End > num) - ErrorManager.ReportError("Script runtime failure: Invalid '{0}' value is out of range for '{1}'", range.End, "SelectionRange.End"); - textEditingHandler.SelectionRange = range; - } - - private static object GetCopyCommand(object instanceObj) => ((TextEditingHandler)instanceObj).CopyCommand; - - private static object GetCutCommand(object instanceObj) => ((TextEditingHandler)instanceObj).CutCommand; - - private static object GetDeleteCommand(object instanceObj) => ((TextEditingHandler)instanceObj).DeleteCommand; - - private static object GetPasteCommand(object instanceObj) => ((TextEditingHandler)instanceObj).PasteCommand; - - private static object GetSelectAllCommand(object instanceObj) => ((TextEditingHandler)instanceObj).SelectAllCommand; - - private static object GetUndoCommand(object instanceObj) => ((TextEditingHandler)instanceObj).UndoCommand; - - private static object GetHorizontalScrollModel(object instanceObj) => ((TextEditingHandler)instanceObj).HorizontalScrollModel; - - private static void SetHorizontalScrollModel(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).HorizontalScrollModel = (TextScrollModel)valueObj; - - private static object GetVerticalScrollModel(object instanceObj) => ((TextEditingHandler)instanceObj).VerticalScrollModel; - - private static void SetVerticalScrollModel(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).VerticalScrollModel = (TextScrollModel)valueObj; - - private static object GetDetectUrls(object instanceObj) => BooleanBoxes.Box(((TextEditingHandler)instanceObj).DetectUrls); - - private static void SetDetectUrls(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).DetectUrls = (bool)valueObj; - - private static object GetLinkColor(object instanceObj) => ((TextEditingHandler)instanceObj).LinkColor; - - private static void SetLinkColor(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).LinkColor = (Color)valueObj; - - private static object GetLinkClickedParameter(object instanceObj) => ((TextEditingHandler)instanceObj).LinkClickedParameter; - - private static object GetInImeCompositionMode(object instanceObj) => BooleanBoxes.Box(((TextEditingHandler)instanceObj).InImeCompositionMode); - - private static void SetInImeCompositionMode(ref object instanceObj, object valueObj) => ((TextEditingHandler)instanceObj).InImeCompositionMode = (bool)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object Construct() => new TextEditingHandler(); - - private static object CallCopy(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).Copy(); - return null; - } - - private static object CallCut(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).Cut(); - return null; - } - - private static object CallDelete(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).Delete(); - return null; - } - - private static object CallPaste(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).Paste(); - return null; - } - - private static object CallSelectAll(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).SelectAll(); - return null; - } - - private static object CallUndo(object instanceObj, object[] parameters) - { - ((TextEditingHandler)instanceObj).Undo(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(214, "TextEditingHandler", null, 110, typeof(TextEditingHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(214, "AcceptsEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcceptsEnter), new SetValueHandler(SetAcceptsEnter), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(214, "AcceptsTab", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcceptsTab), new SetValueHandler(SetAcceptsTab), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(214, "CaretInfo", 26, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCaretInfo), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(214, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEditableTextData), new SetValueHandler(SetEditableTextData), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(214, "Overtype", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOvertype), new SetValueHandler(SetOvertype), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(214, "TextDisplay", 212, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextDisplay), new SetValueHandler(SetTextDisplay), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(214, "SelectionRange", 187, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectionRange), new SetValueHandler(SetSelectionRange), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(214, "CopyCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCopyCommand), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(214, "CutCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCutCommand), null, false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(214, "DeleteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDeleteCommand), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(214, "PasteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPasteCommand), null, false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(214, "SelectAllCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectAllCommand), null, false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(214, "UndoCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUndoCommand), null, false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(214, "HorizontalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHorizontalScrollModel), new SetValueHandler(SetHorizontalScrollModel), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(214, "VerticalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVerticalScrollModel), new SetValueHandler(SetVerticalScrollModel), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(214, "DetectUrls", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDetectUrls), new SetValueHandler(SetDetectUrls), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(214, "LinkColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLinkColor), new SetValueHandler(SetLinkColor), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(214, "LinkClickedParameter", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLinkClickedParameter), null, false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(214, "InImeCompositionMode", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetInImeCompositionMode), new SetValueHandler(SetInImeCompositionMode), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(214, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXEventSchema uixEventSchema1 = new UIXEventSchema(214, "TypingInputRejected"); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(214, "Copy", null, 240, new InvokeHandler(CallCopy), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(214, "Cut", null, 240, new InvokeHandler(CallCut), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(214, "Delete", null, 240, new InvokeHandler(CallDelete), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(214, "Paste", null, 240, new InvokeHandler(CallPaste), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(214, "SelectAll", null, 240, new InvokeHandler(CallSelectAll), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(214, "Undo", null, 240, new InvokeHandler(CallUndo), false); - UIXEventSchema uixEventSchema2 = new UIXEventSchema(214, "LinkClicked"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[20] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema8, - uixPropertySchema9, - uixPropertySchema10, - uixPropertySchema16, - uixPropertySchema4, - uixPropertySchema20, - uixPropertySchema14, - uixPropertySchema19, - uixPropertySchema18, - uixPropertySchema17, - uixPropertySchema5, - uixPropertySchema11, - uixPropertySchema12, - uixPropertySchema7, - uixPropertySchema6, - uixPropertySchema13, - uixPropertySchema15 - }, new MethodSchema[6] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6 - }, new EventSchema[2] - { - uixEventSchema1, - uixEventSchema2 - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs deleted file mode 100644 index 9915c7c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextFragmentSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextFragmentSchema - { - public static UIXTypeSchema Type; - - private static object GetRuns(object instanceObj) => ((TextFragment)instanceObj).Runs; - - private static object GetTagName(object instanceObj) => ((TextFragment)instanceObj).TagName; - - private static object GetContent(object instanceObj) => ((TextFragment)instanceObj).Content; - - private static object GetAttributes(object instanceObj) => ((TextFragment)instanceObj).Attributes; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(215, "TextFragment", null, 153, typeof(TextFragment), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(215, "Runs", 138, 216, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(GetRuns), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(215, "TagName", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTagName), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(215, "Content", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContent), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(215, "Attributes", 58, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttributes), null, false); - Type.Initialize(null, null, new PropertySchema[4] - { - uixPropertySchema4, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs deleted file mode 100644 index 2ad5a8e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextRunDataSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextRunDataSchema - { - public static UIXTypeSchema Type; - - private static object GetPosition(object instanceObj) => ((TextRunData)instanceObj).Position; - - private static object GetSize(object instanceObj) => ((TextRunData)instanceObj).Size; - - private static object GetColor(object instanceObj) => ((TextRunData)instanceObj).Color; - - private static object GetLineNumber(object instanceObj) => ((TextRunData)instanceObj).LineNumber; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(216, "TextRunData", null, 153, typeof(TextRunData), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(216, "Position", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(216, "Size", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSize), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(216, "Color", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColor), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(216, "LineNumber", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLineNumber), null, false); - Type.Initialize(null, null, new PropertySchema[4] - { - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema1, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs deleted file mode 100644 index c6952df..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextRunRendererSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextRunRendererSchema - { - public static UIXTypeSchema Type; - - private static object GetData(object instanceObj) => ((TextRunRenderer)instanceObj).Data; - - private static void SetData(ref object instanceObj, object valueObj) => ((TextRunRenderer)instanceObj).Data = (TextRunData)valueObj; - - private static object GetColor(object instanceObj) => ((TextRunRenderer)instanceObj).Color; - - private static void SetColor(ref object instanceObj, object valueObj) => ((TextRunRenderer)instanceObj).Color = (Color)valueObj; - - private static object GetEffect(object instanceObj) => ((ViewItem)instanceObj).Effect; - - private static void SetEffect(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Effect = (EffectClass)valueObj; - - private static object Construct() => new TextRunRenderer(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(217, "TextRunRenderer", null, 239, typeof(TextRunRenderer), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(217, "Data", 216, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetData), new SetValueHandler(SetData), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(217, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(217, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema3 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs deleted file mode 100644 index dc32fb0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs +++ /dev/null @@ -1,178 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextSchema - { - public static UIXTypeSchema Type; - - private static object GetContent(object instanceObj) => ((Text)instanceObj).Content; - - private static void SetContent(ref object instanceObj, object valueObj) => ((Text)instanceObj).Content = (string)valueObj; - - private static object GetFont(object instanceObj) => ((Text)instanceObj).Font; - - private static void SetFont(ref object instanceObj, object valueObj) => ((Text)instanceObj).Font = (Font)valueObj; - - private static object GetColor(object instanceObj) => ((Text)instanceObj).Color; - - private static void SetColor(ref object instanceObj, object valueObj) => ((Text)instanceObj).Color = (Color)valueObj; - - private static object GetWordWrap(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).WordWrap); - - private static void SetWordWrap(ref object instanceObj, object valueObj) => ((Text)instanceObj).WordWrap = (bool)valueObj; - - private static object GetMaximumLines(object instanceObj) => ((Text)instanceObj).MaximumLines; - - private static void SetMaximumLines(ref object instanceObj, object valueObj) - { - Text text = (Text)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - text.MaximumLines = num; - } - - private static object GetLineAlignment(object instanceObj) => ((Text)instanceObj).LineAlignment; - - private static void SetLineAlignment(ref object instanceObj, object valueObj) => ((Text)instanceObj).LineAlignment = (LineAlignment)valueObj; - - private static object GetLineSpacing(object instanceObj) => ((Text)instanceObj).LineSpacing; - - private static void SetLineSpacing(ref object instanceObj, object valueObj) => ((Text)instanceObj).LineSpacing = (float)valueObj; - - private static object GetCharacterSpacing(object instanceObj) => ((Text)instanceObj).CharacterSpacing; - - private static void SetCharacterSpacing(ref object instanceObj, object valueObj) => ((Text)instanceObj).CharacterSpacing = (float)valueObj; - - private static object GetEnableKerning(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).EnableKerning); - - private static void SetEnableKerning(ref object instanceObj, object valueObj) => ((Text)instanceObj).EnableKerning = (bool)valueObj; - - private static object GetLastLineBounds(object instanceObj) => ((Text)instanceObj).LastLineBounds; - - private static object GetFadeSize(object instanceObj) => ((Text)instanceObj).FadeSize; - - private static void SetFadeSize(ref object instanceObj, object valueObj) => ((Text)instanceObj).FadeSize = (float)valueObj; - - private static object GetStyle(object instanceObj) => ((Text)instanceObj).Style; - - private static void SetStyle(ref object instanceObj, object valueObj) => ((Text)instanceObj).Style = (TextStyle)valueObj; - - private static object GetNamedStyles(object instanceObj) => ((Text)instanceObj).NamedStyles; - - private static void SetNamedStyles(ref object instanceObj, object valueObj) => ((Text)instanceObj).NamedStyles = (IDictionary)valueObj; - - private static object GetFragments(object instanceObj) => ((Text)instanceObj).Fragments; - - private static object GetTextSharpness(object instanceObj) => ((Text)instanceObj).TextSharpness; - - private static void SetTextSharpness(ref object instanceObj, object valueObj) => ((Text)instanceObj).TextSharpness = (TextSharpness)valueObj; - - private static object GetClipped(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).Clipped); - - private static object GetContributesToWidth(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).ContributesToWidth); - - private static void SetContributesToWidth(ref object instanceObj, object valueObj) => ((Text)instanceObj).ContributesToWidth = (bool)valueObj; - - private static object GetBoundsType(object instanceObj) => ((Text)instanceObj).BoundsType; - - private static void SetBoundsType(ref object instanceObj, object valueObj) => ((Text)instanceObj).BoundsType = (TextBounds)valueObj; - - private static object GetEffect(object instanceObj) => ((ViewItem)instanceObj).Effect; - - private static void SetEffect(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Effect = (EffectClass)valueObj; - - private static object GetDisableIme(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).DisableIme); - - private static void SetDisableIme(ref object instanceObj, object valueObj) => ((Text)instanceObj).DisableIme = (bool)valueObj; - - private static object GetHighlightColor(object instanceObj) => ((Text)instanceObj).HighlightColor; - - private static void SetHighlightColor(ref object instanceObj, object valueObj) => ((Text)instanceObj).HighlightColor = (Color)valueObj; - - private static object GetTextHighlightColor(object instanceObj) => ((Text)instanceObj).TextHighlightColor; - - private static void SetTextHighlightColor(ref object instanceObj, object valueObj) => ((Text)instanceObj).TextHighlightColor = (Color)valueObj; - - private static object GetUsePasswordMask(object instanceObj) => BooleanBoxes.Box(((Text)instanceObj).UsePasswordMask); - - private static void SetUsePasswordMask(ref object instanceObj, object valueObj) => ((Text)instanceObj).UsePasswordMask = (bool)valueObj; - - private static object GetPasswordMask(object instanceObj) => ((Text)instanceObj).PasswordMask; - - private static void SetPasswordMask(ref object instanceObj, object valueObj) => ((Text)instanceObj).PasswordMask = (char)valueObj; - - private static object Construct() => new Text(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(212, "Text", null, 239, typeof(Text), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(212, "Content", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(212, "Font", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFont), new SetValueHandler(SetFont), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(212, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(212, "WordWrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWordWrap), new SetValueHandler(SetWordWrap), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(212, "MaximumLines", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMaximumLines), new SetValueHandler(SetMaximumLines), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(212, "LineAlignment", 137, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLineAlignment), new SetValueHandler(SetLineAlignment), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(212, "LineSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLineSpacing), new SetValueHandler(SetLineSpacing), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(212, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCharacterSpacing), new SetValueHandler(SetCharacterSpacing), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(212, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnableKerning), new SetValueHandler(SetEnableKerning), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(212, "LastLineBounds", 169, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetLastLineBounds), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(212, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFadeSize), new SetValueHandler(SetFadeSize), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(212, "Style", 220, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStyle), new SetValueHandler(SetStyle), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(212, "NamedStyles", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNamedStyles), new SetValueHandler(SetNamedStyles), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(212, "Fragments", 138, 215, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetFragments), null, false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(212, "TextSharpness", 219, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextSharpness), new SetValueHandler(SetTextSharpness), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(212, "Clipped", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClipped), null, false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(212, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContributesToWidth), new SetValueHandler(SetContributesToWidth), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(212, "BoundsType", 213, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBoundsType), new SetValueHandler(SetBoundsType), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(212, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(212, "DisableIme", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisableIme), new SetValueHandler(SetDisableIme), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(212, "HighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHighlightColor), new SetValueHandler(SetHighlightColor), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(212, "TextHighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextHighlightColor), new SetValueHandler(SetTextHighlightColor), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(212, "UsePasswordMask", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUsePasswordMask), new SetValueHandler(SetUsePasswordMask), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(212, "PasswordMask", 27, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPasswordMask), new SetValueHandler(SetPasswordMask), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[24] - { - uixPropertySchema18, - uixPropertySchema8, - uixPropertySchema16, - uixPropertySchema3, - uixPropertySchema1, - uixPropertySchema17, - uixPropertySchema20, - uixPropertySchema19, - uixPropertySchema9, - uixPropertySchema11, - uixPropertySchema2, - uixPropertySchema14, - uixPropertySchema21, - uixPropertySchema10, - uixPropertySchema6, - uixPropertySchema7, - uixPropertySchema5, - uixPropertySchema13, - uixPropertySchema24, - uixPropertySchema12, - uixPropertySchema22, - uixPropertySchema15, - uixPropertySchema23, - uixPropertySchema4 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs deleted file mode 100644 index 7fde118..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextScrollModelSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextScrollModelSchema - { - public static UIXTypeSchema Type; - - private static object Construct() => new TextScrollModel(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(218, "TextScrollModel", null, 183, typeof(TextScrollModel), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs deleted file mode 100644 index e082a41..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TextStyleSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TextStyleSchema - { - public static RangeValidator ValidateFontFace = new RangeValidator(RangeValidateFontFace); - public static UIXTypeSchema Type; - - private static object GetFontFace(object instanceObj) => ((TextStyle)instanceObj).FontFace; - - private static void SetFontFace(ref object instanceObj, object valueObj) - { - TextStyle textStyle = (TextStyle)instanceObj; - string str = (string)valueObj; - Result result = ValidateFontFace(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - textStyle.FontFace = str; - } - - private static object GetFontSize(object instanceObj) => ((TextStyle)instanceObj).FontSize; - - private static void SetFontSize(ref object instanceObj, object valueObj) - { - TextStyle textStyle = (TextStyle)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - textStyle.FontSize = num; - } - - private static object GetBold(object instanceObj) => BooleanBoxes.Box(((TextStyle)instanceObj).Bold); - - private static void SetBold(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).Bold = (bool)valueObj; - - private static object GetItalic(object instanceObj) => BooleanBoxes.Box(((TextStyle)instanceObj).Italic); - - private static void SetItalic(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).Italic = (bool)valueObj; - - private static object GetUnderline(object instanceObj) => BooleanBoxes.Box(((TextStyle)instanceObj).Underline); - - private static void SetUnderline(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).Underline = (bool)valueObj; - - private static object GetColor(object instanceObj) => ((TextStyle)instanceObj).Color; - - private static void SetColor(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).Color = (Color)valueObj; - - private static object GetLineSpacing(object instanceObj) => ((TextStyle)instanceObj).LineSpacing; - - private static void SetLineSpacing(ref object instanceObj, object valueObj) - { - TextStyle textStyle = (TextStyle)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - textStyle.LineSpacing = num; - } - - private static object GetEnableKerning(object instanceObj) => BooleanBoxes.Box(((TextStyle)instanceObj).EnableKerning); - - private static void SetEnableKerning(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).EnableKerning = (bool)valueObj; - - private static object GetCharacterSpacing(object instanceObj) => ((TextStyle)instanceObj).CharacterSpacing; - - private static void SetCharacterSpacing(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).CharacterSpacing = (float)valueObj; - - private static object GetFragment(object instanceObj) => BooleanBoxes.Box(((TextStyle)instanceObj).Fragment); - - private static void SetFragment(ref object instanceObj, object valueObj) => ((TextStyle)instanceObj).Fragment = (bool)valueObj; - - private static object Construct() => new TextStyle(); - - private static Result RangeValidateFontFace(object value) - { - string str = (string)value; - return str.Length > 31 ? Result.Fail("\"{0}\" cannot be longer than {1} characters", str, "31") : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(220, "TextStyle", null, 153, typeof(TextStyle), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(220, "FontFace", 208, -1, ExpressionRestriction.None, false, ValidateFontFace, true, new GetValueHandler(GetFontFace), new SetValueHandler(SetFontFace), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(220, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetFontSize), new SetValueHandler(SetFontSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(220, "Bold", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBold), new SetValueHandler(SetBold), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(220, "Italic", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetItalic), new SetValueHandler(SetItalic), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(220, "Underline", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUnderline), new SetValueHandler(SetUnderline), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(220, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(220, "LineSpacing", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetLineSpacing), new SetValueHandler(SetLineSpacing), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(220, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnableKerning), new SetValueHandler(SetEnableKerning), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(220, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCharacterSpacing), new SetValueHandler(SetCharacterSpacing), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(220, "Fragment", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFragment), new SetValueHandler(SetFragment), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[10] - { - uixPropertySchema3, - uixPropertySchema9, - uixPropertySchema6, - uixPropertySchema8, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema10, - uixPropertySchema4, - uixPropertySchema7, - uixPropertySchema5 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs deleted file mode 100644 index f3df58e..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TimerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TimerSchema - { - public static UIXTypeSchema Type; - - private static object GetInterval(object instanceObj) => ((UITimer)instanceObj).Interval; - - private static void SetInterval(ref object instanceObj, object valueObj) - { - UITimer uiTimer = (UITimer)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - uiTimer.Interval = num; - } - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((UITimer)instanceObj).Enabled); - - private static void SetEnabled(ref object instanceObj, object valueObj) => ((UITimer)instanceObj).Enabled = (bool)valueObj; - - private static object GetAutoRepeat(object instanceObj) => BooleanBoxes.Box(((UITimer)instanceObj).AutoRepeat); - - private static void SetAutoRepeat(ref object instanceObj, object valueObj) => ((UITimer)instanceObj).AutoRepeat = (bool)valueObj; - - private static object Construct() => new UITimer(); - - private static object CallStart(object instanceObj, object[] parameters) - { - ((UITimer)instanceObj).Start(); - return null; - } - - private static object CallStop(object instanceObj, object[] parameters) - { - ((UITimer)instanceObj).Stop(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(221, "Timer", null, 153, typeof(UITimer), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(221, "Interval", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetInterval), new SetValueHandler(SetInterval), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(221, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(221, "AutoRepeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAutoRepeat), new SetValueHandler(SetAutoRepeat), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(221, "Tick"); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(221, "Start", null, 240, new InvokeHandler(CallStart), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(221, "Stop", null, 240, new InvokeHandler(CallStop), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, new EventSchema[1] { uixEventSchema }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs deleted file mode 100644 index 6ce38d0..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TransformAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TransformAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetDelay(object instanceObj) => ((TransformAnimation)instanceObj).Delay; - - private static void SetDelay(ref object instanceObj, object valueObj) => ((TransformAnimation)instanceObj).Delay = (float)valueObj; - - private static object GetFilter(object instanceObj) => ((TransformAnimation)instanceObj).Filter; - - private static void SetFilter(ref object instanceObj, object valueObj) => ((TransformAnimation)instanceObj).Filter = (KeyframeFilter)valueObj; - - private static object GetMagnitude(object instanceObj) => ((TransformAnimation)instanceObj).Magnitude; - - private static void SetMagnitude(ref object instanceObj, object valueObj) => ((TransformAnimation)instanceObj).Magnitude = (float)valueObj; - - private static object GetTimeScale(object instanceObj) => ((TransformAnimation)instanceObj).TimeScale; - - private static void SetTimeScale(ref object instanceObj, object valueObj) => ((TransformAnimation)instanceObj).TimeScale = (float)valueObj; - - private static object GetSource(object instanceObj) => ((ReferenceAnimation)instanceObj).Source; - - private static void SetSource(ref object instanceObj, object valueObj) => ((ReferenceAnimation)instanceObj).Source = (IAnimationProvider)valueObj; - - private static object GetType(object instanceObj) => ((ReferenceAnimation)instanceObj).Type; - - private static object Construct() => new TransformAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(222, "TransformAnimation", null, 104, typeof(TransformAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(222, "Delay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDelay), new SetValueHandler(SetDelay), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(222, "Filter", 131, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFilter), new SetValueHandler(SetFilter), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(222, "Magnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMagnitude), new SetValueHandler(SetMagnitude), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(222, "TimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTimeScale), new SetValueHandler(SetTimeScale), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(222, "Source", 104, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(222, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema5, - uixPropertySchema4, - uixPropertySchema6 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs deleted file mode 100644 index 3e12ba1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TransformByAttributeAnimationSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TransformByAttributeAnimationSchema - { - public static UIXTypeSchema Type; - - private static object GetAttribute(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).Attribute; - - private static void SetAttribute(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).Attribute = (TransformAttribute)valueObj; - - private static object GetMaxTimeScale(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).MaxTimeScale; - - private static void SetMaxTimeScale(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).MaxTimeScale = (float)valueObj; - - private static object GetMaxDelay(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).MaxDelay; - - private static void SetMaxDelay(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).MaxDelay = (float)valueObj; - - private static object GetMaxMagnitude(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).MaxMagnitude; - - private static void SetMaxMagnitude(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).MaxMagnitude = (float)valueObj; - - private static object GetOverride(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).Override; - - private static void SetOverride(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).Override = (float)valueObj; - - private static object GetValueTransformer(object instanceObj) => ((TransformByAttributeAnimation)instanceObj).ValueTransformer; - - private static void SetValueTransformer(ref object instanceObj, object valueObj) => ((TransformByAttributeAnimation)instanceObj).ValueTransformer = (ValueTransformer)valueObj; - - private static object Construct() => new TransformByAttributeAnimation(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(224, "TransformByAttributeAnimation", null, 222, typeof(TransformByAttributeAnimation), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(224, "Attribute", 223, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttribute), new SetValueHandler(SetAttribute), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(224, "MaxTimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxTimeScale), new SetValueHandler(SetMaxTimeScale), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(224, "MaxDelay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxDelay), new SetValueHandler(SetMaxDelay), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(224, "MaxMagnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxMagnitude), new SetValueHandler(SetMaxMagnitude), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(224, "Override", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOverride), new SetValueHandler(SetOverride), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(224, "ValueTransformer", 232, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValueTransformer), new SetValueHandler(SetValueTransformer), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema2, - uixPropertySchema5, - uixPropertySchema6 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs deleted file mode 100644 index ac0c020..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TypeConstraintSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TypeConstraintSchema - { - public static UIXTypeSchema Type; - - private static object GetType(object instanceObj) => ((TypeConstraint)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((TypeConstraint)instanceObj).Type = (TypeSchema)valueObj; - - private static object GetConstraint(object instanceObj) => ((TypeConstraint)instanceObj).Constraint; - - private static void SetConstraint(ref object instanceObj, object valueObj) => ((TypeConstraint)instanceObj).Constraint = (TypeSchema)valueObj; - - private static object Construct() => new TypeConstraint(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(226, "TypeConstraint", null, 153, typeof(TypeConstraint), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(226, "Type", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(226, "Constraint", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetConstraint), new SetValueHandler(SetConstraint), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs deleted file mode 100644 index 099a9ec..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TypeSchemaDefinition -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TypeSchemaDefinition - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(225, "Type", null, 153, typeof(TypeSchema), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs deleted file mode 100644 index 3596e04..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TypeSelectorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TypeSelectorSchema - { - public static UIXTypeSchema Type; - - private static object GetType(object instanceObj) => ((TypeSelector)instanceObj).Type; - - private static void SetType(ref object instanceObj, object valueObj) => ((TypeSelector)instanceObj).Type = (TypeSchema)valueObj; - - private static object GetContentName(object instanceObj) => ((TypeSelector)instanceObj).ContentName; - - private static void SetContentName(ref object instanceObj, object valueObj) => ((TypeSelector)instanceObj).ContentName = (string)valueObj; - - private static object Construct() => new TypeSelector(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(227, "TypeSelector", null, 153, typeof(TypeSelector), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(227, "Type", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetType), new SetValueHandler(SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(227, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentName), new SetValueHandler(SetContentName), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] - { - uixPropertySchema2, - uixPropertySchema1 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs deleted file mode 100644 index e4d8a95..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.TypingHandlerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class TypingHandlerSchema - { - public static UIXTypeSchema Type; - - private static object GetEditableTextData(object instanceObj) => ((TypingHandler)instanceObj).EditableTextData; - - private static void SetEditableTextData(ref object instanceObj, object valueObj) => ((TypingHandler)instanceObj).EditableTextData = (EditableTextData)valueObj; - - private static object GetHandlerStage(object instanceObj) => ((InputHandler)instanceObj).HandlerStage; - - private static void SetHandlerStage(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).HandlerStage = (InputHandlerStage)valueObj; - - private static object GetSubmitOnEnter(object instanceObj) => BooleanBoxes.Box(((TypingHandler)instanceObj).SubmitOnEnter); - - private static void SetSubmitOnEnter(ref object instanceObj, object valueObj) => ((TypingHandler)instanceObj).SubmitOnEnter = (bool)valueObj; - - private static object GetTreatEscapeAsBackspace(object instanceObj) => BooleanBoxes.Box(((TypingHandler)instanceObj).TreatEscapeAsBackspace); - - private static void SetTreatEscapeAsBackspace(ref object instanceObj, object valueObj) => ((TypingHandler)instanceObj).TreatEscapeAsBackspace = (bool)valueObj; - - private static object Construct() => new TypingHandler(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(228, "TypingHandler", null, 110, typeof(TypingHandler), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(228, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEditableTextData), new SetValueHandler(SetEditableTextData), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(228, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(228, "SubmitOnEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSubmitOnEnter), new SetValueHandler(SetSubmitOnEnter), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(228, "TreatEscapeAsBackspace", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTreatEscapeAsBackspace), new SetValueHandler(SetTreatEscapeAsBackspace), false); - UIXEventSchema uixEventSchema = new UIXEventSchema(228, "TypingInputRejected"); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4 - }, null, new EventSchema[1] - { - uixEventSchema - }, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs b/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs deleted file mode 100644 index 47ef6ac..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.UISchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class UISchema - { - public static UIXTypeSchema Type; - - private static object GetProperties(object instanceObj) => ((UIClass)instanceObj).Storage; - - private static object GetLocals(object instanceObj) => ((UIClass)instanceObj).Storage; - - private static object GetInput(object instanceObj) => ((UIClass)instanceObj).EnsureInputHandlerStorage(); - - private static object GetContent(object instanceObj) => ((UIClass)instanceObj).RootItem; - - private static void SetContent(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).SetRootItem((ViewItem)valueObj); - - private static object GetFlippable(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).Flippable); - - private static void SetFlippable(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).Flippable = (bool)valueObj; - - private static void SetBase(ref object instanceObj, object valueObj) - { - UIClass uiClass = (UIClass)instanceObj; - } - - private static object GetScripts(object instanceObj) => (object)null; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(229, "UI", null, -1, typeof(UIClass), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(229, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetProperties), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(229, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetLocals), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(229, "Input", 138, 110, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetInput), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(229, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(229, "Flippable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippable), new SetValueHandler(SetFlippable), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(229, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetBase), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(229, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetScripts), null, false); - Type.Initialize(null, null, new PropertySchema[7] - { - uixPropertySchema6, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1, - uixPropertySchema7 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs deleted file mode 100644 index 6d2ea06..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.UIStateSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Input; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class UIStateSchema - { - public static UIXTypeSchema Type; - - private static object GetCreateInterestOnFocus(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).CreateInterestOnFocus); - - private static void SetCreateInterestOnFocus(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).CreateInterestOnFocus = (bool)valueObj; - - private static object GetCursor(object instanceObj) => ((UIClass)instanceObj).Cursor; - - private static void SetCursor(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).Cursor = (CursorID)valueObj; - - private static object GetDirectKeyFocus(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).DirectKeyFocus); - - private static object GetDirectMouseFocus(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).DirectMouseFocus); - - private static object GetFocusInterestTarget(object instanceObj) => ((UIClass)instanceObj).FocusInterestTarget; - - private static void SetFocusInterestTarget(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).FocusInterestTarget = (ViewItem)valueObj; - - private static object GetFocusInterestTargetMargins(object instanceObj) => ((UIClass)instanceObj).FocusInterestTargetMargins; - - private static void SetFocusInterestTargetMargins(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).FocusInterestTargetMargins = (Inset)valueObj; - - private static object GetKeyFocus(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).KeyFocus); - - private static object GetKeyFocusOnMouseDown(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).KeyFocusOnMouseDown); - - private static void SetKeyFocusOnMouseDown(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).KeyFocusOnMouseDown = (bool)valueObj; - - private static object GetKeyFocusOnMouseEnter(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).KeyFocusOnMouseEnter); - - private static void SetKeyFocusOnMouseEnter(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).KeyFocusOnMouseEnter = (bool)valueObj; - - private static object GetKeyInteractive(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).KeyInteractive); - - private static void SetKeyInteractive(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).KeyInteractive = (bool)valueObj; - - private static object GetMouseFocus(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).MouseFocus); - - private static object GetMouseInteractive(object instanceObj) => ((UIClass)instanceObj).MouseInteractive; - - private static void SetMouseInteractive(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).SetMouseInteractive((bool)valueObj, true); - - private static object GetEnabled(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).Enabled); - - private static void SetEnabled(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).Enabled = (bool)valueObj; - - private static object GetFullyEnabled(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).FullyEnabled); - - private static object GetAllowDoubleClicks(object instanceObj) => BooleanBoxes.Box(((UIClass)instanceObj).AllowDoubleClicks); - - private static void SetAllowDoubleClicks(ref object instanceObj, object valueObj) => ((UIClass)instanceObj).AllowDoubleClicks = (bool)valueObj; - - private static object GetPaintOrder(object instanceObj) => (int)((UIClass)instanceObj).PaintOrder; - - private static void SetPaintOrder(ref object instanceObj, object valueObj) - { - UIClass uiClass = (UIClass)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - uiClass.PaintOrder = (uint)num; - } - - private static object CallDisposeOwnedObjectObject(object instanceObj, object[] parameters) - { - UIClass uiClass = (UIClass)instanceObj; - object parameter = parameters[0]; - if (parameter == null) - return null; - if (!(parameter is IDisposableObject disposable)) - { - ErrorManager.ReportError("Attempt to dispose an object '{0}' that isn't disposable", TypeSchema.NameFromInstance(parameter)); - return null; - } - if (!uiClass.UnregisterDisposable(ref disposable)) - { - ErrorManager.ReportError("Attempt to dispose an object '{0}' that '{1}' doesn't own", TypeSchema.NameFromInstance(disposable), uiClass.TypeSchema.Name); - return null; - } - disposable.Dispose(uiClass); - return null; - } - - private static object CallNavigateInto(object instanceObj, object[] parameters) - { - ((UIClass)instanceObj).NavigateInto(); - return null; - } - - private static object CallNavigateIntoBoolean(object instanceObj, object[] parameters) - { - ((UIClass)instanceObj).NavigateInto((bool)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(230, "UIState", null, -1, typeof(UIClass), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(230, "CreateInterestOnFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCreateInterestOnFocus), new SetValueHandler(SetCreateInterestOnFocus), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(230, "Cursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCursor), new SetValueHandler(SetCursor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(230, "DirectKeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDirectKeyFocus), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(230, "DirectMouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDirectMouseFocus), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(230, "FocusInterestTarget", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFocusInterestTarget), new SetValueHandler(SetFocusInterestTarget), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(230, "FocusInterestTargetMargins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFocusInterestTargetMargins), new SetValueHandler(SetFocusInterestTargetMargins), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(230, "KeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocus), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(230, "KeyFocusOnMouseDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusOnMouseDown), new SetValueHandler(SetKeyFocusOnMouseDown), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(230, "KeyFocusOnMouseEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusOnMouseEnter), new SetValueHandler(SetKeyFocusOnMouseEnter), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(230, "KeyInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyInteractive), new SetValueHandler(SetKeyInteractive), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(230, "MouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseFocus), null, false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(230, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractive), new SetValueHandler(SetMouseInteractive), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(230, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(230, "FullyEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFullyEnabled), null, false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(230, "AllowDoubleClicks", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowDoubleClicks), new SetValueHandler(SetAllowDoubleClicks), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(230, "PaintOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetPaintOrder), new SetValueHandler(SetPaintOrder), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(230, "DisposeOwnedObject", new short[1] - { - 153 - }, 240, new InvokeHandler(CallDisposeOwnedObjectObject), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(230, "NavigateInto", null, 240, new InvokeHandler(CallNavigateInto), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(230, "NavigateInto", new short[1] - { - 15 - }, 240, new InvokeHandler(CallNavigateIntoBoolean), false); - Type.Initialize(null, null, new PropertySchema[16] - { - uixPropertySchema15, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3, - uixPropertySchema4, - uixPropertySchema13, - uixPropertySchema5, - uixPropertySchema6, - uixPropertySchema14, - uixPropertySchema7, - uixPropertySchema8, - uixPropertySchema9, - uixPropertySchema10, - uixPropertySchema11, - uixPropertySchema12, - uixPropertySchema16 - }, new MethodSchema[3] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs deleted file mode 100644 index f47e440..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ValueRangeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.ModelItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ValueRangeSchema - { - public static UIXTypeSchema Type; - - private static object GetObjectValue(object instanceObj) => ((IUIValueRange)instanceObj).ObjectValue; - - private static object GetHasPreviousValue(object instanceObj) => BooleanBoxes.Box(((IUIValueRange)instanceObj).HasPreviousValue); - - private static object GetHasNextValue(object instanceObj) => BooleanBoxes.Box(((IUIValueRange)instanceObj).HasNextValue); - - private static object CallPreviousValue(object instanceObj, object[] parameters) - { - ((IUIValueRange)instanceObj).PreviousValue(); - return null; - } - - private static object CallNextValue(object instanceObj, object[] parameters) - { - ((IUIValueRange)instanceObj).NextValue(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(231, "ValueRange", null, 153, typeof(IUIValueRange), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(231, "ObjectValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetObjectValue), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(231, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPreviousValue), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(231, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasNextValue), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(231, "PreviousValue", null, 240, new InvokeHandler(CallPreviousValue), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(231, "NextValue", null, 240, new InvokeHandler(CallNextValue), false); - Type.Initialize(null, null, new PropertySchema[3] - { - uixPropertySchema3, - uixPropertySchema2, - uixPropertySchema1 - }, new MethodSchema[2] - { - uixMethodSchema1, - uixMethodSchema2 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs deleted file mode 100644 index 64bd389..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ValueTransformerSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Library; -using Microsoft.Iris.Session; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ValueTransformerSchema - { - public static UIXTypeSchema Type; - - private static object GetAdd(object instanceObj) => ((ValueTransformer)instanceObj).Add; - - private static void SetAdd(ref object instanceObj, object valueObj) => ((ValueTransformer)instanceObj).Add = (float)valueObj; - - private static object GetSubtract(object instanceObj) => ((ValueTransformer)instanceObj).Subtract; - - private static void SetSubtract(ref object instanceObj, object valueObj) => ((ValueTransformer)instanceObj).Subtract = (float)valueObj; - - private static object GetMultiply(object instanceObj) => ((ValueTransformer)instanceObj).Multiply; - - private static void SetMultiply(ref object instanceObj, object valueObj) => ((ValueTransformer)instanceObj).Multiply = (float)valueObj; - - private static object GetDivide(object instanceObj) => ((ValueTransformer)instanceObj).Divide; - - private static void SetDivide(ref object instanceObj, object valueObj) - { - ValueTransformer valueTransformer = (ValueTransformer)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotZero(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - valueTransformer.Divide = num; - } - - private static object GetMod(object instanceObj) => ((ValueTransformer)instanceObj).Mod; - - private static void SetMod(ref object instanceObj, object valueObj) - { - ValueTransformer valueTransformer = (ValueTransformer)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.ValidateNotZero(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - valueTransformer.Mod = num; - } - - private static object GetAbsolute(object instanceObj) => BooleanBoxes.Box(((ValueTransformer)instanceObj).Absolute); - - private static void SetAbsolute(ref object instanceObj, object valueObj) => ((ValueTransformer)instanceObj).Absolute = (bool)valueObj; - - private static object Construct() => new ValueTransformer(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(232, "ValueTransformer", null, 153, typeof(ValueTransformer), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(232, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAdd), new SetValueHandler(SetAdd), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(232, "Subtract", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSubtract), new SetValueHandler(SetSubtract), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(232, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMultiply), new SetValueHandler(SetMultiply), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(232, "Divide", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(GetDivide), new SetValueHandler(SetDivide), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(232, "Mod", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(GetMod), new SetValueHandler(SetMod), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(232, "Absolute", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAbsolute), new SetValueHandler(SetAbsolute), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] - { - uixPropertySchema6, - uixPropertySchema1, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema3, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs deleted file mode 100644 index eaed6bd..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.Vector2Schema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using System; -using System.Globalization; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class Vector2Schema - { - public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); - public static UIXTypeSchema Type; - - private static object GetX(object instanceObj) => ((Vector2)instanceObj).X; - - private static void SetX(ref object instanceObj, object valueObj) - { - Vector2 vector2 = (Vector2)instanceObj; - float num = (float)valueObj; - vector2.X = num; - instanceObj = vector2; - } - - private static object GetY(object instanceObj) => ((Vector2)instanceObj).Y; - - private static void SetY(ref object instanceObj, object valueObj) - { - Vector2 vector2 = (Vector2)instanceObj; - float num = (float)valueObj; - vector2.Y = num; - instanceObj = vector2; - } - - private static object Construct() => Vector2.Zero; - - private static object ConstructXY(object[] parameters) - { - object instanceObj = Construct(); - SetX(ref instanceObj, parameters[0]); - SetY(ref instanceObj, parameters[1]); - return instanceObj; - } - - private static Result ConvertFromStringXY(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Vector2", result1.Error); - SetX(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Vector2", result2.Error); - SetY(ref instance, valueObj2); - return result2; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Vector2 vector2 = (Vector2)instanceObj; - writer.WriteSingle(vector2.X); - writer.WriteSingle(vector2.Y); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Vector2(reader.ReadSingle(), reader.ReadSingle()); - - private static Result ConvertFromSize(object valueObj, out object instanceObj) - { - Size size = (Size)valueObj; - instanceObj = null; - Vector2 vector2 = new Vector2(size.Width, size.Height); - instanceObj = vector2; - return Result.Success; - } - - private static Result ConvertFromString(object valueObj, out object instanceObj) - { - string s = (string)valueObj; - instanceObj = null; - float result; - if (!float.TryParse(s, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result)) - return Result.Fail(""); - instanceObj = new Vector2() - { - X = result, - Y = result - }; - return Result.Success; - } - - private static Result ConvertFromSingle(object valueObj, out object instanceObj) - { - float num = (float)valueObj; - instanceObj = null; - instanceObj = new Vector2() - { - X = num, - Y = num - }; - return Result.Success; - } - - private static bool IsConversionSupported(TypeSchema fromType) => SingleSchema.Type.IsAssignableFrom(fromType) || SizeSchema.Type.IsAssignableFrom(fromType) || StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (SingleSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSingle(from, out instance); - if (!result.Failed) - return result; - } - if (SizeSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromSize(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - result = ConvertFromString(from, out instance); - if (!result.Failed) - return result; - } - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 2) - { - result = ConvertFromStringXY(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Vector2"); - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - Vector2 vector2_1 = (Vector2)leftObj; - if (op == OperationType.MathNegate) - return -vector2_1; - Vector2 vector2_2 = (Vector2)rightObj; - switch (op - 1) - { - case 0: - return vector2_1 + vector2_2; - case OperationType.MathAdd: - return vector2_1 - vector2_2; - case OperationType.MathSubtract: - return vector2_1 * vector2_2; - case OperationType.MathMultiply: - return vector2_1 / vector2_2; - case OperationType.LogicalOr: - return BooleanBoxes.Box(vector2_1 == vector2_2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(vector2_1 != vector2_2); - default: - return null; - } - } - - private static object CallTryParseStringVector2(object instanceObj, object[] parameters) - { - string parameter1 = (string)parameters[0]; - Vector2 parameter2 = (Vector2)parameters[1]; - object instanceObj1; - return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; - } - - private static Result RangeValidateNotNegative(object value) - { - Vector2 vector2 = (Vector2)value; - return vector2.X < 0.0 || vector2.Y < 0.0 ? Result.Fail("Expecting a non-negative value, but got {0}", vector2.ToString()) : Result.Success; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(233, "Vector2", null, 153, typeof(Vector2), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(233, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(233, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(233, new short[2] - { - 194, - 194 - }, new ConstructHandler(ConstructXY)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(233, "TryParse", new short[2] - { - 208, - 233 - }, 233, new InvokeHandler(CallTryParseStringVector2), true); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[2] - { - uixPropertySchema1, - uixPropertySchema2 - }, new MethodSchema[1] - { - uixMethodSchema - }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs deleted file mode 100644 index 4be97a5..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.Vector3Schema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Data; -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class Vector3Schema - { - public static UIXTypeSchema Type; - - private static object GetX(object instanceObj) => ((Vector3)instanceObj).X; - - private static void SetX(ref object instanceObj, object valueObj) - { - Vector3 vector3 = (Vector3)instanceObj; - float num = (float)valueObj; - vector3.X = num; - instanceObj = vector3; - } - - private static object GetY(object instanceObj) => ((Vector3)instanceObj).Y; - - private static void SetY(ref object instanceObj, object valueObj) - { - Vector3 vector3 = (Vector3)instanceObj; - float num = (float)valueObj; - vector3.Y = num; - instanceObj = vector3; - } - - private static object GetZ(object instanceObj) => ((Vector3)instanceObj).Z; - - private static void SetZ(ref object instanceObj, object valueObj) - { - Vector3 vector3 = (Vector3)instanceObj; - float num = (float)valueObj; - vector3.Z = num; - instanceObj = vector3; - } - - private static object Construct() => Vector3.Zero; - - private static object ConstructXYZ(object[] parameters) - { - object instanceObj = Construct(); - SetX(ref instanceObj, parameters[0]); - SetY(ref instanceObj, parameters[1]); - SetZ(ref instanceObj, parameters[2]); - return instanceObj; - } - - private static Result ConvertFromStringXYZ(string[] splitString, out object instance) - { - instance = Construct(); - object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, null, out valueObj1); - if (result1.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result1.Error); - SetX(ref instance, valueObj1); - object valueObj2; - Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); - if (result2.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result2.Error); - SetY(ref instance, valueObj2); - object valueObj3; - Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, null, out valueObj3); - if (result3.Failed) - return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result3.Error); - SetZ(ref instance, valueObj3); - return result3; - } - - private static void EncodeBinary(ByteCodeWriter writer, object instanceObj) - { - Vector3 vector3 = (Vector3)instanceObj; - writer.WriteSingle(vector3.X); - writer.WriteSingle(vector3.Y); - writer.WriteSingle(vector3.Z); - } - - private static object DecodeBinary(ByteCodeReader reader) => new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); - - private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); - - private static Result TryConvertFrom( - object from, - TypeSchema fromType, - out object instance) - { - Result result = Result.Fail("Unsupported"); - instance = null; - if (StringSchema.Type.IsAssignableFrom(fromType)) - { - string[] splitString = StringUtility.SplitAndTrim(',', (string)from); - if (splitString.Length == 3) - { - result = ConvertFromStringXYZ(splitString, out instance); - if (!result.Failed) - return result; - } - else - result = Result.Fail("Unable to convert \"{0}\" to type '{1}'", from.ToString(), "Vector3"); - } - return result; - } - - private static bool IsOperationSupported(OperationType op) - { - switch (op) - { - case OperationType.MathAdd: - case OperationType.MathSubtract: - case OperationType.MathMultiply: - case OperationType.MathDivide: - case OperationType.RelationalEquals: - case OperationType.RelationalNotEquals: - case OperationType.MathNegate: - return true; - default: - return false; - } - } - - private static object ExecuteOperation(object leftObj, object rightObj, OperationType op) - { - Vector3 vector3_1 = (Vector3)leftObj; - if (op == OperationType.MathNegate) - return -vector3_1; - Vector3 vector3_2 = (Vector3)rightObj; - switch (op - 1) - { - case 0: - return vector3_1 + vector3_2; - case OperationType.MathAdd: - return vector3_1 - vector3_2; - case OperationType.MathSubtract: - return vector3_1 * vector3_2; - case OperationType.MathMultiply: - return vector3_1 / vector3_2; - case OperationType.LogicalOr: - return BooleanBoxes.Box(vector3_1 == vector3_2); - case OperationType.RelationalEquals: - return BooleanBoxes.Box(vector3_1 != vector3_2); - default: - return null; - } - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(234, "Vector3", null, 153, typeof(Vector3), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(234, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(234, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(234, "Z", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetZ), new SetValueHandler(SetZ), false); - UIXConstructorSchema constructorSchema = new UIXConstructorSchema(234, new short[3] - { - 194, - 194, - 194 - }, new ConstructHandler(ConstructXYZ)); - Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] - { - constructorSchema - }, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema3 - }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs deleted file mode 100644 index 42d5e0c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.VideoElementInstanceSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.RenderAPI.VideoPlayback; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class VideoElementInstanceSchema - { - public static UIXTypeSchema Type; - - private static void SetVideoStream(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Video", (IUIVideoStream)valueObj); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(237, "VideoElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(237, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetVideoStream), false); - Type.Initialize(null, null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs deleted file mode 100644 index 3581869..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.VideoElementSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Render; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class VideoElementSchema - { - public static UIXTypeSchema Type; - - private static void SetVideoStream(ref object instanceObj, object valueObj) - { - VideoElement videoElement = (VideoElement)instanceObj; - Microsoft.Iris.VideoStream videoStream = (Microsoft.Iris.VideoStream)valueObj; - if (videoStream == null) - return; - videoElement.VideoStream = videoStream.RenderStream; - } - - private static object Construct() => new VideoElement(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(236, "VideoElement", null, 77, typeof(VideoElement), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(236, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetVideoStream), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs deleted file mode 100644 index bbd3b3f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.VideoSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Drawing; -using Microsoft.Iris.RenderAPI.VideoPlayback; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class VideoSchema - { - public static UIXTypeSchema Type; - - private static object GetChildren(object instanceObj) => ViewItemSchema.ListProxy.GetChildren((ViewItem)instanceObj); - - private static object GetVideoStream(object instanceObj) => ((Video)instanceObj).VideoStream; - - private static void SetVideoStream(ref object instanceObj, object valueObj) => ((Video)instanceObj).VideoStream = (IUIVideoStream)valueObj; - - private static object GetLetterboxColor(object instanceObj) => ((Video)instanceObj).LetterboxColor; - - private static void SetLetterboxColor(ref object instanceObj, object valueObj) => ((Video)instanceObj).LetterboxColor = (Color)valueObj; - - private static object Construct() => new Video(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(235, "Video", null, 239, typeof(Video), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(235, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(235, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVideoStream), new SetValueHandler(SetVideoStream), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(235, "LetterboxColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLetterboxColor), new SetValueHandler(SetLetterboxColor), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] - { - uixPropertySchema1, - uixPropertySchema3, - uixPropertySchema2 - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs deleted file mode 100644 index ff30ba4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.VideoStreamSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class VideoStreamSchema - { - public static UIXTypeSchema Type; - - private static object GetStreamID(object instanceObj) => ((VideoStream)instanceObj).StreamID; - - private static object Construct() => new VideoStream(); - - public static void Pass1Initialize() => Type = new UIXTypeSchema(238, "VideoStream", null, 153, typeof(VideoStream), UIXTypeFlags.Immutable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(238, "StreamID", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStreamID), null, false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] - { - uixPropertySchema - }, null, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs deleted file mode 100644 index c9ae37b..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs +++ /dev/null @@ -1,456 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.ViewItemSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Animations; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Library; -using Microsoft.Iris.Navigation; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; -using System; -using System.Collections; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class ViewItemSchema - { - public static UIXTypeSchema Type; - - private static object GetAlpha(object instanceObj) => ((ViewItem)instanceObj).Alpha; - - private static void SetAlpha(ref object instanceObj, object valueObj) - { - ViewItem viewItem = (ViewItem)instanceObj; - float num = (float)valueObj; - Result result = SingleSchema.Validate0to1(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - viewItem.Alpha = num; - } - - private static object GetAnimations(object instanceObj) => ListProxy.GetAnimation((ViewItem)instanceObj); - - private static object GetCenterPointPercent(object instanceObj) => ((ViewItem)instanceObj).CenterPointPercent; - - private static void SetCenterPointPercent(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).CenterPointPercent = (Vector3)valueObj; - - private static object GetDebugOutline(object instanceObj) => ((ViewItem)instanceObj).DebugOutline; - - private static void SetDebugOutline(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).DebugOutline = (Color)valueObj; - - private static object GetFocusOrder(object instanceObj) => ((ViewItem)instanceObj).FocusOrder; - - private static void SetFocusOrder(ref object instanceObj, object valueObj) - { - ViewItem viewItem = (ViewItem)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - viewItem.FocusOrder = num; - } - - private static object GetAlignment(object instanceObj) => ((ViewItem)instanceObj).Alignment; - - private static void SetAlignment(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Alignment = (ItemAlignment)valueObj; - - private static object GetChildAlignment(object instanceObj) => ((ViewItem)instanceObj).ChildAlignment; - - private static void SetChildAlignment(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).ChildAlignment = (ItemAlignment)valueObj; - - private static object GetLayout(object instanceObj) => ((ViewItem)instanceObj).Layout; - - private static void SetLayout(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Layout = (ILayout)valueObj; - - private static void SetLayoutInput(ref object instanceObj, object valueObj) - { - ViewItem viewItem = (ViewItem)instanceObj; - ILayoutInput layoutInput = (ILayoutInput)valueObj; - if (layoutInput == null) - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "LayoutInput"); - else - viewItem.LayoutInput = layoutInput; - } - - private static object GetLayoutOutput(object instanceObj) => ((ViewItem)instanceObj).LayoutOutput; - - private static object GetMargins(object instanceObj) => ((ViewItem)instanceObj).Margins; - - private static void SetMargins(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Margins = (Inset)valueObj; - - private static object GetMaximumSize(object instanceObj) => ((ViewItem)instanceObj).MaximumSizeObject; - - private static void SetMaximumSize(ref object instanceObj, object valueObj) - { - ViewItem viewItem = (ViewItem)instanceObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - viewItem.MaximumSizeObject = valueObj; - } - - private static object GetMinimumSize(object instanceObj) => ((ViewItem)instanceObj).MinimumSizeObject; - - private static void SetMinimumSize(ref object instanceObj, object valueObj) - { - ViewItem viewItem = (ViewItem)instanceObj; - Result result = SizeSchema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - viewItem.MinimumSizeObject = valueObj; - } - - private static object GetMouseInteractive(object instanceObj) => BooleanBoxes.Box(((ViewItem)instanceObj).MouseInteractive); - - private static void SetMouseInteractive(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).MouseInteractive = (bool)valueObj; - - private static object GetName(object instanceObj) => ((ViewItem)instanceObj).Name; - - private static void SetName(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Name = (string)valueObj; - - private static object GetNavigation(object instanceObj) => ((ViewItem)instanceObj).Navigation; - - private static void SetNavigation(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Navigation = (NavigationPolicies)valueObj; - - private static object GetPadding(object instanceObj) => ((ViewItem)instanceObj).Padding; - - private static void SetPadding(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Padding = (Inset)valueObj; - - private static object GetRotation(object instanceObj) => ((ViewItem)instanceObj).Rotation; - - private static void SetRotation(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Rotation = (Rotation)valueObj; - - private static object GetScale(object instanceObj) => ((ViewItem)instanceObj).Scale; - - private static void SetScale(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Scale = (Vector3)valueObj; - - private static object GetSharedSize(object instanceObj) => ((ViewItem)instanceObj).SharedSize; - - private static void SetSharedSize(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).SharedSize = (SharedSize)valueObj; - - private static object GetSharedSizePolicy(object instanceObj) => ((ViewItem)instanceObj).SharedSizePolicy; - - private static void SetSharedSizePolicy(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).SharedSizePolicy = (SharedSizePolicy)valueObj; - - private static object GetVisible(object instanceObj) => BooleanBoxes.Box(((ViewItem)instanceObj).Visible); - - private static void SetVisible(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Visible = (bool)valueObj; - - private static object GetBackground(object instanceObj) => ((ViewItem)instanceObj).Background; - - private static void SetBackground(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Background = (Color)valueObj; - - private static object GetCamera(object instanceObj) => ((ViewItem)instanceObj).Camera; - - private static void SetCamera(ref object instanceObj, object valueObj) => ((ViewItem)instanceObj).Camera = (Camera)valueObj; - - private static object CallAttachAnimationIAnimation(object instanceObj, object[] parameters) - { - ViewItem viewItem = (ViewItem)instanceObj; - IAnimationProvider parameter = (IAnimationProvider)parameters[0]; - if (parameter == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - viewItem.AttachAnimation(parameter); - return null; - } - - private static object CallAttachAnimationIAnimationAnimationHandle( - object instanceObj, - object[] parameters) - { - ViewItem viewItem = (ViewItem)instanceObj; - IAnimationProvider parameter1 = (IAnimationProvider)parameters[0]; - AnimationHandle parameter2 = (AnimationHandle)parameters[1]; - if (parameter1 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - if (parameter2 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "handle"); - return null; - } - viewItem.AttachAnimation(parameter1, parameter2); - return null; - } - - private static object CallDetachAnimationAnimationEventType( - object instanceObj, - object[] parameters) - { - ((ViewItem)instanceObj).DetachAnimation((AnimationEventType)parameters[0]); - return null; - } - - private static object CallPlayAnimationIAnimation(object instanceObj, object[] parameters) - { - ViewItem viewItem = (ViewItem)instanceObj; - IAnimationProvider parameter = (IAnimationProvider)parameters[0]; - if (parameter == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - viewItem.PlayAnimation(parameter, null); - return null; - } - - private static object CallPlayAnimationIAnimationAnimationHandle( - object instanceObj, - object[] parameters) - { - ViewItem viewItem = (ViewItem)instanceObj; - IAnimationProvider parameter1 = (IAnimationProvider)parameters[0]; - AnimationHandle parameter2 = (AnimationHandle)parameters[1]; - if (parameter1 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "animation"); - return null; - } - if (parameter2 == null) - { - ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "handle"); - return null; - } - viewItem.PlayAnimation(parameter1, parameter2); - return null; - } - - private static object CallPlayAnimationAnimationEventType( - object instanceObj, - object[] parameters) - { - ((ViewItem)instanceObj).PlayAnimation((AnimationEventType)parameters[0]); - return null; - } - - private static object CallForceContentChange(object instanceObj, object[] parameters) - { - ((ViewItem)instanceObj).ForceContentChange(); - return null; - } - - private static object CallSnapshotPosition(object instanceObj, object[] parameters) => ((ViewItem)instanceObj).SnapshotPosition(); - - private static object CallNavigateInto(object instanceObj, object[] parameters) - { - ((ViewItem)instanceObj).NavigateInto(); - return null; - } - - private static object CallNavigateIntoBoolean(object instanceObj, object[] parameters) - { - ((ViewItem)instanceObj).NavigateInto((bool)parameters[0]); - return null; - } - - private static object CallScrollIntoView(object instanceObj, object[] parameters) - { - ((ViewItem)instanceObj).ScrollIntoView(); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(239, "ViewItem", null, -1, typeof(ViewItem), UIXTypeFlags.Disposable); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(239, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(GetAlpha), new SetValueHandler(SetAlpha), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(239, "Animations", 138, 104, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetAnimations), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(239, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCenterPointPercent), new SetValueHandler(SetCenterPointPercent), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(239, "DebugOutline", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDebugOutline), new SetValueHandler(SetDebugOutline), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(239, "FocusOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetFocusOrder), new SetValueHandler(SetFocusOrder), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(239, "Alignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAlignment), new SetValueHandler(SetAlignment), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(239, "ChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChildAlignment), new SetValueHandler(SetChildAlignment), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(239, "Layout", 132, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLayout), new SetValueHandler(SetLayout), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(239, "LayoutInput", 133, -1, ExpressionRestriction.None, false, null, true, null, new SetValueHandler(SetLayoutInput), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(239, "LayoutOutput", 134, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLayoutOutput), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(239, "Margins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMargins), new SetValueHandler(SetMargins), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(239, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(239, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(239, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractive), new SetValueHandler(SetMouseInteractive), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(239, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(239, "Navigation", 151, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNavigation), new SetValueHandler(SetNavigation), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(239, "Padding", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPadding), new SetValueHandler(SetPadding), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(239, "Rotation", 176, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRotation), new SetValueHandler(SetRotation), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(239, "Scale", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScale), new SetValueHandler(SetScale), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(239, "SharedSize", 190, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSharedSize), new SetValueHandler(SetSharedSize), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(239, "SharedSizePolicy", 191, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSharedSizePolicy), new SetValueHandler(SetSharedSizePolicy), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(239, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), new SetValueHandler(SetVisible), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(239, "Background", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBackground), new SetValueHandler(SetBackground), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(239, "Camera", 21, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCamera), new SetValueHandler(SetCamera), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(239, "AttachAnimation", new short[1] - { - 104 - }, 240, new InvokeHandler(CallAttachAnimationIAnimation), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(239, "AttachAnimation", new short[2] - { - 104, - 11 - }, 240, new InvokeHandler(CallAttachAnimationIAnimationAnimationHandle), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(239, "DetachAnimation", new short[1] - { - 10 - }, 240, new InvokeHandler(CallDetachAnimationAnimationEventType), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(239, "PlayAnimation", new short[1] - { - 104 - }, 240, new InvokeHandler(CallPlayAnimationIAnimation), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(239, "PlayAnimation", new short[2] - { - 104, - 11 - }, 240, new InvokeHandler(CallPlayAnimationIAnimationAnimationHandle), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(239, "PlayAnimation", new short[1] - { - 10 - }, 240, new InvokeHandler(CallPlayAnimationAnimationEventType), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(239, "ForceContentChange", null, 240, new InvokeHandler(CallForceContentChange), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(239, "SnapshotPosition", null, 171, new InvokeHandler(CallSnapshotPosition), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(239, "NavigateInto", null, 240, new InvokeHandler(CallNavigateInto), false); - UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(239, "NavigateInto", new short[1] - { - 15 - }, 240, new InvokeHandler(CallNavigateIntoBoolean), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(239, "ScrollIntoView", null, 240, new InvokeHandler(CallScrollIntoView), false); - Type.Initialize(null, null, new PropertySchema[24] - { - uixPropertySchema6, - uixPropertySchema1, - uixPropertySchema2, - uixPropertySchema23, - uixPropertySchema24, - uixPropertySchema3, - uixPropertySchema7, - uixPropertySchema4, - uixPropertySchema5, - uixPropertySchema8, - uixPropertySchema9, - uixPropertySchema10, - uixPropertySchema11, - uixPropertySchema12, - uixPropertySchema13, - uixPropertySchema14, - uixPropertySchema15, - uixPropertySchema16, - uixPropertySchema17, - uixPropertySchema18, - uixPropertySchema19, - uixPropertySchema20, - uixPropertySchema21, - uixPropertySchema22 - }, new MethodSchema[11] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4, - uixMethodSchema5, - uixMethodSchema6, - uixMethodSchema7, - uixMethodSchema8, - uixMethodSchema9, - uixMethodSchema10, - uixMethodSchema11 - }, null, null, null, null, null, null, null, null); - } - - public class ListProxy : IList, ICollection, IEnumerable - { - private ViewItem _subject; - private ViewItemSchema.ListProxyMode _mode; - private static ViewItemSchema.ListProxy s_shared = new ViewItemSchema.ListProxy(); - - public static IList GetChildren(ViewItem subject) - { - s_shared.SetSubject(subject, ListProxyMode.Children); - return s_shared; - } - - public static IList GetAnimation(ViewItem subject) - { - s_shared.SetSubject(subject, ListProxyMode.Animation); - return s_shared; - } - - public int Add(object value) - { - switch (this._mode) - { - case ListProxyMode.Children: - this._subject.Children.Add((Microsoft.Iris.Library.TreeNode)value); - break; - case ListProxyMode.Animation: - if (value != null) - { - this._subject.AttachAnimation((IAnimationProvider)value); - break; - } - break; - } - this._subject = null; - return 0; - } - - public void Clear() => throw new NotImplementedException(); - - public bool Contains(object value) => throw new NotImplementedException(); - - public int IndexOf(object value) => throw new NotImplementedException(); - - public void Insert(int index, object value) => throw new NotImplementedException(); - - public void Remove(object value) => throw new NotImplementedException(); - - public void RemoveAt(int index) => throw new NotImplementedException(); - - public bool IsFixedSize => throw new NotImplementedException(); - - public bool IsReadOnly => throw new NotImplementedException(); - - public object this[int index] - { - get => throw new NotImplementedException(); - set => throw new NotImplementedException(); - } - - public void CopyTo(Array array, int index) => throw new NotImplementedException(); - - public int Count => throw new NotImplementedException(); - - public bool IsSynchronized => throw new NotImplementedException(); - - public object SyncRoot => throw new NotImplementedException(); - - public IEnumerator GetEnumerator() => throw new NotImplementedException(); - - private void SetSubject(ViewItem subject, ViewItemSchema.ListProxyMode mode) - { - this._subject = subject; - this._mode = mode; - } - - private ListProxy() - { - } - } - - public enum ListProxyMode - { - Children, - Animation, - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs deleted file mode 100644 index 611c398..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.VoidSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup.UIX -{ - public static class VoidSchema - { - public static UIXTypeSchema Type; - - public static void Pass1Initialize() => Type = new UIXTypeSchema(240, "Void", "void", -1, typeof(void), UIXTypeFlags.None); - - public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs deleted file mode 100644 index fc73d50..0000000 --- a/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIX.WindowSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Render; -using Microsoft.Iris.Session; -using Microsoft.Iris.UI; - -namespace Microsoft.Iris.Markup.UIX -{ - public static class WindowSchema - { - public static UIXTypeSchema Type; - - private static object GetMainWindow(object instanceObj) => UISession.Default.Form; - - private static object GetCaption(object instanceObj) => ((UIForm)instanceObj).Caption; - - private static void SetCaption(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).Caption = (string)valueObj; - - private static object GetWindowState(object instanceObj) => ((Form)instanceObj).WindowState; - - private static void SetWindowState(ref object instanceObj, object valueObj) => ((Form)instanceObj).WindowState = (Microsoft.Iris.WindowState)valueObj; - - private static object GetActive(object instanceObj) => BooleanBoxes.Box(((Form)instanceObj).ActivationState); - - private static object GetMouseActive(object instanceObj) => BooleanBoxes.Box(!((UIForm)instanceObj).MouseIsIdle); - - private static object GetShowWindowFrame(object instanceObj) => BooleanBoxes.Box(((UIForm)instanceObj).ShowWindowFrame); - - private static void SetShowWindowFrame(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).ShowWindowFrame = (bool)valueObj; - - private static object GetHideMouseOnIdle(object instanceObj) => BooleanBoxes.Box(((UIForm)instanceObj).HideMouseOnIdle); - - private static void SetHideMouseOnIdle(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).HideMouseOnIdle = (bool)valueObj; - - private static object GetMouseIdleTimeout(object instanceObj) => ((UIForm)instanceObj).MouseIdleTimeout; - - private static void SetMouseIdleTimeout(ref object instanceObj, object valueObj) - { - UIForm uiForm = (UIForm)instanceObj; - int num = (int)valueObj; - Result result = Int32Schema.ValidateNotNegative(valueObj); - if (result.Failed) - ErrorManager.ReportError(result.Error); - else - uiForm.MouseIdleTimeout = num; - } - - private static object GetAlwaysOnTop(object instanceObj) => BooleanBoxes.Box(((UIForm)instanceObj).AlwaysOnTop); - - private static void SetAlwaysOnTop(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).AlwaysOnTop = (bool)valueObj; - - private static object GetShowInTaskbar(object instanceObj) => BooleanBoxes.Box(((UIForm)instanceObj).ShowInTaskbar); - - private static void SetShowInTaskbar(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).ShowInTaskbar = (bool)valueObj; - - private static object GetPreventInterruption(object instanceObj) => BooleanBoxes.Box(((UIForm)instanceObj).PreventInterruption); - - private static void SetPreventInterruption(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).PreventInterruption = (bool)valueObj; - - private static object GetMaximizeMode(object instanceObj) => ((UIForm)instanceObj).MaximizeMode; - - private static void SetMaximizeMode(ref object instanceObj, object valueObj) => ((UIForm)instanceObj).MaximizeMode = (MaximizeMode)valueObj; - - private static object GetClientSize(object instanceObj) => ((Form)instanceObj).ClientSize; - - private static void SetClientSize(ref object instanceObj, object valueObj) => ((Form)instanceObj).ClientSize = (Size)valueObj; - - private static object GetPosition(object instanceObj) => ((Form)instanceObj).Position; - - private static void SetPosition(ref object instanceObj, object valueObj) => ((Form)instanceObj).Position = (Point)valueObj; - - private static object GetVisible(object instanceObj) => BooleanBoxes.Box(((Form)instanceObj).Visible); - - private static void SetVisible(ref object instanceObj, object valueObj) => ((Form)instanceObj).Visible = (bool)valueObj; - - private static object Construct() => UISession.Default.Form; - - private static object CallClose(object instanceObj, object[] parameters) - { - ((UIForm)instanceObj).Close(); - return null; - } - - private static object CallForceClose(object instanceObj, object[] parameters) - { - ((Form)instanceObj).ForceClose(); - return null; - } - - private static object CallSaveKeyFocus(object instanceObj, object[] parameters) => ((UIForm)instanceObj).SaveKeyFocus(); - - private static object CallRestoreKeyFocusSavedKeyFocus(object instanceObj, object[] parameters) - { - ((UIForm)instanceObj).RestoreKeyFocus((SavedKeyFocus)parameters[0]); - return null; - } - - public static void Pass1Initialize() => Type = new UIXTypeSchema(241, "Window", null, 153, typeof(UIForm), UIXTypeFlags.None); - - public static void Pass2Initialize() - { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(241, "MainWindow", 241, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMainWindow), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(241, "Caption", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCaption), new SetValueHandler(SetCaption), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(241, "WindowState", 242, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWindowState), new SetValueHandler(SetWindowState), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(241, "Active", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetActive), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(241, "MouseActive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseActive), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(241, "ShowWindowFrame", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowWindowFrame), new SetValueHandler(SetShowWindowFrame), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(241, "HideMouseOnIdle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHideMouseOnIdle), new SetValueHandler(SetHideMouseOnIdle), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(241, "MouseIdleTimeout", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMouseIdleTimeout), new SetValueHandler(SetMouseIdleTimeout), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(241, "AlwaysOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAlwaysOnTop), new SetValueHandler(SetAlwaysOnTop), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(241, "ShowInTaskbar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowInTaskbar), new SetValueHandler(SetShowInTaskbar), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(241, "PreventInterruption", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPreventInterruption), new SetValueHandler(SetPreventInterruption), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(241, "MaximizeMode", 146, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaximizeMode), new SetValueHandler(SetMaximizeMode), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(241, "ClientSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClientSize), new SetValueHandler(SetClientSize), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(241, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(241, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), new SetValueHandler(SetVisible), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(241, "Close", null, 240, new InvokeHandler(CallClose), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(241, "ForceClose", null, 240, new InvokeHandler(CallForceClose), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(241, "SaveKeyFocus", null, 177, new InvokeHandler(CallSaveKeyFocus), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(241, "RestoreKeyFocus", new short[1] - { - 177 - }, 240, new InvokeHandler(CallRestoreKeyFocusSavedKeyFocus), false); - Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[15] - { - uixPropertySchema4, - uixPropertySchema9, - uixPropertySchema2, - uixPropertySchema13, - uixPropertySchema7, - uixPropertySchema1, - uixPropertySchema12, - uixPropertySchema5, - uixPropertySchema8, - uixPropertySchema14, - uixPropertySchema11, - uixPropertySchema10, - uixPropertySchema6, - uixPropertySchema15, - uixPropertySchema3 - }, new MethodSchema[4] - { - uixMethodSchema1, - uixMethodSchema2, - uixMethodSchema3, - uixMethodSchema4 - }, null, null, null, null, null, null, null, null); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXConstructorSchema.cs b/UIX/Microsoft/Iris/Markup/UIXConstructorSchema.cs deleted file mode 100644 index d8ac12c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXConstructorSchema.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXConstructorSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class UIXConstructorSchema : ConstructorSchema - { - private TypeSchema[] _parameterTypes; - private ConstructHandler _construct; - - public UIXConstructorSchema( - short ownerTypeID, - short[] parameterTypeIDs, - ConstructHandler construct) - : base(UIXTypes.MapIDToType(ownerTypeID)) - { - this._parameterTypes = UIXTypes.MapIDsToTypes(parameterTypeIDs); - this._construct = construct; - } - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public override object Construct(object[] parameters) => this._construct(parameters); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXEnumData.cs b/UIX/Microsoft/Iris/Markup/UIXEnumData.cs deleted file mode 100644 index 1c6f0aa..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXEnumData.cs +++ /dev/null @@ -1,819 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXEnumData -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class UIXEnumData - { - public static Map GetAccessibleRoleEnumData() => new Map(64) - { - ["Alert"] = 8, - ["Animation"] = 54, - ["Application"] = 14, - ["Border"] = 19, - ["ButtonDropDown"] = 56, - ["ButtonDropDownGrid"] = 58, - ["ButtonMenu"] = 57, - ["Caret"] = 7, - ["Character"] = 32, - ["Chart"] = 17, - ["CheckButton"] = 44, - ["Client"] = 10, - ["Clock"] = 61, - ["Column"] = 27, - ["ColumnHeader"] = 25, - ["ComboBox"] = 46, - ["Cursor"] = 6, - ["Diagram"] = 53, - ["Dial"] = 49, - ["Dialog"] = 18, - ["Document"] = 15, - ["DropList"] = 47, - ["Equation"] = 55, - ["Graphic"] = 40, - ["Grip"] = 4, - ["Grouping"] = 20, - ["HelpBalloon"] = 31, - ["HotkeyField"] = 50, - ["IPAddress"] = 63, - ["Indicator"] = 39, - ["Link"] = 30, - ["List"] = 33, - ["ListItem"] = 34, - ["MenuBar"] = 2, - ["MenuItem"] = 12, - ["MenuPopup"] = 11, - ["None"] = 0, - ["Outline"] = 35, - ["OutlineButton"] = 64, - ["OutlineItem"] = 36, - ["PageTab"] = 37, - ["PageTabList"] = 60, - ["Pane"] = 16, - ["ProgressBar"] = 48, - ["PropertyPage"] = 38, - ["PushButton"] = 43, - ["RadioButton"] = 45, - ["Row"] = 28, - ["RowHeader"] = 26, - ["ScrollBar"] = 3, - ["Separator"] = 21, - ["Slider"] = 51, - ["Sound"] = 5, - ["SpinButton"] = 52, - ["SplitButton"] = 62, - ["StaticText"] = 41, - ["StatusBar"] = 23, - ["Table"] = 24, - ["Text"] = 42, - ["TitleBar"] = 1, - ["ToolBar"] = 22, - ["ToolTip"] = 13, - ["Whitespace"] = 59, - ["Window"] = 9 - }; - - public static Map GetAlignmentEnumData() => new Map(5) - { - ["Center"] = 2, - ["Far"] = 3, - ["Fill"] = 4, - ["Near"] = 1, - ["Unspecified"] = 0 - }; - - public static Map GetAnimationEventTypeEnumData() => new Map(12) - { - ["Alpha"] = 6, - ["ContentChangeHide"] = 10, - ["ContentChangeShow"] = 9, - ["GainFocus"] = 7, - ["Hide"] = 1, - ["Idle"] = 11, - ["LoseFocus"] = 8, - ["Move"] = 2, - ["Rotate"] = 5, - ["Scale"] = 4, - ["Show"] = 0, - ["Size"] = 3 - }; - - public static Map GetInputHandlerTransitionEnumData() => new Map(2) - { - ["Down"] = 0, - ["Up"] = 1 - }; - - public static Map GetInputHandlerModifiersEnumData() => new Map(6) - { - ["All"] = 15, - ["Alt"] = 4, - ["Ctrl"] = 1, - ["None"] = 0, - ["Shift"] = 2, - ["Windows"] = 8 - }; - - public static Map GetClickTypeEnumData() => new Map(12) - { - ["Any"] = sbyte.MaxValue, - ["EnterKey"] = 16, - ["GamePad"] = 96, - ["GamePadA"] = 32, - ["GamePadStart"] = 64, - ["Key"] = 24, - ["LeftMouse"] = 1, - ["MiddleMouse"] = 4, - ["Mouse"] = 7, - ["None"] = 0, - ["RightMouse"] = 2, - ["SpaceKey"] = 8 - }; - - public static Map GetClickCountEnumData() => new Map(2) - { - ["Double"] = 1, - ["Single"] = 0 - }; - - public static Map GetInvokePriorityEnumData() => new Map(2) - { - ["Low"] = 1, - ["Normal"] = 0 - }; - - public static Map GetCursorEnumData() => new Map(16) - { - ["Arrow"] = 2, - ["Cancel"] = 3, - ["Copy"] = 4, - ["Crosshair"] = 5, - ["Hand"] = 7, - ["IBeam"] = 6, - ["Move"] = 9, - ["No"] = 10, - ["NotSpecified"] = 0, - ["Size"] = 12, - ["SizeNESW"] = 16, - ["SizeNS"] = 13, - ["SizeNWSE"] = 15, - ["SizeWE"] = 14, - ["UpArrow"] = 17, - ["Wait"] = 18 - }; - - public static Map GetDataQueryStatusEnumData() => new Map(5) - { - ["Complete"] = 3, - ["Error"] = 4, - ["Idle"] = 0, - ["ProcessingData"] = 2, - ["RequestingData"] = 1 - }; - - public static Map GetDebugOutlineScopeEnumData() => new Map(4) - { - ["All"] = 3, - ["FlaggedOnly"] = 0, - ["Hosts"] = 2, - ["Input"] = 1 - }; - - public static Map GetDebugLabelFormatEnumData() => new Map(3) - { - ["Full"] = 2, - ["Name"] = 1, - ["None"] = 0 - }; - - public static Map GetDropActionEnumData() => new Map(4) - { - ["All"] = 3, - ["Copy"] = 1, - ["Move"] = 2, - ["None"] = 0 - }; - - public static Map GetBeginDragPolicyEnumData() => new Map(2) - { - ["Down"] = 0, - ["Move"] = 1 - }; - - public static Map GetColorOperationEnumData() => new Map(13) - { - ["Add"] = 0, - ["ColorBurn"] = 6, - ["ColorDodge"] = 5, - ["Darken"] = 4, - ["HardLight"] = 10, - ["Lighten"] = 3, - ["LinearBurn"] = 11, - ["LinearDodge"] = 0, - ["Multiply"] = 2, - ["Overlay"] = 8, - ["Screen"] = 7, - ["SoftLight"] = 9, - ["Subtract"] = 1 - }; - - public static Map GetAlphaOperationEnumData() => new Map(5) - { - ["Add"] = 0, - ["Multiply"] = 2, - ["Source1"] = 3, - ["Source2"] = 4, - ["Subtract"] = 1 - }; - - public static Map GetGaussianBlurModeEnumData() => new Map(3) - { - ["Horizontal"] = 1, - ["Normal"] = 0, - ["Vertical"] = 2 - }; - - public static Map GetEmbossDirectionEnumData() => new Map(2) - { - ["LeftToRight"] = 0, - ["RightToLeft"] = 1 - }; - - public static Map GetColorSchemeEnumData() => new Map(3) - { - ["Default"] = 0, - ["HighContrast1"] = 1, - ["HighContrast2"] = 2 - }; - - public static Map GetGraphicsDeviceTypeEnumData() => new Map(2) - { - ["DX9"] = 1, - ["GDI"] = 0 - }; - - public static Map GetOrientationEnumData() => new Map(2) - { - ["Horizontal"] = 0, - ["Vertical"] = 1 - }; - - public static Map GetRepeatPolicyEnumData() => new Map(4) - { - ["Always"] = 3, - ["Never"] = 0, - ["WhenTooBig"] = 1, - ["WhenTooSmall"] = 2 - }; - - public static Map GetStripAlignmentEnumData() => new Map(3) - { - ["Center"] = 1, - ["Far"] = 2, - ["Near"] = 0 - }; - - public static Map GetMissingItemPolicyEnumData() => new Map(4) - { - ["SizeToAverage"] = 0, - ["SizeToLargest"] = 2, - ["SizeToSmallest"] = 1, - ["Wait"] = 3 - }; - - public static Map GetFocusChangeReasonEnumData() => new Map(6) - { - ["Any"] = 15, - ["Directional"] = 2, - ["Key"] = 6, - ["Mouse"] = 1, - ["Other"] = 8, - ["Tab"] = 4 - }; - - public static Map GetFontStylesEnumData() => new Map(3) - { - ["Bold"] = 1, - ["Italic"] = 2, - ["None"] = 0 - }; - - public static Map GetSizingPolicyEnumData() => new Map(3) - { - ["SizeToChildren"] = 1, - ["SizeToConstraint"] = 2, - ["SizeToContent"] = 0 - }; - - public static Map GetStretchingPolicyEnumData() => new Map(4) - { - ["Fill"] = 1, - ["None"] = 0, - ["Uniform"] = 2, - ["UniformToFill"] = 3 - }; - - public static Map GetHostStatusEnumData() => new Map(4) - { - ["FailureLoadingSource"] = 2, - ["FailureRunningScript"] = 3, - ["LoadingSource"] = 1, - ["Normal"] = 0 - }; - - public static Map GetImageStatusEnumData() => new Map(4) - { - ["Complete"] = 2, - ["Error"] = 3, - ["Loading"] = 1, - ["PendingLoad"] = 0 - }; - - public static Map GetInputHandlerStageEnumData() => new Map(3) - { - ["Bubbled"] = 4, - ["Direct"] = 2, - ["Routed"] = 1 - }; - - public static Map GetInterpolationTypeEnumData() => new Map(9) - { - ["Bezier"] = 6, - ["Cosine"] = 5, - ["EaseIn"] = 7, - ["EaseOut"] = 8, - ["Exp"] = 2, - ["Linear"] = 0, - ["Log"] = 3, - ["SCurve"] = 1, - ["Sine"] = 4 - }; - - public static Map GetKeyHandlerKeyEnumData() => new Map(143) - { - ["A"] = 65, - ["Add"] = 107, - ["Alt"] = 18, - ["Any"] = -1, - ["Apps"] = 93, - ["B"] = 66, - ["Backslash"] = 226, - ["Backspace"] = 8, - ["C"] = 67, - ["CapsLock"] = 20, - ["Clear"] = 12, - ["CloseBrace"] = 221, - ["Comma"] = 188, - ["Control"] = 17, - ["D"] = 68, - ["D0"] = 48, - ["D1"] = 49, - ["D2"] = 50, - ["D3"] = 51, - ["D4"] = 52, - ["D5"] = 53, - ["D6"] = 54, - ["D7"] = 55, - ["D8"] = 56, - ["D9"] = 57, - ["Delete"] = 46, - ["Divide"] = 111, - ["Down"] = 40, - ["E"] = 69, - ["End"] = 35, - ["Enter"] = 13, - ["Equals"] = 187, - ["Escape"] = 27, - ["F"] = 70, - ["F1"] = 112, - ["F10"] = 121, - ["F11"] = 122, - ["F12"] = 123, - ["F13"] = 124, - ["F14"] = 125, - ["F15"] = 126, - ["F16"] = sbyte.MaxValue, - ["F17"] = 128, - ["F18"] = 129, - ["F19"] = 130, - ["F2"] = 113, - ["F20"] = 131, - ["F21"] = 132, - ["F22"] = 133, - ["F23"] = 134, - ["F24"] = 135, - ["F3"] = 114, - ["F4"] = 115, - ["F5"] = 116, - ["F6"] = 117, - ["F7"] = 118, - ["F8"] = 119, - ["F9"] = 120, - ["G"] = 71, - ["GamePadA"] = 22528, - ["GamePadB"] = 22529, - ["GamePadBack"] = 22597, - ["GamePadDPadDown"] = 22545, - ["GamePadDPadLeft"] = 22546, - ["GamePadDPadRight"] = 22547, - ["GamePadDPadUp"] = 22544, - ["GamePadLShoulder"] = 22533, - ["GamePadLThumbDown"] = 22561, - ["GamePadLThumbDownLeft"] = 22567, - ["GamePadLThumbDownRight"] = 22566, - ["GamePadLThumbLeft"] = 22563, - ["GamePadLThumbPress"] = 22550, - ["GamePadLThumbRight"] = 22562, - ["GamePadLThumbUp"] = 22560, - ["GamePadLThumbUpLeft"] = 22564, - ["GamePadLThumbUpRight"] = 22565, - ["GamePadLTrigger"] = 22534, - ["GamePadRShoulder"] = 22532, - ["GamePadRThumbDown"] = 22577, - ["GamePadRThumbDownLeft"] = 22583, - ["GamePadRThumbDownRight"] = 22582, - ["GamePadRThumbLeft"] = 22579, - ["GamePadRThumbPress"] = 22551, - ["GamePadRThumbRight"] = 22578, - ["GamePadRThumbUp"] = 22576, - ["GamePadRThumbUpLeft"] = 22580, - ["GamePadRThumbUpRight"] = 22581, - ["GamePadRTrigger"] = 22535, - ["GamePadStart"] = 22548, - ["GamePadX"] = 22530, - ["GamePadY"] = 22531, - ["H"] = 72, - ["Home"] = 36, - ["I"] = 73, - ["Insert"] = 45, - ["J"] = 74, - ["K"] = 75, - ["L"] = 76, - ["Left"] = 37, - ["M"] = 77, - ["Multiply"] = 106, - ["N"] = 78, - ["None"] = 0, - ["NumLock"] = 144, - ["NumPad0"] = 96, - ["NumPad1"] = 97, - ["NumPad2"] = 98, - ["NumPad3"] = 99, - ["NumPad4"] = 100, - ["NumPad5"] = 101, - ["NumPad6"] = 102, - ["NumPad7"] = 103, - ["NumPad8"] = 104, - ["NumPad9"] = 105, - ["O"] = 79, - ["OpenBrace"] = 219, - ["P"] = 80, - ["PageDown"] = 34, - ["PageUp"] = 33, - ["Period"] = 190, - ["Pipe"] = 220, - ["PrintScreen"] = 44, - ["Q"] = 81, - ["QuestionMark"] = 191, - ["Quotes"] = 222, - ["R"] = 82, - ["Right"] = 39, - ["S"] = 83, - ["Semicolon"] = 186, - ["Shift"] = 16, - ["Space"] = 32, - ["Subtract"] = 109, - ["T"] = 84, - ["Tab"] = 9, - ["Tilde"] = 192, - ["U"] = 85, - ["Underscore"] = 189, - ["Up"] = 38, - ["V"] = 86, - ["W"] = 87, - ["X"] = 88, - ["Y"] = 89, - ["Z"] = 90 - }; - - public static Map GetNavigationPoliciesEnumData() => new Map(20) - { - ["Column"] = 4, - ["ContainAll"] = 1792, - ["ContainDirectional"] = 768, - ["ContainHorizontal"] = 512, - ["ContainTabOrder"] = 1024, - ["ContainVertical"] = 256, - ["FlowHorizontal"] = 65536, - ["FlowVertical"] = 131072, - ["Group"] = 1, - ["None"] = 0, - ["PreferContainerFocus"] = 262144, - ["PreferFocusOrder"] = 64, - ["RememberFocus"] = 32, - ["Row"] = 2, - ["TabGroup"] = 16, - ["WrapAll"] = 28672, - ["WrapDirectional"] = 12288, - ["WrapHorizontal"] = 8192, - ["WrapTabOrder"] = 16384, - ["WrapVertical"] = 4096 - }; - - public static Map GetMouseTargetEnumData() => new Map(3) - { - ["Fixed"] = 1, - ["Follow"] = 2, - ["None"] = 0 - }; - - public static Map GetInterestPointEnumData() => new Map(5) - { - ["BottomLeft"] = 2, - ["BottomRight"] = 3, - ["Center"] = 4, - ["TopLeft"] = 0, - ["TopRight"] = 1 - }; - - public static Map GetFlipDirectionEnumData() => new Map(4) - { - ["Both"] = 3, - ["Horizontal"] = 1, - ["None"] = 0, - ["Vertical"] = 2 - }; - - public static Map GetSnapshotPolicyEnumData() => new Map(3) - { - ["Continuous"] = 0, - ["OnLoop"] = 2, - ["Once"] = 1 - }; - - public static Map GetRelativeEdgeEnumData() => new Map(2) - { - ["Far"] = 1, - ["Near"] = 0 - }; - - public static Map GetContentPositioningPolicyEnumData() => new Map(2) - { - ["RespectPaddingAndLocking"] = 0, - ["ShowMaximalContent"] = 1 - }; - - public static Map GetSharedSizePolicyEnumData() => new Map(7) - { - ["ContributesToHeight"] = 2, - ["ContributesToSize"] = 3, - ["ContributesToWidth"] = 1, - ["Default"] = 15, - ["SharesHeight"] = 8, - ["SharesSize"] = 12, - ["SharesWidth"] = 4 - }; - - public static Map GetShortcutHandlerCommandEnumData() => new Map(29) - { - ["Back"] = 16, - ["ChannelDown"] = 3, - ["ChannelUp"] = 2, - ["Clear"] = 26, - ["Enter"] = 36, - ["FastForward"] = 7, - ["None"] = 0, - ["OEMExtensibility0"] = 73, - ["OEMExtensibility1"] = 74, - ["OEMExtensibility10"] = 83, - ["OEMExtensibility11"] = 84, - ["OEMExtensibility2"] = 75, - ["OEMExtensibility3"] = 76, - ["OEMExtensibility4"] = 77, - ["OEMExtensibility5"] = 78, - ["OEMExtensibility6"] = 79, - ["OEMExtensibility7"] = 80, - ["OEMExtensibility8"] = 81, - ["OEMExtensibility9"] = 82, - ["PageDown"] = 3, - ["PageUp"] = 2, - ["Pause"] = 5, - ["Play"] = 4, - ["PlayPause"] = 30, - ["Record"] = 6, - ["Rewind"] = 8, - ["SkipBack"] = 10, - ["SkipForward"] = 9, - ["Stop"] = 11 - }; - - public static Map GetSystemSoundEventEnumData() => new Map(30) - { - ["Asterisk"] = 1, - ["CloseProgram"] = 2, - ["CriticalBatteryAlarm"] = 3, - ["CriticalStop"] = 4, - ["DefaultBeep"] = 5, - ["DeviceConnect"] = 6, - ["DeviceDisconnect"] = 7, - ["DeviceFailedToConnect"] = 8, - ["Exclamation"] = 9, - ["ExitWindows"] = 10, - ["LowBatteryAlarm"] = 11, - ["Maximize"] = 12, - ["MenuCommand"] = 13, - ["MenuPopup"] = 14, - ["Minimize"] = 15, - ["NewFaxNotification"] = 16, - ["NewMailNotification"] = 17, - ["None"] = 0, - ["OpenProgram"] = 18, - ["PrintComplete"] = 19, - ["ProgramError"] = 20, - ["Question"] = 21, - ["RestoreDown"] = 22, - ["RestoreUp"] = 23, - ["Select"] = 24, - ["ShowToolbarBand"] = 25, - ["StartWindows"] = 26, - ["SystemNotification"] = 27, - ["WindowsLogoff"] = 28, - ["WindowsLogon"] = 29 - }; - - public static Map GetStackPriorityEnumData() => new Map(3) - { - ["High"] = 2, - ["Low"] = 0, - ["Medium"] = 1 - }; - - public static Map GetLineAlignmentEnumData() => new Map(3) - { - ["Center"] = 1, - ["Far"] = 2, - ["Near"] = 0 - }; - - public static Map GetTextBoundsEnumData() => new Map(5) - { - ["AlignToAscender"] = 1, - ["AlignToBaseline"] = 2, - ["Full"] = 0, - ["Tight"] = 7, - ["TrimLeftSideBearing"] = 4 - }; - - public static Map GetTextSharpnessEnumData() => new Map(2) - { - ["Sharp"] = 0, - ["Soft"] = 1 - }; - - public static Map GetKeyframeFilterEnumData() => new Map(6) - { - ["All"] = 0, - ["Alpha"] = 5, - ["Position"] = 1, - ["Rotate"] = 4, - ["Scale"] = 3, - ["Size"] = 2 - }; - - public static Map GetTransformAttributeEnumData() => new Map(5) - { - ["Height"] = 2, - ["Index"] = 0, - ["Width"] = 1, - ["X"] = 3, - ["Y"] = 4 - }; - - public static Map GetWindowStateEnumData() => new Map(3) - { - ["Maximized"] = 2, - ["Minimized"] = 1, - ["Normal"] = 0 - }; - - public static Map GetMaximizeModeEnumData() => new Map(2) - { - ["FullScreen"] = 1, - ["Normal"] = 0 - }; - - public static Map GetDataForType(short typeID) - { - switch (typeID) - { - case 1: - return GetAccessibleRoleEnumData(); - case 3: - return GetAlignmentEnumData(); - case 5: - return GetAlphaOperationEnumData(); - case 10: - return GetAnimationEventTypeEnumData(); - case 12: - return GetBeginDragPolicyEnumData(); - case 31: - return GetClickCountEnumData(); - case 33: - return GetClickTypeEnumData(); - case 38: - return GetColorOperationEnumData(); - case 39: - return GetColorSchemeEnumData(); - case 41: - return GetContentPositioningPolicyEnumData(); - case 44: - return GetCursorEnumData(); - case 47: - return GetDataQueryStatusEnumData(); - case 50: - return GetDebugLabelFormatEnumData(); - case 51: - return GetDebugOutlineScopeEnumData(); - case 64: - return GetDropActionEnumData(); - case 84: - return GetEmbossDirectionEnumData(); - case 89: - return GetFlipDirectionEnumData(); - case 91: - return GetFocusChangeReasonEnumData(); - case 94: - return GetFontStylesEnumData(); - case 96: - return GetGaussianBlurModeEnumData(); - case 98: - return GetGraphicsDeviceTypeEnumData(); - case 102: - return GetHostStatusEnumData(); - case 108: - return GetImageStatusEnumData(); - case 111: - return GetInputHandlerModifiersEnumData(); - case 112: - return GetInputHandlerStageEnumData(); - case 113: - return GetInputHandlerTransitionEnumData(); - case 118: - return GetInterestPointEnumData(); - case 122: - return GetInterpolationTypeEnumData(); - case 126: - return GetInvokePriorityEnumData(); - case 129: - return GetKeyHandlerKeyEnumData(); - case 131: - return GetKeyframeFilterEnumData(); - case 137: - return GetLineAlignmentEnumData(); - case 146: - return GetMaximizeModeEnumData(); - case 148: - return GetMissingItemPolicyEnumData(); - case 149: - return GetMouseTargetEnumData(); - case 151: - return GetNavigationPoliciesEnumData(); - case 154: - return GetOrientationEnumData(); - case 170: - return GetRelativeEdgeEnumData(); - case 172: - return GetRepeatPolicyEnumData(); - case 191: - return GetSharedSizePolicyEnumData(); - case 193: - return GetShortcutHandlerCommandEnumData(); - case 199: - return GetSizingPolicyEnumData(); - case 200: - return GetSnapshotPolicyEnumData(); - case 206: - return GetStackPriorityEnumData(); - case 207: - return GetStretchingPolicyEnumData(); - case 209: - return GetStripAlignmentEnumData(); - case 211: - return GetSystemSoundEventEnumData(); - case 213: - return GetTextBoundsEnumData(); - case 219: - return GetTextSharpnessEnumData(); - case 223: - return GetTransformAttributeEnumData(); - case 242: - return GetWindowStateEnumData(); - default: - return null; - } - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXEnumSchema.cs b/UIX/Microsoft/Iris/Markup/UIXEnumSchema.cs deleted file mode 100644 index c3f4d13..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXEnumSchema.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXEnumSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using System; - -namespace Microsoft.Iris.Markup -{ - public class UIXEnumSchema : EnumSchema - { - private short _typeID; - - public UIXEnumSchema(short typeID, string name, Type runtimeType, bool isFlags) - : base(MarkupSystem.UIXGlobal) - { - this._typeID = typeID; - this.Initialize(name, runtimeType, isFlags, null, null); - UIXTypes.RegisterTypeForID(typeID, this); - } - - protected override void InitializeNameToValueMap() => this._nameToValueMap = UIXEnumData.GetDataForType(this._typeID); - - public override string ToString() => this.Name; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXEventSchema.cs b/UIX/Microsoft/Iris/Markup/UIXEventSchema.cs deleted file mode 100644 index 725ef7f..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXEventSchema.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXEventSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class UIXEventSchema : EventSchema - { - private string _name; - - public UIXEventSchema(short ownerTypeID, string name) - : base(UIXTypes.MapIDToType(ownerTypeID)) - => this._name = name; - - public override string Name => this._name; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXLoadResult.cs b/UIX/Microsoft/Iris/Markup/UIXLoadResult.cs deleted file mode 100644 index b3630fc..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXLoadResult.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXLoadResult -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using Microsoft.Iris.Markup.UIX; - -namespace Microsoft.Iris.Markup -{ - public class UIXLoadResult : LoadResult - { - public UIXLoadResult(string uri) - : base(uri) - { - } - - public static void InitializeStatics() => UIXLoadResultExports.InitializeStatics(); - - public override TypeSchema[] ExportTable => UIXLoadResultExports.ExportTable; - - private void SetExportTable(TypeSchema[] value) => UIXLoadResultExports.ExportTable = value; - - protected override void OnDispose() - { - base.OnDispose(); - foreach (DisposableObject disposableObject in this.ExportTable) - disposableObject.Dispose(this); - this.SetExportTable(null); - } - - public override TypeSchema FindType(string name) - { - for (int index = 0; index < this.ExportTable.Length; ++index) - { - TypeSchema typeSchema = this.ExportTable[index]; - if (typeSchema.Name == name || typeSchema.AlternateName == name) - return typeSchema; - } - return null; - } - - public override LoadResultStatus Status => LoadResultStatus.Success; - - public static Result ValidateStringAsValue( - string inline_, - TypeSchema propertyType, - RangeValidator validator, - out object value) - { - Result result = propertyType.TypeConverter(inline_, StringSchema.Type, out value); - if (result.Failed || validator == null) - return result; - result = validator(value); - return result; - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs b/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs deleted file mode 100644 index 6de7358..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs +++ /dev/null @@ -1,520 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXLoadResultExports -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Accessibility; -using Microsoft.Iris.Animations; -using Microsoft.Iris.Debug; -using Microsoft.Iris.Drawing; -using Microsoft.Iris.Input; -using Microsoft.Iris.InputHandlers; -using Microsoft.Iris.Layout; -using Microsoft.Iris.Layouts; -using Microsoft.Iris.Markup.UIX; -using Microsoft.Iris.ModelItems; -using Microsoft.Iris.Navigation; -using Microsoft.Iris.Render; -using Microsoft.Iris.RenderAPI.Audio; -using Microsoft.Iris.UI; -using Microsoft.Iris.ViewItems; - -namespace Microsoft.Iris.Markup -{ - public static class UIXLoadResultExports - { - public static TypeSchema AccessibleRoleType; - public static TypeSchema AlignmentType; - public static TypeSchema AlphaOperationType; - public static TypeSchema AnimationEventTypeType; - public static TypeSchema BeginDragPolicyType; - public static TypeSchema ClickCountType; - public static TypeSchema ClickTypeType; - public static TypeSchema ColorOperationType; - public static TypeSchema ColorSchemeType; - public static TypeSchema ContentPositioningPolicyType; - public static TypeSchema CursorType; - public static TypeSchema DataQueryStatusType; - public static TypeSchema DebugLabelFormatType; - public static TypeSchema DebugOutlineScopeType; - public static TypeSchema DropActionType; - public static TypeSchema EmbossDirectionType; - public static TypeSchema FlipDirectionType; - public static TypeSchema FocusChangeReasonType; - public static TypeSchema FontStylesType; - public static TypeSchema GaussianBlurModeType; - public static TypeSchema GraphicsDeviceTypeType; - public static TypeSchema HostStatusType; - public static TypeSchema ImageStatusType; - public static TypeSchema InputHandlerModifiersType; - public static TypeSchema InputHandlerStageType; - public static TypeSchema InputHandlerTransitionType; - public static TypeSchema InterestPointType; - public static TypeSchema InterpolationTypeType; - public static TypeSchema InvokePriorityType; - public static TypeSchema KeyHandlerKeyType; - public static TypeSchema KeyframeFilterType; - public static TypeSchema LineAlignmentType; - public static TypeSchema MaximizeModeType; - public static TypeSchema MissingItemPolicyType; - public static TypeSchema MouseTargetType; - public static TypeSchema NavigationPoliciesType; - public static TypeSchema OrientationType; - public static TypeSchema RelativeEdgeType; - public static TypeSchema RepeatPolicyType; - public static TypeSchema SharedSizePolicyType; - public static TypeSchema ShortcutHandlerCommandType; - public static TypeSchema SizingPolicyType; - public static TypeSchema SnapshotPolicyType; - public static TypeSchema StackPriorityType; - public static TypeSchema StretchingPolicyType; - public static TypeSchema StripAlignmentType; - public static TypeSchema SystemSoundEventType; - public static TypeSchema TextBoundsType; - public static TypeSchema TextSharpnessType; - public static TypeSchema TransformAttributeType; - public static TypeSchema WindowStateType; - public static TypeSchema[] ExportTable; - - public static void InitializeStatics() - { - ExportTable = new TypeSchema[243]; - AccessibleRoleType = new UIXEnumSchema(1, "AccessibleRole", typeof(AccRole), false); - AlignmentType = new UIXEnumSchema(3, "Alignment", typeof(Alignment), false); - AlphaOperationType = new UIXEnumSchema(5, "AlphaOperation", typeof(AlphaOperation), false); - AnimationEventTypeType = new UIXEnumSchema(10, "AnimationEventType", typeof(AnimationEventType), false); - BeginDragPolicyType = new UIXEnumSchema(12, "BeginDragPolicy", typeof(BeginDragPolicy), false); - ClickCountType = new UIXEnumSchema(31, "ClickCount", typeof(ClickCount), false); - ClickTypeType = new UIXEnumSchema(33, "ClickType", typeof(ClickType), true); - ColorOperationType = new UIXEnumSchema(38, "ColorOperation", typeof(ColorOperation), false); - ColorSchemeType = new UIXEnumSchema(39, "ColorScheme", typeof(ColorScheme), false); - ContentPositioningPolicyType = new UIXEnumSchema(41, "ContentPositioningPolicy", typeof(ContentPositioningPolicy), false); - CursorType = new UIXEnumSchema(44, "Cursor", typeof(CursorID), false); - DataQueryStatusType = new UIXEnumSchema(47, "DataQueryStatus", typeof(DataProviderQueryStatus), false); - DebugLabelFormatType = new UIXEnumSchema(50, "DebugLabelFormat", typeof(DebugLabelFormat), false); - DebugOutlineScopeType = new UIXEnumSchema(51, "DebugOutlineScope", typeof(DebugOutlineScope), false); - DropActionType = new UIXEnumSchema(64, "DropAction", typeof(DropAction), true); - EmbossDirectionType = new UIXEnumSchema(84, "EmbossDirection", typeof(EmbossDirection), false); - FlipDirectionType = new UIXEnumSchema(89, "FlipDirection", typeof(FlipDirection), true); - FocusChangeReasonType = new UIXEnumSchema(91, "FocusChangeReason", typeof(FocusChangeReason), true); - FontStylesType = new UIXEnumSchema(94, "FontStyles", typeof(FontStyles), true); - GaussianBlurModeType = new UIXEnumSchema(96, "GaussianBlurMode", typeof(GaussianBlurMode), false); - GraphicsDeviceTypeType = new UIXEnumSchema(98, "GraphicsDeviceType", typeof(RenderingType), false); - HostStatusType = new UIXEnumSchema(102, "HostStatus", typeof(HostStatus), false); - ImageStatusType = new UIXEnumSchema(108, "ImageStatus", typeof(ImageStatus), false); - InputHandlerModifiersType = new UIXEnumSchema(111, "InputHandlerModifiers", typeof(InputHandlerModifiers), true); - InputHandlerStageType = new UIXEnumSchema(112, "InputHandlerStage", typeof(InputHandlerStage), true); - InputHandlerTransitionType = new UIXEnumSchema(113, "InputHandlerTransition", typeof(InputHandlerTransition), false); - InterestPointType = new UIXEnumSchema(118, "InterestPoint", typeof(InterestPoint), false); - InterpolationTypeType = new UIXEnumSchema(122, "InterpolationType", typeof(InterpolationType), false); - InvokePriorityType = new UIXEnumSchema(126, "InvokePriority", typeof(InvokePriority), false); - KeyHandlerKeyType = new UIXEnumSchema(129, "KeyHandlerKey", typeof(KeyHandlerKey), false); - KeyframeFilterType = new UIXEnumSchema(131, "KeyframeFilter", typeof(KeyframeFilter), false); - LineAlignmentType = new UIXEnumSchema(137, "LineAlignment", typeof(LineAlignment), false); - MaximizeModeType = new UIXEnumSchema(146, "MaximizeMode", typeof(MaximizeMode), false); - MissingItemPolicyType = new UIXEnumSchema(148, "MissingItemPolicy", typeof(MissingItemPolicy), false); - MouseTargetType = new UIXEnumSchema(149, "MouseTarget", typeof(MouseTarget), false); - NavigationPoliciesType = new UIXEnumSchema(151, "NavigationPolicies", typeof(NavigationPolicies), true); - OrientationType = new UIXEnumSchema(154, "Orientation", typeof(Orientation), false); - RelativeEdgeType = new UIXEnumSchema(170, "RelativeEdge", typeof(RelativeEdge), false); - RepeatPolicyType = new UIXEnumSchema(172, "RepeatPolicy", typeof(RepeatPolicy), false); - SharedSizePolicyType = new UIXEnumSchema(191, "SharedSizePolicy", typeof(SharedSizePolicy), true); - ShortcutHandlerCommandType = new UIXEnumSchema(193, "ShortcutHandlerCommand", typeof(ShortcutHandlerCommand), false); - SizingPolicyType = new UIXEnumSchema(199, "SizingPolicy", typeof(SizingPolicy), false); - SnapshotPolicyType = new UIXEnumSchema(200, "SnapshotPolicy", typeof(SnapshotPolicy), false); - StackPriorityType = new UIXEnumSchema(206, "StackPriority", typeof(StackPriority), false); - StretchingPolicyType = new UIXEnumSchema(207, "StretchingPolicy", typeof(StretchingPolicy), false); - StripAlignmentType = new UIXEnumSchema(209, "StripAlignment", typeof(StripAlignment), false); - SystemSoundEventType = new UIXEnumSchema(211, "SystemSoundEvent", typeof(SystemSoundEvent), false); - TextBoundsType = new UIXEnumSchema(213, "TextBounds", typeof(TextBounds), true); - TextSharpnessType = new UIXEnumSchema(219, "TextSharpness", typeof(TextSharpness), false); - TransformAttributeType = new UIXEnumSchema(223, "TransformAttribute", typeof(TransformAttribute), false); - WindowStateType = new UIXEnumSchema(242, "WindowState", typeof(Microsoft.Iris.WindowState), false); - AccessibleSchema.Pass1Initialize(); - AliasSchema.Pass1Initialize(); - AlphaKeyframeSchema.Pass1Initialize(); - AnchorEdgeSchema.Pass1Initialize(); - AnchorLayoutSchema.Pass1Initialize(); - AnchorLayoutInputSchema.Pass1Initialize(); - AnimationSchema.Pass1Initialize(); - AnimationHandleSchema.Pass1Initialize(); - BlendSchema.Pass1Initialize(); - BlurSchema.Pass1Initialize(); - BooleanSchema.Pass1Initialize(); - BooleanChoiceSchema.Pass1Initialize(); - BrightnessSchema.Pass1Initialize(); - BrightnessInstanceSchema.Pass1Initialize(); - ByteSchema.Pass1Initialize(); - ByteRangedValueSchema.Pass1Initialize(); - CameraSchema.Pass1Initialize(); - CameraAtKeyframeSchema.Pass1Initialize(); - CameraEyeKeyframeSchema.Pass1Initialize(); - CameraUpKeyframeSchema.Pass1Initialize(); - CameraZnKeyframeSchema.Pass1Initialize(); - CaretInfoSchema.Pass1Initialize(); - CharSchema.Pass1Initialize(); - ChoiceSchema.Pass1Initialize(); - ClassSchema.Pass1Initialize(); - ClassStateSchema.Pass1Initialize(); - ClickHandlerSchema.Pass1Initialize(); - ClipSchema.Pass1Initialize(); - ColorSchema.Pass1Initialize(); - ColorElementSchema.Pass1Initialize(); - ColorElementInstanceSchema.Pass1Initialize(); - CommandSchema.Pass1Initialize(); - ContrastSchema.Pass1Initialize(); - ContrastInstanceSchema.Pass1Initialize(); - DataMappingSchema.Pass1Initialize(); - DataQuerySchema.Pass1Initialize(); - DataTypeSchema.Pass1Initialize(); - DebugSchema.Pass1Initialize(); - DebugOutlinesSchema.Pass1Initialize(); - DefaultLayoutSchema.Pass1Initialize(); - DesaturateSchema.Pass1Initialize(); - DesaturateInstanceSchema.Pass1Initialize(); - DestinationElementSchema.Pass1Initialize(); - DestinationElementInstanceSchema.Pass1Initialize(); - DictionarySchema.Pass1Initialize(); - DockLayoutSchema.Pass1Initialize(); - DockLayoutInputSchema.Pass1Initialize(); - DoubleSchema.Pass1Initialize(); - DragHandlerSchema.Pass1Initialize(); - DragSourceHandlerSchema.Pass1Initialize(); - DropTargetHandlerSchema.Pass1Initialize(); - EdgeDetectionSchema.Pass1Initialize(); - EdgeDetectionInstanceSchema.Pass1Initialize(); - EditableTextDataSchema.Pass1Initialize(); - EffectSchema.Pass1Initialize(); - EffectAnimationSchema.Pass1Initialize(); - EffectColorAnimationSchema.Pass1Initialize(); - EffectColorKeyframeSchema.Pass1Initialize(); - EffectElementSchema.Pass1Initialize(); - EffectElementInstanceSchema.Pass1Initialize(); - EffectFloatAnimationSchema.Pass1Initialize(); - EffectFloatKeyframeSchema.Pass1Initialize(); - EffectInputSchema.Pass1Initialize(); - EffectInstanceSchema.Pass1Initialize(); - EffectLayerSchema.Pass1Initialize(); - EffectOperationSchema.Pass1Initialize(); - EffectVector3AnimationSchema.Pass1Initialize(); - EffectVector3KeyframeSchema.Pass1Initialize(); - EmbossSchema.Pass1Initialize(); - EmbossInstanceSchema.Pass1Initialize(); - EnumeratorSchema.Pass1Initialize(); - EnvironmentSchema.Pass1Initialize(); - EventContextSchema.Pass1Initialize(); - FlowLayoutSchema.Pass1Initialize(); - FocusHandlerSchema.Pass1Initialize(); - FontSchema.Pass1Initialize(); - FormLayoutInputSchema.Pass1Initialize(); - GraphicSchema.Pass1Initialize(); - GridLayoutSchema.Pass1Initialize(); - GroupSchema.Pass1Initialize(); - HostSchema.Pass1Initialize(); - HwndHostSchema.Pass1Initialize(); - IAnimationSchema.Pass1Initialize(); - ImageSchema.Pass1Initialize(); - ImageElementSchema.Pass1Initialize(); - ImageElementInstanceSchema.Pass1Initialize(); - IndexSchema.Pass1Initialize(); - InputHandlerSchema.Pass1Initialize(); - InsetSchema.Pass1Initialize(); - Int32Schema.Pass1Initialize(); - Int64Schema.Pass1Initialize(); - IntRangedValueSchema.Pass1Initialize(); - InterpolateElementSchema.Pass1Initialize(); - InterpolateElementInstanceSchema.Pass1Initialize(); - InterpolationSchema.Pass1Initialize(); - InvAlphaSchema.Pass1Initialize(); - InvColorSchema.Pass1Initialize(); - InvertSchema.Pass1Initialize(); - ItemAlignmentSchema.Pass1Initialize(); - KeyHandlerSchema.Pass1Initialize(); - KeyframeSchema.Pass1Initialize(); - LayoutSchema.Pass1Initialize(); - LayoutInputSchema.Pass1Initialize(); - LayoutOutputSchema.Pass1Initialize(); - LightShaftSchema.Pass1Initialize(); - LightShaftInstanceSchema.Pass1Initialize(); - ListSchema.Pass1Initialize(); - MajorMinorSchema.Pass1Initialize(); - MappingSchema.Pass1Initialize(); - MarkupSchema.Pass1Initialize(); - MarkupDataQueryInstanceSchema.Pass1Initialize(); - MarkupDataTypeInstanceSchema.Pass1Initialize(); - MarkupErrorSchema.Pass1Initialize(); - MathSchema.Pass1Initialize(); - MergeAnimationSchema.Pass1Initialize(); - MouseWheelHandlerSchema.Pass1Initialize(); - NullSchema.Pass1Initialize(); - ObjectSchema.Pass1Initialize(); - OrientationKeyframeSchema.Pass1Initialize(); - PanelSchema.Pass1Initialize(); - PlacementModeSchema.Pass1Initialize(); - PointSchema.Pass1Initialize(); - PointLight2DSchema.Pass1Initialize(); - PointLight2DInstanceSchema.Pass1Initialize(); - PopupLayoutSchema.Pass1Initialize(); - PopupLayoutInputSchema.Pass1Initialize(); - PopupPositionSchema.Pass1Initialize(); - PositionKeyframeSchema.Pass1Initialize(); - PositionXKeyframeSchema.Pass1Initialize(); - PositionYKeyframeSchema.Pass1Initialize(); - RandomSchema.Pass1Initialize(); - RangedValueSchema.Pass1Initialize(); - RectangleSchema.Pass1Initialize(); - RelativeToSchema.Pass1Initialize(); - RepeaterSchema.Pass1Initialize(); - RotateKeyframeSchema.Pass1Initialize(); - RotateLayoutSchema.Pass1Initialize(); - RotationSchema.Pass1Initialize(); - SavedKeyFocusSchema.Pass1Initialize(); - ScaleKeyframeSchema.Pass1Initialize(); - ScaleLayoutSchema.Pass1Initialize(); - ScaleXKeyframeSchema.Pass1Initialize(); - ScaleYKeyframeSchema.Pass1Initialize(); - ScrollModelSchema.Pass1Initialize(); - ScrollModelBaseSchema.Pass1Initialize(); - ScrollerSchema.Pass1Initialize(); - ScrollingHandlerSchema.Pass1Initialize(); - SelectionManagerSchema.Pass1Initialize(); - SelectionRangeSchema.Pass1Initialize(); - SepiaSchema.Pass1Initialize(); - SepiaInstanceSchema.Pass1Initialize(); - SharedSizeSchema.Pass1Initialize(); - ShortcutHandlerSchema.Pass1Initialize(); - SingleSchema.Pass1Initialize(); - SizeSchema.Pass1Initialize(); - SizeKeyframeSchema.Pass1Initialize(); - SizeXKeyframeSchema.Pass1Initialize(); - SizeYKeyframeSchema.Pass1Initialize(); - SoundSchema.Pass1Initialize(); - SpotLight2DSchema.Pass1Initialize(); - SpotLight2DInstanceSchema.Pass1Initialize(); - StackLayoutSchema.Pass1Initialize(); - StackLayoutInputSchema.Pass1Initialize(); - StringSchema.Pass1Initialize(); - SwitchAnimationSchema.Pass1Initialize(); - TextSchema.Pass1Initialize(); - TextEditingHandlerSchema.Pass1Initialize(); - TextFragmentSchema.Pass1Initialize(); - TextRunDataSchema.Pass1Initialize(); - TextRunRendererSchema.Pass1Initialize(); - TextScrollModelSchema.Pass1Initialize(); - TextStyleSchema.Pass1Initialize(); - TimerSchema.Pass1Initialize(); - TransformAnimationSchema.Pass1Initialize(); - TransformByAttributeAnimationSchema.Pass1Initialize(); - TypeSchemaDefinition.Pass1Initialize(); - TypeConstraintSchema.Pass1Initialize(); - TypeSelectorSchema.Pass1Initialize(); - TypingHandlerSchema.Pass1Initialize(); - UISchema.Pass1Initialize(); - UIStateSchema.Pass1Initialize(); - ValueRangeSchema.Pass1Initialize(); - ValueTransformerSchema.Pass1Initialize(); - Vector2Schema.Pass1Initialize(); - Vector3Schema.Pass1Initialize(); - VideoSchema.Pass1Initialize(); - VideoElementSchema.Pass1Initialize(); - VideoElementInstanceSchema.Pass1Initialize(); - VideoStreamSchema.Pass1Initialize(); - ViewItemSchema.Pass1Initialize(); - VoidSchema.Pass1Initialize(); - WindowSchema.Pass1Initialize(); - AccessibleSchema.Pass2Initialize(); - AliasSchema.Pass2Initialize(); - AlphaKeyframeSchema.Pass2Initialize(); - AnchorEdgeSchema.Pass2Initialize(); - AnchorLayoutSchema.Pass2Initialize(); - AnchorLayoutInputSchema.Pass2Initialize(); - AnimationSchema.Pass2Initialize(); - AnimationHandleSchema.Pass2Initialize(); - BlendSchema.Pass2Initialize(); - BlurSchema.Pass2Initialize(); - BooleanSchema.Pass2Initialize(); - BooleanChoiceSchema.Pass2Initialize(); - BrightnessSchema.Pass2Initialize(); - BrightnessInstanceSchema.Pass2Initialize(); - ByteSchema.Pass2Initialize(); - ByteRangedValueSchema.Pass2Initialize(); - CameraSchema.Pass2Initialize(); - CameraAtKeyframeSchema.Pass2Initialize(); - CameraEyeKeyframeSchema.Pass2Initialize(); - CameraUpKeyframeSchema.Pass2Initialize(); - CameraZnKeyframeSchema.Pass2Initialize(); - CaretInfoSchema.Pass2Initialize(); - CharSchema.Pass2Initialize(); - ChoiceSchema.Pass2Initialize(); - ClassSchema.Pass2Initialize(); - ClassStateSchema.Pass2Initialize(); - ClickHandlerSchema.Pass2Initialize(); - ClipSchema.Pass2Initialize(); - ColorSchema.Pass2Initialize(); - ColorElementSchema.Pass2Initialize(); - ColorElementInstanceSchema.Pass2Initialize(); - CommandSchema.Pass2Initialize(); - ContrastSchema.Pass2Initialize(); - ContrastInstanceSchema.Pass2Initialize(); - DataMappingSchema.Pass2Initialize(); - DataQuerySchema.Pass2Initialize(); - DataTypeSchema.Pass2Initialize(); - DebugSchema.Pass2Initialize(); - DebugOutlinesSchema.Pass2Initialize(); - DefaultLayoutSchema.Pass2Initialize(); - DesaturateSchema.Pass2Initialize(); - DesaturateInstanceSchema.Pass2Initialize(); - DestinationElementSchema.Pass2Initialize(); - DestinationElementInstanceSchema.Pass2Initialize(); - DictionarySchema.Pass2Initialize(); - DockLayoutSchema.Pass2Initialize(); - DockLayoutInputSchema.Pass2Initialize(); - DoubleSchema.Pass2Initialize(); - DragHandlerSchema.Pass2Initialize(); - DragSourceHandlerSchema.Pass2Initialize(); - DropTargetHandlerSchema.Pass2Initialize(); - EdgeDetectionSchema.Pass2Initialize(); - EdgeDetectionInstanceSchema.Pass2Initialize(); - EditableTextDataSchema.Pass2Initialize(); - EffectSchema.Pass2Initialize(); - EffectAnimationSchema.Pass2Initialize(); - EffectColorAnimationSchema.Pass2Initialize(); - EffectColorKeyframeSchema.Pass2Initialize(); - EffectElementSchema.Pass2Initialize(); - EffectElementInstanceSchema.Pass2Initialize(); - EffectFloatAnimationSchema.Pass2Initialize(); - EffectFloatKeyframeSchema.Pass2Initialize(); - EffectInputSchema.Pass2Initialize(); - EffectInstanceSchema.Pass2Initialize(); - EffectLayerSchema.Pass2Initialize(); - EffectOperationSchema.Pass2Initialize(); - EffectVector3AnimationSchema.Pass2Initialize(); - EffectVector3KeyframeSchema.Pass2Initialize(); - EmbossSchema.Pass2Initialize(); - EmbossInstanceSchema.Pass2Initialize(); - EnumeratorSchema.Pass2Initialize(); - EnvironmentSchema.Pass2Initialize(); - EventContextSchema.Pass2Initialize(); - FlowLayoutSchema.Pass2Initialize(); - FocusHandlerSchema.Pass2Initialize(); - FontSchema.Pass2Initialize(); - FormLayoutInputSchema.Pass2Initialize(); - GraphicSchema.Pass2Initialize(); - GridLayoutSchema.Pass2Initialize(); - GroupSchema.Pass2Initialize(); - HostSchema.Pass2Initialize(); - HwndHostSchema.Pass2Initialize(); - IAnimationSchema.Pass2Initialize(); - ImageSchema.Pass2Initialize(); - ImageElementSchema.Pass2Initialize(); - ImageElementInstanceSchema.Pass2Initialize(); - IndexSchema.Pass2Initialize(); - InputHandlerSchema.Pass2Initialize(); - InsetSchema.Pass2Initialize(); - Int32Schema.Pass2Initialize(); - Int64Schema.Pass2Initialize(); - IntRangedValueSchema.Pass2Initialize(); - InterpolateElementSchema.Pass2Initialize(); - InterpolateElementInstanceSchema.Pass2Initialize(); - InterpolationSchema.Pass2Initialize(); - InvAlphaSchema.Pass2Initialize(); - InvColorSchema.Pass2Initialize(); - InvertSchema.Pass2Initialize(); - ItemAlignmentSchema.Pass2Initialize(); - KeyHandlerSchema.Pass2Initialize(); - KeyframeSchema.Pass2Initialize(); - LayoutSchema.Pass2Initialize(); - LayoutInputSchema.Pass2Initialize(); - LayoutOutputSchema.Pass2Initialize(); - LightShaftSchema.Pass2Initialize(); - LightShaftInstanceSchema.Pass2Initialize(); - ListSchema.Pass2Initialize(); - MajorMinorSchema.Pass2Initialize(); - MappingSchema.Pass2Initialize(); - MarkupSchema.Pass2Initialize(); - MarkupDataQueryInstanceSchema.Pass2Initialize(); - MarkupDataTypeInstanceSchema.Pass2Initialize(); - MarkupErrorSchema.Pass2Initialize(); - MathSchema.Pass2Initialize(); - MergeAnimationSchema.Pass2Initialize(); - MouseWheelHandlerSchema.Pass2Initialize(); - NullSchema.Pass2Initialize(); - ObjectSchema.Pass2Initialize(); - OrientationKeyframeSchema.Pass2Initialize(); - PanelSchema.Pass2Initialize(); - PlacementModeSchema.Pass2Initialize(); - PointSchema.Pass2Initialize(); - PointLight2DSchema.Pass2Initialize(); - PointLight2DInstanceSchema.Pass2Initialize(); - PopupLayoutSchema.Pass2Initialize(); - PopupLayoutInputSchema.Pass2Initialize(); - PopupPositionSchema.Pass2Initialize(); - PositionKeyframeSchema.Pass2Initialize(); - PositionXKeyframeSchema.Pass2Initialize(); - PositionYKeyframeSchema.Pass2Initialize(); - RandomSchema.Pass2Initialize(); - RangedValueSchema.Pass2Initialize(); - RectangleSchema.Pass2Initialize(); - RelativeToSchema.Pass2Initialize(); - RepeaterSchema.Pass2Initialize(); - RotateKeyframeSchema.Pass2Initialize(); - RotateLayoutSchema.Pass2Initialize(); - RotationSchema.Pass2Initialize(); - SavedKeyFocusSchema.Pass2Initialize(); - ScaleKeyframeSchema.Pass2Initialize(); - ScaleLayoutSchema.Pass2Initialize(); - ScaleXKeyframeSchema.Pass2Initialize(); - ScaleYKeyframeSchema.Pass2Initialize(); - ScrollModelSchema.Pass2Initialize(); - ScrollModelBaseSchema.Pass2Initialize(); - ScrollerSchema.Pass2Initialize(); - ScrollingHandlerSchema.Pass2Initialize(); - SelectionManagerSchema.Pass2Initialize(); - SelectionRangeSchema.Pass2Initialize(); - SepiaSchema.Pass2Initialize(); - SepiaInstanceSchema.Pass2Initialize(); - SharedSizeSchema.Pass2Initialize(); - ShortcutHandlerSchema.Pass2Initialize(); - SingleSchema.Pass2Initialize(); - SizeSchema.Pass2Initialize(); - SizeKeyframeSchema.Pass2Initialize(); - SizeXKeyframeSchema.Pass2Initialize(); - SizeYKeyframeSchema.Pass2Initialize(); - SoundSchema.Pass2Initialize(); - SpotLight2DSchema.Pass2Initialize(); - SpotLight2DInstanceSchema.Pass2Initialize(); - StackLayoutSchema.Pass2Initialize(); - StackLayoutInputSchema.Pass2Initialize(); - StringSchema.Pass2Initialize(); - SwitchAnimationSchema.Pass2Initialize(); - TextSchema.Pass2Initialize(); - TextEditingHandlerSchema.Pass2Initialize(); - TextFragmentSchema.Pass2Initialize(); - TextRunDataSchema.Pass2Initialize(); - TextRunRendererSchema.Pass2Initialize(); - TextScrollModelSchema.Pass2Initialize(); - TextStyleSchema.Pass2Initialize(); - TimerSchema.Pass2Initialize(); - TransformAnimationSchema.Pass2Initialize(); - TransformByAttributeAnimationSchema.Pass2Initialize(); - TypeSchemaDefinition.Pass2Initialize(); - TypeConstraintSchema.Pass2Initialize(); - TypeSelectorSchema.Pass2Initialize(); - TypingHandlerSchema.Pass2Initialize(); - UISchema.Pass2Initialize(); - UIStateSchema.Pass2Initialize(); - ValueRangeSchema.Pass2Initialize(); - ValueTransformerSchema.Pass2Initialize(); - Vector2Schema.Pass2Initialize(); - Vector3Schema.Pass2Initialize(); - VideoSchema.Pass2Initialize(); - VideoElementSchema.Pass2Initialize(); - VideoElementInstanceSchema.Pass2Initialize(); - VideoStreamSchema.Pass2Initialize(); - ViewItemSchema.Pass2Initialize(); - VoidSchema.Pass2Initialize(); - WindowSchema.Pass2Initialize(); - } - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXMethodSchema.cs b/UIX/Microsoft/Iris/Markup/UIXMethodSchema.cs deleted file mode 100644 index bcf01c4..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXMethodSchema.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXMethodSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class UIXMethodSchema : MethodSchema - { - private string _name; - private TypeSchema[] _parameterTypes; - private TypeSchema _returnType; - private bool _isStatic; - private InvokeHandler _invoke; - - public UIXMethodSchema( - short ownerTypeID, - string name, - short[] parameterTypeIDs, - short returnTypeID, - InvokeHandler invoke, - bool isStatic) - : base(UIXTypes.MapIDToType(ownerTypeID)) - { - this._name = name; - this._parameterTypes = UIXTypes.MapIDsToTypes(parameterTypeIDs); - this._returnType = UIXTypes.MapIDToType(returnTypeID); - this._invoke = invoke; - this._isStatic = isStatic; - } - - public override string Name => this._name; - - public override TypeSchema[] ParameterTypes => this._parameterTypes; - - public override TypeSchema ReturnType => this._returnType; - - public override bool IsStatic => this._isStatic; - - public override object Invoke(object instance, object[] parameters) => this._invoke(instance, parameters); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXPropertySchema.cs b/UIX/Microsoft/Iris/Markup/UIXPropertySchema.cs deleted file mode 100644 index fd9fdfa..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXPropertySchema.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXPropertySchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public class UIXPropertySchema : PropertySchema - { - private string _name; - private TypeSchema _propertyType; - private TypeSchema _alternateType; - private bool _isStatic; - private ExpressionRestriction _expressionRestriction; - private bool _requiredForCreation; - private RangeValidator _rangeValidator; - private bool _notifiesOnChange; - private GetValueHandler _getValue; - private SetValueHandler _setValue; - - public UIXPropertySchema( - short ownerTypeID, - string name, - short typeID, - short alternateTypeID, - ExpressionRestriction expressionRestriction, - bool requiredForCreation, - RangeValidator rangeValidator, - bool notifiesOnChange, - GetValueHandler getValue, - SetValueHandler setValue, - bool isStatic) - : base(UIXTypes.MapIDToType(ownerTypeID)) - { - this._name = name; - this._propertyType = UIXTypes.MapIDToType(typeID); - this._alternateType = UIXTypes.MapIDToType(alternateTypeID); - this._expressionRestriction = expressionRestriction; - this._requiredForCreation = requiredForCreation; - this._rangeValidator = rangeValidator; - this._notifiesOnChange = notifiesOnChange; - this._getValue = getValue; - this._setValue = setValue; - this._isStatic = isStatic; - } - - public override string Name => this._name; - - public override TypeSchema PropertyType => this._propertyType; - - public override TypeSchema AlternateType => this._alternateType; - - public override bool CanRead => this._getValue != null; - - public override bool CanWrite => this._setValue != null; - - public override bool IsStatic => this._isStatic; - - public override ExpressionRestriction ExpressionRestriction => this._expressionRestriction; - - public override bool RequiredForCreation => this._requiredForCreation; - - public override RangeValidator RangeValidator => this._rangeValidator; - - public override bool NotifiesOnChange => this._notifiesOnChange; - - public override object GetValue(object instance) => this._getValue(instance); - - public override void SetValue(ref object instance, object value) => this._setValue(ref instance, value); - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXTypeFlags.cs b/UIX/Microsoft/Iris/Markup/UIXTypeFlags.cs deleted file mode 100644 index fc3606c..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXTypeFlags.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXTypeFlags -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public enum UIXTypeFlags - { - None = 0, - Disposable = 1, - Immutable = 2, - Static = 4, - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXTypeID.cs b/UIX/Microsoft/Iris/Markup/UIXTypeID.cs deleted file mode 100644 index f39e219..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXTypeID.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXTypeID -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class UIXTypeID - { - public const short None = -1; - public const short Accessible = 0; - public const short AccessibleRole = 1; - public const short Alias = 2; - public const short Alignment = 3; - public const short AlphaKeyframe = 4; - public const short AlphaOperation = 5; - public const short AnchorEdge = 6; - public const short AnchorLayout = 7; - public const short AnchorLayoutInput = 8; - public const short Animation = 9; - public const short AnimationEventType = 10; - public const short AnimationHandle = 11; - public const short BeginDragPolicy = 12; - public const short Blend = 13; - public const short Blur = 14; - public const short Boolean = 15; - public const short BooleanChoice = 16; - public const short Brightness = 17; - public const short BrightnessInstance = 18; - public const short Byte = 19; - public const short ByteRangedValue = 20; - public const short Camera = 21; - public const short CameraAtKeyframe = 22; - public const short CameraEyeKeyframe = 23; - public const short CameraUpKeyframe = 24; - public const short CameraZnKeyframe = 25; - public const short CaretInfo = 26; - public const short Char = 27; - public const short Choice = 28; - public const short Class = 29; - public const short ClassState = 30; - public const short ClickCount = 31; - public const short ClickHandler = 32; - public const short ClickType = 33; - public const short Clip = 34; - public const short Color = 35; - public const short ColorElement = 36; - public const short ColorElementInstance = 37; - public const short ColorOperation = 38; - public const short ColorScheme = 39; - public const short Command = 40; - public const short ContentPositioningPolicy = 41; - public const short Contrast = 42; - public const short ContrastInstance = 43; - public const short Cursor = 44; - public const short DataMapping = 45; - public const short DataQuery = 46; - public const short DataQueryStatus = 47; - public const short DataType = 48; - public const short Debug = 49; - public const short DebugLabelFormat = 50; - public const short DebugOutlineScope = 51; - public const short DebugOutlines = 52; - public const short DefaultLayout = 53; - public const short Desaturate = 54; - public const short DesaturateInstance = 55; - public const short DestinationElement = 56; - public const short DestinationElementInstance = 57; - public const short Dictionary = 58; - public const short DockLayout = 59; - public const short DockLayoutInput = 60; - public const short Double = 61; - public const short DragHandler = 62; - public const short DragSourceHandler = 63; - public const short DropAction = 64; - public const short DropTargetHandler = 65; - public const short EdgeDetection = 66; - public const short EdgeDetectionInstance = 67; - public const short EditableTextData = 68; - public const short Effect = 69; - public const short EffectAnimation = 70; - public const short EffectColorAnimation = 71; - public const short EffectColorKeyframe = 72; - public const short EffectElement = 73; - public const short EffectElementInstance = 74; - public const short EffectFloatAnimation = 75; - public const short EffectFloatKeyframe = 76; - public const short EffectInput = 77; - public const short EffectInstance = 78; - public const short EffectLayer = 79; - public const short EffectOperation = 80; - public const short EffectVector3Animation = 81; - public const short EffectVector3Keyframe = 82; - public const short Emboss = 83; - public const short EmbossDirection = 84; - public const short EmbossInstance = 85; - public const short Enumerator = 86; - public const short Environment = 87; - public const short EventContext = 88; - public const short FlipDirection = 89; - public const short FlowLayout = 90; - public const short FocusChangeReason = 91; - public const short FocusHandler = 92; - public const short Font = 93; - public const short FontStyles = 94; - public const short FormLayoutInput = 95; - public const short GaussianBlurMode = 96; - public const short Graphic = 97; - public const short GraphicsDeviceType = 98; - public const short GridLayout = 99; - public const short Group = 100; - public const short Host = 101; - public const short HostStatus = 102; - public const short HwndHost = 103; - public const short IAnimation = 104; - public const short Image = 105; - public const short ImageElement = 106; - public const short ImageElementInstance = 107; - public const short ImageStatus = 108; - public const short Index = 109; - public const short InputHandler = 110; - public const short InputHandlerModifiers = 111; - public const short InputHandlerStage = 112; - public const short InputHandlerTransition = 113; - public const short Inset = 114; - public const short Int32 = 115; - public const short Int64 = 116; - public const short IntRangedValue = 117; - public const short InterestPoint = 118; - public const short InterpolateElement = 119; - public const short InterpolateElementInstance = 120; - public const short Interpolation = 121; - public const short InterpolationType = 122; - public const short InvAlpha = 123; - public const short InvColor = 124; - public const short Invert = 125; - public const short InvokePriority = 126; - public const short ItemAlignment = 127; - public const short KeyHandler = 128; - public const short KeyHandlerKey = 129; - public const short Keyframe = 130; - public const short KeyframeFilter = 131; - public const short Layout = 132; - public const short LayoutInput = 133; - public const short LayoutOutput = 134; - public const short LightShaft = 135; - public const short LightShaftInstance = 136; - public const short LineAlignment = 137; - public const short List = 138; - public const short MajorMinor = 139; - public const short Mapping = 140; - public const short Markup = 141; - public const short MarkupDataQueryInstance = 142; - public const short MarkupDataTypeInstance = 143; - public const short MarkupError = 144; - public const short Math = 145; - public const short MaximizeMode = 146; - public const short MergeAnimation = 147; - public const short MissingItemPolicy = 148; - public const short MouseTarget = 149; - public const short MouseWheelHandler = 150; - public const short NavigationPolicies = 151; - public const short Null = 152; - public const short Object = 153; - public const short Orientation = 154; - public const short OrientationKeyframe = 155; - public const short Panel = 156; - public const short PlacementMode = 157; - public const short Point = 158; - public const short PointLight2D = 159; - public const short PointLight2DInstance = 160; - public const short PopupLayout = 161; - public const short PopupLayoutInput = 162; - public const short PopupPosition = 163; - public const short PositionKeyframe = 164; - public const short PositionXKeyframe = 165; - public const short PositionYKeyframe = 166; - public const short Random = 167; - public const short RangedValue = 168; - public const short Rectangle = 169; - public const short RelativeEdge = 170; - public const short RelativeTo = 171; - public const short RepeatPolicy = 172; - public const short Repeater = 173; - public const short RotateKeyframe = 174; - public const short RotateLayout = 175; - public const short Rotation = 176; - public const short SavedKeyFocus = 177; - public const short ScaleKeyframe = 178; - public const short ScaleLayout = 179; - public const short ScaleXKeyframe = 180; - public const short ScaleYKeyframe = 181; - public const short ScrollModel = 182; - public const short ScrollModelBase = 183; - public const short Scroller = 184; - public const short ScrollingHandler = 185; - public const short SelectionManager = 186; - public const short SelectionRange = 187; - public const short Sepia = 188; - public const short SepiaInstance = 189; - public const short SharedSize = 190; - public const short SharedSizePolicy = 191; - public const short ShortcutHandler = 192; - public const short ShortcutHandlerCommand = 193; - public const short Single = 194; - public const short Size = 195; - public const short SizeKeyframe = 196; - public const short SizeXKeyframe = 197; - public const short SizeYKeyframe = 198; - public const short SizingPolicy = 199; - public const short SnapshotPolicy = 200; - public const short Sound = 201; - public const short SpotLight2D = 202; - public const short SpotLight2DInstance = 203; - public const short StackLayout = 204; - public const short StackLayoutInput = 205; - public const short StackPriority = 206; - public const short StretchingPolicy = 207; - public const short String = 208; - public const short StripAlignment = 209; - public const short SwitchAnimation = 210; - public const short SystemSoundEvent = 211; - public const short Text = 212; - public const short TextBounds = 213; - public const short TextEditingHandler = 214; - public const short TextFragment = 215; - public const short TextRunData = 216; - public const short TextRunRenderer = 217; - public const short TextScrollModel = 218; - public const short TextSharpness = 219; - public const short TextStyle = 220; - public const short Timer = 221; - public const short TransformAnimation = 222; - public const short TransformAttribute = 223; - public const short TransformByAttributeAnimation = 224; - public const short Type = 225; - public const short TypeConstraint = 226; - public const short TypeSelector = 227; - public const short TypingHandler = 228; - public const short UI = 229; - public const short UIState = 230; - public const short ValueRange = 231; - public const short ValueTransformer = 232; - public const short Vector2 = 233; - public const short Vector3 = 234; - public const short Video = 235; - public const short VideoElement = 236; - public const short VideoElementInstance = 237; - public const short VideoStream = 238; - public const short ViewItem = 239; - public const short Void = 240; - public const short Window = 241; - public const short WindowState = 242; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXTypeSchema.cs b/UIX/Microsoft/Iris/Markup/UIXTypeSchema.cs deleted file mode 100644 index eb462b1..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXTypeSchema.cs +++ /dev/null @@ -1,255 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXTypeSchema -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -using Microsoft.Iris.Library; -using System; - -namespace Microsoft.Iris.Markup -{ - public class UIXTypeSchema : TypeSchema - { - private short _typeID; - private short _baseTypeID; - private string _name; - private string _alternateName; - private TypeSchema _baseType; - private DefaultConstructHandler _defaultConstructor; - private ConstructorSchema[] _constructors; - private PropertySchema[] _properties; - private MethodSchema[] _methods; - private EventSchema[] _events; - private TypeConverterHandler _typeConverter; - private SupportsTypeConversionHandler _supportsTypeConversion; - private EncodeBinaryHandler _encodeBinary; - private DecodeBinaryHandler _decodeBinary; - private PerformOperationHandler _performOperation; - private SupportsOperationHandler _supportsOperation; - private FindCanonicalInstanceHandler _findCanonicalInstance; - private Type _instanceType; - private UIXTypeFlags _flags; - private static object[] EmptyParameterList = new object[0]; - - public UIXTypeSchema( - short typeID, - string name, - string alternateName, - short baseTypeID, - Type instanceType, - UIXTypeFlags flags) - : base(MarkupSystem.UIXGlobal) - { - this._typeID = typeID; - this._baseTypeID = baseTypeID; - this._name = name; - this._alternateName = alternateName; - this._instanceType = instanceType; - this._flags = flags; - UIXTypes.RegisterTypeForID(typeID, this); - } - - public void Initialize( - DefaultConstructHandler defaultConstructor, - ConstructorSchema[] constructors, - PropertySchema[] properties, - MethodSchema[] methods, - EventSchema[] events, - FindCanonicalInstanceHandler findCanonicalInstance, - TypeConverterHandler typeConverter, - SupportsTypeConversionHandler supportsTypeConversion, - EncodeBinaryHandler encodeBinary, - DecodeBinaryHandler decodeBinary, - PerformOperationHandler performOperation, - SupportsOperationHandler supportsOperation) - { - if (constructors == null) - constructors = ConstructorSchema.EmptyList; - if (properties == null) - properties = PropertySchema.EmptyList; - if (methods == null) - methods = MethodSchema.EmptyList; - if (events == null) - events = EventSchema.EmptyList; - this._defaultConstructor = defaultConstructor; - this._constructors = constructors; - this._properties = properties; - this._methods = methods; - this._events = events; - this._findCanonicalInstance = findCanonicalInstance; - this._typeConverter = typeConverter; - this._supportsTypeConversion = supportsTypeConversion; - this._encodeBinary = encodeBinary; - this._decodeBinary = decodeBinary; - this._performOperation = performOperation; - this._supportsOperation = supportsOperation; - } - - protected override void OnDispose() - { - base.OnDispose(); - foreach (DisposableObject constructor in this._constructors) - constructor.Dispose(this); - foreach (DisposableObject property in this._properties) - property.Dispose(this); - foreach (DisposableObject method in this._methods) - method.Dispose(this); - foreach (DisposableObject disposableObject in this._events) - disposableObject.Dispose(this); - } - - public override string Name => this._name; - - public override string AlternateName => this._alternateName; - - public override TypeSchema Base - { - get - { - if (this._baseTypeID != -1 && this._baseType == null) - this._baseType = UIXTypes.MapIDToType(this._baseTypeID); - return this._baseType; - } - } - - public override bool Contractual => false; - - public override Type RuntimeType => this._instanceType; - - public override bool IsNativeAssignableFrom(object check) => this.RuntimeType.IsAssignableFrom(check.GetType()); - - public override bool IsNativeAssignableFrom(TypeSchema checkSchema) => false; - - public override bool Disposable => (this._flags & UIXTypeFlags.Disposable) != UIXTypeFlags.None; - - public override bool IsStatic => (this._flags & UIXTypeFlags.Static) != UIXTypeFlags.None; - - public override object ConstructDefault() => this._defaultConstructor(); - - public override bool HasDefaultConstructor => this._defaultConstructor != null; - - public override bool HasInitializer => false; - - public override void InitializeInstance(ref object instance) - { - } - - public override ConstructorSchema FindConstructor(TypeSchema[] parameters) - { - for (int index1 = 0; index1 < this._constructors.Length; ++index1) - { - ConstructorSchema constructor = this._constructors[index1]; - TypeSchema[] parameterTypes = constructor.ParameterTypes; - if (parameters.Length == parameterTypes.Length) - { - bool flag = true; - for (int index2 = 0; index2 < parameters.Length; ++index2) - { - if (!parameterTypes[index2].IsAssignableFrom(parameters[index2])) - { - flag = false; - break; - } - } - if (flag) - return constructor; - } - } - return null; - } - - public override PropertySchema FindProperty(string name) - { - for (int index = 0; index < this._properties.Length; ++index) - { - PropertySchema property = this._properties[index]; - if (name == property.Name) - return property; - } - return null; - } - - public override ConstructorSchema[] Constructors => this._constructors; - - public override PropertySchema[] Properties => this._properties; - - public override MethodSchema[] Methods => this._methods; - - public override EventSchema[] Events => this._events; - - public override MethodSchema FindMethod(string name, TypeSchema[] parameters) - { - for (int index1 = 0; index1 < this._methods.Length; ++index1) - { - MethodSchema method = this._methods[index1]; - if (name == method.Name) - { - TypeSchema[] parameterTypes = method.ParameterTypes; - if (parameters.Length == parameterTypes.Length) - { - bool flag = true; - for (int index2 = 0; index2 < parameters.Length; ++index2) - { - if (!parameterTypes[index2].IsAssignableFrom(parameters[index2])) - { - flag = false; - break; - } - } - if (flag) - return method; - } - } - } - return null; - } - - public override EventSchema FindEvent(string name) - { - for (int index = 0; index < this._events.Length; ++index) - { - EventSchema eventSchema = this._events[index]; - if (name == eventSchema.Name) - return eventSchema; - } - return null; - } - - public override object FindCanonicalInstance(string name) => this._findCanonicalInstance != null ? this._findCanonicalInstance(name) : null; - - public override Result TypeConverter( - object from, - TypeSchema fromType, - out object instance) - { - return this._typeConverter(from, fromType, out instance); - } - - public override bool SupportsTypeConversion(TypeSchema fromType) => this._supportsTypeConversion != null && this._supportsTypeConversion(fromType); - - public override void EncodeBinary(ByteCodeWriter writer, object instance) => this._encodeBinary(writer, instance); - - public override object DecodeBinary(ByteCodeReader reader) => this._decodeBinary(reader); - - public override bool SupportsBinaryEncoding => this._encodeBinary != null; - - public override int FindTypeHint => _typeID; - - public override object PerformOperation(object left, object right, OperationType op) - { - object obj = null; - if (this._performOperation != null) - obj = this._performOperation(left, right, op); - return obj; - } - - public override bool SupportsOperation(OperationType op) => this._supportsOperation != null && this._supportsOperation(op); - - public override bool IsNullAssignable => !this._instanceType.IsValueType; - - public override bool IsRuntimeImmutable => (this._flags & UIXTypeFlags.Immutable) != UIXTypeFlags.None; - - public override string ErrorContextDescription => this.Name; - } -} diff --git a/UIX/Microsoft/Iris/Markup/UIXTypes.cs b/UIX/Microsoft/Iris/Markup/UIXTypes.cs deleted file mode 100644 index 36b67c6..0000000 --- a/UIX/Microsoft/Iris/Markup/UIXTypes.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.UIXTypes -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class UIXTypes - { - public static TypeSchema MapIDToType(short ID) => ID != -1 ? UIXLoadResultExports.ExportTable[ID] : null; - - public static TypeSchema[] MapIDsToTypes(short[] IDs) - { - TypeSchema[] typeSchemaArray; - if (IDs == null) - { - typeSchemaArray = TypeSchema.EmptyList; - } - else - { - typeSchemaArray = new TypeSchema[IDs.Length]; - for (int index = 0; index < IDs.Length; ++index) - typeSchemaArray[index] = UIXLoadResultExports.ExportTable[IDs[index]]; - } - return typeSchemaArray; - } - - public static void RegisterTypeForID(short ID, TypeSchema type) => UIXLoadResultExports.ExportTable[ID] = type; - } -} diff --git a/UIX/Microsoft/Iris/Markup/ValidateMessage.cs b/UIX/Microsoft/Iris/Markup/ValidateMessage.cs deleted file mode 100644 index 2a1ec35..0000000 --- a/UIX/Microsoft/Iris/Markup/ValidateMessage.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Microsoft.Iris.Markup.ValidateMessage -// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217 -// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11 -// Assembly location: C:\Program Files\Zune\UIX.dll - -namespace Microsoft.Iris.Markup -{ - public static class ValidateMessage - { - public const string AliasCycleDetected = "Alias cycle detected: {0} {1}"; - public const string AliasTypeRequired = "Alias Type property must be provided"; - public const string AliasTargetTypeNotFound = "Target type for alias '{0}' could not be found"; - public const string AssemblyLoadFailure = "Failure loading assembly"; - public const string AssemblyLoadFailureSpecific = "Failure loading assembly: '{0}'"; - public const string AssemblyInvalidReferenceNoWhack = "Invalid assembly reference '{0}'. URI must contain a forward slash after the assembly name"; - public const string AttributeMustBeBoolean = "Property '{0}' must be Boolean 'true' or 'false'"; - public const string BaseKeywordCanOnlyBeUsedInOverrideMethod = "'base' keyword can only be used in an override method"; - public const string BaseKeywordCanOnlyCallMethod = "'base' keyword can only be used to call the base virtual method inside an override"; - public const string BaseTypeCannotBeShared = "Base type cannot be a shared Class"; - public const string BaseTypeMustBeClass = "Base type must be a markup-defined Class type"; - public const string BaseTypeMustBeMarkupDefined = "Base type must be a markup-defined type"; - public const string BaseTypeMustBeTypeIdentifier = "Base must be a type identifier (prefix:Type)"; - public const string BaseTypeMustBeUI = "Base type must be a markup-defined UI type"; - public const string BreakMustBeInLoop = "No enclosing loop out of which to break or continue"; - public const string CodeBlockRequiresReturn = "Code block must end with a return of type '{0}'"; - public const string CodeReturnValueTypeMismatch = "Return values are not supported for this code block (currently returning '{0}')"; - public const string CodeMustReturnSomething = "Code block must have at least one return statement of type '{0}'"; - public const string ConstructorNotFoundOnType = "A matching constructor could not be found on '{0}'"; - public const string ContentOverrideTypeMismatch = "Content Name '{0}' exists in base class '{1}' with type '{2}' and type override '{3}' does not match"; - public const string ContentNameNotOverridden = "Missing content name declaration: base type '{0}' has declared content name '{1}' of type '{2}'"; - public const string DataIsMalformedPerEncoding = "Malformed input file. The file contains data which is not valid in the {0} encoding"; - public const string DeclaredTriggersCannotBeBaseOnScopedLocals = "Expression cannot be declared as a trigger since '{0}' is a temporary (scoped) variable"; - public const string DeclaredTriggersMustHaveOuterNotifyingMember = "Expression cannot be declared as a trigger since it does not have an outermost property or event that fires notifications"; - public const string DeclaredTriggerOnlySupportedInScripts = "Expressions can only be used as triggers if they exist within Script blocks"; - public const string DefaultConstructorNotFound = "Type '{0}' may only be created via indirection (i.e. <{0} {0}=\"...\"/>)"; - public const string DictionaryPropertyValuesMustBeNamed = "Dictionary property '{0}' requires all values be named"; - public const string DuplicatePropertyFound = "Property '{0}' was specified more than once"; - public const string DuplicateTypeFound = "Type '{0}' was specified more than once"; - public const string ExpressionCannotBeLValue = "Expression cannot be used as the target an assignment (related symbol: '{0}')"; - public const string ExpressionMemberAccessGetOnly = "Expression access to '{0}' only supports read operations"; - public const string ExpressionMemberAccessSetOnly = "Expression access to '{0}' only supports write operations"; - public const string ExpressionMemberAccessUnavailable = "Expression access to '{0}' is not available"; - public const string ExpressionOperationTypeMismatch = "Operator '{0}' cannot be applied to operands of dissimilar types '{1}' and '{2}'"; - public const string ExpressionOperationUnsupported = "Operator '{0}' cannot be applied to operand of type '{1}'"; - public const string ExpressionConditionalTypeMismatch = "Both expressions for the {0} operator must match: '{1}' and '{2}' are not compatible"; - public const string FoundTypeEnumeratorIsNotCorrectType = "While searching for an enumerator, a 'GetEnumerator' method was found on '{0}', but, it is not of type 'Enumerator' (it is '{1}')"; - public const string InvalidSymbolName = "Invalid name \"{0}\". Valid names must begin with either an alphabetic character or an underscore and can otherwise contain only alphabetic, numeric, or underscore characters"; - public const string InvalidTypeCast = "Cannot cast '{0}' to '{1}'"; - public const string InvalidValue = "Specified value '{0}' is not valid"; - public const string InvalidEscapeSequence = "Invalid escape sequence '{0}' in string literal"; - public const string LexerSyntaxErrorFormat = "Syntax Error: Unexpected character encountered: '{0}'"; - public const string MalformedAssemblyName = "Malformed assembly name '{0}'"; - public const string MarkupTypeCyclicReference = "Circular base class dependency involving '{0}' and '{1}'"; - public const string MemberNotFoundOnType = "Unable to find a Property, Event, or Method called \"{0}\" on '{1}'"; - public const string MethodAlreadyDefined = "Method '{0}' was already defined in this class with the same signature"; - public const string MethodDefinedInBaseNotVirtual = "Method '{0}' was already defined in '{1}' with the same signature and was not declared virtual"; - public const string MethodNoMethodToOverride = "Method '{0}' declared override, but no base method found to override"; - public const string MethodMustUseOverride = "Method '{0}' is virtual in '{1}', must use 'override' to override"; - public const string MethodReturnTypeMustBeTheSame = "Method '{0}' overrides base method from '{1}', but return types do not match: '{2}' on override, '{3}' on base."; - public const string MethodSpecifierConflictVirtualOverride = "Only one of 'virtual' and 'override' is allowed"; - public const string MethodSpecifierDuplicated = "Duplicate modifier '{0}'"; - public const string MethodsAllowedOnClassOnly = "Methods allowed only on , and "; - public const string MethodsSpecifiedMoreThanOnce = "Methods may only be specified once"; - public const string MultipleValuePropertyMustHaveObjectTagValues = "Collection property '{0}' may only have multiple values specified in expanded form"; - public const string NameAlreadyInUse = "Name \"{0}\" is already in use (type '{1}') located in '{2}'"; - public const string NameIsReserved = "Name \"{0}\" is reserved and cannot be used."; - public const string NameOverrideDisallowedCrossOrigin = "Name \"{0}\" (located in {1}) cannot override the same name within base class '{2}' (located in {3}) since overrides cannot cross section types"; - public const string NameOverrideDisallowedForOrigin = "Name \"{0}\" (also defined in base class '{1}') cannot be overridden (tried to override {2}, but can only override Properties and Content)"; - public const string NamePropertyRequired = "'Name' property is required and must be provided"; - public const string NameUsageOutOfScope = "Name \"{0}\" may not be used in this context since the tag is not within a Properties, Locals, Input, or Content block"; - public const string NamedContentAttributeMisconfiguration = "Named Content must have a single 'Name' attribute"; - public const string NegativeValuesUnsupported = "Expecting a non-negative value, but got {0}"; - public const string NestedDeclaredTriggersNotAllowed = "Declared triggers may not exist within other declared triggers"; - public const string NullConstantNotAllowedInNullCoalescing = "Null constant may not be used as the condition for ?? operator"; - public const string OutOfRangeMin = "Expecting a value no smaller than {0}, but got {1}"; - public const string OutOfRangeMinMax = "Expecting a value between {0} and {1}, but got {2}"; - public const string OutOfRangeMinMaxExclusive = "Expecting a value between {0} and {1} (exclusive), but got {2}"; - public const string ParameterizedConstructorNotFoundOnType = "A matching constructor could not be found on '{0}' that accepts parameters '{1}'"; - public const string ParameterizedMethodNotFoundOnType = "Unable to find a Method \"{0}\" that accepts parameters '{1}' on '{2}'"; - public const string ParserSyntaxErrorFormat = "Syntax Error: Unexpected character encountered: '{0}'"; - public const string PropertiesUnsupportedOnIndirectionContainers = "Property sets are not supported on type indirection tag. Property specified was '{0}'"; - public const string PropertyAttributesNotSupported = "Property attributes are not supported on property '{0}'"; - public const string PropertyDoesNotSupportMultiValue = "Property '{0}' does not support multiple values (property type is '{1}')"; - public const string PropertyDoesNotSupportReadingForCollectionAdd = "Property '{0}' must support reading to retrieve its collection for multiple value adds"; - public const string PropertyDoesNotSupportSetting = "Property '{0}' does not support setting"; - public const string PropertyMultipleValueScriptBlocksUnsupported = "Property '{0}' does not support multi-value script blocks"; - public const string PropertyNotFoundOnType = "Property '{0}' does not exist on '{1}'"; - public const string PropertyOverrideFound = "Property '{0}' was specified as Override='false' but a base property was found"; - public const string PropertyOverrideNotFound = "Property '{0}' was specified as Override='true' but no property was found to override"; - public const string PropertyOverrideTypeMismatch = "Property '{0}' exists in base class '{1}' with type '{2}' and type override '{3}' does not match"; - public const string PropertyRequiresValue = "Property '{0}' requires a value to be provided"; - public const string PropertyValueCannotHaveMixedTagCodeValues = "Property '{0}' cannot contain both object-tag and script block values"; - public const string PropertyValueMustBeExpanded = "Property '{0}' values must be in expanded form"; - public const string PropertyValueNotInline = "Property '{0}' does not support expanded value syntax"; - public const string PropertyValueTypeMismatch = "Property '{0}' expects a value of type '{1}' but got a value of type '{2}'"; - public const string RequiredPropertyNotSpecified = "Property '{0}' must be specified for '{1}' to function"; - public const string RequiredPropertyNotProvided = "Property '{0}' must be specified"; - public const string RequiredProperyDeclarationOnlyForMarkupTypes = "'$Required' can't be used in this context. It may only be used for declaring required properties on Classes and UIs"; - public const string ReturnTypeCannotBeInferred = "Return type cannot be determined due to inconsistant return type statements (mismatched types are: '{0}' and '{1}')"; - public const string RightAngleExpected = "Expecting a value of 0, 90, 180, or 270, but got {0}"; - public const string RootElementMustBeClass = "Unexpected root element '{0}', must be , or "; - public const string ScriptAttributeNotFound = "Script attribute '{0}' is unknown"; - public const string ScriptAttributeParameterCountInvalid = "Script attribute '{0}' invalid number of parameters (expecting: {1})"; - public const string ScriptAttributeParameterMustBeBoolean = "Script attribute parameter must be Boolean 'true' or 'false'"; - public const string ScriptInvalidStartCharacter = "Invalid starting script character '{0}'"; - public const string StringConversionFailed = "Unable to convert \"{0}\" to type '{1}'"; - public const string StringConversionFailedOuter = "Problem converting '{0}' ({1})"; - public const string StringConverterUnavailable = "String conversion is not available for '{0}'"; - public const string StringLengthInvalid = "\"{0}\" cannot be longer than {1} characters"; - public const string SymbolNotFound = "Unable to locate symbol \"{0}\" within Properties, Locals, Input, or Content"; - public const string SyntaxErrorUnexpectedEOF = "Unexpected end of script (script beginning at line {0}, column {1})"; - public const string SyntaxErrorTypeCastExpectingSymbol = "Type cast was expecting symbol, found '{0}'"; - public const string TagMismatch = "Mismatched tags found: <{0}> ... "; - public const string TechniqueElementCannotBeNamed = "Element '{0}' has no properties that can be changed dynamically and therefore cannot be named"; - public const string TechniqueElementPropertyNotDynamic = "Element '{0}' property '{1}' is being assigned a value which requires it to be set dynamically, but the property cannot be changed dynamically"; - public const string TechniqueOverrideNotAllowed = "Overriding Techniques property is not allowed; base class has already defined techniques"; - public const string TypeConstraintDefinitionMismatch = "Type '{0}' does not match specified constraint '{1}'"; - public const string TypeConstraintPropertyValueNotConstant = "Type parameter property '{0}' must be supplied a type constant (by name, or via 'typeof')"; - public const string TypeConstraintTypeMismatch = "Type parameter property '{0}' is of type '{1}' which is not compatible with the base type constraint '{2}'"; - public const string TypeConverterUnavailable = "Type conversion is not available for '{0}'"; - public const string TypeIsNotEnumerable = "Type '{0}' is not enumerable"; - public const string TypeMismatch = "'{0}' cannot be used in this context (expecting types compatible with '{1}')"; - public const string TypeMismatchAssignment = "Invalid assignment: Type '{0}' cannot be assigned to type '{1}'"; - public const string TypeMustBeNullAssignable = "The {0} operator must be used with a reference type ('{1}' is not null assignable)"; - public const string TypeNotFound = "Type '{0}' was not found within '{1}'"; - public const string TypeNotPublic = "Type '{0}' is not public in '{1}'"; - public const string UICannotBeShared = "UI cannot be marked as shared"; - public const string UIXRootTagScopeNotFound = "Unknown markup format. Expecting ... root markup tags"; - public const string ValueMustBeCodeBlock = "Expecting