Ejemplo n.º 1
0
        private void startingGameControls()
        {
            ColorRight = model.Colors.Blue;
            ColorLeft  = model.Colors.White;

            //CREATE TWO BUTTONS
            RightButtonCommand = new RightButtonCommand(this);
            LeftButtonCommand  = new LeftButtonCommand(this);

            // COORDINATES FOR THE POINT
            var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
            var width       = Math.Round(Window.Current.Bounds.Width * scaleFactor, 0);
            var height      = Math.Round(Window.Current.Bounds.Height * scaleFactor, 0);

            // SIZE AND ACTUAL COORDINATES HERE
            WidthOfPoint    = 10;
            HeightOfPoint   = 10;
            CanvasLeftPoint = height / 2.5;
            CanvasTopPoint  = width / 4.5;

            // RECT AROUND THE IMAGE ON THE CANVAS
            RectanglePoint = new Rect(CanvasLeftPoint, CanvasTopPoint, WidthOfPoint, HeightOfPoint);

            model.Point movingPoint = new model.Point();
            Source = movingPoint.ImagePath;
        }
Ejemplo n.º 2
0
        protected override void HandleInteractionObjectChanged()
        {
            SetButtonContent(Interaction.Buttons);

            RightButtonCommand.RaiseCanExecuteChanged();
            MiddleButtonCommand.RaiseCanExecuteChanged();

            SetIcon();

            ApplyActionResultOverview();

            ApplySecondText();
        }