예제 #1
0
파일: ContentTest.cs 프로젝트: dfr0/moon
		public void IsFullScreen ()
		{
			Content content = new Content ();
			try {
				content.IsFullScreen = true;
				// only works from a user keyboard / mouse event
				Assert.IsFalse (content.IsFullScreen, "IsFullScreen");
			}
			finally {
				content.IsFullScreen = false;
			}
		}
 /// <summary>
 /// Initializes a new instance of GraphicsConfig.
 /// </summary>
 public GraphicsConfig()
 {
     InitializeComponent();
     this.DataContext = new StringProvider();
     this.Title       = StringProvider.GraphicsConfig_PageTitle;
     _pluginVisual    = Application.Current.Host.Content;
     _pluginVisual.FullScreenOptions  = FullScreenOptions.StaysFullScreenWhenUnfocused;
     _pluginVisual.FullScreenChanged += (sender, e) =>
     {
         if (_pluginVisual.IsFullScreen)
         {
             fullScreenButton.Content = StringProvider.GraphicsConfig_Windowed;
         }
         else
         {
             fullScreenButton.Content = StringProvider.GraphicsConfig_FullScreen;
         }
     };
 }
예제 #3
0
        public void Page_Loaded(object o, EventArgs e)
        {
            // Initialize variables
            _defaultVolume = mediaElement.Volume;
            BrowserHost = App.Current.Host.Content;

            // Initialize UI
            _primaryBoardDisplay = new BoardDisplay();
            Children.Add(_primaryBoardDisplay);
            _fadingBoardDisplay = new BoardDisplay();
            Children.Add(_fadingBoardDisplay);

            // Initialize handlers
            KeyUp += new KeyEventHandler(HandleKeyUp);
            MouseLeftButtonDown += new MouseButtonEventHandler(HandleMouseLeftButtonDown);
            BrowserHost.Resized += new EventHandler(HandleResize);

            // Create the starting board, play the "new" sound, and fade it in
            _primaryBoardDisplay.Board = Board.FromString(BoardWikipediaSample);
            PlaySoundEffect(SoundEffect.New);
            _fadingBoardDisplay.Fade(FadeSecondsLoading);
        }
예제 #4
0
파일: ContentTest.cs 프로젝트: dfr0/moon
		public void New ()
		{
			Content content = new Content ();
			Check (content);
		}
예제 #5
0
파일: ContentTest.cs 프로젝트: dfr0/moon
		void Check (Content content)
		{
			Assert.IsTrue (content.ActualHeight >= 0, "ActualHeight");
			Assert.IsTrue (content.ActualWidth >= 0, "ActualWidth");
			Assert.IsFalse (content.IsFullScreen, "IsFullScreen");
		}