From 4064cf048cc677873eca46482dac2a118f90f693 Mon Sep 17 00:00:00 2001 From: Antonio Feregrino Date: Tue, 13 Dec 2016 00:17:08 -0600 Subject: [PATCH] FaceIt --- FaceIt/AppDelegate.cs | 59 +++++++ .../AppIcon.appiconset/Contents.json | 157 ++++++++++++++++++ FaceIt/Assets.xcassets/Contents.json | 6 + FaceIt/Entitlements.plist | 6 + FaceIt/FaceIt.csproj | 118 +++++++++++++ FaceIt/FaceIt.sln | 23 +++ FaceIt/FaceView.cs | 49 ++++++ FaceIt/FaceView.designer.cs | 21 +++ FaceIt/Info.plist | 39 +++++ FaceIt/LaunchScreen.storyboard | 27 +++ FaceIt/Main.cs | 15 ++ FaceIt/Main.storyboard | 38 +++++ FaceIt/ViewController.cs | 26 +++ FaceIt/ViewController.designer.cs | 21 +++ 14 files changed, 605 insertions(+) create mode 100644 FaceIt/AppDelegate.cs create mode 100644 FaceIt/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 FaceIt/Assets.xcassets/Contents.json create mode 100644 FaceIt/Entitlements.plist create mode 100644 FaceIt/FaceIt.csproj create mode 100644 FaceIt/FaceIt.sln create mode 100644 FaceIt/FaceView.cs create mode 100644 FaceIt/FaceView.designer.cs create mode 100644 FaceIt/Info.plist create mode 100644 FaceIt/LaunchScreen.storyboard create mode 100644 FaceIt/Main.cs create mode 100644 FaceIt/Main.storyboard create mode 100644 FaceIt/ViewController.cs create mode 100644 FaceIt/ViewController.designer.cs diff --git a/FaceIt/AppDelegate.cs b/FaceIt/AppDelegate.cs new file mode 100644 index 0000000..fda51cb --- /dev/null +++ b/FaceIt/AppDelegate.cs @@ -0,0 +1,59 @@ +using Foundation; +using UIKit; + +namespace FaceIt +{ + // 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 application events from iOS. + [Register("AppDelegate")] + public class AppDelegate : UIApplicationDelegate + { + // class-level declarations + + public override UIWindow Window + { + get; + set; + } + + public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) + { + // Override point for customization after application launch. + // If not required for your application you can safely delete this method + + return true; + } + + public override void OnResignActivation(UIApplication application) + { + // Invoked when the application is about to move from active to inactive state. + // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) + // or when the user quits the application and it begins the transition to the background state. + // Games should use this method to pause the game. + } + + public override void DidEnterBackground(UIApplication application) + { + // Use this method to release shared resources, save user data, invalidate timers and store the application state. + // If your application supports background exection this method is called instead of WillTerminate when the user quits. + } + + public override void WillEnterForeground(UIApplication application) + { + // Called as part of the transiton from background to active state. + // Here you can undo many of the changes made on entering the background. + } + + public override void OnActivated(UIApplication application) + { + // Restart any tasks that were paused (or not yet started) while the application was inactive. + // If the application was previously in the background, optionally refresh the user interface. + } + + public override void WillTerminate(UIApplication application) + { + // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground. + } + } +} + diff --git a/FaceIt/Assets.xcassets/AppIcon.appiconset/Contents.json b/FaceIt/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..4e64678 --- /dev/null +++ b/FaceIt/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,157 @@ +{ + "images": [ + { + "idiom": "iphone", + "size": "29x29", + "scale": "1x" + }, + { + "idiom": "iphone", + "size": "29x29", + "scale": "2x" + }, + { + "idiom": "iphone", + "size": "29x29", + "scale": "3x" + }, + { + "idiom": "iphone", + "size": "40x40", + "scale": "2x" + }, + { + "idiom": "iphone", + "size": "40x40", + "scale": "3x" + }, + { + "idiom": "iphone", + "size": "57x57", + "scale": "1x" + }, + { + "idiom": "iphone", + "size": "57x57", + "scale": "2x" + }, + { + "idiom": "iphone", + "size": "60x60", + "scale": "2x" + }, + { + "idiom": "iphone", + "size": "60x60", + "scale": "3x" + }, + { + "idiom": "ipad", + "size": "29x29", + "scale": "1x" + }, + { + "idiom": "ipad", + "size": "29x29", + "scale": "2x" + }, + { + "idiom": "ipad", + "size": "40x40", + "scale": "1x" + }, + { + "idiom": "ipad", + "size": "40x40", + "scale": "2x" + }, + { + "idiom": "ipad", + "size": "50x50", + "scale": "1x" + }, + { + "idiom": "ipad", + "size": "50x50", + "scale": "2x" + }, + { + "idiom": "ipad", + "size": "72x72", + "scale": "1x" + }, + { + "idiom": "ipad", + "size": "72x72", + "scale": "2x" + }, + { + "idiom": "ipad", + "size": "76x76", + "scale": "1x" + }, + { + "idiom": "ipad", + "size": "76x76", + "scale": "2x" + }, + { + "size": "24x24", + "idiom": "watch", + "scale": "2x", + "role": "notificationCenter", + "subtype": "38mm" + }, + { + "size": "27.5x27.5", + "idiom": "watch", + "scale": "2x", + "role": "notificationCenter", + "subtype": "42mm" + }, + { + "size": "29x29", + "idiom": "watch", + "role": "companionSettings", + "scale": "2x" + }, + { + "size": "29x29", + "idiom": "watch", + "role": "companionSettings", + "scale": "3x" + }, + { + "size": "40x40", + "idiom": "watch", + "scale": "2x", + "role": "appLauncher", + "subtype": "38mm" + }, + { + "size": "44x44", + "idiom": "watch", + "scale": "2x", + "role": "longLook", + "subtype": "42mm" + }, + { + "size": "86x86", + "idiom": "watch", + "scale": "2x", + "role": "quickLook", + "subtype": "38mm" + }, + { + "size": "98x98", + "idiom": "watch", + "scale": "2x", + "role": "quickLook", + "subtype": "42mm" + } + ], + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/FaceIt/Assets.xcassets/Contents.json b/FaceIt/Assets.xcassets/Contents.json new file mode 100644 index 0000000..4caf392 --- /dev/null +++ b/FaceIt/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/FaceIt/Entitlements.plist b/FaceIt/Entitlements.plist new file mode 100644 index 0000000..9ae5993 --- /dev/null +++ b/FaceIt/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/FaceIt/FaceIt.csproj b/FaceIt/FaceIt.csproj new file mode 100644 index 0000000..bb86c44 --- /dev/null +++ b/FaceIt/FaceIt.csproj @@ -0,0 +1,118 @@ + + + + Debug + iPhoneSimulator + {C4E0C06A-3D3B-4168-B0C3-40B48D360585} + {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + FaceApp + FaceApp + Resources + + + true + full + false + bin\iPhoneSimulator\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + iPhone Developer + true + true + true + true + 31325 + None + x86_64 + HttpClientHandler + Default + x86 + + + pdbonly + true + bin\iPhone\Release + prompt + 4 + iPhone Developer + true + true + true + Entitlements.plist + SdkOnly + ARMv7, ARM64 + HttpClientHandler + Default + x86 + + + pdbonly + true + bin\iPhoneSimulator\Release + prompt + 4 + iPhone Developer + true + true + None + x86_64 + HttpClientHandler + Default + x86 + + + true + full + false + bin\iPhone\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + iPhone Developer + true + true + true + true + true + true + Entitlements.plist + SdkOnly + ARMv7, ARM64 + HttpClientHandler + Default + x86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ViewController.cs + + + + + \ No newline at end of file diff --git a/FaceIt/FaceIt.sln b/FaceIt/FaceIt.sln new file mode 100644 index 0000000..a2cf9a1 --- /dev/null +++ b/FaceIt/FaceIt.sln @@ -0,0 +1,23 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceIt", "FaceIt.csproj", "{C4E0C06A-3D3B-4168-B0C3-40B48D360585}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Release|iPhone.ActiveCfg = Release|iPhone + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Release|iPhone.Build.0 = Release|iPhone + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Debug|iPhone.ActiveCfg = Debug|iPhone + {C4E0C06A-3D3B-4168-B0C3-40B48D360585}.Debug|iPhone.Build.0 = Debug|iPhone + EndGlobalSection +EndGlobal diff --git a/FaceIt/FaceView.cs b/FaceIt/FaceView.cs new file mode 100644 index 0000000..4018d33 --- /dev/null +++ b/FaceIt/FaceView.cs @@ -0,0 +1,49 @@ +using System; +using System.ComponentModel; +using Foundation; +using UIKit; +using CoreGraphics; + +namespace FaceIt +{ + [Register("FaceView"), DesignTimeVisible(true)] + public class FaceView : UIView + { + private double _skullRadius; + public double SkullRadius + { + get { return _skullRadius; } + set { _skullRadius = value; } + } + + public CGPoint SkullCenter + { + get; set; + } + + public FaceView(IntPtr p) + : base(p) + { + //Initialize(); + } + + public FaceView() + { + //Initialize(); + } + + public override void Draw(CoreGraphics.CGRect rect) + { + base.Draw(rect); + + _skullRadius = Math.Min(Bounds.Size.Width, Bounds.Size.Height); + SkullCenter = new CGPoint(Bounds.GetMidX(), Bounds.GetMidY()); + + var skull = UIBezierPath.FromArc(SkullCenter, new nfloat(_skullRadius), 0, new nfloat(2 * Math.PI), false); + skull.LineWidth = (nfloat)5.0; + + UIColor.Blue.SetStroke(); + skull.Stroke(); + } + } +} diff --git a/FaceIt/FaceView.designer.cs b/FaceIt/FaceView.designer.cs new file mode 100644 index 0000000..78173d9 --- /dev/null +++ b/FaceIt/FaceView.designer.cs @@ -0,0 +1,21 @@ +// WARNING +// +// This file has been generated automatically by Xamarin Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. +// +using Foundation; +using System; +using System.CodeDom.Compiler; +using UIKit; + +namespace FaceIt +{ + [Register ("FaceView")] + partial class FaceView + { + void ReleaseDesignerOutlets () + { + } + } +} \ No newline at end of file diff --git a/FaceIt/Info.plist b/FaceIt/Info.plist new file mode 100644 index 0000000..678efa0 --- /dev/null +++ b/FaceIt/Info.plist @@ -0,0 +1,39 @@ + + + + + CFBundleIdentifier + com.thatcsharpguy.faceit + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 10.1 + UIDeviceFamily + + 1 + 2 + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/AppIcon.appiconset + CFBundleName + FaceIt + + diff --git a/FaceIt/LaunchScreen.storyboard b/FaceIt/LaunchScreen.storyboard new file mode 100644 index 0000000..7981a14 --- /dev/null +++ b/FaceIt/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FaceIt/Main.cs b/FaceIt/Main.cs new file mode 100644 index 0000000..ec8d6f0 --- /dev/null +++ b/FaceIt/Main.cs @@ -0,0 +1,15 @@ +using UIKit; + +namespace FaceIt +{ + public class Application + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, "AppDelegate"); + } + } +} diff --git a/FaceIt/Main.storyboard b/FaceIt/Main.storyboard new file mode 100644 index 0000000..893cc16 --- /dev/null +++ b/FaceIt/Main.storyboard @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FaceIt/ViewController.cs b/FaceIt/ViewController.cs new file mode 100644 index 0000000..4e9279d --- /dev/null +++ b/FaceIt/ViewController.cs @@ -0,0 +1,26 @@ +using System; + +using UIKit; + +namespace FaceIt +{ + public partial class ViewController : UIViewController + { + protected ViewController(IntPtr handle) : base(handle) + { + // Note: this .ctor should not contain any initialization logic. + } + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + // Perform any additional setup after loading the view, typically from a nib. + } + + public override void DidReceiveMemoryWarning() + { + base.DidReceiveMemoryWarning(); + // Release any cached data, images, etc that aren't in use. + } + } +} diff --git a/FaceIt/ViewController.designer.cs b/FaceIt/ViewController.designer.cs new file mode 100644 index 0000000..0d2d59e --- /dev/null +++ b/FaceIt/ViewController.designer.cs @@ -0,0 +1,21 @@ +// WARNING +// +// This file has been generated automatically by Xamarin Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. +// +using Foundation; +using System; +using System.CodeDom.Compiler; +using UIKit; + +namespace FaceApp +{ + [Register ("ViewController")] + partial class ViewController + { + void ReleaseDesignerOutlets () + { + } + } +} \ No newline at end of file