Ejemplo n.º 1
0
        public IOManager(Game game)
            : base(game)
        {
            DisplayManager.CameraFreeze();
            graphicsCollection = new GraphicsCollection(game);
            Game.Services.AddService(typeof(GraphicsCollection), graphicsCollection);
            graphicsCollection.OnProgress += new EventHandler <IOEventArgs>(graphicsCollection_OnProgress);
            graphicsCollection.OnComplete += new EventHandler <IOEventArgs>(graphicsCollection_OnComplete);
            graphicsCollection.OnStart    += new EventHandler <IOEventArgs>(graphicsCollection_OnStart);

            fontsCollection = new FontsCollection(game);
            Game.Services.AddService(typeof(FontsCollection), fontsCollection);
            fontsCollection.OnStart    += new EventHandler <IOEventArgs>(fontsCollection_OnStart);
            fontsCollection.OnProgress += new EventHandler <IOEventArgs>(fontsCollection_OnProgress);
            fontsCollection.OnComplete += new EventHandler <IOEventArgs>(fontsCollection_OnComplete);

            AutosaveTimer = new Timer(game);
            AutosaveTimer.IntervalType = TimerIntervalType.Seconds;
            AutosaveTimer.Interval     = 0;
            AutosaveTimer.OnTick      += new EventHandler(AutosaveTimer_OnTick);

            Game.Services.AddService(typeof(IOManager), this);
        }
Ejemplo n.º 2
0
        public IOManager(Game game)
            : base(game)
        {
            DisplayManager.CameraFreeze();
            graphicsCollection = new GraphicsCollection(game);
            Game.Services.AddService(typeof(GraphicsCollection), graphicsCollection);
            graphicsCollection.OnProgress += new EventHandler<IOEventArgs>(graphicsCollection_OnProgress);
            graphicsCollection.OnComplete += new EventHandler<IOEventArgs>(graphicsCollection_OnComplete);
            graphicsCollection.OnStart += new EventHandler<IOEventArgs>(graphicsCollection_OnStart);

            fontsCollection = new FontsCollection(game);
            Game.Services.AddService(typeof(FontsCollection), fontsCollection);
            fontsCollection.OnStart += new EventHandler<IOEventArgs>(fontsCollection_OnStart);
            fontsCollection.OnProgress += new EventHandler<IOEventArgs>(fontsCollection_OnProgress);
            fontsCollection.OnComplete += new EventHandler<IOEventArgs>(fontsCollection_OnComplete);
            
            AutosaveTimer = new Timer(game);
            AutosaveTimer.IntervalType = TimerIntervalType.Seconds;
            AutosaveTimer.Interval = 0;
            AutosaveTimer.OnTick += new EventHandler(AutosaveTimer_OnTick);

            Game.Services.AddService(typeof(IOManager), this);
        }