Exemple #1
0
        public UIResultView(object parentView, RectangleF frame, DoneClickDelegate onClick)
        {
            View = PlatformView.Create( );
            View.AddAsSubview(parentView);
            View.UserInteractionEnabled = false;

            StatusLabel = PlatformLabel.Create( );
            //StatusBackground = PlatformView.Create( );

            ResultSymbol = PlatformLabel.Create( );
            ResultLabel  = PlatformLabel.Create( );
            //ResultBackground = PlatformView.Create( );


            ResultCircle = PlatformCircleView.Create( );
            ResultCircle.AddAsSubview(parentView);


            // setup our UI hierarchy
            //StatusBackground.AddAsSubview( parentView );
            //StatusBackground.UserInteractionEnabled = false;
            //StatusBackground.BorderWidth = .5f;

            StatusLabel.AddAsSubview(parentView);
            StatusLabel.UserInteractionEnabled = false;


            //ResultBackground.AddAsSubview( parentView );
            //ResultBackground.UserInteractionEnabled = false;
            //ResultBackground.BorderWidth = .5f;

            ResultSymbol.AddAsSubview(parentView);
            ResultSymbol.UserInteractionEnabled = false;

            ResultLabel.AddAsSubview(parentView);
            ResultLabel.UserInteractionEnabled = false;

            DoneButton = PlatformButton.Create( );
            DoneButton.AddAsSubview(parentView);
            DoneButton.ClickEvent = ( PlatformButton button ) =>
            {
                if (onClick != null)
                {
                    onClick( );
                }
            };


            // default the view size and opacity
            SetOpacity(0.00f);

            SetBounds(frame);

            // give it a default style
            SetStyle( );
        }