public MainView(MainViewController parent)
 {
     Parent = parent;
     Input  = new UITextField()
     {
         BackgroundColor = UIColor.White, TextColor = UIColor.Black
     };
     Input.ReturnKeyType = UIReturnKeyType.Send;
     Input.ShouldReturn  = delegate {
         Parent.SendText(Input.Text.ToString());
         Input.Text = "";
         return(true);
     };
     Output = new UITextView()
     {
         BackgroundColor = UIColor.Black, TextColor = UIColor.Green, Editable = false
     };
     send = UIButton.FromType(UIButtonType.RoundedRect);
     send.SetTitle("Send", UIControlState.Normal);
     send.TouchDown += delegate {
         Parent.SendText(Input.Text.ToString());
         Input.Text = "";
     };
     this.AddSubview(Input);
     this.AddSubview(Output);
     this.AddSubview(send);
 }
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            mainViewController        = new MainViewController();
            window.RootViewController = mainViewController;
            window.MakeKeyAndVisible();

            return(true);
        }
Example #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            var mainViewController = new MainViewController ();

            window.RootViewController = mainViewController;
            window.MakeKeyAndVisible ();

            return true;
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            if (string.IsNullOrEmpty(Secrets.GoogleMapsApiKey))
            {
                throw new Exception("Please provide your own Google Maps Api Key");
            }

            MapServices.ProvideAPIKey(Secrets.GoogleMapsApiKey);

            var controller    = new MainViewController();
            var navController = new UINavigationController(controller);

            Window.RootViewController = navController;

            Window.MakeKeyAndVisible();

            return(true);
        }
 public MainView(MainViewController parent)
 {
     Parent = parent;
     Input = new UITextField(){BackgroundColor = UIColor.White, TextColor = UIColor.Black};
     Input.ReturnKeyType = UIReturnKeyType.Send;
     Input.ShouldReturn = delegate{
         Parent.SendText(Input.Text.ToString());
         Input.Text = "";
         return true;
     };
     Output = new UITextView(){BackgroundColor = UIColor.Black, TextColor = UIColor.Green,Editable = false};
     send = UIButton.FromType(UIButtonType.RoundedRect);
     send.SetTitle("Send", UIControlState.Normal);
     send.TouchDown += delegate {
         Parent.SendText(Input.Text.ToString());
         Input.Text = "";
     };
     this.AddSubview(Input);
     this.AddSubview(Output);
     this.AddSubview(send);
 }
 public RedParkDelegate(MainViewController manager)
 {
     Manager = manager;
 }
 public RedParkDelegate(MainViewController manager)
 {
     Manager = manager;
 }