diff --git a/MPfm/MPfm.iOS/Classes/Controllers/BaseViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/Base/BaseViewController.cs similarity index 52% rename from MPfm/MPfm.iOS/Classes/Controllers/BaseViewController.cs rename to MPfm/MPfm.iOS/Classes/Controllers/Base/BaseViewController.cs index 8283c7dd..ec04e2b5 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/BaseViewController.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/Base/BaseViewController.cs @@ -21,23 +21,41 @@ using MonoTouch.Foundation; using MonoTouch.UIKit; using MPfm.MVP; +using MPfm.MVP.Views; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers.Base { - public abstract class BaseViewController : UIViewController//, IBaseView + public abstract class BaseViewController : UIViewController, IBaseView { - //public Action OnViewDestroy { get; set; } // Is this useful on iOS? - //protected Action OnViewReady { get; set; } + #region IBaseView implementation - public BaseViewController(string nibName, NSBundle bundle) + public void ShowView(bool shown) + { + } + + public Action OnViewDestroy { get; set; } + + #endregion + + protected Action OnViewReady { get; set; } + + public BaseViewController(Action onViewReady, string nibName, NSBundle bundle) : base(nibName, bundle) { + OnViewReady = onViewReady; } -// public void ShowView(bool shown) -// { -// this.View.Hidden = !shown; -// } + public override void ViewWillAppear(bool animated) + { + base.ViewWillAppear(animated); + OnViewReady(this); + } + + public override void ViewDidDisappear(bool animated) + { + base.ViewDidDisappear(animated); + OnViewDestroy(this); + } } } diff --git a/MPfm/MPfm.iOS/Classes/Controllers/ListViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/ListViewController.cs deleted file mode 100644 index 37cc16ae..00000000 --- a/MPfm/MPfm.iOS/Classes/Controllers/ListViewController.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright © 2011-2013 Yanick Castonguay -// -// This file is part of MPfm. -// -// MPfm is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// MPfm is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with MPfm. If not, see . - -using System; -using System.Collections.Generic; -using System.Drawing; -using MonoTouch.Foundation; -using MonoTouch.UIKit; - -namespace MPfm.iOS -{ - public partial class ListViewController : BaseViewController - { - private UIBarButtonItem btnBack; - private Action actionOnItemSelected; - private ListTableViewSource tableViewSource; - private string title; - public List Items { get; private set; } - - static bool UserInterfaceIdiomIsPhone - { - get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } - } - - public ListViewController(string title, List items, Action actionOnItemSelected) - : base (UserInterfaceIdiomIsPhone ? "ListViewController_iPhone" : "ListViewController_iPad", null) - { - if (this.TabBarItem != null) - { - this.TabBarItem.Title = title; - this.TabBarItem.Image = UIImage.FromBundle("Images/Tabs/more"); - } - this.title = title; - this.Items = items; - this.actionOnItemSelected = actionOnItemSelected; - } - - public override void DidReceiveMemoryWarning() - { - // Releases the view if it doesn't have a superview. - base.DidReceiveMemoryWarning(); - - // Release any cached data, images, etc that aren't in use. - } - - public override void ViewDidLoad() - { - base.ViewDidLoad(); - -// // Set NavCtrl title if available -// if(this.NavigationController != null) -// this.NavigationController.Title = this.TabBarItem.Title; - - // Create text attributes for navigation bar button - UITextAttributes attr = new UITextAttributes(); - attr.Font = UIFont.FromName("OstrichSans-Black", 16); - attr.TextColor = UIColor.White; - attr.TextShadowColor = UIColor.DarkGray; - attr.TextShadowOffset = new UIOffset(0, 0); - - // Set back button for navigation bar - btnBack = new UIBarButtonItem(title, UIBarButtonItemStyle.Plain, null, null); - btnBack.SetTitleTextAttributes(attr, UIControlState.Normal); - this.NavigationItem.BackBarButtonItem = btnBack; - - // Load data source - tableViewSource = new ListTableViewSource(Items, actionOnItemSelected); - tableView.Source = tableViewSource; - } - - public override void ViewDidUnload() - { - base.ViewDidUnload(); - - // Clear any references to subviews of the main view in order to - // allow the Garbage Collector to collect them sooner. - // - // e.g. myOutlet.Dispose (); myOutlet = null; - - ReleaseDesignerOutlets(); - } - - public override void ViewWillAppear(bool animated) - { - base.ViewWillAppear(animated); - - MPfmNavigationController navCtrl = (MPfmNavigationController)this.NavigationController; - navCtrl.SetTitle(title); - } - - public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) - { - // Return true for supported orientations - if (UserInterfaceIdiomIsPhone) - { - return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown); - } else - { - return true; - } - } - } -} - diff --git a/MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.cs new file mode 100644 index 00000000..8ad81f02 --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.cs @@ -0,0 +1,147 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System; +using System.Collections.Generic; +using System.Drawing; +using MonoTouch.Foundation; +using MonoTouch.UIKit; +using MPfm.iOS.Classes.Controllers.Base; +using MPfm.iOS.Classes.Objects; +using MPfm.iOS.Classes.Delegates; +using MPfm.iOS.Classes.Controls; +using MPfm.MVP.Views; + +namespace MPfm.iOS.Classes.Controllers +{ + public partial class MobileLibraryBrowserViewController : BaseViewController, IMobileLibraryBrowserView + { + #region IMobileLibraryBrowserView implementation + + public MobileLibraryBrowserType BrowserType { get; set; } + public string Filter { get; set; } + public Action OnItemClick { get; set; } + + #endregion + +// private UIBarButtonItem btnBack; +// private Action actionOnItemSelected; +// private ListTableViewSource tableViewSource; +// private string title; +// public List Items { get; private set; } + private List _items; + private string _cellIdentifier = "MobileLibraryBrowserCell"; + + static bool UserInterfaceIdiomIsPhone + { + get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } + } + + public MobileLibraryBrowserViewController(Action onViewReady) + : base (onViewReady, UserInterfaceIdiomIsPhone ? "ListViewController_iPhone" : "ListViewController_iPad", null) + { + } + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + + _items = new List(); + _items.Add(new GenericListItem() { + Title = "Hello", + Image = UIImage.FromBundle("/Images/icon114.png") + }); + tableView.WeakDataSource = this; + tableView.WeakDelegate = this; + } + + public override void ViewWillAppear(bool animated) + { + base.ViewWillAppear(animated); + } + + public override void ViewDidDisappear(bool animated) + { + tableView.DeselectRow(tableView.IndexPathForSelectedRow, false); + base.ViewDidDisappear(animated); + } + + public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) + { + // Return true for supported orientations + if (UserInterfaceIdiomIsPhone) + { + return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown); + } else + { + return true; + } + } + + [Export ("tableView:numberOfRowsInSection:")] + public int RowsInSection(UITableView tableview, int section) + { + return _items.Count; + } + + [Export ("tableView:cellForRowAtIndexPath:")] + public UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) + { + // Request a recycled cell to save memory + UITableViewCell cell = tableView.DequeueReusableCell(_cellIdentifier); + + // Set cell style + var cellStyle = UITableViewCellStyle.Subtitle; + + // Create cell if cell could not be recycled + if (cell == null) + cell = new UITableViewCell(cellStyle, _cellIdentifier); + + // Set title + cell.TextLabel.Text = _items[indexPath.Row].Title; + cell.DetailTextLabel.Text = _items[indexPath.Row].Subtitle; + cell.ImageView.Image = _items[indexPath.Row].Image; + + // Set font + //cell.TextLabel.Font = UIFont.FromName("Junction", 20); + cell.TextLabel.Font = UIFont.FromName("OstrichSans-Medium", 26); + cell.DetailTextLabel.Font = UIFont.FromName("OstrichSans-Medium", 18); + + // Set chevron + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + + // // Check this is the version cell (remove all user interaction) + // if (viewModel.Items[indexPath.Row].ItemType == MoreItemType.Version) + // { + // cell.Accessory = UITableViewCellAccessory.None; + // cell.SelectionStyle = UITableViewCellSelectionStyle.None; + // cell.TextLabel.TextColor = UIColor.Gray; + // cell.TextLabel.TextAlignment = UITextAlignment.Center; + // cell.TextLabel.Font = UIFont.FromName("Asap", 16); + // } + + return cell; + } + + [Export ("tableView:didSelectRowAtIndexPath:")] + public void RowSelected(UITableView tableView, NSIndexPath indexPath) + { + OnItemClick(indexPath.Row); + } + } +} + diff --git a/MPfm/MPfm.iOS/Classes/Controllers/ListViewController.designer.cs b/MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.designer.cs similarity index 86% rename from MPfm/MPfm.iOS/Classes/Controllers/ListViewController.designer.cs rename to MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.designer.cs index b7d93979..ac18ae15 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/ListViewController.designer.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/MobileLibraryBrowserViewController.designer.cs @@ -17,10 +17,10 @@ using MonoTouch.Foundation; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers { - [Register ("ListViewController")] - partial class ListViewController + [Register ("MobileLibraryBrowserViewController")] + partial class MobileLibraryBrowserViewController { [Outlet] MonoTouch.UIKit.UITableView tableView { get; set; } diff --git a/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.cs new file mode 100644 index 00000000..ee9d28ac --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.cs @@ -0,0 +1,72 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System; +using System.Collections.Generic; +using System.Drawing; +using MonoTouch.Foundation; +using MonoTouch.UIKit; +using MPfm.MVP.Views; +using MPfm.iOS.Classes.Controllers.Base; + +namespace MPfm.iOS +{ + public partial class MoreViewController : BaseViewController, IMobileOptionsMenuView + { + #region IMobileOptionsMenuView implementation + + public void RefreshMenu(Dictionary options) + { + } + + public Action OnClickPreferences { get; set; } + public Action OnClickEffects { get; set; } + public Action OnClickAbout { get; set; } + + #endregion + + static bool UserInterfaceIdiomIsPhone + { + get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } + } + + public MoreViewController(Action onViewReady) + : base (onViewReady, UserInterfaceIdiomIsPhone ? "MoreViewController_iPhone" : "MoreViewController_iPad", null) + { + } + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + + // Perform any additional setup after loading the view, typically from a nib. + } + + public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) + { + // Return true for supported orientations + if (UserInterfaceIdiomIsPhone) + { + return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown); + } else + { + return true; + } + } + } +} + diff --git a/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.designer.cs b/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.designer.cs new file mode 100644 index 00000000..02afad10 --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Controllers/MoreViewController.designer.cs @@ -0,0 +1,18 @@ +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoTouch.Foundation; + +namespace MPfm.iOS +{ + [Register ("MoreViewController")] + partial class MoreViewController + { + void ReleaseDesignerOutlets() + { + } + } +} + diff --git a/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.cs index 81f22e95..234be19b 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.cs @@ -21,19 +21,21 @@ using MonoTouch.Foundation; using MonoTouch.UIKit; using MPfm.Player; -using MPfm.Sound.BassWrapper; using System.IO; using System.Timers; -using MPfm.Sound; using MPfm.Core; using System.Linq; using MonoTouch.CoreGraphics; using MPfm.Sound.AudioFiles; using MPfm.Sound.Bass.Net; +using MPfm.iOS.Classes.Controllers.Base; +using MPfm.iOS.Classes.Controls; +using MPfm.MVP.Views; +using MPfm.MVP.Models; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers { - public partial class PlayerViewController : BaseViewController + public partial class PlayerViewController : BaseViewController, IPlayerView { private IPlayer player; private Timer timer; @@ -42,19 +44,11 @@ public partial class PlayerViewController : BaseViewController get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } } - public PlayerViewController() - : base (UserInterfaceIdiomIsPhone ? "PlayerViewController_iPhone" : "PlayerViewController_iPad", null) + public PlayerViewController(Action onViewReady) + : base (onViewReady, UserInterfaceIdiomIsPhone ? "PlayerViewController_iPhone" : "PlayerViewController_iPad", null) { } - public override void DidReceiveMemoryWarning () - { - // Releases the view if it doesn't have a superview. - base.DidReceiveMemoryWarning (); - - // Release any cached data, images, etc that aren't in use. - } - public override void ViewDidLoad() { base.ViewDidLoad(); @@ -73,44 +67,32 @@ public override void ViewDidLoad() sliderPosition.Transform = CGAffineTransform.MakeScale(0.7f, 0.7f); sliderPosition.Frame = new RectangleF(70, sliderPosition.Frame.Y, 180, sliderPosition.Frame.Height); - timer = new Timer(); - timer.Interval = 100; - timer.Elapsed += (sender, e) => { - InvokeOnMainThread(() => { - try - { - long bytes = MPfm.Player.Player.CurrentPlayer.GetPosition(); - long samples = ConvertAudio.ToPCM(bytes, (uint)MPfm.Player.Player.CurrentPlayer.Playlist.CurrentItem.AudioFile.BitsPerSample, 2); - long ms = ConvertAudio.ToMS(samples, (uint)MPfm.Player.Player.CurrentPlayer.Playlist.CurrentItem.AudioFile.SampleRate); - string pos = Conversion.MillisecondsToTimeString((ulong)ms); - lblPosition.Text = pos; - sliderPosition.Value = ms; - } catch - { - lblPosition.Text = "0:00.000"; - } - }); - }; - - // Initialize player - Device device = new Device(){ - DriverType = DriverType.DirectSound, - Id = -1 - }; - player = new MPfm.Player.Player(device, 44100, 5000, 100, true); - Play(); - } - - public override void ViewDidUnload () - { - base.ViewDidUnload (); - - // Clear any references to subviews of the main view in order to - // allow the Garbage Collector to collect them sooner. - // - // e.g. myOutlet.Dispose (); myOutlet = null; - - ReleaseDesignerOutlets (); +// timer = new Timer(); +// timer.Interval = 100; +// timer.Elapsed += (sender, e) => { +// InvokeOnMainThread(() => { +// try +// { +// long bytes = MPfm.Player.Player.CurrentPlayer.GetPosition(); +// long samples = ConvertAudio.ToPCM(bytes, (uint)MPfm.Player.Player.CurrentPlayer.Playlist.CurrentItem.AudioFile.BitsPerSample, 2); +// long ms = ConvertAudio.ToMS(samples, (uint)MPfm.Player.Player.CurrentPlayer.Playlist.CurrentItem.AudioFile.SampleRate); +// string pos = Conversion.MillisecondsToTimeString((ulong)ms); +// lblPosition.Text = pos; +// sliderPosition.Value = ms; +// } catch +// { +// lblPosition.Text = "0:00.000"; +// } +// }); +// }; +// +// // Initialize player +// Device device = new Device(){ +// DriverType = DriverType.DirectSound, +// Id = -1 +// }; +// player = new MPfm.Player.Player(device, 44100, 5000, 100, true); +// Play(); } public override void ViewWillAppear(bool animated) @@ -120,8 +102,8 @@ public override void ViewWillAppear(bool animated) MPfmNavigationController navCtrl = (MPfmNavigationController)this.NavigationController; navCtrl.SetTitle("Now Playing"); } - - public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) + + public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) { // Return true for supported orientations if (UserInterfaceIdiomIsPhone) { @@ -201,6 +183,41 @@ private void Play() { player.Next(); } + + #region IPlayerView implementation + + public void RefreshPlayerPosition(PlayerPositionEntity entity) + { + } + + public void RefreshSongInformation(AudioFile audioFile) + { + } + + public void RefreshPlayerVolume(PlayerVolumeEntity entity) + { + } + + public void RefreshPlayerTimeShifting(PlayerTimeShiftingEntity entity) + { + } + + public void PlayerError(Exception ex) + { + } + + public Action OnPlayerPlay { get; set; } + public Action> OnPlayerPlayFiles { get; set; } + public Action OnPlayerPause { get; set; } + public Action OnPlayerStop { get; set; } + public Action OnPlayerPrevious { get; set; } + public Action OnPlayerNext { get; set; } + public Action OnPlayerSetVolume { get; set; } + public Action OnPlayerSetPitchShifting { get; set; } + public Action OnPlayerSetTimeShifting { get; set; } + public Action OnPlayerSetPosition { get; set; } + + #endregion } } diff --git a/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.designer.cs b/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.designer.cs index 6fe5b331..0238501e 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.designer.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.designer.cs @@ -6,7 +6,7 @@ // using MonoTouch.Foundation; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers { [Register ("PlayerViewController")] partial class PlayerViewController diff --git a/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.cs index 120fc72d..e01dfab4 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.cs @@ -20,18 +20,32 @@ using MonoTouch.Foundation; using MonoTouch.UIKit; +using MPfm.iOS.Classes.Controllers.Base; +using MPfm.MVP.Views; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers { - public partial class SplashViewController : BaseViewController + public partial class SplashViewController : BaseViewController, ISplashView { + #region ISplashView implementation + + public void RefreshStatus(string message) + { + } + + public void InitDone() + { + } + + #endregion + static bool UserInterfaceIdiomIsPhone { get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } } - public SplashViewController() - : base (UserInterfaceIdiomIsPhone ? "SplashViewController_iPhone" : "SplashViewController_iPad", null) + public SplashViewController(Action onViewReady) + : base (onViewReady, UserInterfaceIdiomIsPhone ? "SplashViewController_iPhone" : "SplashViewController_iPad", null) { } @@ -46,20 +60,6 @@ public override void DidReceiveMemoryWarning() public override void ViewDidLoad() { base.ViewDidLoad(); - - // Perform any additional setup after loading the view, typically from a nib. - } - - public override void ViewDidUnload() - { - base.ViewDidUnload(); - - // Clear any references to subviews of the main view in order to - // allow the Garbage Collector to collect them sooner. - // - // e.g. myOutlet.Dispose (); myOutlet = null; - - ReleaseDesignerOutlets(); } public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) diff --git a/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.designer.cs b/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.designer.cs index e85746aa..e251275f 100644 --- a/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.designer.cs +++ b/MPfm/MPfm.iOS/Classes/Controllers/SplashViewController.designer.cs @@ -17,7 +17,7 @@ using MonoTouch.Foundation; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controllers { [Register ("SplashViewController")] partial class SplashViewController diff --git a/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.cs b/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.cs new file mode 100644 index 00000000..41c31570 --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.cs @@ -0,0 +1,88 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System; +using System.Collections.Generic; +using System.Drawing; +using MonoTouch.Foundation; +using MonoTouch.UIKit; +using MPfm.Library.UpdateLibrary; +using MPfm.iOS.Classes.Controllers.Base; +using MPfm.MVP.Models; +using MPfm.MVP.Views; + +namespace MPfm.iOS +{ + public partial class UpdateLibraryViewController : BaseViewController, IUpdateLibraryView + { + static bool UserInterfaceIdiomIsPhone + { + get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } + } + + public UpdateLibraryViewController(Action onViewReady) + : base (onViewReady, UserInterfaceIdiomIsPhone ? "UpdateLibraryViewController_iPhone" : "UpdateLibraryViewController_iPad", null) + { + } + + public override void DidReceiveMemoryWarning() + { + // Releases the view if it doesn't have a superview. + base.DidReceiveMemoryWarning(); + + // Release any cached data, images, etc that aren't in use. + } + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + + // Perform any additional setup after loading the view, typically from a nib. + } + + public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) + { + // Return true for supported orientations + if (UserInterfaceIdiomIsPhone) + { + return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown); + } else + { + return true; + } + } + + #region IUpdateLibraryView implementation + + public Action, string> OnStartUpdateLibrary { get; set; } + + public void RefreshStatus(UpdateLibraryEntity entity) + { + } + + public void AddToLog(string entry) + { + } + + public void ProcessEnded(bool canceled) + { + } + + #endregion + } +} + diff --git a/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.designer.cs b/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.designer.cs new file mode 100644 index 00000000..858b3960 --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Controllers/UpdateLibraryViewController.designer.cs @@ -0,0 +1,18 @@ +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoTouch.Foundation; + +namespace MPfm.iOS +{ + [Register ("UpdateLibraryViewController")] + partial class UpdateLibraryViewController + { + void ReleaseDesignerOutlets() + { + } + } +} + diff --git a/MPfm/MPfm.iOS/Classes/Controls/MPfmNavigationController.cs b/MPfm/MPfm.iOS/Classes/Controls/MPfmNavigationController.cs index 5f7f24c1..766e2e80 100644 --- a/MPfm/MPfm.iOS/Classes/Controls/MPfmNavigationController.cs +++ b/MPfm/MPfm.iOS/Classes/Controls/MPfmNavigationController.cs @@ -22,7 +22,7 @@ using MonoTouch.Foundation; using MonoTouch.UIKit; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Controls { [Register("MPfmNavigationController")] public class MPfmNavigationController : UINavigationController diff --git a/MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs b/MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs index 6cc8d744..50aff173 100644 --- a/MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs +++ b/MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs @@ -20,8 +20,15 @@ using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; - -namespace MPfm.iOS +using MPfm.iOS.Classes.Controls; +using MPfm.iOS.Classes.Controllers; +using MPfm.iOS.Classes.Objects; +using MPfm.MVP.Bootstrap; +using MPfm.MVP.Navigation; +using MPfm.MVP.Views; +using MPfm.iOS.Classes.Navigation; + +namespace MPfm.iOS.Classes.Delegates { // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally responding) to @@ -29,19 +36,11 @@ namespace MPfm.iOS [Register ("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { - UIWindow window; - UITabBarController tabBarController; - MPfmNavigationController artistNavController; - MPfmNavigationController albumNavController; - MPfmNavigationController playlistNavController; - MPfmNavigationController moreNavController; - - SplashViewController splashViewController; - PlayerViewController playerViewController; - ListViewController artistViewController; - ListViewController albumViewController; - ListViewController playlistViewController; - ListViewController moreViewController; + UIWindow _window; + UITabBarController _tabBarController; + SplashViewController _splashViewController; + iOSNavigationManager _navigationManager; + List> _navigationControllers = new List>(); // // This method is invoked when the application has loaded and is ready to run. In this @@ -52,157 +51,30 @@ public partial class AppDelegate : UIApplicationDelegate // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { + // Complete IoC configuration + TinyIoC.TinyIoCContainer container = Bootstrapper.GetContainer(); + container.Register().AsSingleton(); + container.Register().AsMultiInstance(); + container.Register().AsMultiInstance(); + container.Register().AsMultiInstance(); + container.Register().AsMultiInstance(); + container.Register().AsMultiInstance(); + //container.Register().AsMultiInstance(); + //container.Register().AsMultiInstance(); + //container.Register().AsMultiInstance(); + // Create window - window = new UIWindow(UIScreen.MainScreen.Bounds); + _window = new UIWindow(UIScreen.MainScreen.Bounds); // Create tab bar controller, but hide it while the splash screen is visible - tabBarController = new UITabBarController(); - tabBarController.View.Hidden = true; - window.RootViewController = tabBarController; - - // Create splash screen and display it while loading - splashViewController = new SplashViewController(); - splashViewController.View.Frame = window.Frame; - splashViewController.View.AutoresizingMask = UIViewAutoresizing.All; - window.AddSubview(splashViewController.View); - window.MakeKeyAndVisible(); - - playerViewController = new PlayerViewController(); - - // Get list of fonts - //List fontFamilies = new List(UIFont.FamilyNames); - //fontFamilies.Sort(); - //List fontNames = UIFont.FontNamesForFamilyName("Ostrich Sans Rounded").ToList(); - - // Prepare navigation controllers - //artistNavController = new MPfmNavigationController("OstrichSansRounded-Medium", 26); - artistNavController = new MPfmNavigationController("OstrichSans-Black", 26); - artistNavController.NavigationBar.BackgroundColor = UIColor.Clear; - artistNavController.NavigationBar.TintColor = UIColor.Clear; - albumNavController = new MPfmNavigationController("OstrichSans-Black", 26); - albumNavController.NavigationBar.BackgroundColor = UIColor.Clear; - albumNavController.NavigationBar.TintColor = UIColor.Clear; - playlistNavController = new MPfmNavigationController("OstrichSans-Black", 26); - playlistNavController.NavigationBar.BackgroundColor = UIColor.Clear; - playlistNavController.NavigationBar.TintColor = UIColor.Clear; - moreNavController = new MPfmNavigationController("OstrichSans-Black", 26); - moreNavController.NavigationBar.BackgroundColor = UIColor.Clear; - moreNavController.NavigationBar.TintColor = UIColor.Clear; - - // Prepare Artists view controller - artistViewController = new ListViewController("Artists", new List() { - new GenericListItem() { - Title = "Amon Tobin", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Aphex Twin", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Blake James", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Bob Marley & The Wailers", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Broken Social Scene", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Can", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Dylan Bob", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "My Bloody Valentine", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Public Image Ltd.", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "The Future Sound of London", - Image = UIImage.FromBundle("/Images/icon114.png") - } - }, (item) => { - playerViewController.HidesBottomBarWhenPushed = true; - artistNavController.PushViewController(playerViewController, true); - }); - artistNavController.PushViewController(artistViewController, false); - - // Prepare Albums tab - albumViewController = new ListViewController("Albums", new List() { - new GenericListItem() { - Title = "Album 1", - Subtitle = "Artist Name", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Album 2", - Subtitle = "Artist Name", - Image = UIImage.FromBundle("/Images/icon114.png") - } - }, null); - albumNavController.PushViewController(albumViewController, false); - - // Prepare Playlist tab - playlistViewController = new ListViewController("Playlists", new List() { - new GenericListItem() { - Title = "Playlist 1", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "Playlist 2", - Image = UIImage.FromBundle("/Images/icon114.png") - } - }, null); - playlistNavController.PushViewController(playlistViewController, false); - - // Prepare More tab - moreViewController = new ListViewController("More", new List() { - new GenericListItem() { - Title = "Settings", - Image = UIImage.FromBundle("/Images/icon114.png") - }, - new GenericListItem() { - Title = "About MP4M", - Image = UIImage.FromBundle("/Images/icon114.png") - } - }, null); - moreNavController.PushViewController(moreViewController, false); - - // Create text attributes for tab bar items - UITextAttributes attr = new UITextAttributes(); - //attr.Font = UIFont.FromName("Junction", 11); - attr.Font = UIFont.FromName("OstrichSans-Black", 13); - attr.TextColor = UIColor.White; - //attr.TextShadowColor = UIColor.DarkGray; - //attr.TextShadowOffset = new UIOffset(1, 1); - artistNavController.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal); - albumNavController.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal); - playlistNavController.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal); - moreNavController.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal); - - // Add view controllers to tab bar - tabBarController.ViewControllers = new UIViewController[] { - artistNavController, - albumNavController, - playlistNavController, - moreNavController - }; - - splashViewController.RemoveFromParentViewController(); - tabBarController.View.Hidden = false; - - // Show status bar again - //UIApplication.SharedApplication.SetStatusBarHidden(false, true); + _tabBarController = new UITabBarController(); + _tabBarController.View.Hidden = true; + _window.RootViewController = _tabBarController; + + // Start navigation manager + _navigationManager = (iOSNavigationManager)container.Resolve(); + _navigationManager.AppDelegate = this; + _navigationManager.Start(); return true; } @@ -216,6 +88,61 @@ public override void WillTerminate(UIApplication application) } MPfm.Player.Player.CurrentPlayer.Dispose(); } + + public void ShowSplash(SplashViewController viewController) + { + _splashViewController = viewController; + _splashViewController.View.Frame = _window.Frame; + _splashViewController.View.AutoresizingMask = UIViewAutoresizing.All; + _window.AddSubview(_splashViewController.View); + _window.MakeKeyAndVisible(); + } + + public void HideSplash() + { + _tabBarController.View.Hidden = false; + } + + public void AddTab(MobileNavigationTabType type, string title, UIViewController viewController) + { + // Create text attributes for tab + UITextAttributes attr = new UITextAttributes(); + //attr.Font = UIFont.FromName("Junction", 11); + attr.Font = UIFont.FromName("OstrichSans-Black", 13); + attr.TextColor = UIColor.White; + attr.TextShadowColor = UIColor.DarkGray; + attr.TextShadowOffset = new UIOffset(1, 1); + + // Create navigation controller + var navCtrl = new MPfmNavigationController("OstrichSans-Black", 26); + navCtrl.SetTitle(title); + navCtrl.NavigationBar.BackgroundColor = UIColor.Clear; + navCtrl.NavigationBar.TintColor = UIColor.Clear; + navCtrl.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal); + navCtrl.TabBarItem.Title = title; + navCtrl.TabBarItem.Image = UIImage.FromBundle("Images/Tabs/more"); + navCtrl.PushViewController(viewController, false); + + // Add view controller to list + _navigationControllers.Add(new KeyValuePair(type, navCtrl)); + + // Add navigation controller as a tab + var list = new List(); + if(_tabBarController.ViewControllers != null) + list = _tabBarController.ViewControllers.ToList(); + list.Add(navCtrl); + _tabBarController.ViewControllers = list.ToArray(); + } + + public void PushTabView(MobileNavigationTabType type, UIViewController viewController) + { + if (viewController is PlayerViewController) + { + viewController.HidesBottomBarWhenPushed = true; + var navCtrl = _navigationControllers.FirstOrDefault(x => x.Key == type).Value; + navCtrl.PushViewController(viewController, true); + } + } } } diff --git a/MPfm/MPfm.iOS/Classes/Delegates/ListTableViewSource.cs b/MPfm/MPfm.iOS/Classes/Delegates/ListTableViewSource.cs deleted file mode 100644 index 08074d4f..00000000 --- a/MPfm/MPfm.iOS/Classes/Delegates/ListTableViewSource.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © 2011-2013 Yanick Castonguay -// -// This file is part of MPfm. -// -// MPfm is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// MPfm is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with MPfm. If not, see . - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoTouch.Foundation; -using MonoTouch.UIKit; - -namespace MPfm.iOS -{ - public class ListTableViewSource : UITableViewSource - { - Action onRowSelected; - string cellIdentifier = "ListTableCell"; - List items; - - public ListTableViewSource(List items, Action onRowSelected) - { - this.onRowSelected = onRowSelected; - this.items = items; - } - - public override int RowsInSection(UITableView tableview, int section) - { - return items.Count; - } - - public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) - { - // Request a recycled cell to save memory - UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); - - // Set cell style - var cellStyle = UITableViewCellStyle.Subtitle; - - // Create cell if cell could not be recycled - if (cell == null) - cell = new UITableViewCell(cellStyle, cellIdentifier); - - // Set title - cell.TextLabel.Text = items[indexPath.Row].Title; - cell.DetailTextLabel.Text = items[indexPath.Row].Subtitle; - cell.ImageView.Image = items[indexPath.Row].Image; - - // Set font - //cell.TextLabel.Font = UIFont.FromName("Junction", 20); - cell.TextLabel.Font = UIFont.FromName("OstrichSans-Medium", 26); - cell.DetailTextLabel.Font = UIFont.FromName("OstrichSans-Medium", 18); - - // Set chevron - cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; - -// // Check this is the version cell (remove all user interaction) -// if (viewModel.Items[indexPath.Row].ItemType == MoreItemType.Version) -// { -// cell.Accessory = UITableViewCellAccessory.None; -// cell.SelectionStyle = UITableViewCellSelectionStyle.None; -// cell.TextLabel.TextColor = UIColor.Gray; -// cell.TextLabel.TextAlignment = UITextAlignment.Center; -// cell.TextLabel.Font = UIFont.FromName("Asap", 16); -// } - - return cell; - } - - public override void RowSelected(UITableView tableView, NSIndexPath indexPath) - { - if(onRowSelected != null) - onRowSelected(items[indexPath.Row]); - } - } -} diff --git a/MPfm/MPfm.iOS/Classes/Navigation/iOSNavigationManager.cs b/MPfm/MPfm.iOS/Classes/Navigation/iOSNavigationManager.cs new file mode 100644 index 00000000..f210af7a --- /dev/null +++ b/MPfm/MPfm.iOS/Classes/Navigation/iOSNavigationManager.cs @@ -0,0 +1,50 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using MPfm.MVP.Navigation; +using MPfm.MVP.Views; +using MPfm.iOS.Classes.Delegates; +using MPfm.iOS.Classes.Controllers; +using MonoTouch.UIKit; + +namespace MPfm.iOS.Classes.Navigation +{ + public sealed class iOSNavigationManager : MobileNavigationManager + { + public AppDelegate AppDelegate { get; set; } + + public override void ShowSplash(ISplashView view) + { + AppDelegate.ShowSplash((SplashViewController)view); + } + + public override void HideSplash() + { + AppDelegate.HideSplash(); + } + + public override void AddTab(MobileNavigationTabType type, string title, IBaseView view) + { + AppDelegate.AddTab(type, title, (UIViewController)view); + } + + public override void PushTabView(MobileNavigationTabType type, IBaseView view) + { + AppDelegate.PushTabView(type, (UIViewController)view); + } + } +} diff --git a/MPfm/MPfm.iOS/Classes/Objects/GenericListItem.cs b/MPfm/MPfm.iOS/Classes/Objects/GenericListItem.cs index fa563b84..c251c8d7 100644 --- a/MPfm/MPfm.iOS/Classes/Objects/GenericListItem.cs +++ b/MPfm/MPfm.iOS/Classes/Objects/GenericListItem.cs @@ -21,7 +21,7 @@ using MonoTouch.Foundation; using MonoTouch.UIKit; -namespace MPfm.iOS +namespace MPfm.iOS.Classes.Objects { public class GenericListItem { diff --git a/MPfm/MPfm.iOS/MPfm.iOS.csproj b/MPfm/MPfm.iOS/MPfm.iOS.csproj index ab6057b7..590743ab 100644 --- a/MPfm/MPfm.iOS/MPfm.iOS.csproj +++ b/MPfm/MPfm.iOS/MPfm.iOS.csproj @@ -128,23 +128,35 @@ SplashViewController.cs - - - ListViewController.cs - - - + + + + + MobileLibraryBrowserViewController.cs + + + + MoreViewController.cs + + + + UpdateLibraryViewController.cs + - - + + + + + + @@ -159,6 +171,8 @@ + + diff --git a/MPfm/MPfm.iOS/XIB/iPad/ListViewController_iPad.xib b/MPfm/MPfm.iOS/XIB/iPad/ListViewController_iPad.xib deleted file mode 100644 index 5ddf1006..00000000 --- a/MPfm/MPfm.iOS/XIB/iPad/ListViewController_iPad.xib +++ /dev/null @@ -1,121 +0,0 @@ - - - - 1280 - 11C25 - 1919 - 1138.11 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 916 - - - IBProxyObject - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 292 - {{0, 20}, {768, 1004}} - - - - 3 - MQA - - 2 - - - NO - - 2 - - IBIPadFramework - - - - - - - view - - - - 3 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - ListViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 3 - - - - - ListViewController - UITableViewController - - IBProjectSource - ListViewController.h - - - - - 0 - IBIPadFramework - YES - 3 - 916 - - diff --git a/MPfm/MPfm.iOS/XIB/iPad/MobileLibraryBrowserViewController_iPad.xib b/MPfm/MPfm.iOS/XIB/iPad/MobileLibraryBrowserViewController_iPad.xib new file mode 100644 index 00000000..b8de9336 --- /dev/null +++ b/MPfm/MPfm.iOS/XIB/iPad/MobileLibraryBrowserViewController_iPad.xib @@ -0,0 +1,111 @@ + + + + 1536 + 12C54 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1930 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + {{0, 20}, {768, 1004}} + + + + + 3 + MQA + + 2 + + + NO + + 2 + + IBIPadFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + MobileLibraryBrowserViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + 0 + IBIPadFramework + YES + 3 + 1930 + + diff --git a/MPfm/MPfm.iOS/XIB/iPad/MoreViewController_iPad.xib b/MPfm/MPfm.iOS/XIB/iPad/MoreViewController_iPad.xib new file mode 100644 index 00000000..c1a0c10f --- /dev/null +++ b/MPfm/MPfm.iOS/XIB/iPad/MoreViewController_iPad.xib @@ -0,0 +1,121 @@ + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + {{0, 20}, {768, 1004}} + + + + 3 + MQA + + 2 + + + NO + + 2 + + IBIPadFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + MoreViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + MoreViewController + UITableViewController + + IBProjectSource + MoreViewController.h + + + + + 0 + IBIPadFramework + YES + 3 + 916 + + diff --git a/MPfm/MPfm.iOS/XIB/iPad/UpdateLibraryViewController_iPad.xib b/MPfm/MPfm.iOS/XIB/iPad/UpdateLibraryViewController_iPad.xib new file mode 100644 index 00000000..4c5ae968 --- /dev/null +++ b/MPfm/MPfm.iOS/XIB/iPad/UpdateLibraryViewController_iPad.xib @@ -0,0 +1,121 @@ + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + {{0, 20}, {768, 1004}} + + + + 3 + MQA + + 2 + + + NO + + 2 + + IBIPadFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + UpdateLibraryViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + UpdateLibraryViewController + UITableViewController + + IBProjectSource + UpdateLibraryViewController.h + + + + + 0 + IBIPadFramework + YES + 3 + 916 + + diff --git a/MPfm/MPfm.iOS/XIB/iPhone/ListViewController_iPhone.xib b/MPfm/MPfm.iOS/XIB/iPhone/MobileLibraryBrowserViewController_iPhone.xib similarity index 82% rename from MPfm/MPfm.iOS/XIB/iPhone/ListViewController_iPhone.xib rename to MPfm/MPfm.iOS/XIB/iPhone/MobileLibraryBrowserViewController_iPhone.xib index c1f90f28..970bc6c6 100644 --- a/MPfm/MPfm.iOS/XIB/iPhone/ListViewController_iPhone.xib +++ b/MPfm/MPfm.iOS/XIB/iPhone/MobileLibraryBrowserViewController_iPhone.xib @@ -3,12 +3,12 @@ 1536 12C54 - 2840 + 2844 1187.34 625.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 + 1930 IBProxyObject @@ -41,6 +41,7 @@ {320, 460} + _NS:9 3 @@ -60,7 +61,7 @@ {{0, 20}, {320, 460}} - + 3 MQA @@ -126,7 +127,7 @@ - ListViewController + MobileLibraryBrowserViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -139,33 +140,11 @@ 5 - - - - ListViewController - UIViewController - - tableView - UITableView - - - tableView - - tableView - UITableView - - - - IBProjectSource - ./Classes/ListViewController.h - - - - + 0 IBCocoaTouchFramework YES 3 - 1926 + 1930 diff --git a/MPfm/MPfm.iOS/XIB/iPhone/MoreViewController_iPhone.xib b/MPfm/MPfm.iOS/XIB/iPhone/MoreViewController_iPhone.xib new file mode 100644 index 00000000..d8cbc3c1 --- /dev/null +++ b/MPfm/MPfm.iOS/XIB/iPhone/MoreViewController_iPhone.xib @@ -0,0 +1,118 @@ + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + + + MoreViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + MoreViewController + UIViewController + + IBProjectSource + MoreViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 916 + + diff --git a/MPfm/MPfm.iOS/XIB/iPhone/UpdateLibraryViewController_iPhone.xib b/MPfm/MPfm.iOS/XIB/iPhone/UpdateLibraryViewController_iPhone.xib new file mode 100644 index 00000000..6ba30bfd --- /dev/null +++ b/MPfm/MPfm.iOS/XIB/iPhone/UpdateLibraryViewController_iPhone.xib @@ -0,0 +1,118 @@ + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + + + UpdateLibraryViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + UpdateLibraryViewController + UIViewController + + IBProjectSource + UpdateLibraryViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 916 + + diff --git a/MPfm/MPfm_iOS.sln b/MPfm/MPfm_iOS.sln index b54902fa..0360bf48 100644 --- a/MPfm/MPfm_iOS.sln +++ b/MPfm/MPfm_iOS.sln @@ -141,6 +141,33 @@ Global {FEB7497C-784C-4380-874F-46FD93C82BA1}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = MPfm.iOS.csproj + StartupItem = MPfm.iOS\MPfm.iOS.csproj + Policies = $0 + $0.DotNetNamingPolicy = $1 + $1.DirectoryNamespaceAssociation = None + $1.ResourceNamePolicy = FileFormatDefault + $0.TextStylePolicy = $2 + $2.inheritsSet = VisualStudio + $2.inheritsScope = text/plain + $2.scope = text/x-csharp + $0.CSharpFormattingPolicy = $3 + $3.IndentSwitchBody = True + $3.AnonymousMethodBraceStyle = NextLine + $3.PropertyBraceStyle = NextLine + $3.PropertyGetBraceStyle = NextLine + $3.PropertySetBraceStyle = NextLine + $3.EventBraceStyle = NextLine + $3.EventAddBraceStyle = NextLine + $3.EventRemoveBraceStyle = NextLine + $3.StatementBraceStyle = NextLine + $3.ArrayInitializerBraceStyle = NextLine + $3.BeforeMethodDeclarationParentheses = False + $3.BeforeMethodCallParentheses = False + $3.BeforeConstructorDeclarationParentheses = False + $3.BeforeDelegateDeclarationParentheses = False + $3.NewParentheses = False + $3.inheritsSet = Mono + $3.inheritsScope = text/x-csharp + $3.scope = text/x-csharp EndGlobalSection EndGlobal