From 32a6e7a37219b1eb0b83874c65321d2f25696c2a Mon Sep 17 00:00:00 2001 From: Rustam Zaitov Date: Wed, 5 Feb 2014 21:32:03 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D1=8B=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=BD?= =?UTF-8?q?=D0=B0=D0=BA=D0=B0=20=D1=80=D1=83=D0=B1=D0=BB=D1=8F=20=D0=B2=20?= =?UTF-8?q?=D1=88=D1=80=D0=B8=D1=84=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rouble/IOs/AppDelegate.cs | 27 +++++++++ Rouble/IOs/Entitlements.plist | 6 ++ Rouble/IOs/Info.plist | 26 ++++++++ Rouble/IOs/Main.cs | 19 ++++++ Rouble/IOs/MainController.cs | 65 ++++++++++++++++++++ Rouble/IOs/Rouble.csproj | 108 ++++++++++++++++++++++++++++++++++ Rouble/Rouble.sln | 32 ++++++++++ Rouble/Shared/Rouble.ttf | Bin 0 -> 1824 bytes 8 files changed, 283 insertions(+) create mode 100644 Rouble/IOs/AppDelegate.cs create mode 100644 Rouble/IOs/Entitlements.plist create mode 100644 Rouble/IOs/Info.plist create mode 100644 Rouble/IOs/Main.cs create mode 100644 Rouble/IOs/MainController.cs create mode 100644 Rouble/IOs/Rouble.csproj create mode 100644 Rouble/Rouble.sln create mode 100644 Rouble/Shared/Rouble.ttf diff --git a/Rouble/IOs/AppDelegate.cs b/Rouble/IOs/AppDelegate.cs new file mode 100644 index 0000000..30a5ab3 --- /dev/null +++ b/Rouble/IOs/AppDelegate.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using MonoTouch.Foundation; +using MonoTouch.UIKit; + +namespace Rouble +{ + [Register ("AppDelegate")] + public partial class AppDelegate : UIApplicationDelegate + { + private UIWindow _window; + private MainController _mainController; + + public override bool FinishedLaunching (UIApplication app, NSDictionary options) + { + _window = new UIWindow (UIScreen.MainScreen.Bounds); + _mainController = new MainController (); + + _window.RootViewController = _mainController; + _window.MakeKeyAndVisible (); + + return true; + } + } +} + diff --git a/Rouble/IOs/Entitlements.plist b/Rouble/IOs/Entitlements.plist new file mode 100644 index 0000000..5ea1ec7 --- /dev/null +++ b/Rouble/IOs/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/Rouble/IOs/Info.plist b/Rouble/IOs/Info.plist new file mode 100644 index 0000000..f840480 --- /dev/null +++ b/Rouble/IOs/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDisplayName + Rouble + CFBundleIdentifier + com.your-company.Rouble + UIDeviceFamily + + 1 + + UIAppFonts + + Rouble.ttf + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + MinimumOSVersion + 6.0 + + diff --git a/Rouble/IOs/Main.cs b/Rouble/IOs/Main.cs new file mode 100644 index 0000000..822edfa --- /dev/null +++ b/Rouble/IOs/Main.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using MonoTouch.Foundation; +using MonoTouch.UIKit; + +namespace Rouble +{ + 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/Rouble/IOs/MainController.cs b/Rouble/IOs/MainController.cs new file mode 100644 index 0000000..57135db --- /dev/null +++ b/Rouble/IOs/MainController.cs @@ -0,0 +1,65 @@ +using System; + +using MonoTouch.UIKit; +using System.Drawing; + +namespace Rouble +{ + public class MainController : UIViewController + { + private const string Text = "Цена: 100 {0}"; + + private UILabel _label1; + private UILabel _label2; + private UILabel _label3; + + + public MainController () + { + + } + + public override void ViewDidLoad () + { + base.ViewDidLoad (); + + View.BackgroundColor = UIColor.White; + + _label1 = new UILabel (); + _label1.Text = Text; + View.AddSubview (_label1); + + _label2 = new UILabel (); + _label2.Text = Text; + View.AddSubview (_label2); + + _label3 = new UILabel (); + _label3.Text = Text; + View.AddSubview (_label3); + } + + public override void ViewDidLayoutSubviews() + { + base.ViewWillLayoutSubviews (); + + _label1.SizeToFit (); + _label1.Center = View.Center; + + _label2.SizeToFit (); + _label2.Center = View.Center; + MoveY (_label2, -50f); + + _label3.SizeToFit (); + _label3.Center = View.Center; + MoveY (_label3, 50f); + } + + private void MoveY(UIView view, float dy) + { + RectangleF frame = view.Frame; + frame.Y += dy; + view.Frame = frame; + } + } +} + diff --git a/Rouble/IOs/Rouble.csproj b/Rouble/IOs/Rouble.csproj new file mode 100644 index 0000000..5590255 --- /dev/null +++ b/Rouble/IOs/Rouble.csproj @@ -0,0 +1,108 @@ + + + + Debug + iPhoneSimulator + 10.0.0 + 2.0 + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9} + {6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + Rouble + Resources + Rouble + + + true + full + false + bin\iPhoneSimulator\Debug + DEBUG; + prompt + 4 + false + None + Entitlements.plist + true + + + full + true + bin\iPhoneSimulator\Release + prompt + 4 + None + false + Entitlements.plist + + + true + full + false + bin\iPhone\Debug + DEBUG; + prompt + 4 + false + Entitlements.plist + true + iPhone Developer + + + full + true + bin\iPhone\Release + prompt + 4 + Entitlements.plist + false + iPhone Developer + + + full + true + bin\iPhone\Ad-Hoc + prompt + 4 + false + Entitlements.plist + true + Automatic:AdHoc + iPhone Distribution + + + full + true + bin\iPhone\AppStore + prompt + 4 + iPhone Distribution + Entitlements.plist + false + Automatic:AppStore + + + + + + + + + + + + + + + + + + + + + + + Resources\Rouble.ttf + + + \ No newline at end of file diff --git a/Rouble/Rouble.sln b/Rouble/Rouble.sln new file mode 100644 index 0000000..fe74d49 --- /dev/null +++ b/Rouble/Rouble.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rouble", "IOs\Rouble.csproj", "{0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + Ad-Hoc|iPhone = Ad-Hoc|iPhone + AppStore|iPhone = AppStore|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.AppStore|iPhone.ActiveCfg = AppStore|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.AppStore|iPhone.Build.0 = AppStore|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Debug|iPhone.ActiveCfg = Debug|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Debug|iPhone.Build.0 = Debug|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Release|iPhone.ActiveCfg = Release|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Release|iPhone.Build.0 = Release|iPhone + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {0F5F2F1C-52CD-4DF6-84F7-223D5CCEAAE9}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = IOs\Rouble.csproj + EndGlobalSection +EndGlobal diff --git a/Rouble/Shared/Rouble.ttf b/Rouble/Shared/Rouble.ttf new file mode 100644 index 0000000000000000000000000000000000000000..db2664f71d64dacdbcbd226c2d0ebfee00023dc8 GIT binary patch literal 1824 zcmd5+U1%It6#nj=nN6y(cF`g=MrK$e72I@p^CJzVMyY9h(UQhi5UiVIy1TNQU3RmO zwJHS(jZh(^g~lR8B|a32^x|w5VS&qiWDp+XsO!G#P80`Zr2DtD2R7B z_kQQ+o^$7(a}NZ7+i(yX%%^v6iS@j;{Yy$tl3p0f#B=Mi!AAk(WkAd((xv^)Uwl19 ze3(>D+VSC`-=FLSv|-wJB`IjSu8|jgc48kgr3r~=unSKF zcqO@Hhccrt&$qFK9+r*mp7%Nrjjp7T|EtwW>!HN3Gp+A8W@*s?+!eHftya())@7xj zHCMiOrW=}m{UsN8h?`s=`bFadtj9fQ<^h7CV5qY_XvOr6ck7{6E7sN7@nFaj)<#Q| z&XvnDd{s!tx#~=dxa?c`Q1%^{pDlg->9ylCrP8~V`8WR~|6l#h z`MbIvshxl7=b0I~by)C(r$M;nIycWAer9 z(aI-twLAKuK8EGr5&n8dC!H%36LQB*VLA&podsdO^y(`IoCRk<8?PLY8&;O&hDCXH z6_+nNi{pvZ>y_^oYsq6xqn-|v|B*S_MJl^_XMLPMwRHQwJGWhjP=&O1F!So9fLCP% z`aIOTf_&B^@?drCtrAu1@qVq&Hj!r(cQ&xe$C8zFzmGLmN~@1`zN2kEHgE?X^KpRq zDP~{j>*y(l=X@;KCEoC{WZYvu*3gFce5}*va~~VH7vK0eKz!pwEE4T72TD2HOs5jb zQM0`*W)=%}zP~t_w)^cwF&+1C*k{6OM|ZS47I97X*!e;#J7PxLA`wqgHN*)XG=eBP zU}69zxE7wzE-3=lg5aupo8RBu9o{ZCc#Z!@fQ_m;7>^ZN<^CV*zr4ji0A3C