Beispiel #1
0
        public override void ViewDidLoad()
        {
            ButtonMainMenu.Layer.CornerRadius = 5;
            ButtonMainMenu.Layer.BorderWidth  = 1;
            ButtonMainMenu.Layer.BorderColor  = UIColor.White.CGColor;

            ButtonPlayAgain.Layer.CornerRadius = 5;
            ButtonPlayAgain.Layer.BorderWidth  = 1;
            ButtonPlayAgain.Layer.BorderColor  = UIColor.White.CGColor;

            LabelWinnerText.Font = UIFont.BoldSystemFontOfSize(26);

            SetWinnerText();

            ButtonMainMenu.TouchUpInside += (sender, e) =>
            {
                ((UINavigationController)PresentingViewController).ViewControllers = new UIViewController[] { ((UINavigationController)PresentingViewController).ViewControllers[0] };

                PresentingViewController.DismissViewController(true, null);
            };

            ButtonPlayAgain.TouchUpInside += (sender, e) =>
            {
                PresentingViewController.DismissViewController(true, null);
            };
        }
Beispiel #2
0
 void OnSaveClicked(object sender, EventArgs e)
 {
     PhotoView.Image.Dispose();
     PhotoView.Image = imageView.Image;
     PresentingViewController.DismissViewController(true, () => {
     });
 }
        void Dismiss(NSObject sender)
        {
            // inform our MasterViewController we are going away
            Action completionHandler = MasterViewController != null ? MasterViewController.WasDismissed : (Action)null;

            PresentingViewController.DismissViewController(true, completionHandler);
        }
Beispiel #4
0
        public void Dismiss(object sender, EventArgs args)
        {
            // Explicitly unregister observers because we cannot predict when the GC cleans up
            Unregister();

            PresentingViewController?.DismissViewController(true, null);
        }
Beispiel #5
0
 void DimmingViewTapped(UIGestureRecognizer gesture)
 {
     if (gesture.State == UIGestureRecognizerState.Recognized)
     {
         PresentingViewController.DismissViewController(true, null);
     }
 }
        public void FinishPickingAssets(object sender, EventArgs args)
        {
            // Explicitly unregister observers because we cannot predict when the GC cleans up
            Unregister();

            FinishedPickingAssets?.Invoke(this, new MultiAssetEventArgs(_selectedAssets.ToArray()));

            PresentingViewController.DismissViewController(true, null);
        }
        public void Dismiss(object sender, EventArgs args)
        {
            // Explicitly unregister observers because we cannot predict when the GC cleans up
            Unregister();

            var e = Canceled;

            if (e != null)
            {
                e(this, EventArgs.Empty);
            }

            PresentingViewController.DismissViewController(true, null);
        }
Beispiel #8
0
 void Dismiss(NSObject sender)
 {
     if (Delegate != null)
     {
         Delegate.AccessoryViewControllerDidSaveAccessory(this, Accessory);
     }
     if (editingExistingAccessory)
     {
         PresentingViewController.DismissViewController(true, null);
     }
     else
     {
         NavigationController.PopViewController(true);
     }
 }
Beispiel #9
0
        partial void done(UIKit.UIBarButtonItem sender)
        {
            Settings.DebuggingEnabled                = debuggingEnabledSwitch.On;
            Settings.CellSize                        = cellSizeStepper.Value;
            Settings.MarginFactor                    = marginFactorStepper.Value;
            Settings.GroupingEnabled                 = groupingEnabledSwitch.On;
            Settings.SettingsDataSet                 = (SettingsDataSet)SelectedRowForSection(SECTION_DATA_SET);
            Settings.SettingsClusterer               = (SettingsClusterer)SelectedRowForSection(SECTION_CLUSTERER);
            Settings.MaxZoomLevelForClustering       = maxZoomLevelStepper.Value;
            Settings.MinUniqueLocationsForClustering = (uint)minUniqueLocationsStepper.Value;
            Settings.SettingsAnimator                = (SettingsAnimator)SelectedRowForSection(SECTION_ANIMATOR);

            Completed?.Invoke(this, Settings.Clone());

            PresentingViewController.DismissViewController(true, null);
        }
 public override void ViewDidAppear(bool animated)
 {
     if (RdioClient.SharedClient.IsAuthorized)
     {
         // After the user authenticates with the Rdio login screen we're done
         PresentingViewController.DismissViewController(false, null);
     }
     else if (!string.IsNullOrEmpty(RdioClient.SharedClient.AuthToken))
     {
         // On first launch if the user has previously authenticated
         RdioClient.SharedClient.AuthorizeWithToken(RdioClient.SharedClient.AuthToken);
     }
     else
     {
         // On first launch with no authentication stored
         View.AddSubview(loginButton);
     }
 }
        public LoginScreenController(RectangleF frame)
        {
            View = new UIView(frame);
            View.AddSubview(new UIImageView(UIImage.FromFile("purple.png")));

            float width        = frame.Width;
            float delta        = 20f;
            float buttonWidth  = width - (2 * delta);
            float buttonHeigth = 2 * delta;

            loginButton       = UIButton.FromType(UIButtonType.RoundedRect);
            loginButton.Frame = new RectangleF(delta, delta, buttonWidth, buttonHeigth);
            loginButton.SetTitle("Login to Rdio", UIControlState.Normal);

            loginButton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            loginButton.TouchUpInside += (sender, e) => {
                RdioClient.SharedClient.AuthorizeFromController(this);
            };

            RdioClient.SharedClient.AuthorizeRequestCompleted += (state) => {
                switch (state)
                {
                case AuthorizeState.Authorized:
                    PresentingViewController.DismissViewController(false, null);
                    break;

                case AuthorizeState.Failed:
                    new UIAlertView("Authentication Failed", "Failed to login to Rdio", null, "ok", null).Show();
                    this.View.AddSubview(loginButton);
                    break;

                case AuthorizeState.Cancelled:
                    new UIAlertView("Authentication Cancelled", "You cancelled your authentication", null, "ok", null).Show();
                    PresentingViewController.DismissViewController(false, null);
                    break;

                default:
                    break;
                }
            };
        }
Beispiel #12
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            TableView.BackgroundColor = UIColor.FromRGB(238 / 255.0f, 91 / 255.0f, 51 / 255.0f);

            TableView.RegisterClassForCellReuse(typeof(TextFieldCell), "TextFieldCell");
            TableView.RowHeight       = UITableView.AutomaticDimension;
            TableView.TableFooterView = new UIView();

            logoCell = new ImageCell();
            logoCell
            .CloseStream
            .Subscribe(_ => PresentingViewController.DismissViewController(true, null))
            .AddTo(disposables);

            buttonCell = new ButtonCell();
            buttonCell
            .ActionStream
            .SelectMany(_ => SignupManager.SignUp(api, null))
            .ObserveOn(SynchronizationContext.Current)
            .Subscribe(Succeed)
            .AddTo(disposables);
        }
 public void DismissButtonTapped(UIButton sender)
 {
     PresentingViewController.DismissViewController(true, null);
 }
 partial void CloseButton_Activated(UIBarButtonItem sender)
 {
     PresentingViewController.DismissViewController(true, null);
 }
 void DismissChangePasswordSuccessAlertView()
 {
     PresentingViewController.DismissViewController(true, null);
 }
 void CancelChangePasswordAction(object sender, EventArgs e)
 {
     PresentingViewController.DismissViewController(true, null);
     //go back to login view
     AppDisplayUtil.Instance.GoToLoginView();
 }
 void DimmingViewTapped(UITapGestureRecognizer sender)
 {
     PresentingViewController.DismissViewController(true, null);
 }
Beispiel #18
0
 partial void cancel(UIKit.UIBarButtonItem sender)
 {
     PresentingViewController.DismissViewController(true, null);
 }