Skip to content

Commit

Permalink
Updated Mac and iOS project following changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycastonguay committed Feb 15, 2013
1 parent 19d5d7b commit 75f9d2b
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 19 deletions.
1 change: 1 addition & 0 deletions MPfm/MPfm.MVP/MPfm.MVP.csproj
Expand Up @@ -195,5 +195,6 @@
<Compile Include="Presenters\Interfaces\IMainPresenter.cs" />
<Compile Include="Presenters\MainPresenter.cs" />
<Compile Include="Navigation\NavigationManager.cs" />
<Compile Include="Messages\AudioFileCacheUpdatedMessage.cs" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions MPfm/MPfm.MVP/MPfm.MVP.iOS.csproj
Expand Up @@ -268,5 +268,6 @@
<Compile Include="Presenters\Interfaces\IMainPresenter.cs" />
<Compile Include="Presenters\MainPresenter.cs" />
<Compile Include="Navigation\NavigationManager.cs" />
<Compile Include="Messages\AudioFileCacheUpdatedMessage.cs" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion MPfm/MPfm.Mac/AppDelegate.cs
Expand Up @@ -26,7 +26,7 @@
using MonoMac.Foundation;
using MonoMac.ObjCRuntime;
using MPfm.MVP;
using MPfm.MVP.Bootstrapper;
using MPfm.MVP.Bootstrap;
using MPfm.MVP.Navigation;
using MPfm.MVP.Views;
using TinyIoC;
Expand Down
2 changes: 1 addition & 1 deletion MPfm/MPfm.Mac/Controls/SongPositionSlider.cs
Expand Up @@ -23,7 +23,7 @@
using MonoMac.Foundation;
using MPfm.MVP;
using MPfm.MVP.Presenters.Interfaces;
using MPfm.MVP.Bootstrapper;
using MPfm.MVP.Bootstrap;

namespace MPfm.Mac
{
Expand Down
30 changes: 15 additions & 15 deletions MPfm/MPfm.Mac/Windows/Controllers/MainWindowController.cs
Expand Up @@ -653,26 +653,26 @@ public void RefreshPlayerPosition(PlayerPositionEntity entity)
};
}

public void RefreshSongInformation(SongInformationEntity entity)
public void RefreshSongInformation(AudioFile audioFile)
{
InvokeOnMainThread(delegate {
// Set labels
lblArtistName.StringValue = entity.ArtistName;
lblAlbumTitle.StringValue = entity.AlbumTitle;
lblSongTitle.StringValue = entity.Title;
lblSongPath.StringValue = entity.FilePath;
lblPosition.StringValue = entity.Position;
lblLength.StringValue = entity.Length;

lblFileType.StringValue = entity.FileTypeString;
lblBitrate.StringValue = entity.BitrateString;
lblBitsPerSample.StringValue = entity.BitsPerSampleString;
lblSampleRate.StringValue = entity.SampleRateString;
lblArtistName.StringValue = audioFile.ArtistName;
lblAlbumTitle.StringValue = audioFile.AlbumTitle;
lblSongTitle.StringValue = audioFile.Title;
lblSongPath.StringValue = audioFile.FilePath;
//lblPosition.StringValue = audioFile.Position;
lblLength.StringValue = audioFile.Length;

lblFileType.StringValue = audioFile.FileType.ToString();
lblBitrate.StringValue = audioFile.Bitrate.ToString();
lblBitsPerSample.StringValue = audioFile.BitsPerSample.ToString();
lblSampleRate.StringValue = audioFile.SampleRate.ToString();

// Set album cover
if (!String.IsNullOrEmpty(entity.FilePath))
if (!String.IsNullOrEmpty(audioFile.FilePath))
{
NSImage image = AlbumCoverHelper.GetAlbumCover(entity.FilePath);
NSImage image = AlbumCoverHelper.GetAlbumCover(audioFile.FilePath);
if (image != null)
imageAlbumCover.Image = image;
else
Expand All @@ -685,7 +685,7 @@ public void RefreshSongInformation(SongInformationEntity entity)

// Refresh which song is playing in the Song Browser
if(songBrowserSource != null)
songBrowserSource.RefreshIsPlaying(tableSongBrowser, entity.FilePath);
songBrowserSource.RefreshIsPlaying(tableSongBrowser, audioFile.FilePath);
});
}

Expand Down
Expand Up @@ -28,7 +28,7 @@
using MPfm.Library.UpdateLibrary;
using MPfm.MVP.Models;
using MPfm.MVP.Presenters;
using MPfm.MVP.Bootstrapper;
using MPfm.MVP.Bootstrap;

namespace MPfm.Mac
{
Expand All @@ -43,6 +43,7 @@ public partial class UpdateLibraryWindowController : BaseWindowController, IUpda
IUpdateLibraryPresenter presenter = null;

public Action<UpdateLibraryMode, List<string>, string> OnStartUpdateLibrary { get; set; }
public Action OnCancelUpdateLibrary { get; set; }

#region Constructors

Expand Down
Expand Up @@ -32,6 +32,10 @@ public partial class MobileLibraryBrowserViewController : BaseViewController, IM
{
#region IMobileLibraryBrowserView implementation

public void RefreshLibraryBrowser(IEnumerable<MPfm.MVP.Models.LibraryBrowserEntity> entities)
{
}

public MobileLibraryBrowserType BrowserType { get; set; }
public string Filter { get; set; }
public Action<int> OnItemClick { get; set; }
Expand Down
Expand Up @@ -69,6 +69,7 @@ public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientati
#region IUpdateLibraryView implementation

public Action<UpdateLibraryMode, List<string>, string> OnStartUpdateLibrary { get; set; }
public Action OnCancelUpdateLibrary { get; set; }

public void RefreshStatus(UpdateLibraryEntity entity)
{
Expand Down
1 change: 0 additions & 1 deletion MPfm/MPfm.iOS/MPfm.iOS.csproj
Expand Up @@ -51,7 +51,6 @@
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>True</MtouchDebug>
<MtouchProfiling>True</MtouchProfiling>
<IpaPackageName />
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
Expand Down

0 comments on commit 75f9d2b

Please sign in to comment.