Exemple #1
0
 /// <summary>Restores the original resolution of the DisplayDevice.</summary>
 /// <exception cref="Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception>
 public void RestoreResolution()
 {
     if (original_resolution != null)
     {
         if (implementation.TryRestoreResolution(this))
         {
             current_resolution  = original_resolution;
             original_resolution = null;
         }
         else
         {
             throw new Graphics.GraphicsModeException(String.Format("Device {0}: Failed to restore resolution.", this));
         }
     }
 }
Exemple #2
0
        /// <summary>Restores the original resolution of the DisplayDevice.</summary>
        /// <exception cref="Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception>
        public void RestoreResolution()
        {
            if (OriginalResolution != null)
            {
                //effect.FadeOut();

                if (implementation.TryRestoreResolution(this))
                {
                    current_resolution = OriginalResolution;
                    OriginalResolution = null;
                }
                else
                {
                    throw new Graphics.GraphicsModeException(String.Format("Device {0}: Failed to restore resolution.", this));
                }

                //effect.FadeIn();
            }
        }