Ejemplo n.º 1
0
 private void RefreshProfilesList()
 {
     fishSchoolProfil.Items.Clear();
     foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Fisherbot\\", "*.xml"))
     {
         fishSchoolProfil.Items.Add(f);
     }
 }
Ejemplo n.º 2
0
 private void RefreshProfileList()
 {
     try
     {
         string alteracValley = XMLProfileListAlteracValley.Text;
         XMLProfileListAlteracValley.Items.Clear();
         string warsongGulch = XMLProfileListWarsongGulch.Text;
         XMLProfileListWarsongGulch.Items.Clear();
         string arathiBasin = XMLProfileListArathiBasin.Text;
         XMLProfileListArathiBasin.Items.Clear();
         string eyeoftheStorm = XMLProfileListEyeoftheStorm.Text;
         XMLProfileListEyeoftheStorm.Items.Clear();
         string strandoftheAncients = XMLProfileListStrandoftheAncients.Text;
         XMLProfileListStrandoftheAncients.Items.Clear();
         string isleofConquest = XMLProfileListIsleofConquest.Text;
         XMLProfileListIsleofConquest.Items.Clear();
         string battleforGilneas = XMLProfileListBattleforGilneas.Text;
         XMLProfileListBattleforGilneas.Items.Clear();
         string twinPeaks = XMLProfileListTwinPeaks.Text;
         XMLProfileListTwinPeaks.Items.Clear();
         string templeofKotmogu = XMLProfileListTempleofKotmogu.Text;
         XMLProfileListTempleofKotmogu.Items.Clear();
         string silvershardMines = XMLProfileListSilvershardMines.Text;
         XMLProfileListSilvershardMines.Items.Clear();
         foreach (
             string f in
             Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Battlegrounder\\", "*.xml")
             )
         {
             XMLProfileListAlteracValley.Items.Add(f);
             XMLProfileListWarsongGulch.Items.Add(f);
             XMLProfileListArathiBasin.Items.Add(f);
             XMLProfileListEyeoftheStorm.Items.Add(f);
             XMLProfileListStrandoftheAncients.Items.Add(f);
             XMLProfileListIsleofConquest.Items.Add(f);
             XMLProfileListBattleforGilneas.Items.Add(f);
             XMLProfileListTwinPeaks.Items.Add(f);
             XMLProfileListTempleofKotmogu.Items.Add(f);
             XMLProfileListSilvershardMines.Items.Add(f);
         }
         XMLProfileListAlteracValley.Text       = alteracValley;
         XMLProfileListWarsongGulch.Text        = warsongGulch;
         XMLProfileListArathiBasin.Text         = arathiBasin;
         XMLProfileListEyeoftheStorm.Text       = eyeoftheStorm;
         XMLProfileListStrandoftheAncients.Text = strandoftheAncients;
         XMLProfileListIsleofConquest.Text      = isleofConquest;
         XMLProfileListBattleforGilneas.Text    = battleforGilneas;
         XMLProfileListTwinPeaks.Text           = twinPeaks;
         XMLProfileListTempleofKotmogu.Text     = templeofKotmogu;
         XMLProfileListSilvershardMines.Text    = silvershardMines;
     }
     catch (Exception e)
     {
         Logging.WriteError("Battlegrounder > Bot > LoadProfile > RefreshProfileList(): " + e);
     }
 }
Ejemplo n.º 3
0
        private void Translate()
        {
            try
            {
                LangSelection.Items.Clear();
                foreach (string l in Others.GetFilesDirectory(Application.StartupPath + "\\Data\\Lang\\", "*.xml"))
                {
                    Application.DoEvents();
                    LangSelection.Items.Add(l.Remove(l.Length - 1 - 3));
                }

                string langSelected = "English.xml";
                if (Others.ExistFile(Application.StartupPath + "\\Settings\\lang.txt"))
                {
                    string langTemp = Others.ReadFile(Application.StartupPath + "\\Settings\\lang.txt");
                    if (!string.IsNullOrEmpty(langTemp))
                    {
                        if (Others.ExistFile(Application.StartupPath + "\\Data\\Lang\\" + langTemp))
                        {
                            langSelected = langTemp;
                        }
                    }
                }
                if (!nManager.Translate.Load(langSelected))
                {
                    return;
                }

                LangSelection.Text = langSelected.Remove(langSelected.Length - 1 - 3);
                LangSelection.SelectedIndexChanged += LangSelection_SelectedIndexChanged;

                MainHeader.TitleText = nManager.Translate.Get(nManager.Translate.Id.LoginFormTitle) + @" - " + Information.MainTitle;
                Text            = MainHeader.TitleText;
                Identifier.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormDefaultIdentifier);
                Remember.Text   = nManager.Translate.Get(nManager.Translate.Id.LoginFormRemember);
                SetToolTypeIfNeeded(Remember);
                Register.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormRegister);
                SetToolTypeIfNeeded(Register);
                LoginButton.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormStart);
                SetToolTypeIfNeeded(LoginButton);
                RefreshButton.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormRefresh);
                SetToolTypeIfNeeded(RefreshButton);
                WebsiteLink.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormWebsite);
                SetToolTypeIfNeeded(WebsiteLink);
                ForumLink.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormForum);
                SetToolTypeIfNeeded(ForumLink);
                UseKey.Text = nManager.Translate.Get(nManager.Translate.Id.LoginFormUseKey);
                SetToolTypeIfNeeded(UseKey);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Ejemplo n.º 4
0
        private void InitializeUI()
        {
            try
            {
                MainHeader.TitleText = (nManagerSetting.CurrentSetting.HideCharacterNameFromTitle ? "Anonymous" : ObjectManager.Me.Name) + " - " + Information.MainTitle;
                if (LoginServer.IsFreeVersion)
                {
                    MainHeader.TitleText += " - Trial";
                }
                this.Text = Others.GetRandomString(Others.Random(4, 10));

                if (nManagerSetting.AutoStartProduct)
                {
                    nManagerSetting.CurrentSetting.LastProductLoaded = nManagerSetting.AutoStartProductName;
                }
                // Products:
                int i  = 0;
                int i2 = -1;
                foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Products\\", "*.dll"))
                {
                    string       text = f.Replace(".dll", "");
                    Translate.Id ret;
                    if (Enum.TryParse(text.Replace(" ", "_") + "_Product_Description", true, out ret))
                    {
                        if (!string.IsNullOrEmpty(nManager.Translate.Get(ret)))
                        {
                            text = text + " - " + nManager.Translate.Get(ret);
                        }
                    }
                    if (!string.IsNullOrEmpty(nManagerSetting.CurrentSetting.LastProductLoaded) &&
                        text.Split('-')[0].Trim().ToLower() == nManagerSetting.CurrentSetting.LastProductLoaded.Split('-')[0].Trim().ToLower())
                    {
                        i2 = i;
                    }
                    ProductList.Items.Add(text);
                    i++;
                }
                ProductList.DropDownStyle = ComboBoxStyle.DropDownList;
                if (i2 >= 0)
                {
                    ProductList.SelectedIndex = i2;
                }
            }
            catch (Exception ex)
            {
                Logging.WriteError("Main > InitializeUI(): " + ex);
            }
        }
Ejemplo n.º 5
0
 private void RefreshProfileList()
 {
     try
     {
         string profileName = ProfileList.Text;
         ProfileList.Items.Clear();
         foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Grinder\\", "*.xml"))
         {
             ProfileList.Items.Add(f);
         }
         ProfileList.Text = profileName;
     }
     catch (Exception e)
     {
         Logging.WriteError("Grinder > Bot > LoadProfile > RefreshProfileList(): " + e);
     }
 }
Ejemplo n.º 6
0
 private void RefreshSimpleProfileList(bool load = false)
 {
     try
     {
         int  currentSelection = SimpleProfilesList.Items.Count;
         bool abort            = false;
         SimpleProfilesList.Items.Clear();
         foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Quester\\", "*.xml"))
         {
             foreach (string grouped in GroupedProfilesList.Items)
             {
                 if (grouped == f)
                 {
                     abort = true;
                     break;
                 }
             }
             if (!abort)
             {
                 SimpleProfilesList.Items.Add(f);
             }
             else
             {
                 abort = false;
             }
         }
         if (load && SimpleProfilesList.Items.Count > 0)
         {
             SimpleProfilesList.SelectedIndex = 0;
         }
         else if (currentSelection <= SimpleProfilesList.Items.Count - 1 && SimpleProfilesList.Items.Count > 0)
         {
             SimpleProfilesList.SelectedIndex = currentSelection;
         }
         else if (SimpleProfilesList.Items.Count > 0)
         {
             SimpleProfilesList.SelectedIndex = 0;
         }
     }
     catch (Exception e)
     {
         Logging.WriteError("Quester > Profile > GroupedProfileManager > RefreshSimpleProfileList(): " + e);
     }
 }
Ejemplo n.º 7
0
 private void RefreshSimpleProfileList(bool load = false)
 {
     try
     {
         int currentSelection = SimpleProfilesList.SelectedIndex;
         SimpleProfilesList.Items.Clear();
         foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Quester\\", "*.xml"))
         {
             if (f.Contains("[H]") && nManager.Wow.ObjectManager.ObjectManager.Me.PlayerFaction.ToLower() != "horde")
             {
                 continue;
             }
             if (f.Contains("[A]") && nManager.Wow.ObjectManager.ObjectManager.Me.PlayerFaction.ToLower() == "horde")
             {
                 continue;
             }
             SimpleProfilesList.Items.Add(f);
             if (load && QuesterSettings.CurrentSettings.LastProfileSimple && QuesterSettings.CurrentSettings.LastProfile == f)
             {
                 currentSelection = SimpleProfilesList.Items.Count - 1;
             }
         }
         if (load && SimpleProfilesList.Items.Count > 0 && QuesterSettings.CurrentSettings.LastProfile == "")
         {
             SimpleProfilesList.SelectedIndex = 0;
         }
         else if (SimpleProfilesList.Items.Count > 0 && currentSelection <= SimpleProfilesList.Items.Count - 1)
         {
             SimpleProfilesList.SelectedIndex = currentSelection;
         }
         if (SimpleProfilesList.Items.Count > 0 && SimpleProfilesList.SelectedIndex == -1)
         {
             SimpleProfilesList.SelectedIndex = 0;
         }
     }
     catch (Exception e)
     {
         Logging.WriteError("Quester > Profile > QuesterProfileLoader > RefreshSimpleProfileList(): " + e);
     }
 }
Ejemplo n.º 8
0
 private void RefreshSimpleProfileList(bool load = false)
 {
     try
     {
         int currentSelection = ExistingSimpleProfiles.SelectedIndex;
         ExistingSimpleProfiles.Items.Clear();
         foreach (string f in Others.GetFilesDirectory(Application.StartupPath + "\\Profiles\\Quester\\", "*.xml"))
         {
             ExistingSimpleProfiles.Items.Add(f);
         }
         if (load && ExistingSimpleProfiles.Items.Count > 0)
         {
             ExistingSimpleProfiles.SelectedIndex = 0;
         }
         else if (currentSelection <= ExistingSimpleProfiles.Items.Count - 1 && ExistingSimpleProfiles.Items.Count > 0)
         {
             ExistingSimpleProfiles.SelectedIndex = currentSelection;
         }
         else if (ExistingSimpleProfiles.Items.Count > 0)
         {
             ExistingSimpleProfiles.SelectedIndex = 0;
         }
         if (ExistingSimpleProfiles.Items.Count > 0)
         {
             ProfileManagerEdit.Show();
             ProfileManagerRemove.Show();
         }
         else
         {
             ProfileManagerEdit.Hide();
             ProfileManagerRemove.Hide();
         }
     }
     catch (Exception e)
     {
         Logging.WriteError("Quester > Profile > ProfileManager > RefreshSimpleProfileList(): " + e);
     }
 }