예제 #1
0
 public UserPreferences()
 {
     Video = new VideoPreferences();
     AnimationStudio = new AnimationStudioPreferences();
     Audio = new AudioPreferences();
     Map = new MapPreferences();
     TileSet = new TileSetPreferences();
     Memory = new MemoryPreferences();
     Tabs = new TabsPreferences();
 }
예제 #2
0
        public UserPreferences(UserPreferences original)
        {
            Video = new VideoPreferences()
            {
                DoubleBuffering = original.Video.DoubleBuffering,
                ShowPopups = original.Video.ShowPopups,
                ShowSplashScreen = original.Video.ShowSplashScreen,
                ShowBubbleMainScreen = original.Video.ShowBubbleMainScreen
            };

            AnimationStudio = new AnimationStudioPreferences()
            {
                BackgroundColor = original.AnimationStudio.BackgroundColor,
                RulerSize = original.AnimationStudio.RulerSize,
                ShowSplashScreen = original.AnimationStudio.ShowSplashScreen,
                UseXna = original.AnimationStudio.UseXna
            };

            Audio = new AudioPreferences()
            {
                LoopSongs = original.Audio.LoopSongs,
                PlaySound = original.Audio.PlaySound,
                SoundPath = original.Audio.SoundPath
            };

            Map = new MapPreferences()
            {
                GridColor = original.Map.GridColor,
                GridThickness = original.Map.GridThickness,
                TileSize = original.Map.TileSize
            };

            TileSet = new TileSetPreferences()
            {
                BackgroundColor = original.TileSet.BackgroundColor,
                TilesPerRow = original.TileSet.TilesPerRow
            };

            Memory = new MemoryPreferences()
            {
                HistoryCount = original.Memory.HistoryCount,
                Hotkeys = original.Memory.Hotkeys,
                PreloadMaps = original.Memory.PreloadMaps,
                QuickMaps = original.Memory.QuickMaps
            };

            Tabs = new TabsPreferences()
            {
                FirstColorGradiant = original.Tabs.FirstColorGradiant,
                SecondColorGradiant = original.Tabs.SecondColorGradiant
            };
        }
예제 #3
0
        public UserPreferences(SerializationInfo info, StreamingContext context)
        {
            Video = new VideoPreferences()
            {
                DoubleBuffering = info.GetBoolean("VideoDoubleBuffering"),
                ShowPopups = info.GetBoolean("VideoShowPopups"),
                ShowSplashScreen = info.GetBoolean("VideoSplashScreen"),
                ShowBubbleMainScreen = info.GetBoolean("VideoShowBubbleMainScreen")
            };

            AnimationStudio = new AnimationStudioPreferences()
            {
                BackgroundColor = (Color)info.GetValue("AnimationStudioBackgroundColor", typeof(Color)),
                RulerSize = info.GetInt32("AnimationStudioRulerSize"),
                ShowSplashScreen = info.GetBoolean("AnimationStudioShowSplashScreen"),
                UseXna = info.GetBoolean("AnimationStudioUseXna")
            };

            Audio = new AudioPreferences()
            {
                LoopSongs = info.GetBoolean("AudioLoopSongs"),
                PlaySound = info.GetBoolean("AudioPlaySound"),
                SoundPath = info.GetString("AudioSoundPath")
            };

            Map = new MapPreferences()
            {
                GridColor = (Color)info.GetValue("MapGridColor", typeof(Color)),
                GridThickness = info.GetInt32("MapGridThickness"),
                TileSize = (Size)info.GetValue("MapTileSize", typeof(Size))
            };

            TileSet = new TileSetPreferences()
            {
                BackgroundColor = (Color)info.GetValue("TileSetBackgroundColor", typeof(Color)),
                TilesPerRow = info.GetInt32("TileSetTilesPerRow")
            };

            Memory = new MemoryPreferences()
            {
                HistoryCount = info.GetInt32("MemoryHistoryCount"),
                Hotkeys = info.GetBoolean("MemoryHotkeys"),
                PreloadMaps = info.GetBoolean("MemoryPreloadMaps"),
                QuickMaps = info.GetBoolean("MemoryQuickMaps")
            };

            Tabs = new TabsPreferences()
            {
                FirstColorGradiant = (Color)info.GetValue("FirstColorGradiant", typeof(Color)),
                SecondColorGradiant = (Color)info.GetValue("SecondColorGradiant", typeof(Color))
            };
        }