コード例 #1
0
ファイル: ScreenInfo.cs プロジェクト: DrPandemic/EraParadox
        /// <summary>
        /// Fills the info object from the xml.
        /// </summary>
        static public ScreenInfo GetInfo()
        {
            const string SCREEN_INFO_PATH = "Content/" + SCREEN_INFORMATION;
            ScreenInfo   screenInfo       = null;

            XmlSerializer serializer = new XmlSerializer(typeof(ScreenInfo));

            StreamReader reader = new StreamReader(SCREEN_INFO_PATH);

            screenInfo = (ScreenInfo)serializer.Deserialize(reader);
            reader.Close();
            return(screenInfo);
        }
コード例 #2
0
 public ScreenService(GraphicsDeviceManager gdm)
 {
     m_GraphicsDeviceManager = gdm;
     screenInfo     = ScreenInfo.GetInfo();
     IsMouseVisible = false;
 }