Skip to content

Commit

Permalink
Merge pull request #101 from SeriousM/remove_sl_wp
Browse files Browse the repository at this point in the history
Removal of SL & WP support
  • Loading branch information
MrCircuit committed May 4, 2016
2 parents 35f68ba + 218bdc7 commit 1abc92e
Show file tree
Hide file tree
Showing 34 changed files with 5 additions and 745 deletions.
16 changes: 3 additions & 13 deletions MemoryTest.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFLocalizeExtension", "WPFLocalizeExtension\WPFLocalizeExtension.csproj", "{E8C5B094-2CB4-4C26-87F0-351B03612179}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MemoryTest", "Tests\MemoryTest\MemoryTest.csproj", "{3D591943-C256-46EB-88EA-CCA0B3A498E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFMarkupExtensions-3.5", "..\XAMLMarkupExtensions\XAMLMarkupExtensions\WPFMarkupExtensions-3.5.csproj", "{4EAF896D-9C9A-4654-891A-BC9919864886}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -37,16 +37,6 @@ Global
{3D591943-C256-46EB-88EA-CCA0B3A498E6}.Release|Mixed Platforms.Build.0 = Release|x86
{3D591943-C256-46EB-88EA-CCA0B3A498E6}.Release|x86.ActiveCfg = Release|x86
{3D591943-C256-46EB-88EA-CCA0B3A498E6}.Release|x86.Build.0 = Release|x86
{4EAF896D-9C9A-4654-891A-BC9919864886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Debug|x86.ActiveCfg = Debug|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Release|Any CPU.Build.0 = Release|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4EAF896D-9C9A-4654-891A-BC9919864886}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 0 additions & 6 deletions Tests/SLTest/SLTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@
<ItemGroup>
<Resource Include="Resources\United_Kingdom.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\WPFLocalizeExtension\SLLocalizeExtension.csproj">
<Project>{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}</Project>
<Name>SLLocalizeExtension</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Properties\OutOfBrowserSettings.xml" />
</ItemGroup>
Expand Down
8 changes: 1 addition & 7 deletions WPFLocalizeExtension.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFLocalizeExtension", "WPFLocalizeExtension\WPFLocalizeExtension.csproj", "{E8C5B094-2CB4-4C26-87F0-351B03612179}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLLocalizeExtension", "WPFLocalizeExtension\SLLocalizeExtension.csproj", "{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFLocalizationExtensionDemoApplication", "WPFLocalizationExtensionDemoApplication\WPFLocalizationExtensionDemoApplication.csproj", "{53618740-D7CF-43C3-A8A7-D81522A16623}"
EndProject
Global
Expand All @@ -19,10 +17,6 @@ Global
{E8C5B094-2CB4-4C26-87F0-351B03612179}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8C5B094-2CB4-4C26-87F0-351B03612179}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8C5B094-2CB4-4C26-87F0-351B03612179}.Release|Any CPU.Build.0 = Release|Any CPU
{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7422AF3D-69D5-4862-90CF-62A8C5B23FBC}.Release|Any CPU.Build.0 = Release|Any CPU
{53618740-D7CF-43C3-A8A7-D81522A16623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53618740-D7CF-43C3-A8A7-D81522A16623}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53618740-D7CF-43C3-A8A7-D81522A16623}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
4 changes: 0 additions & 4 deletions WPFLocalizeExtension/Engine/EnumComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// <author>Uwe Mayer</author>
#endregion

#if SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
using System;
using System.Linq;
Expand Down
6 changes: 0 additions & 6 deletions WPFLocalizeExtension/Engine/IDictionaryEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
// <author>Uwe Mayer</author>
#endregion

#if WINDOWS_PHONE
namespace WP7LocalizeExtension.Engine
#elif SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
using System;
using System.Windows;
Expand Down
14 changes: 0 additions & 14 deletions WPFLocalizeExtension/Engine/LocBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// <author>Uwe Mayer</author>
#endregion

#if SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
#region Uses
using System;
Expand All @@ -19,11 +15,7 @@ namespace WPFLocalizeExtension.Engine
using System.Text;
using System.Windows;
using System.Windows.Data;
#if SILVERLIGHT
using SLLocalizeExtension.Extensions;
#else
using WPFLocalizeExtension.Extensions;
#endif
#endregion

/// <summary>
Expand All @@ -36,19 +28,13 @@ public class LocBinding : FrameworkElement
/// <summary>
/// We don't know what will be the Source/target type so we keep 'object'.
/// </summary>
#if SILVERLIGHT
public static readonly DependencyProperty SourceProperty =
DependencyProperty.Register("Source", typeof(object), typeof(LocBinding),
new PropertyMetadata(null, OnPropertyChanged));
#else
public static readonly DependencyProperty SourceProperty =
DependencyProperty.Register("Source", typeof(object), typeof(LocBinding),
new FrameworkPropertyMetadata(OnPropertyChanged)
{
BindsTwoWayByDefault = true,
DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
});
#endif

/// <summary>
/// The source.
Expand Down
4 changes: 0 additions & 4 deletions WPFLocalizeExtension/Engine/LocProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// <author>Uwe Mayer</author>
#endregion

#if SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
using System;
using System.ComponentModel;
Expand Down
70 changes: 0 additions & 70 deletions WPFLocalizeExtension/Engine/LocalizeDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,15 @@
using System.Windows.Markup;

// Register this namespace one with prefix
#if WINDOWS_PHONE
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WP7LocalizeExtension.Engine")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WP7LocalizeExtension.Extensions")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WP7LocalizeExtension.Providers")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WP7LocalizeExtension.TypeConverters")]
#elif SILVERLIGHT
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "SLLocalizeExtension.Engine")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "SLLocalizeExtension.Extensions")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "SLLocalizeExtension.Providers")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "SLLocalizeExtension.TypeConverters")]
#else
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WPFLocalizeExtension.Engine")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WPFLocalizeExtension.Extensions")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WPFLocalizeExtension.Providers")]
[assembly: XmlnsDefinition("http://wpflocalizeextension.codeplex.com", "WPFLocalizeExtension.TypeConverters")]
#endif

// Assign a default namespace prefix for the schema
[assembly: XmlnsPrefix("http://wpflocalizeextension.codeplex.com", "lex")]

#if WINDOWS_PHONE
namespace WP7LocalizeExtension.Engine
#elif SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
#region Uses
using System;
Expand All @@ -51,12 +33,8 @@ namespace WPFLocalizeExtension.Engine
using System.Windows.Input;
using Extensions;
using Providers;
#if !WINDOWS_PHONE
using XAMLMarkupExtensions.Base;
#endif
#if !SILVERLIGHT
using System.Windows.Threading;
#endif
#endregion

/// <summary>
Expand Down Expand Up @@ -108,10 +86,7 @@ internal void RaisePropertyChanged(string property)
/// <see cref="DependencyProperty"/> DesignCulture to set the Culture.
/// Only supported at DesignTime.
/// </summary>
#if SILVERLIGHT
#else
[DesignOnly(true)]
#endif
public static readonly DependencyProperty DesignCultureProperty =
DependencyProperty.RegisterAttached(
"DesignCulture",
Expand Down Expand Up @@ -167,10 +142,7 @@ internal void RaisePropertyChanged(string property)
/// </summary>
/// <param name="obj">The dependency object.</param>
/// <param name="args">The event argument.</param>
#if SILVERLIGHT
#else
[DesignOnly(true)]
#endif
private static void SetCultureFromDependencyProperty(DependencyObject obj, DependencyPropertyChangedEventArgs args)
{
if (!Instance.GetIsInDesignMode())
Expand Down Expand Up @@ -359,10 +331,7 @@ public static bool GetOutputMissingKeys(DependencyObject target)
/// </summary>
/// <param name="obj">The dependency object to get the design culture from.</param>
/// <returns>The design culture at design time or the current culture at runtime.</returns>
#if SILVERLIGHT
#else
[DesignOnly(true)]
#endif
public static string GetDesignCulture(DependencyObject obj)
{
if (Instance.GetIsInDesignMode())
Expand Down Expand Up @@ -439,10 +408,7 @@ public static void SetOutputMissingKeys(DependencyObject obj, bool value)
/// </summary>
/// <param name="obj">The dependency object to set the culture to.</param>
/// <param name="value">The value.</param>
#if SILVERLIGHT
#else
[DesignOnly(true)]
#endif
public static void SetDesignCulture(DependencyObject obj, string value)
{
if (Instance.GetIsInDesignMode())
Expand Down Expand Up @@ -502,12 +468,10 @@ public static void SetDesignCulture(DependencyObject obj, string value)
/// </summary>
private bool? _isInDesignMode = null;

#if !WINDOWS_PHONE
/// <summary>
/// A dictionary for notification classes for changes of the individual target Parent changes.
/// </summary>
private ParentNotifiers parentNotifiers = new ParentNotifiers();
#endif
#endregion

#region Constructor
Expand All @@ -517,11 +481,7 @@ public static void SetDesignCulture(DependencyObject obj, string value)
/// </summary>
private LocalizeDictionary()
{
#if WINDOWS_PHONE
this.DefaultProvider = StaticResxLocalizationProvider.Instance;
#else
this.DefaultProvider = ResxLocalizationProvider.Instance;
#endif
this.SetCultureCommand = new CultureInfoDelegateCommand(SetCulture);
}

Expand Down Expand Up @@ -557,12 +517,8 @@ private void AvailableCulturesCollectionChanged(object sender, NotifyCollectionC
/// </summary>
~LocalizeDictionary()
{
#if !WINDOWS_PHONE
LocExtension.ClearResourceBuffer();
#endif
#if !SILVERLIGHT
FELoc.ClearResourceBuffer();
#endif
BLoc.ClearResourceBuffer();
}
#endregion
Expand Down Expand Up @@ -838,8 +794,6 @@ public ObservableCollection<CultureInfo> MergedAvailableCultures
/// </summary>
public ICommand SetCultureCommand { get; private set; }

#if SILVERLIGHT
#else
/// <summary>
/// Gets the specific <see cref="CultureInfo"/> of the current culture.
/// This can be used for format manners.
Expand All @@ -853,7 +807,6 @@ public CultureInfo SpecificCulture
return CultureInfo.CreateSpecificCulture(this.Culture.ToString());
}
}
#endif
#endregion

#region Localization Core
Expand All @@ -879,19 +832,13 @@ public object GetLocalizedObject(string source, string dictionary, string key, C
/// <returns>The value corresponding to the source/dictionary/key path for the given culture (otherwise NULL).</returns>
public object GetLocalizedObject(string key, DependencyObject target, CultureInfo culture)
{
#if WINDOWS_PHONE
var provider = this.DefaultProvider;
#else
#if !SILVERLIGHT
if (this.DefaultProvider is InheritingResxLocalizationProvider)
return GetLocalizedObject(key, target, culture, this.DefaultProvider);
#endif

var provider = target != null ? target.GetValue(GetProvider) : null;

if (provider == null)
provider = this.DefaultProvider;
#endif

return GetLocalizedObject(key, target, culture, provider);
}
Expand Down Expand Up @@ -920,19 +867,13 @@ public object GetLocalizedObject(string key, DependencyObject target, CultureInf
/// <returns>Returns an object with all possible pieces of the given key (Assembly, Dictionary, Key)</returns>
public FullyQualifiedResourceKeyBase GetFullyQualifiedResourceKey(string key, DependencyObject target)
{
#if WINDOWS_PHONE
var provider = this.DefaultProvider;
#else
#if !SILVERLIGHT
if (this.DefaultProvider is InheritingResxLocalizationProvider)
return GetFullyQualifiedResourceKey(key, target, this.DefaultProvider);
#endif

var provider = target != null ? target.GetValue(GetProvider) : null;

if (provider == null)
provider = this.DefaultProvider;
#endif

return GetFullyQualifiedResourceKey(key, target, provider);
}
Expand Down Expand Up @@ -983,11 +924,7 @@ public bool ResourceKeyExists(string resourceAssembly, string resourceDictionary
/// </returns>
public bool ResourceKeyExists(string resourceAssembly, string resourceDictionary, string resourceKey, CultureInfo cultureToUse)
{
#if WINDOWS_PHONE
var provider = StaticResxLocalizationProvider.Instance;
#else
var provider = ResxLocalizationProvider.Instance;
#endif

return ResourceKeyExists(resourceAssembly + ":" + resourceDictionary + ":" + resourceKey, cultureToUse, provider);
}
Expand Down Expand Up @@ -1018,8 +955,6 @@ public bool GetIsInDesignMode()
{
lock (SyncRoot)
{
#if SILVERLIGHT
#else
if (_isInDesignMode.HasValue)
return _isInDesignMode.Value;

Expand All @@ -1042,7 +977,6 @@ public bool GetIsInDesignMode()

return _isInDesignMode.Value;
}
#endif
_isInDesignMode = DesignerProperties.GetIsInDesignMode(this);
return _isInDesignMode.Value;
}
Expand Down Expand Up @@ -1241,9 +1175,6 @@ public CultureInfoDelegateCommand(Action<CultureInfo> execute, Predicate<Culture
/// <summary>
/// Occurs when changes occur that affect whether or not the command should execute.
/// </summary>
#if SILVERLIGHT
public event EventHandler CanExecuteChanged;
#else
public event EventHandler CanExecuteChanged
{
add
Expand All @@ -1255,7 +1186,6 @@ public CultureInfoDelegateCommand(Action<CultureInfo> execute, Predicate<Culture
CommandManager.RequerySuggested -= value;
}
}
#endif

/// <summary>
/// Determines whether the command can execute in its current state.
Expand Down
6 changes: 0 additions & 6 deletions WPFLocalizeExtension/Engine/MissingKeyEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
// <author>Uwe Mayer</author>
#endregion

#if WINDOWS_PHONE
namespace WP7LocalizeExtension.Engine
#elif SILVERLIGHT
namespace SLLocalizeExtension.Engine
#else
namespace WPFLocalizeExtension.Engine
#endif
{
using System;

Expand Down

0 comments on commit 1abc92e

Please sign in to comment.