Ejemplo n.º 1
0
        public PreferenceManager()
        {
            _.Info("Load Preference Manager", _.InfoImportance.Important);

            PreferenceAll  = new PreferenceAll();
            _xmlSerializer = new XmlSerializer(PreferenceAll.GetType());

            Read();
        }
Ejemplo n.º 2
0
        public PreferenceManager()
        {
            _.Info("Load Preference Manager", _.InfoImportance.Important);

            PreferenceAll = new PreferenceAll();
            _xmlSerializer = new XmlSerializer(PreferenceAll.GetType());

            Read();
        }
Ejemplo n.º 3
0
        public void Read()
        {
            _.Info("Attempt To Read Existing Settings", _.InfoImportance.Important);

            if (!File.Exists(Constants.StrXmlPreferences))
            {
                _.Info("No Existing Settings Found", _.InfoImportance.NotImportant);
                PreferenceAll.ConvertOldSettings();
                return;
            }

            PreferenceAll.OverlayAlert.UnitIds.Clear();
            PreferenceAll = (PreferenceAll)_xmlSerializer.Deserialize(new StreamReader(Constants.StrXmlPreferences));

            _.Info("Read Of Existing Settings Successful", _.InfoImportance.Important);
        }
Ejemplo n.º 4
0
        public void Read()
        {
            _.Info("Attempt To Read Existing Settings", _.InfoImportance.Important);

            if (!File.Exists(Constants.StrXmlPreferences))
            {
                _.Info("No Existing Settings Found", _.InfoImportance.NotImportant);
                PreferenceAll.ConvertOldSettings();
                return;
            }

            PreferenceAll.OverlayAlert.UnitIds.Clear();
            PreferenceAll = (PreferenceAll)_xmlSerializer.Deserialize(new StreamReader(Constants.StrXmlPreferences));

            _.Info("Read Of Existing Settings Successful", _.InfoImportance.Important);
        }
Ejemplo n.º 5
0
        public void Restore()
        {
            _.Info("Restore Default Settings", _.InfoImportance.Important);

            PreferenceAll = new PreferenceAll();

            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PbDarkshrine);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuDarktemplar);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuOracle);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuVoidray);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuWarpprismTransport);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuBanshee);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuReaper);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuWidowMine);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuMedivac);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbBanelingNest);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuBaneling);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuMutalisk);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbSpire);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuInfestor);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbHive);
        }
Ejemplo n.º 6
0
        public void Restore()
        {
            _.Info("Restore Default Settings", _.InfoImportance.Important);

            PreferenceAll = new PreferenceAll();

            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PbDarkshrine);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuDarktemplar);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuOracle);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuVoidray);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.PuWarpprismTransport);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuBanshee);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuReaper);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuWidowMine);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.TuMedivac);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbBanelingNest);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuBaneling);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuMutalisk);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbSpire);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZuInfestor);
            PreferenceAll.OverlayAlert.UnitIds.Add(PredefinedTypes.UnitId.ZbHive);
        }