コード例 #1
0
        public void ChangeBackground(Background new_background)
        {
			Console.WriteLine("Changing background to " + new_background.uri);

			backgroundAlreadySet = true;
			backgroundImage.Source = new BitmapImage(new_background.uri);

			// And, in any case, clear screen:
			ClearScreen();

        }
コード例 #2
0
        public void CycleBackgrounds()
        {
			int currBackground = prevBackground + 1;
			if (currBackground >= backgrounds.Count)
			{
				currBackground = 0;
			}

			prevBackground = currBackground;
			background = backgrounds[currBackground];
			backgroundAlreadySet = false;
        }
コード例 #3
0
        public DrawController(Canvas canvas, Image image, Rectangle rect, Image canvasImage, Ellipse[] buttons)
        {
            drawingCanvas = canvas;
            backgroundImage = image;
            colorRect = rect;
            this.canvasImage = canvasImage;
            this.buttons = buttons;

			//Get Backgrounds in Dropbox
			backgrounds = new List<Background>();
			findAndInitializeBackgrounds();
			background = backgrounds[0];
        }