diff --git a/ImageKitDemoStep1/AppDelegate.cs b/ImageKitDemoStep1/AppDelegate.cs index 7b64b20..3d3d01e 100644 --- a/ImageKitDemoStep1/AppDelegate.cs +++ b/ImageKitDemoStep1/AppDelegate.cs @@ -1,8 +1,8 @@ using System; -using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; +using CoreGraphics; +using Foundation; +using AppKit; +using ObjCRuntime; namespace ImageKitDemo { @@ -14,7 +14,7 @@ namespace ImageKitDemo { } - public override void FinishedLaunching (NSObject notification) + public override void DidFinishLaunching (NSNotification notification) { mainWindowController = new MainWindowController (); mainWindowController.Window.MakeKeyAndOrderFront (this); diff --git a/ImageKitDemoStep1/BrowseData.cs b/ImageKitDemoStep1/BrowseData.cs index 3df5f19..e02c24e 100644 --- a/ImageKitDemoStep1/BrowseData.cs +++ b/ImageKitDemoStep1/BrowseData.cs @@ -2,9 +2,9 @@ using System; using System.IO; using System.Collections.Generic; using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ImageKit; +using Foundation; +using AppKit; +using ImageKit; namespace ImageKitDemo { @@ -38,7 +38,7 @@ namespace ImageKitDemo //indexes will change, but I will put the items in after the item at destination //FIXME - missing methods on NSIndexSet //FIXME make an extension method on List<> - int destination = destinationIndex - indexes.Where (x => x < destinationIndex).Count (); + int destination = (int) destinationIndex - (int)indexes.Where (x =>(int) x <(int) destinationIndex).Count (); List movingImages = new List (); foreach (int index in indexes) movingImages.Add (images[index]); diff --git a/ImageKitDemoStep1/BrowseItem.cs b/ImageKitDemoStep1/BrowseItem.cs index 90ef8ed..347782c 100644 --- a/ImageKitDemoStep1/BrowseItem.cs +++ b/ImageKitDemoStep1/BrowseItem.cs @@ -1,7 +1,7 @@ using System; using System.IO; -using MonoMac.ImageKit; -using MonoMac.Foundation; +using ImageKit; +using Foundation; namespace ImageKitDemo { diff --git a/ImageKitDemoStep1/DragDelegate.cs b/ImageKitDemoStep1/DragDelegate.cs index d110517..cae7a14 100644 --- a/ImageKitDemoStep1/DragDelegate.cs +++ b/ImageKitDemoStep1/DragDelegate.cs @@ -1,9 +1,9 @@ using System; using System.Linq; -using MonoMac.ObjCRuntime; -using MonoMac.AppKit; -using MonoMac.ImageKit; -using MonoMac.Foundation; +using ObjCRuntime; +using AppKit; +using ImageKit; +using Foundation; namespace ImageKitDemo { @@ -57,11 +57,11 @@ namespace ImageKitDemo if (pb.Types.Contains (NSPasteboard.NSFilenamesType)) data = pb.GetPropertyListForType (NSPasteboard.NSFilenamesType) as NSArray; if (data != null) { - for (int i = 0; i < data.Count; i++) { + for (int i = 0; i < (int) data.Count; i++) { string path = (string)NSString.FromHandle (data.ValueAt ((uint)i)); Console.WriteLine ("From pasteboard Item {0} = {1}", i, path); ((BrowseData)browserView.DataSource).AddImages ( - NSUrl.FromFilename (path), browserView.GetIndexAtLocationOfDroppedItem ()); + NSUrl.FromFilename (path), (int)browserView.GetIndexAtLocationOfDroppedItem ()); browserView.ReloadData (); } } diff --git a/ImageKitDemoStep1/ImageKitDemo.csproj b/ImageKitDemoStep1/ImageKitDemo.csproj index 4cba880..b45eeb3 100644 --- a/ImageKitDemoStep1/ImageKitDemo.csproj +++ b/ImageKitDemoStep1/ImageKitDemo.csproj @@ -6,11 +6,12 @@ 10.0.0 2.0 {BD79A8FA-DFDB-4B85-A007-BE957D9FE882} - {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Exe ImageKitDemo ImageKitDemo - + Xamarin.Mac + v2.0 true @@ -35,10 +36,7 @@ - - - False - + @@ -69,6 +67,5 @@ - - + \ No newline at end of file diff --git a/ImageKitDemoStep1/Main.cs b/ImageKitDemoStep1/Main.cs index 84e71c2..581cfd5 100644 --- a/ImageKitDemoStep1/Main.cs +++ b/ImageKitDemoStep1/Main.cs @@ -1,8 +1,8 @@ using System; -using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; +using CoreGraphics; +using Foundation; +using AppKit; +using ObjCRuntime; namespace ImageKitDemo { diff --git a/ImageKitDemoStep1/MainMenu.xib.designer.cs b/ImageKitDemoStep1/MainMenu.xib.designer.cs index 94dbe8d..f2617bf 100644 --- a/ImageKitDemoStep1/MainMenu.xib.designer.cs +++ b/ImageKitDemoStep1/MainMenu.xib.designer.cs @@ -12,7 +12,7 @@ namespace ImageKitDemo { // Should subclass MonoMac.AppKit.NSResponder - [MonoMac.Foundation.Register("AppDelegate")] + [Foundation.Register("AppDelegate")] public partial class AppDelegate { } } diff --git a/ImageKitDemoStep1/MainWindow.cs b/ImageKitDemoStep1/MainWindow.cs index 6162b31..89a8d8b 100644 --- a/ImageKitDemoStep1/MainWindow.cs +++ b/ImageKitDemoStep1/MainWindow.cs @@ -2,12 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; +using Foundation; +using AppKit; namespace ImageKitDemo { - public partial class MainWindow : MonoMac.AppKit.NSWindow + public partial class MainWindow : AppKit.NSWindow { #region Constructors diff --git a/ImageKitDemoStep1/MainWindow.xib.designer.cs b/ImageKitDemoStep1/MainWindow.xib.designer.cs index 1f87a12..0b33f2e 100644 --- a/ImageKitDemoStep1/MainWindow.xib.designer.cs +++ b/ImageKitDemoStep1/MainWindow.xib.designer.cs @@ -12,30 +12,30 @@ namespace ImageKitDemo { // Should subclass MonoMac.AppKit.NSWindow - [MonoMac.Foundation.Register("MainWindow")] + [Foundation.Register("MainWindow")] public partial class MainWindow { } // Should subclass MonoMac.AppKit.NSWindowController - [MonoMac.Foundation.Register("MainWindowController")] + [Foundation.Register("MainWindowController")] public partial class MainWindowController { - private global::MonoMac.ImageKit.IKImageBrowserView __mt_browserView; + private global::ImageKit.IKImageBrowserView __mt_browserView; #pragma warning disable 0169 - [MonoMac.Foundation.Export("AddButtonClicked:")] - partial void AddButtonClicked (MonoMac.AppKit.NSButton sender); + [Foundation.Export("AddButtonClicked:")] + partial void AddButtonClicked (AppKit.NSButton sender); - [MonoMac.Foundation.Export("SearchTextChanged:")] - partial void SearchTextChanged (MonoMac.AppKit.NSSearchField sender); + [Foundation.Export("SearchTextChanged:")] + partial void SearchTextChanged (AppKit.NSSearchField sender); - [MonoMac.Foundation.Export("SliderChanged:")] - partial void SliderChanged (MonoMac.AppKit.NSSlider sender); + [Foundation.Export("SliderChanged:")] + partial void SliderChanged (AppKit.NSSlider sender); - [MonoMac.Foundation.Connect("browserView")] - private global::MonoMac.ImageKit.IKImageBrowserView browserView { + [Foundation.Connect("browserView")] + private global::ImageKit.IKImageBrowserView browserView { get { - this.__mt_browserView = ((global::MonoMac.ImageKit.IKImageBrowserView)(this.GetNativeField("browserView"))); + this.__mt_browserView = ((global::ImageKit.IKImageBrowserView)(this.GetNativeField("browserView"))); return this.__mt_browserView; } set { diff --git a/ImageKitDemoStep1/MainWindowController.cs b/ImageKitDemoStep1/MainWindowController.cs index b4f40c4..293ed87 100644 --- a/ImageKitDemoStep1/MainWindowController.cs +++ b/ImageKitDemoStep1/MainWindowController.cs @@ -3,13 +3,13 @@ using System; using System.IO; using System.Collections.Generic; using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ImageKit; +using Foundation; +using AppKit; +using ImageKit; namespace ImageKitDemo { - public partial class MainWindowController : MonoMac.AppKit.NSWindowController + public partial class MainWindowController : AppKit.NSWindowController { #region Constructors @@ -80,7 +80,7 @@ namespace ImageKitDemo panel.CanChooseDirectories = true; panel.CanChooseFiles = true; //FIXME - create enum for open/save panel return code - int i = panel.RunModal (); + int i = (int)panel.RunModal (); if (i == 1 && panel.Urls != null) { foreach (NSUrl url in panel.Urls) { browseData.AddImages (url);