Esempio n. 1
0
        public static void ShowPanel(string title, UIView view, Action <Dictionary <string, object> > editingEndedBlock)
        {
            MKEntryPanel panel = GetPanel();

            panel.closeBlock                 = editingEndedBlock;
            panel.titleLabel.Text            = title;
            panel.titleLabel.BackgroundColor = UIColor.Clear;
            panel.entryField.Font            = UIFont.FromName("DINPro-Medium", 16);
            panel.entryField.LeftView        = new UIView(new RectangleF(0, 0, 5, 31));
            panel.entryField.LeftViewMode    = UITextFieldViewMode.Always;
            panel.entryField.Background      = CashflowTheme.SharedTheme.TextBackground.CreateResizableImage(new UIEdgeInsets(5, 10, 5, 10));
            panel.valueField.Font            = UIFont.FromName("DINPro-Medium", 16);
            panel.valueField.RightView       = new UIView(new RectangleF(0, 0, 5, 31));
            panel.valueField.RightViewMode   = UITextFieldViewMode.Always;
            panel.valueField.Background      = CashflowTheme.SharedTheme.TextBackground.CreateResizableImage(new UIEdgeInsets(5, 10, 5, 10));
            panel.valueField.TextAlignment   = UITextAlignment.Right;
            panel.entryField.BecomeFirstResponder();

            panel.dimView = new UIControl(UIScreen.MainScreen.Bounds);
            CATransition transition = CATransition.CreateAnimation();

            transition.Duration       = kAnimationDuration;
            transition.TimingFunction = CAMediaTimingFunction.FromName(CAMediaTimingFunction.EaseInEaseOut);
            transition.Type           = CATransition.TransitionFade.ToString();
            panel.dimView.Layer.AddAnimation(transition, null);
            panel.dimView.BackgroundColor = UIColor.Black;
            panel.dimView.Alpha           = 0.8f;
            panel.dimView.TouchDown      += (sender, e) => panel.CancelTapped();
            view.AddSubview(panel.dimView);
            view.AddSubview(panel);
        }
Esempio n. 2
0
        static MKEntryPanel GetPanel()
        {
            MKEntryPanel panel = new MKEntryPanel();

            CATransition transition = CATransition.CreateAnimation();

            transition.Duration       = kAnimationDuration;
            transition.TimingFunction = CAMediaTimingFunction.FromName(CAMediaTimingFunction.EaseInEaseOut);
            transition.Type           = CATransition.TransitionPush.ToString();
            transition.Subtype        = CATransition.TransitionFromBottom.ToString();
            panel.Layer.AddAnimation(transition, null);

            return(panel);
        }
 void ShowEditPanel()
 {
     MKEntryPanel.ShowPanel("Edit the new item", View,
                            (enteredValues) => {
         if (enteredValues != null)
         {
             rows [currentlyEditedItem.Row] = enteredValues;
             tableView.ReloadRows(new NSIndexPath[] { currentlyEditedItem }, UITableViewRowAnimation.None);
         }
         else
         {
             rows.RemoveAt(currentlyEditedItem.Row);
             tableView.DeleteRows(new NSIndexPath[] { currentlyEditedItem }, UITableViewRowAnimation.None);
         }
     });
 }
Esempio n. 4
0
        static MKEntryPanel GetPanel()
        {
            MKEntryPanel panel = new MKEntryPanel ();

            CATransition transition = CATransition.CreateAnimation ();
            transition.Duration = kAnimationDuration;
            transition.TimingFunction = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseInEaseOut);
            transition.Type = CATransition.TransitionPush.ToString ();
            transition.Subtype = CATransition.TransitionFromBottom.ToString ();
            panel.Layer.AddAnimation (transition, null);

            return panel;
        }