Updated WayUp example to not use make files but use a MonoDevelop sly file.

This commit is contained in:
chrisntr 2011-07-24 21:00:52 +01:00
Родитель 554bdc5d7a
Коммит 11501be539
11 изменённых файлов: 328 добавлений и 108 удалений

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.9 KiB

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 59 KiB

После

Ширина:  |  Высота:  |  Размер: 59 KiB

5
wayup/Info.plist Normal file
Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict />
</plist>

52
wayup/Main.cs Normal file
Просмотреть файл

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace WayUp
{
public class Application
{
static void Main (string[] args)
{
UIApplication.Main (args);
}
}
// The name AppDelegate is referenced in the MainWindow.xib file.
public partial class WhichWayIsUpAppDelegate : UIApplicationDelegate
{
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
window.AddSubview(crateViewController.View);
window.MakeKeyAndVisible ();
return true;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
}
}
public partial class CrateViewController : UIViewController {
public CrateViewController (IntPtr handle) : base (handle) {}
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
return true;
}
}
}

Просмотреть файл

@ -1,11 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.02">
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9D23</string>
<string key="IBDocument.InterfaceBuilderVersion">652</string>
<string key="IBDocument.AppKitVersion">949.32</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<string key="IBDocument.SystemVersion">10K540</string>
<string key="IBDocument.InterfaceBuilderVersion">851</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">141</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2"/>
@ -15,12 +19,28 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="605940130">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUICustomObject" id="664661524">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUICustomObject" id="664661524"/>
<object class="IBUIWindow" id="380026005">
<reference key="NSNextResponder"/>
<int key="NSvFlags">1292</int>
@ -33,6 +53,7 @@
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIVisibleAtLaunch">YES</bool>
</object>
<object class="IBUIViewController" id="692027599">
@ -50,9 +71,10 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentMode">1</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">crate.png</string>
<string key="NSResourceName">/Images/crate.png</string>
</object>
</object>
</object>
@ -61,7 +83,13 @@
<reference key="IBUIBackgroundColor" ref="436719429"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@ -97,9 +125,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="957960031">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@ -109,18 +135,18 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="parent" ref="957960031"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="957960031"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="664661524"/>
<reference key="parent" ref="957960031"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
@ -129,7 +155,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="697785741"/>
</object>
<reference key="parent" ref="957960031"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
@ -145,13 +171,19 @@
<reference key="object" ref="439241219"/>
<reference key="parent" ref="697785741"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="605940130"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>12.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
<string>2.IBAttributePlaceholdersKey</string>
@ -166,31 +198,28 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<string>{{1968, 12}, {320, 480}}</string>
<string>{{1360, 37}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>WhichWayIsUpAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>CrateViewController</string>
<string>{{133, 431}, {320, 480}}</string>
<string>{{6, 431}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
@ -198,9 +227,7 @@
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
@ -224,7 +251,7 @@
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>crateViewController</string>
<string>window</string>
@ -235,6 +262,25 @@
<string>UIWindow</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>crateViewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">crateViewController</string>
<string key="candidateClassName">CrateViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">window</string>
<string key="candidateClassName">UIWindow</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/WhichWayIsUpAppDelegate.h</string>
@ -251,7 +297,22 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="1050" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">WhichWayIsUp.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">/Images/crate.png</string>
<string key="NS.object.0">{16, 16}</string>
</object>
<string key="IBCocoaTouchPluginVersion">141</string>
</data>
</archive>

52
wayup/MainWindow.xib.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,52 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WayUp {
// Base type probably should be MonoTouch.Foundation.NSObject or subclass
[MonoTouch.Foundation.Register("WhichWayIsUpAppDelegate")]
public partial class WhichWayIsUpAppDelegate {
private MonoTouch.UIKit.UIWindow __mt_window;
private CrateViewController __mt_crateViewController;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("window")]
private MonoTouch.UIKit.UIWindow window {
get {
this.__mt_window = ((MonoTouch.UIKit.UIWindow)(this.GetNativeField("window")));
return this.__mt_window;
}
set {
this.__mt_window = value;
this.SetNativeField("window", value);
}
}
[MonoTouch.Foundation.Connect("crateViewController")]
private CrateViewController crateViewController {
get {
this.__mt_crateViewController = ((CrateViewController)(this.GetNativeField("crateViewController")));
return this.__mt_crateViewController;
}
set {
this.__mt_crateViewController = value;
this.SetNativeField("crateViewController", value);
}
}
}
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("CrateViewController")]
public partial class CrateViewController {
}
}

Просмотреть файл

@ -1,13 +0,0 @@
APPDIR = Wayup.app
EXE = wayup.exe
SOURCES = wayup.cs wayup.g.cs
APP = $(APPDIR)/hello
MFLAGS=-icon=Icon.png
EXTRA_DEPS = MainWindow.nib
DATA = crate.png Icon.png $(EXTRA_DEPS)
%.nib: %.xib
ibtool $< --compile $@
include ../Make.common

104
wayup/WayUp.csproj Normal file
Просмотреть файл

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2B59EB42-A1BE-4926-B96C-FD223C06460E}</ProjectGuid>
<ProjectTypeGuids>{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>WayUp</RootNamespace>
<MainNibFile>MainWindow.xib</MainNibFile>
<AssemblyName>example</AssemblyName>
<MtouchMinimumOS>3.0</MtouchMinimumOS>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<BundleIcon>Images\Icon.png</BundleIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchDebug>True</MtouchDebug>
<MtouchUseLlvm>false</MtouchUseLlvm>
<ConsolePause>false</ConsolePause>
<MtouchUseSGen>false</MtouchUseSGen>
<MtouchUseThumb>false</MtouchUseThumb>
<MtouchArch>ARMv6</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchDebug>False</MtouchDebug>
<MtouchUseSGen>false</MtouchUseSGen>
<ConsolePause>false</ConsolePause>
<MtouchUseLlvm>false</MtouchUseLlvm>
<MtouchUseThumb>false</MtouchUseThumb>
<MtouchArch>ARMv6</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchUseSGen>false</MtouchUseSGen>
<MtouchDebug>True</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<ConsolePause>false</ConsolePause>
<MtouchUseThumb>false</MtouchUseThumb>
<MtouchArch>ARMv6</MtouchArch>
<MtouchUseLlvm>false</MtouchUseLlvm>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchUseSGen>false</MtouchUseSGen>
<MtouchDebug>False</MtouchDebug>
<MtouchUseThumb>false</MtouchUseThumb>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchArch>ARMv6</MtouchArch>
<MtouchUseLlvm>false</MtouchUseLlvm>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="monotouch" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow.xib.designer.cs">
<DependentUpon>MainWindow.xib</DependentUpon>
</Compile>
<Compile Include="Main.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="MainWindow.xib" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Content Include="Images\crate.png" />
<Content Include="Images\Icon.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Images\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
</ItemGroup>
</Project>

26
wayup/WayUp.sln Normal file
Просмотреть файл

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WayUp", "WayUp.csproj", "{2B59EB42-A1BE-4926-B96C-FD223C06460E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Debug|iPhone.Build.0 = Debug|iPhone
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Release|iPhone.ActiveCfg = Release|iPhone
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Release|iPhone.Build.0 = Release|iPhone
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{2B59EB42-A1BE-4926-B96C-FD223C06460E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = WayUp.csproj
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,35 +0,0 @@
//
// Wayup sample in C#
//
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using System.Drawing;
[Register]
public class CrateViewController : UIViewController {
public CrateViewController (IntPtr handle) : base (handle) {}
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
return true;
}
}
[Register]
public partial class WhichWayIsUpAppDelegate : UIApplicationDelegate {
public override void FinishedLaunching (UIApplication app)
{
window.AddSubview (crateViewController.View);
}
}
class Demo {
static void Main (string [] args)
{
UIApplication.Main (args, null, null);
}
}

Просмотреть файл

@ -1,32 +0,0 @@
//
// Wayup auto-generated outlets C#
//
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using System.Drawing;
public partial class WhichWayIsUpAppDelegate : UIApplicationDelegate {
[Connect]
public UIWindow window {
get {
return (UIWindow) GetNativeField ("window");
}
set {
SetNativeField ("window", value);
}
}
[Connect]
public CrateViewController crateViewController {
get {
return (CrateViewController) GetNativeField ("crateViewController");
}
set {
SetNativeField ("crateViewController", value);
}
}
}