Пример #1
0
        public static void LoadSettings()
        {
            var executableFileInfo = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;
            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);
            SelectedEngine = pIniManager.GetString("Engine", "Selected", string.Empty);
            SelectedCombat = pIniManager.GetString("Combat", "Selected", string.Empty);
            FirstRun = pIniManager.GetBoolean("Config", "FirstRun", true);
            DebugMode = pIniManager.GetBoolean("Config", "DebugMode", false);
            Password = pIniManager.GetString("Config", "UserName", String.Empty);
            UserName = pIniManager.GetString("Config", "Password", String.Empty);
            BackgroundMode = pIniManager.GetBoolean("Config", "BackgroundMode", false);
            HookMouse = pIniManager.GetBoolean("Config", "HookMouse", false);
            SetupUseHotkeys = pIniManager.GetBoolean("Config", "UseHotkeys", false);
            StopAfterBool = pIniManager.GetBoolean("Config", "StopAfter", false);
            StopAfter = pIniManager.GetString("Config", "StopAfterTime", "120");
            LogOutOnFollowTime = pIniManager.GetString("Config", "LogoutOnFollowTime", "2");
            SoundFollow = pIniManager.GetBoolean("Config", "FollowSound", true);
            SoundWhisper = pIniManager.GetBoolean("Config", "WhisperSound", true);
            SoundStop = pIniManager.GetBoolean("Config", "SoundStop", true);
            Shutdown = pIniManager.GetBoolean("Config", "ShutdownComputer", false);
            LogoutOnFollow = pIniManager.GetBoolean("Config", "LogoutOnFollow", false);
            UseCtm = pIniManager.GetBoolean("Config", "UseCtm", false);
            DebugLog = pIniManager.GetBoolean("Config", "DebugLog", false);
            Latency = pIniManager.GetInt("Config", "Latency", 0);
            Language = (LazyLanguage)pIniManager.GetInt("Config", "Language", 0);
            //
            CombatBoolEat = pIniManager.GetBoolean("Combat", "CBEat", true);
            CombatBoolDrink = pIniManager.GetBoolean("Combat", "CBDrink", true);
            CombatEatAt = pIniManager.GetString("Combat", "COEat", "0");
            CombatDrinkAt = pIniManager.GetString("Combat", "CODrink", "0");

            KeysGroundMountBar = pIniManager.GetString("Keys", "GroundMountBar", "1");
            KeysGroundMountKey = pIniManager.GetString("Keys", "GroundMountKey", "1");
            KeysAttack1Bar = pIniManager.GetString("Keys", "Attack1Bar", "1");
            KeysAttack1Key = pIniManager.GetString("Keys", "Attack1Key", "1");
            KeysEatBar = pIniManager.GetString("Keys", "EatBar", "1");
            KeysEatKey = pIniManager.GetString("Keys", "EatKey", "1");
            KeysDrinkBar = pIniManager.GetString("Keys", "DrinkBar", "1");
            KeysDrinkKey = pIniManager.GetString("Keys", "DrinkKey", "1");
            KeysMoteExtractorBar = pIniManager.GetString("Keys", "MoteBar", "1");
            KeysMoteExtractorKey = pIniManager.GetString("Keys", "MoteKey", "1");
            KeysStafeLeftKeyText = pIniManager.GetString("Keys", "StafeLeftKeyText", "Q");
            KeysStafeRightKeyText = pIniManager.GetString("Keys", "StafeRightKeyText", "E");
            KeysInteractKeyText = pIniManager.GetString("Keys", "InteractText", "U");
            KeysInteractTargetText = pIniManager.GetString("Keys", "InteractTargetText", "P");
            KeysTargetLastTargetText = pIniManager.GetString("Keys", "KeysTargetLastTargetText", "G");

            //Mail
            ShouldMail = pIniManager.GetBoolean("Mail", "ShouldMail", false);
            MailTo = pIniManager.GetString("Mail", "MailTo", string.Empty);
            //MacroForMail = pIniManager.GetBoolean("Mail", "MacroForMail", false);
            MacroForMail = false;
            KeysMailMacroBar = pIniManager.GetString("Mail", "KeysMailMacroBar", "1");
            KeysMailMacroKey = pIniManager.GetString("Mail", "KeysMailMacroKey", "1");

            //Vendor
            ShouldVendor = pIniManager.GetBoolean("Vendor", "ShouldVendor", false);
            ShouldRepair = pIniManager.GetBoolean("Vendor", "ShouldRepair", false);
            SellCommon = pIniManager.GetBoolean("Vendor", "SellCommon", false);
            SellUncommon = pIniManager.GetBoolean("Vendor", "SellUncommon", false);
            SellPoor = pIniManager.GetBoolean("Vendor", "SellPoor", false);
            FreeBackspace = pIniManager.GetString("Vendor", "FreeBackspace", "2"); 

            //Add by Spyman
            WOWPath = pIniManager.GetString("Config", "WOWPath", "");
            WOWAccName = pIniManager.GetString("Config", "WOWAccName", "");
            WOWAccPass = pIniManager.GetString("Config", "WOWAccPath", "");
            WOWCharList = pIniManager.GetString("Config", "WOWCharList", "");
            WOWCharIdx = pIniManager.GetString("Config", "WOWCharIdx", "");
            WOWServer = pIniManager.GetString("Config", "WOWServer", "");
            StartHour = pIniManager.GetString("Config", "StartHour", "");
            StartMin = pIniManager.GetString("Config", "StartMin", "");
            StopHour = pIniManager.GetString("Config", "StopHour", "");
            StopMin = pIniManager.GetString("Config", "StopMin", "");
            FightFile = pIniManager.GetString("Config", "FightFile", "");
            MapFile = pIniManager.GetString("Config", "MapFile", "");
            DBIP = pIniManager.GetString("Config", "DBIP", "");
            DBSid = pIniManager.GetString("Config", "DBSid", "");
            MachineID = pIniManager.GetString("Config", "MachineID", "");
            AHer = pIniManager.GetString("Config", "AHer", "");
            WriteLazyLog = pIniManager.GetBoolean("Config", "WriteLazyLog", false);
        }
Пример #2
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            SelectedEngine     = pIniManager.GetString("Engine", "Selected", string.Empty);
            SelectedCombat     = pIniManager.GetString("Combat", "Selected", string.Empty);
            FirstRun           = pIniManager.GetBoolean("Config", "FirstRun", true);
            DebugMode          = pIniManager.GetBoolean("Config", "DebugMode", false);
            Password           = pIniManager.GetString("Config", "UserName", String.Empty);
            UserName           = pIniManager.GetString("Config", "Password", String.Empty);
            BackgroundMode     = pIniManager.GetBoolean("Config", "BackgroundMode", false);
            HookMouse          = pIniManager.GetBoolean("Config", "HookMouse", false);
            SetupUseHotkeys    = pIniManager.GetBoolean("Config", "UseHotkeys", false);
            StopAfterBool      = pIniManager.GetBoolean("Config", "StopAfter", false);
            StopAfter          = pIniManager.GetString("Config", "StopAfterTime", "120");
            LogOutOnFollowTime = pIniManager.GetString("Config", "LogoutOnFollowTime", "2");
            SoundFollow        = pIniManager.GetBoolean("Config", "FollowSound", true);
            SoundWhisper       = pIniManager.GetBoolean("Config", "WhisperSound", true);
            SoundStop          = pIniManager.GetBoolean("Config", "SoundStop", true);
            Shutdown           = pIniManager.GetBoolean("Config", "ShutdownComputer", false);
            LogoutOnFollow     = pIniManager.GetBoolean("Config", "LogoutOnFollow", false);
            UseCtm             = pIniManager.GetBoolean("Config", "UseCtm", false);
            DebugLog           = pIniManager.GetBoolean("Config", "DebugLog", false);
            Latency            = pIniManager.GetInt("Config", "Latency", 0);
            Language           = (LazyLanguage)pIniManager.GetInt("Config", "Language", 0);
            //
            CombatBoolEat   = pIniManager.GetBoolean("Combat", "CBEat", true);
            CombatBoolDrink = pIniManager.GetBoolean("Combat", "CBDrink", true);
            CombatEatAt     = pIniManager.GetString("Combat", "COEat", "0");
            CombatDrinkAt   = pIniManager.GetString("Combat", "CODrink", "0");

            KeysGroundMountBar       = pIniManager.GetString("Keys", "GroundMountBar", "1");
            KeysGroundMountKey       = pIniManager.GetString("Keys", "GroundMountKey", "1");
            KeysAttack1Bar           = pIniManager.GetString("Keys", "Attack1Bar", "1");
            KeysAttack1Key           = pIniManager.GetString("Keys", "Attack1Key", "1");
            KeysEatBar               = pIniManager.GetString("Keys", "EatBar", "1");
            KeysEatKey               = pIniManager.GetString("Keys", "EatKey", "1");
            KeysDrinkBar             = pIniManager.GetString("Keys", "DrinkBar", "1");
            KeysDrinkKey             = pIniManager.GetString("Keys", "DrinkKey", "1");
            KeysMoteExtractorBar     = pIniManager.GetString("Keys", "MoteBar", "1");
            KeysMoteExtractorKey     = pIniManager.GetString("Keys", "MoteKey", "1");
            KeysStafeLeftKeyText     = pIniManager.GetString("Keys", "StafeLeftKeyText", "Q");
            KeysStafeRightKeyText    = pIniManager.GetString("Keys", "StafeRightKeyText", "E");
            KeysInteractKeyText      = pIniManager.GetString("Keys", "InteractText", "U");
            KeysInteractTargetText   = pIniManager.GetString("Keys", "InteractTargetText", "P");
            KeysTargetLastTargetText = pIniManager.GetString("Keys", "KeysTargetLastTargetText", "G");

            //Mail
            ShouldMail = pIniManager.GetBoolean("Mail", "ShouldMail", false);
            MailTo     = pIniManager.GetString("Mail", "MailTo", string.Empty);
            //MacroForMail = pIniManager.GetBoolean("Mail", "MacroForMail", false);
            MacroForMail     = false;
            KeysMailMacroBar = pIniManager.GetString("Mail", "KeysMailMacroBar", "1");
            KeysMailMacroKey = pIniManager.GetString("Mail", "KeysMailMacroKey", "1");

            //Vendor
            ShouldVendor  = pIniManager.GetBoolean("Vendor", "ShouldVendor", false);
            ShouldRepair  = pIniManager.GetBoolean("Vendor", "ShouldRepair", false);
            SellCommon    = pIniManager.GetBoolean("Vendor", "SellCommon", false);
            SellUncommon  = pIniManager.GetBoolean("Vendor", "SellUncommon", false);
            SellPoor      = pIniManager.GetBoolean("Vendor", "SellPoor", false);
            FreeBackspace = pIniManager.GetString("Vendor", "FreeBackspace", "2");
        }