private void c_btnTBCWowDirectoryBrowse_Click(object sender, EventArgs e)
 {
     VF.FolderSelectDialog folderSelectDialog = new VF.FolderSelectDialog();
     folderSelectDialog.Title            = "Please find the WoW The Burning Crusade Directory for me";
     folderSelectDialog.InitialDirectory = Settings.GetWowDirectory(WowVersionEnum.TBC);
     if (folderSelectDialog.ShowDialog() == true)
     {
         c_txtTBCWowDirectory.Text = folderSelectDialog.FileName;
         if (c_txtTBCWowDirectory.Text.EndsWith("\\") == false && c_txtTBCWowDirectory.Text.EndsWith("/") == false)
         {
             c_txtTBCWowDirectory.Text += "\\";
         }
         if (WowUtility.IsValidWowDirectory(c_txtTBCWowDirectory.Text) == false)
         {
             c_txtTBCWowDirectory.ForeColor = Color.Red;
             Utility.MessageBoxShow(c_txtTBCWowDirectory.Text + " is not a valid WoW The Burning Crusade Directory. \r\nPlease choose the correct directory where WoW TBC is installed.");
         }
         else
         {
             if (WowUtility.IsWowDirectoryTBC(c_txtTBCWowDirectory.Text) == true)
             {
                 c_txtTBCWowDirectory.ForeColor = Color.Black;
             }
             else
             {
                 c_txtTBCWowDirectory.ForeColor = Color.Red;
                 Utility.MessageBoxShow(c_txtTBCWowDirectory.Text + " is not a valid WoW The Burning Crusade Directory. \r\nPlease choose the correct directory where WoW TBC is installed.");
             }
         }
     }
 }
Example #2
0
 private void c_btnBrowse_Click(object sender, EventArgs e)
 {
     VF.FolderSelectDialog folderSelectDialog = new VF.FolderSelectDialog();
     folderSelectDialog.Title            = "Please find the WoW Classic(or TBC) Directory for me";
     folderSelectDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
     if (folderSelectDialog.ShowDialog() == true)
     {
         c_txtWowDirectory.Text = folderSelectDialog.FileName;
         if (WowUtility.IsValidWowDirectory(c_txtWowDirectory.Text) == false)
         {
             c_txtWowDirectory.ForeColor = Color.Red;
             Utility.MessageBoxShow(c_txtWowDirectory.Text + " is not a valid Wow Directory. \r\nPlease choose the correct directory where Wow is installed.");
         }
         else
         {
             c_txtWowDirectory.ForeColor = Color.Black;
         }
     }
 }
Example #3
0
 private void c_btnOK_Click(object sender, EventArgs e)
 {
     if (WowUtility.IsValidWowDirectory(c_txtWowDirectory.Text) == true)
     {
         if (WowUtility.IsWowDirectoryClassic(c_txtWowDirectory.Text) == true)
         {
             Settings.Instance._WowDirectory = c_txtWowDirectory.Text;
             if (Settings.Instance._WowDirectory.EndsWith("\\") == false && Settings.Instance._WowDirectory.EndsWith("/") == false)
             {
                 Settings.Instance._WowDirectory += "\\";
             }
             Settings.Save();
             Close();
         }
         else if (WowUtility.IsWowDirectoryTBC(c_txtWowDirectory.Text) == true)
         {
             Utility.MessageBoxShow("Please note that this Launcher was originally made for WoW Classic and that some features may not work 100% for WoW TBC. \r\nPlease report any bugs and errors found on the forum at forum.realmplayers.com");
             Settings.Instance._WowDirectory = c_txtWowDirectory.Text;
             if (Settings.Instance._WowDirectory.EndsWith("\\") == false && Settings.Instance._WowDirectory.EndsWith("/") == false)
             {
                 Settings.Instance._WowDirectory += "\\";
             }
             Settings.Instance._WowTBCDirectory = Settings.Instance._WowDirectory;
             Settings.Save();
             Close();
         }
         else
         {
             Utility.MessageBoxShow(c_txtWowDirectory.Text + " is not a valid Wow Directory. \r\nPlease choose the correct directory where Wow is installed.");
         }
     }
     else
     {
         c_txtWowDirectory.ForeColor = Color.Red;
         Utility.MessageBoxShow(c_txtWowDirectory.Text + " is not a valid Wow Directory. \r\nPlease choose the correct directory where Wow is installed.");
     }
 }
        private void c_btnClose_Click(object sender, EventArgs e)
        {
            if (WowUtility.IsValidWowDirectory(c_txtWowDirectory.Text) == false)
            {
                var dialogResult = Utility.MessageBoxShow("The specified WoW Classic Directory is not valid. Only valid WoW Classic Directory can be used. Use the old specified \"" + Settings.GetWowDirectory(WowVersionEnum.Vanilla) + "\"?", "Not valid Wow Directory", MessageBoxButtons.YesNo);
                if (dialogResult == System.Windows.Forms.DialogResult.No)
                {
                    c_txtWowDirectory.ForeColor = Color.Red;
                }
                else//if (dialogResult == System.Windows.Forms.DialogResult.Yes)
                {
                    c_txtWowDirectory.Text = Settings.GetWowDirectory(WowVersionEnum.Vanilla);
                }
                return;
            }
            else
            {
                if (c_txtWowDirectory.Text.EndsWith("\\") == false && c_txtWowDirectory.Text.EndsWith("/") == false)
                {
                    c_txtWowDirectory.Text = c_txtWowDirectory.Text + "\\";
                }
                Settings.Instance._WowDirectory = c_txtWowDirectory.Text;
            }
            if (c_cbxEnableTBC.Checked == true)
            {
                if (WowUtility.IsValidWowDirectory(c_txtTBCWowDirectory.Text) == false)
                {
                    if (Settings.HaveTBC == true)
                    {
                        var dialogResult = Utility.MessageBoxShow("The specified WoW The Burning Crusade Directory is not valid. Only valid WoW TBC Directory can be used. Use the old specified \"" + Settings.GetWowDirectory(WowVersionEnum.TBC) + "\"?", "Not valid Wow Directory", MessageBoxButtons.YesNo);
                        if (dialogResult == System.Windows.Forms.DialogResult.No)
                        {
                            c_txtTBCWowDirectory.ForeColor = Color.Red;
                        }
                        else//if (dialogResult == System.Windows.Forms.DialogResult.Yes)
                        {
                            c_txtTBCWowDirectory.Text = Settings.GetWowDirectory(WowVersionEnum.TBC);
                        }
                        return;
                    }
                    else
                    {
                        var dialogResult = Utility.MessageBoxShow("The specified WoW The Burning Crusade Directory is not valid. Only valid WoW TBC Directory can be used. Disable the use of WoW TBC Directory?", "Not valid Wow Directory", MessageBoxButtons.YesNo);
                        if (dialogResult == System.Windows.Forms.DialogResult.No)
                        {
                            c_txtTBCWowDirectory.ForeColor = Color.Red;
                        }
                        else//if (dialogResult == System.Windows.Forms.DialogResult.Yes)
                        {
                            c_txtTBCWowDirectory.ForeColor = Color.Black;
                            c_cbxEnableTBC.Checked         = false;
                            c_txtTBCWowDirectory.Text      = "";
                        }
                        return;
                    }
                }
                else
                {
                    if (c_txtTBCWowDirectory.Text.EndsWith("\\") == false && c_txtTBCWowDirectory.Text.EndsWith("/") == false)
                    {
                        c_txtTBCWowDirectory.Text = c_txtTBCWowDirectory.Text + "\\";
                    }
                    Settings.Instance._WowTBCDirectory = c_txtTBCWowDirectory.Text;
                }
            }
            else
            {
                Settings.Instance._WowTBCDirectory = "";
            }

            Settings.Instance.RunWoWNotAdmin     = c_cbxRunNotAdmin.Checked;
            Settings.Instance.AutoHideOldNews    = c_cbxAutoHide.Checked;
            Settings.Instance.AutoUpdateVFAddons = c_cbAutoUpdateVF.Checked;
            //Settings.Instance.UseWoWNoDelay = c_cbxWoWNoDelay.Checked;
            Settings.Instance.AutoRefreshNews        = c_cbAutoRefresh.Checked;
            Settings.Instance.NewsSources_Feenix     = c_cbxFeenixNews.Checked;
            Settings.Instance.NewsSources_Nostalrius = c_cbxNostalriusNews.Checked;
            Settings.Instance.NewsSources_Kronos     = c_cbxKronosNews.Checked;

            if (RealmPlayersUploader.IsValidUserID(Settings.UserID) == true)
            {
                Settings.Instance.ContributeRealmPlayers  = c_cbContributeRealmPlayers.Checked;
                Settings.Instance.ContributeRaidStats     = c_cbContributeRaidStats.Checked;
                Settings.Instance.Wait5SecondsAfterUpload = c_cbxWait5Seconds.Checked;
            }
            Close();
        }