Пример #1
0
        public void arrangeMenu()
        {
            elements = new List <UIButton>();

            for (int i = 0; i < 7; i++)
            {
                ScheduleButton element = new ScheduleButton(DateTime.Now.AddDays(i));
                element.TouchUpInside += delegate(object sender, EventArgs e)
                {
                    ScheduleButton btn = ( ScheduleButton )sender;
                    this.NavigationController.PushViewController(btn.scheduleViewController, true);
                };

                elements.Add(element);
            }

            ScheduleButton booking = new ScheduleButton("Mine bestillinger");

            booking.TouchUpInside += delegate(object sender, EventArgs e)
            {
                ScheduleButton btn = ( ScheduleButton )sender;
                this.NavigationController.PushViewController(btn.scheduleViewController, true);
            };

            elements.Add(booking);



            settingsButton = new UIButton();
            settingsButton.SetBackgroundImage(UIImage.FromFile("images/grey.png"), UIControlState.Normal);
            settingsButton.SetBackgroundImage(UIImage.FromFile("images/blue.png"), UIControlState.Highlighted);

            settingsButton.SetTitle("Innstillinger", UIControlState.Normal);
            settingsButton.TouchUpInside += delegate(object sender, EventArgs e) {
                this.NavigationController.PushViewController(new GymSettingsViewController(), true);
            };

            elements.Add(settingsButton);
        }
Пример #2
0
        public void arrangeMenu()
        {
            elements = new List<UIButton>();

            for ( int i = 0 ;i< 7 ; i++)
            {
                ScheduleButton element = new ScheduleButton( DateTime.Now.AddDays( i ) );
                element.TouchUpInside += delegate(object sender, EventArgs e)
                {
                    ScheduleButton btn = ( ScheduleButton ) sender;
                    this.NavigationController.PushViewController( btn.scheduleViewController,true );
                };

                elements.Add(element);
            }

            ScheduleButton booking = new ScheduleButton( "Mine bestillinger" );
            booking.TouchUpInside += delegate(object sender, EventArgs e)
            {
                ScheduleButton btn = ( ScheduleButton ) sender;
                this.NavigationController.PushViewController( btn.scheduleViewController,true );
            };

            elements.Add( booking );

            settingsButton = new UIButton();
            settingsButton.SetBackgroundImage(  UIImage.FromFile ("images/grey.png"), UIControlState.Normal );
            settingsButton.SetBackgroundImage(  UIImage.FromFile ("images/blue.png"), UIControlState.Highlighted );

            settingsButton.SetTitle( "Innstillinger",UIControlState.Normal);
            settingsButton.TouchUpInside += delegate(object sender, EventArgs e) {
                this.NavigationController.PushViewController( new GymSettingsViewController(),true );
            };

            elements.Add ( settingsButton );
        }