Esempio n. 1
0
        private void btnSetWarcraftPath_Click(object sender, EventArgs e)
        {
            folderBrowserDialog.ShowNewFolderButton = true;
            DialogResult result = folderBrowserDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                textBoxWarcraftPath.Text = folderBrowserDialog.SelectedPath;
                string location = Properties.Settings.Default.WarcraftLocation = folderBrowserDialog.SelectedPath;
                Properties.Settings.Default.Save();
                w3SuperAdminFormBLL.UpdatePathAndButtonsState(location, lblWarcraftVersion.Name, btnChangePatch.Name, textBoxWarcraftPath.Name, btnGrabRocCDKey.Name, btnGrabTftCDKey.Name,
                                                              textBoxRocKey.Name, textBoxTftKey.Name, btnChangeRocKey.Name, btnChangeTftKey.Name);
                w3SuperAdminFormBLL.AddSubItemToPlay(location, playToolStripMenuItem);
            }
        }
Esempio n. 2
0
        private void LoadForm()
        {
            string location = Properties.Settings.Default.WarcraftLocation;

            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Blizzard Entertainment\Warcraft III");

            //check if the key exists
            if (key == null)
            {
                this.btnManageSettings.Enabled = false;
            }
            else
            {
                key.Dispose();
            }

            w3SuperAdminFormBLL = new W3SuperAdminFormBLL();
            w3SuperAdminFormBLL.PatchesGroupBox = this.managePatchesGroupBox;
            w3SuperAdminFormBLL.CDKeyGroupBox   = this.manageCDKeysGroupBox;
            w3SuperAdminFormBLL.UpdatePathAndButtonsState(location, lblWarcraftVersion.Name, btnChangePatch.Name,
                                                          textBoxWarcraftPath.Name, btnGrabRocCDKey.Name, btnGrabTftCDKey.Name,
                                                          textBoxRocKey.Name, textBoxTftKey.Name, btnChangeRocKey.Name, btnChangeTftKey.Name);
            w3SuperAdminFormBLL.AddSubItemToPlay(location, this.playToolStripMenuItem);
        }