Пример #1
0
        partial void DoneMedButton_TouchUpInside(UIButton sender)
        {
            if (CheckFullfill())
            {
                //TimeSpan days = TillDate.Date - FromDate.Date;
                //DateTime time;
                //for (int i = 0; i < days.Days; i++)
                // {
                //   for (int j = 0; j < Number; j++)
                //  {
                //      time = (DateTime)picks[j].Date;
                AddReminder(Name, (NSDate)DateTime.Today.AddHours(1));
                //  }
                // }

                int index1 = this.NavigationController.ViewControllers.Length - 3;
                FirstViewController parrent = (FirstViewController)this.NavigationController.ViewControllers[index1];
                parrent.Med      = Name;
                parrent.FromDate = FromDate;
                parrent.TillDate = TillDate;
                parrent.TabBarController.TabBar.Hidden = false;
                this.NavigationController.PopToRootViewController(true);
            }
            else
            {
                var okAlertController = UIAlertController.Create("Error", "You didnt fill in all fields.", UIAlertControllerStyle.Alert);

                okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));

                PresentViewController(okAlertController, true, null);
            }
        }
Пример #2
0
        public GeneroPickerViewModel(FirstViewController controller)
        {
            this.controller = controller;

            //Poner el valor inicial.
            controller.StrGenero = generos[0];
        }
Пример #3
0
        partial void DeleteButton_TouchUpInside(UIButton sender)
        {
            int index = this.NavigationController.ViewControllers.Length - 2;
            FirstViewController parrent = (FirstViewController)this.NavigationController.ViewControllers[index];

            parrent.Index = Index;
            this.NavigationController.PopViewController(true);
        }
Пример #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            var firstViewController = new FirstViewController ();

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

            return true;
        }
Пример #5
0
 public SplitView()
     : base()
 {
     // create our master and detail views
     masterView = new SecondViewController ();
     detailView = new FirstViewController ();
     fv = (FirstViewController)detailView;
     sd = new SplitDelegate ();
     Delegate = sd;
     // create an array of controllers from them and then
     // assign it to the controllers property
     ViewControllers = new UIViewController[]
     { masterView, detailView }; // order is important
 }