Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor/FPF/PresentationFramework')
-rw-r--r--src/Editor/FPF/PresentationFramework/PresentationFramework.csproj9
-rw-r--r--src/Editor/FPF/PresentationFramework/Properties/AssemblyInfo.cs5
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionary.cs101
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionaryLocation.cs9
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.SystemColors.cs30
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.SystemParameters.cs25
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.ThemeInfoAttribute.cs7
-rw-r--r--src/Editor/FPF/PresentationFramework/System.Windows.Thickness.cs215
8 files changed, 401 insertions, 0 deletions
diff --git a/src/Editor/FPF/PresentationFramework/PresentationFramework.csproj b/src/Editor/FPF/PresentationFramework/PresentationFramework.csproj
new file mode 100644
index 0000000..10e9077
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/PresentationFramework.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Xamarin.Mac.Sdk">
+ <PropertyGroup>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\PresentationCore\PresentationCore.csproj" />
+ <ProjectReference Include="..\WindowsBase\WindowsBase.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/Properties/AssemblyInfo.cs b/src/Editor/FPF/PresentationFramework/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ca0bd7d
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/Properties/AssemblyInfo.cs
@@ -0,0 +1,5 @@
+using System;
+using System.Reflection;
+
+[assembly: CLSCompliant(true)]
+[assembly: AssemblyVersion("4.0.0.0")] \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionary.cs b/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionary.cs
new file mode 100644
index 0000000..6444913
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionary.cs
@@ -0,0 +1,101 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Linq;
+
+namespace System.Windows
+{
+ public class ResourceDictionary : System.Object, IDictionary
+ {
+ public System.Boolean Contains(System.Object param0) {
+ if (innerDictionary.ContainsKey (param0))
+ return true;
+ if (_mergedDictionaries != null) {
+ for (int i = MergedDictionaries.Count - 1; i >= 0; i--) {
+ var mergedDictionary = MergedDictionaries[i];
+ if (mergedDictionary != null && mergedDictionary.Contains(param0))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public ResourceDictionary() { }
+ public void Add(System.Object param0, System.Object param1) { innerDictionary[param0] = param1; }
+
+ public void Clear()
+ {
+ innerDictionary.Clear();
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Remove(object key)
+ {
+ innerDictionary.Remove(key);
+ }
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new NotImplementedException();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return innerDictionary.GetEnumerator();
+ }
+
+ private ObservableCollection<ResourceDictionary> _mergedDictionaries = null;
+ public System.Collections.ObjectModel.Collection<System.Windows.ResourceDictionary> MergedDictionaries {
+ get {
+ if (_mergedDictionaries == null) {
+ _mergedDictionaries = new ObservableCollection<ResourceDictionary>();
+ }
+ return _mergedDictionaries;
+ }
+ }
+
+ public bool IsFixedSize => throw new NotImplementedException();
+
+ public bool IsReadOnly => throw new NotImplementedException();
+
+ public ICollection Keys => innerDictionary.Keys;
+
+ public ICollection Values => innerDictionary.Values;
+
+ public int Count => throw new NotImplementedException();
+
+ public bool IsSynchronized => throw new NotImplementedException();
+
+ public object SyncRoot => throw new NotImplementedException();
+
+ public bool HasImplicitDataTemplates { get; set; }
+ public bool HasImplicitStyles { get; private set; }
+ public bool IsThemeDictionary { get; private set; }
+ public bool IsInitialized { get; private set; }
+ public bool InvalidatesImplicitDataTemplateResources { get; private set; }
+
+ Dictionary<object, object> innerDictionary = new Dictionary<object, object>();
+
+ public object this[object key] {
+ get {
+ if (innerDictionary.TryGetValue(key, out var val))
+ return val;
+ for (int i = MergedDictionaries.Count - 1; i >= 0; i--)
+ {
+ var merged = MergedDictionaries [i];
+ val = merged [key];
+ if (val != null)
+ return val;
+ }
+
+ return null;
+ }
+ set { innerDictionary[key] = value; }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionaryLocation.cs b/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionaryLocation.cs
new file mode 100644
index 0000000..b471f0d
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.ResourceDictionaryLocation.cs
@@ -0,0 +1,9 @@
+namespace System.Windows
+{
+ public enum ResourceDictionaryLocation
+ { None,
+ SourceAssembly,
+ ExternalAssembly,
+
+ }
+} \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.SystemColors.cs b/src/Editor/FPF/PresentationFramework/System.Windows.SystemColors.cs
new file mode 100644
index 0000000..a6adb3d
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.SystemColors.cs
@@ -0,0 +1,30 @@
+namespace System.Windows
+{
+ public abstract class SystemColors : System.Object
+ {
+ static System.Windows.Media.Color pinkColor = new Media.Color {
+ R = 255, G = 192, B = 203, A = 255
+ };
+ public static System.Windows.Media.Color ControlColor { get { return pinkColor; } }
+ public static System.Windows.Media.Color ControlTextColor { get { return pinkColor; } }
+ public static System.Windows.Media.Color GrayTextColor { get { return pinkColor; } }
+ public static System.Windows.Media.Color HighlightColor { get { return pinkColor; } }
+ public static System.Windows.Media.Color HighlightTextColor { get { return pinkColor; } }
+ public static System.Windows.Media.SolidColorBrush ActiveBorderBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush ActiveCaptionBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush ControlBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush ControlDarkBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush ControlLightBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush ControlLightLightBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush GrayTextBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush HighlightBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush HotTrackBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush InfoBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush InfoTextBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush WindowBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush WindowFrameBrush { get { return new Media.SolidColorBrush(pinkColor); } }
+ public static System.Windows.Media.SolidColorBrush WindowTextBrush {
+ get { return new Windows.Media.SolidColorBrush(new Media.Color { R = 0, G = 0, B = 0, A = 255 }); }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.SystemParameters.cs b/src/Editor/FPF/PresentationFramework/System.Windows.SystemParameters.cs
new file mode 100644
index 0000000..f24e07b
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.SystemParameters.cs
@@ -0,0 +1,25 @@
+namespace System.Windows
+{
+ public abstract class SystemParameters : System.Object
+ {
+
+
+
+
+
+
+
+
+
+
+ public static System.Boolean HighContrast { get { return false; } }
+ public static System.Boolean IsMenuDropRightAligned { get { throw new System.NotImplementedException(); } }
+ public static System.Boolean MenuDropAlignment { get { throw new System.NotImplementedException(); } }
+ public static System.Double MinimumHorizontalDragDistance { get { return 5; } }
+ public static System.Double MinimumVerticalDragDistance { get { return 5; } }
+ public static System.Double PrimaryScreenHeight { get { throw new System.NotImplementedException(); } }
+ public static System.Double PrimaryScreenWidth { get { throw new System.NotImplementedException(); } }
+ public static System.Int32 WheelScrollLines { get { throw new System.NotImplementedException(); } }
+ public static System.Windows.Rect WorkArea { get { throw new System.NotImplementedException(); } }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.ThemeInfoAttribute.cs b/src/Editor/FPF/PresentationFramework/System.Windows.ThemeInfoAttribute.cs
new file mode 100644
index 0000000..2b6a550
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.ThemeInfoAttribute.cs
@@ -0,0 +1,7 @@
+namespace System.Windows
+{
+ public class ThemeInfoAttribute : System.Attribute
+ { public ThemeInfoAttribute(System.Windows.ResourceDictionaryLocation param0, System.Windows.ResourceDictionaryLocation param1){}
+
+ }
+} \ No newline at end of file
diff --git a/src/Editor/FPF/PresentationFramework/System.Windows.Thickness.cs b/src/Editor/FPF/PresentationFramework/System.Windows.Thickness.cs
new file mode 100644
index 0000000..bd7be9b
--- /dev/null
+++ b/src/Editor/FPF/PresentationFramework/System.Windows.Thickness.cs
@@ -0,0 +1,215 @@
+//---------------------------------------------------------------------------
+//
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//
+// File: Thickness.cs
+//
+// Description: Contains the Thickness (double x4) value type.
+//
+// History:
+// 06/02/2003 : greglett - created.
+//
+//---------------------------------------------------------------------------
+
+using System.ComponentModel;
+using System.Globalization;
+
+namespace System.Windows
+{
+ /// <summary>
+ /// Thickness is a value type used to describe the thickness of frame around a rectangle.
+ /// It contains four doubles each corresponding to a side: Left, Top, Right, Bottom.
+ /// </summary>
+ public struct Thickness : IEquatable<Thickness>
+ {
+ //-------------------------------------------------------------------
+ //
+ // Constructors
+ //
+ //-------------------------------------------------------------------
+
+ #region Constructors
+ /// <summary>
+ /// This constructur builds a Thickness with a specified value on every side.
+ /// </summary>
+ /// <param name="uniformLength">The specified uniform length.</param>
+ public Thickness(double uniformLength)
+ {
+ _Left = _Top = _Right = _Bottom = uniformLength;
+ }
+
+ /// <summary>
+ /// This constructor builds a Thickness with the specified number of pixels on each side.
+ /// </summary>
+ /// <param name="left">The thickness for the left side.</param>
+ /// <param name="top">The thickness for the top side.</param>
+ /// <param name="right">The thickness for the right side.</param>
+ /// <param name="bottom">The thickness for the bottom side.</param>
+ public Thickness(double left, double top, double right, double bottom)
+ {
+ _Left = left;
+ _Top = top;
+ _Right = right;
+ _Bottom = bottom;
+ }
+
+
+ #endregion
+
+
+ //-------------------------------------------------------------------
+ //
+ // Public Methods
+ //
+ //-------------------------------------------------------------------
+
+ #region Public Methods
+
+ /// <summary>
+ /// This function compares to the provided object for type and value equality.
+ /// </summary>
+ /// <param name="obj">Object to compare</param>
+ /// <returns>True if object is a Thickness and all sides of it are equal to this Thickness'.</returns>
+ public override bool Equals(object obj)
+ {
+ if (obj is Thickness)
+ {
+ Thickness otherObj = (Thickness)obj;
+ return (this == otherObj);
+ }
+ return (false);
+ }
+
+ /// <summary>
+ /// Compares this instance of Thickness with another instance.
+ /// </summary>
+ /// <param name="thickness">Thickness instance to compare.</param>
+ /// <returns><c>true</c>if this Thickness instance has the same value
+ /// and unit type as thickness.</returns>
+ public bool Equals(Thickness thickness)
+ {
+ return (this == thickness);
+ }
+
+ /// <summary>
+ /// This function returns a hash code.
+ /// </summary>
+ /// <returns>Hash code</returns>
+ public override int GetHashCode()
+ {
+ return _Left.GetHashCode() ^ _Top.GetHashCode() ^ _Right.GetHashCode() ^ _Bottom.GetHashCode();
+ }
+
+ #endregion
+
+
+ //-------------------------------------------------------------------
+ //
+ // Public Operators
+ //
+ //-------------------------------------------------------------------
+
+ #region Public Operators
+
+ /// <summary>
+ /// Overloaded operator to compare two Thicknesses for equality.
+ /// </summary>
+ /// <param name="t1">first Thickness to compare</param>
+ /// <param name="t2">second Thickness to compare</param>
+ /// <returns>True if all sides of the Thickness are equal, false otherwise</returns>
+ // SEEALSO
+ public static bool operator ==(Thickness t1, Thickness t2)
+ {
+ return ((t1._Left == t2._Left || (double.IsNaN(t1._Left) && double.IsNaN(t2._Left)))
+ && (t1._Top == t2._Top || (double.IsNaN(t1._Top) && double.IsNaN(t2._Top)))
+ && (t1._Right == t2._Right || (double.IsNaN(t1._Right) && double.IsNaN(t2._Right)))
+ && (t1._Bottom == t2._Bottom || (double.IsNaN(t1._Bottom) && double.IsNaN(t2._Bottom)))
+ );
+ }
+
+ /// <summary>
+ /// Overloaded operator to compare two Thicknesses for inequality.
+ /// </summary>
+ /// <param name="t1">first Thickness to compare</param>
+ /// <param name="t2">second Thickness to compare</param>
+ /// <returns>False if all sides of the Thickness are equal, true otherwise</returns>
+ // SEEALSO
+ public static bool operator !=(Thickness t1, Thickness t2)
+ {
+ return (!(t1 == t2));
+ }
+
+ #endregion
+
+
+ //-------------------------------------------------------------------
+ //
+ // Public Properties
+ //
+ //-------------------------------------------------------------------
+
+ #region Public Properties
+
+ /// <summary>This property is the Length on the thickness' left side</summary>
+ public double Left
+ {
+ get { return _Left; }
+ set { _Left = value; }
+ }
+
+ /// <summary>This property is the Length on the thickness' top side</summary>
+ public double Top
+ {
+ get { return _Top; }
+ set { _Top = value; }
+ }
+
+ /// <summary>This property is the Length on the thickness' right side</summary>
+ public double Right
+ {
+ get { return _Right; }
+ set { _Right = value; }
+ }
+
+ /// <summary>This property is the Length on the thickness' bottom side</summary>
+ public double Bottom
+ {
+ get { return _Bottom; }
+ set { _Bottom = value; }
+ }
+ #endregion
+
+ //-------------------------------------------------------------------
+ //
+ // INternal API
+ //
+ //-------------------------------------------------------------------
+
+ #region Internal API
+
+ internal Size Size
+ {
+ get
+ {
+ return new Size(_Left + _Right, _Top + _Bottom);
+ }
+ }
+
+ #endregion
+
+ //-------------------------------------------------------------------
+ //
+ // Private Fields
+ //
+ //-------------------------------------------------------------------
+
+ #region Private Fields
+
+ private double _Left;
+ private double _Top;
+ private double _Right;
+ private double _Bottom;
+
+ #endregion
+ }
+} \ No newline at end of file