diff --git a/MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj b/MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj
index 7aafd815..72499e9c 100644
--- a/MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj
+++ b/MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj
@@ -111,15 +111,16 @@
-
-
+
+
+
@@ -138,8 +139,8 @@
-
-
+
+
diff --git a/MPfm/MPfm.Library/Services/WinRT/SyncDiscoveryService.cs b/MPfm/MPfm.Library/Services/WinRT/SyncDiscoveryService.cs
index 012674ac..db01cc67 100644
--- a/MPfm/MPfm.Library/Services/WinRT/SyncDiscoveryService.cs
+++ b/MPfm/MPfm.Library/Services/WinRT/SyncDiscoveryService.cs
@@ -16,7 +16,7 @@
// along with MPfm. If not, see .
using System;
-using System.Collections.Concurrent;
+//using System.Collections.Concurrent; // Not supported on WP8 but supported on W8...
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -77,89 +77,89 @@ public void SearchForDevices(string baseIP)
/// IP addresses to search
public void SearchForDevices(List ips)
{
- SearchForDevices(ips, (devices) => {
- if(OnDiscoveryEnded != null)
- OnDiscoveryEnded(devices);
- });
+ //SearchForDevices(ips, (devices) => {
+ // if(OnDiscoveryEnded != null)
+ // OnDiscoveryEnded(devices);
+ //});
}
- ///
- /// Searches for devices in the IP addresses passed in parameter.
- ///
- /// IP addresses to search
- /// This action will be triggered when the discovery has ended
- private void SearchForDevices(List ips, Action> actionDiscoveryEnded)
- {
- //int ipCount = 0;
- //_cancellationTokenSource = new CancellationTokenSource();
- //ParallelOptions parallelOptions = new ParallelOptions();
- //parallelOptions.CancellationToken = _cancellationTokenSource.Token;
- //parallelOptions.MaxDegreeOfParallelism = System.Environment.ProcessorCount * 2;
- //_currentTask = Task.Factory.StartNew(() => {
- // try
- // {
- // Console.WriteLine("SyncDiscoveryService - SearchForDevices - processorCount: {0}", System.Environment.ProcessorCount);
- // IsRunning = true;
- // ConcurrentBag devices = new ConcurrentBag();
- // Parallel.For(1, ips.Count, parallelOptions, (index, state) =>
- // {
- // //// Check for cancel (for some reason this doesn't work!)
- // //if (_cancellationTokenSource.IsCancellationRequested)
- // // state.Stop();
+ /////
+ ///// Searches for devices in the IP addresses passed in parameter.
+ /////
+ ///// IP addresses to search
+ ///// This action will be triggered when the discovery has ended
+ //private void SearchForDevices(List ips, Action> actionDiscoveryEnded)
+ //{
+ // //int ipCount = 0;
+ // //_cancellationTokenSource = new CancellationTokenSource();
+ // //ParallelOptions parallelOptions = new ParallelOptions();
+ // //parallelOptions.CancellationToken = _cancellationTokenSource.Token;
+ // //parallelOptions.MaxDegreeOfParallelism = System.Environment.ProcessorCount * 2;
+ // //_currentTask = Task.Factory.StartNew(() => {
+ // // try
+ // // {
+ // // Console.WriteLine("SyncDiscoveryService - SearchForDevices - processorCount: {0}", System.Environment.ProcessorCount);
+ // // IsRunning = true;
+ // // ConcurrentBag devices = new ConcurrentBag();
+ // // Parallel.For(1, ips.Count, parallelOptions, (index, state) =>
+ // // {
+ // // //// Check for cancel (for some reason this doesn't work!)
+ // // //if (_cancellationTokenSource.IsCancellationRequested)
+ // // // state.Stop();
- // if (_isCancelling)
- // {
- // Console.WriteLine("SyncDiscoveryService - Cancelling parallel task...");
- // state.Stop();
- // }
+ // // if (_isCancelling)
+ // // {
+ // // Console.WriteLine("SyncDiscoveryService - Cancelling parallel task...");
+ // // state.Stop();
+ // // }
- // try
- // {
- // //Console.WriteLine("SyncDiscoveryService - Pinging {0}...", ips[index]);
- // WebClientTimeout client = new WebClientTimeout(800);
- // string content = client.DownloadString(string.Format("http://{0}:{1}/sessionsapp.version", ips[index], Port));
+ // // try
+ // // {
+ // // //Console.WriteLine("SyncDiscoveryService - Pinging {0}...", ips[index]);
+ // // WebClientTimeout client = new WebClientTimeout(800);
+ // // string content = client.DownloadString(string.Format("http://{0}:{1}/sessionsapp.version", ips[index], Port));
- // Console.WriteLine("SyncDiscoveryService - Got version from {0}: {1}", ips[index], content);
- // var device = XmlSerialization.Deserialize(content);
- // if (device.SyncVersionId.ToUpper() == SyncListenerService.SyncVersionId.ToUpper())
- // {
- // device.Url = String.Format("http://{0}:{1}/", ips[index], Port);
- // devices.Add(device);
- // Console.WriteLine("SyncDiscoveryService - Raising OnDeviceFound event...");
- // if (OnDeviceFound != null)
- // OnDeviceFound(device);
- // Console.WriteLine("SyncDiscoveryService - The following host is available: {0}", ips[index]);
- // }
- // }
- // catch (Exception ex)
- // {
- // // Ignore IP address
- // }
- // finally
- // {
- // ipCount++;
- // float percentageDone = ((float)ipCount / (float)ips.Count) * 100;
- // if (OnDiscoveryProgress != null)
- // OnDiscoveryProgress(percentageDone, String.Format("Finding devices on local network ({0:0}%)", percentageDone));
- // }
- // });
+ // // Console.WriteLine("SyncDiscoveryService - Got version from {0}: {1}", ips[index], content);
+ // // var device = XmlSerialization.Deserialize(content);
+ // // if (device.SyncVersionId.ToUpper() == SyncListenerService.SyncVersionId.ToUpper())
+ // // {
+ // // device.Url = String.Format("http://{0}:{1}/", ips[index], Port);
+ // // devices.Add(device);
+ // // Console.WriteLine("SyncDiscoveryService - Raising OnDeviceFound event...");
+ // // if (OnDeviceFound != null)
+ // // OnDeviceFound(device);
+ // // Console.WriteLine("SyncDiscoveryService - The following host is available: {0}", ips[index]);
+ // // }
+ // // }
+ // // catch (Exception ex)
+ // // {
+ // // // Ignore IP address
+ // // }
+ // // finally
+ // // {
+ // // ipCount++;
+ // // float percentageDone = ((float)ipCount / (float)ips.Count) * 100;
+ // // if (OnDiscoveryProgress != null)
+ // // OnDiscoveryProgress(percentageDone, String.Format("Finding devices on local network ({0:0}%)", percentageDone));
+ // // }
+ // // });
- // IsRunning = false;
+ // // IsRunning = false;
- // Console.WriteLine("SyncDiscoveryService - Discovery done!");
- // if (actionDiscoveryEnded != null)
- // actionDiscoveryEnded(devices);
- // }
- // catch (OperationCanceledException ex)
- // {
- // Console.WriteLine("SyncDiscoveryService - SearchForDevices - OperationCanceledException: {0}", ex);
- // }
- // catch (Exception ex)
- // {
- // Console.WriteLine("SyncDiscoveryService - SearchForDevices - Exception: {0}", ex);
- // }
- //});
- }
+ // // Console.WriteLine("SyncDiscoveryService - Discovery done!");
+ // // if (actionDiscoveryEnded != null)
+ // // actionDiscoveryEnded(devices);
+ // // }
+ // // catch (OperationCanceledException ex)
+ // // {
+ // // Console.WriteLine("SyncDiscoveryService - SearchForDevices - OperationCanceledException: {0}", ex);
+ // // }
+ // // catch (Exception ex)
+ // // {
+ // // Console.WriteLine("SyncDiscoveryService - SearchForDevices - Exception: {0}", ex);
+ // // }
+ // //});
+ //}
///
/// Cancels the discovery process.
diff --git a/MPfm/MPfm.MVP/MPfm.MVP.WindowsPhone.csproj b/MPfm/MPfm.MVP/MPfm.MVP.WindowsPhone.csproj
index ccaf649f..5bb7feb3 100644
--- a/MPfm/MPfm.MVP/MPfm.MVP.WindowsPhone.csproj
+++ b/MPfm/MPfm.MVP/MPfm.MVP.WindowsPhone.csproj
@@ -5,12 +5,12 @@
AnyCPU
10.0.20506
2.0
- {5CA0AA57-8F15-4DC2-B5C6-25692F200869}
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}
{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Library
Properties
- MPfm.Core
- MPfm.Core
+ MPfm.MVP
+ MPfm.MVP
WindowsPhone
v8.0
$(TargetFrameworkVersion)
@@ -82,7 +82,24 @@
prompt
4
-
+
+
+ {5CA0AA57-8F15-4DC2-B5C6-25692F200869}
+ MPfm.Core.WindowsPhone
+
+
+ {317F03EF-9294-47D4-A915-7ABDC647897A}
+ MPfm.Library.WindowsPhone
+
+
+ {4ACC27D9-C476-4BCA-B5BE-F1A067B5E317}
+ MPfm.Player.WindowsPhone
+
+
+ {591A3842-87BC-467F-AA99-42749C8DBFB3}
+ MPfm.Sound.WindowsPhone
+
+
diff --git a/MPfm/MPfm.Sound/MPfm.Sound.WindowsPhone.csproj b/MPfm/MPfm.Sound/MPfm.Sound.WindowsPhone.csproj
index e57ca018..17a111c3 100644
--- a/MPfm/MPfm.Sound/MPfm.Sound.WindowsPhone.csproj
+++ b/MPfm/MPfm.Sound/MPfm.Sound.WindowsPhone.csproj
@@ -92,12 +92,13 @@
+
-
+
@@ -105,7 +106,7 @@
-
+
@@ -113,7 +114,7 @@
-
+
diff --git a/MPfm/MPfm.Sound/PeakFiles/WinRT/PeakFileService.cs b/MPfm/MPfm.Sound/PeakFiles/WinRT/PeakFileService.cs
index db75e55a..f6c96495 100644
--- a/MPfm/MPfm.Sound/PeakFiles/WinRT/PeakFileService.cs
+++ b/MPfm/MPfm.Sound/PeakFiles/WinRT/PeakFileService.cs
@@ -17,9 +17,6 @@
using System;
using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using MPfm.Core;
diff --git a/MPfm/MPfm.WindowsPhone/MPfm.WindowsPhone.csproj b/MPfm/MPfm.WindowsPhone/MPfm.WindowsPhone.csproj
index 437cb299..bb495596 100644
--- a/MPfm/MPfm.WindowsPhone/MPfm.WindowsPhone.csproj
+++ b/MPfm/MPfm.WindowsPhone/MPfm.WindowsPhone.csproj
@@ -156,6 +156,10 @@
{317F03EF-9294-47D4-A915-7ABDC647897A}
MPfm.Library.WindowsPhone
+
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}
+ MPfm.MVP.WindowsPhone
+
{4ACC27D9-C476-4BCA-B5BE-F1A067B5E317}
MPfm.Player.WindowsPhone
diff --git a/MPfm/MPfm_WindowsPhone.sln b/MPfm/MPfm_WindowsPhone.sln
index a0cb74ee..c7f2388c 100644
--- a/MPfm/MPfm_WindowsPhone.sln
+++ b/MPfm/MPfm_WindowsPhone.sln
@@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MPfm.Library.WindowsPhone",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sqlite", "..\..\sqlite-net-wp8\Sqlite.vcxproj", "{59B35F6C-E062-4F0E-88D8-13F3F82A24F3}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MPfm.MVP.WindowsPhone", "MPfm.MVP\MPfm.MVP.WindowsPhone.csproj", "{FC1E0293-0863-4C96-A514-98B70C695DAC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -155,6 +157,26 @@ Global
{59B35F6C-E062-4F0E-88D8-13F3F82A24F3}.Release|Win32.Build.0 = Release|Win32
{59B35F6C-E062-4F0E-88D8-13F3F82A24F3}.Release|x86.ActiveCfg = Release|Win32
{59B35F6C-E062-4F0E-88D8-13F3F82A24F3}.Release|x86.Build.0 = Release|Win32
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|ARM.ActiveCfg = Debug|ARM
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|ARM.Build.0 = Debug|ARM
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Win32.ActiveCfg = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|Win32.Build.0 = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|x86.ActiveCfg = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Debug|x86.Build.0 = Debug|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|ARM.ActiveCfg = Release|ARM
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|ARM.Build.0 = Release|ARM
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Mixed Platforms.Build.0 = Release|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Win32.ActiveCfg = Release|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|Win32.Build.0 = Release|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|x86.ActiveCfg = Release|x86
+ {FC1E0293-0863-4C96-A514-98B70C695DAC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE