Beispiel #1
0
        public ControlView(BoardView board)
        {
            noteContainer = new UIView();
            noteContainer.AddRedBorder();
            Add(noteContainer);

            gotoStartButton = UIButton.FromType(UIButtonType.Custom);
            gotoStartButton.SetBackgroundImage(UIImage.FromFile("controls/start.png"), UIControlState.Normal);
            Add(gotoStartButton);

            prevButton = UIButton.FromType(UIButtonType.Custom);
            prevButton.SetBackgroundImage(UIImage.FromFile("controls/previous.png"), UIControlState.Normal);
            Add(prevButton);

            playButton = UIButton.FromType(UIButtonType.Custom);
            playButton.SetBackgroundImage(UIImage.FromFile("controls/play.png"), UIControlState.Normal);
            Add(playButton);

            nextButton = UIButton.FromType(UIButtonType.Custom);
            nextButton.SetBackgroundImage(UIImage.FromFile("controls/next.png"), UIControlState.Normal);
            Add(nextButton);

            gotoEndButton = UIButton.FromType(UIButtonType.Custom);
            gotoEndButton.SetBackgroundImage(UIImage.FromFile("controls/end.png"), UIControlState.Normal);
            Add(gotoEndButton);

            gotoStartButton.TouchUpInside += board.GoToStart;
            prevButton.TouchUpInside += board.PreviousMove;
            playButton.TouchUpInside += board.Play;
            nextButton.TouchUpInside += board.NextMove;
            gotoEndButton.TouchUpInside += board.GoToEnd;
        }
Beispiel #2
0
        public ControlView(BoardView board)
        {
            noteContainer = new UIView();
            noteContainer.AddRedBorder();
            Add(noteContainer);

            gotoStartButton = UIButton.FromType(UIButtonType.Custom);
            gotoStartButton.SetBackgroundImage(UIImage.FromFile("controls/start.png"), UIControlState.Normal);
            Add(gotoStartButton);

            prevButton = UIButton.FromType(UIButtonType.Custom);
            prevButton.SetBackgroundImage(UIImage.FromFile("controls/previous.png"), UIControlState.Normal);
            Add(prevButton);

            playButton = UIButton.FromType(UIButtonType.Custom);
            playButton.SetBackgroundImage(UIImage.FromFile("controls/play.png"), UIControlState.Normal);
            Add(playButton);

            nextButton = UIButton.FromType(UIButtonType.Custom);
            nextButton.SetBackgroundImage(UIImage.FromFile("controls/next.png"), UIControlState.Normal);
            Add(nextButton);

            gotoEndButton = UIButton.FromType(UIButtonType.Custom);
            gotoEndButton.SetBackgroundImage(UIImage.FromFile("controls/end.png"), UIControlState.Normal);
            Add(gotoEndButton);

            gotoStartButton.TouchUpInside += board.GoToStart;
            prevButton.TouchUpInside      += board.PreviousMove;
            playButton.TouchUpInside      += board.Play;
            nextButton.TouchUpInside      += board.NextMove;
            gotoEndButton.TouchUpInside   += board.GoToEnd;
        }