private void LoadData() { // Load data _ucDemonbuddy.textBox1.Text = bot.Name; _ucDemonbuddy.textBox2.Text = bot.Description; // Advanced section _ucAdvanced.checkBox2.Checked = bot.CreateWindowsUser; _ucAdvanced.checkBox1.Checked = bot.UseWindowsUser; _ucAdvanced.textBox1.Text = bot.WindowsUserName; _ucAdvanced.maskedTextBox1.Text = bot.WindowsUserPassword; _ucAdvanced.textBox3.Text = bot.D3PrefsLocation; _ucAdvanced.checkBox3.Checked = bot.UseDiabloClone; _ucAdvanced.textBox2.Text = bot.DiabloCloneLocation; // Demonbuddy _ucDemonbuddy.textBox4.Text = bot.Demonbuddy.Location; _ucDemonbuddy.textBox3.Text = bot.Demonbuddy.Key; _ucDemonbuddy.comboBox1.Text = bot.Demonbuddy.CombatRoutine; _ucDemonbuddy.checkBox1.Checked = bot.Demonbuddy.NoFlash; _ucDemonbuddy.checkBox2.Checked = bot.Demonbuddy.AutoUpdate; _ucDemonbuddy.checkBox3.Checked = bot.Demonbuddy.NoUpdate; _ucDemonbuddy.textBox9.Text = bot.Demonbuddy.BuddyAuthUsername; _ucDemonbuddy.maskedTextBox2.Text = bot.Demonbuddy.BuddyAuthPassword; _ucDemonbuddy.comboBox2.SelectedIndex = bot.Demonbuddy.Priority; _ucDemonbuddy.checkBox5.Checked = bot.Demonbuddy.ForceEnableAllPlugins; // Demonbuddy manual position _ucDemonbuddy.checkBox4.Checked = bot.Demonbuddy.ManualPosSize; _ucDemonbuddy.textBox6.Text = bot.Demonbuddy.X.ToString(); _ucDemonbuddy.textBox5.Text = bot.Demonbuddy.Y.ToString(); _ucDemonbuddy.textBox10.Text = bot.Demonbuddy.W.ToString(); _ucDemonbuddy.textBox11.Text = bot.Demonbuddy.H.ToString(); // Diablo _ucDiablo.textBox3.Text = bot.Diablo.Username; _ucDiablo.maskedTextBox1.Text = bot.Diablo.Password; _ucDiablo.textBox1.Text = bot.Diablo.Location; _ucDiablo.comboBox1.SelectedItem = bot.Diablo.Language; _ucDiablo.comboBox2.SelectedItem = bot.Diablo.Region; _ucDiablo.checkBox1.Checked = bot.Diablo.UseAuthenticator; _ucDiablo.checkBox2.Checked = bot.Diablo.UseIsBoxer; _ucDiablo.textBox13.Text = bot.Diablo.CharacterSet; _ucDiablo.textBox12.Text = bot.Diablo.DisplaySlot; _ucDiablo.checkBox4.Checked = bot.Diablo.NoFrame; // Affinity Diablo if (bot.Diablo.CpuCount != Environment.ProcessorCount) { bot.Diablo.ProcessorAffinity = bot.Diablo.AllProcessors; bot.Diablo.CpuCount = Environment.ProcessorCount; } if (AffinityDiablo.cpus.Count != bot.Diablo.CpuCount) { Logger.Instance.Write( "For whatever reason Diablo and UI see different number of CPUs, affinity disabled"); } else { for (int i = 0; i < bot.Diablo.CpuCount; i++) { AffinityDiablo.cpus[i].Checked = ((bot.Diablo.ProcessorAffinity & (1 << i)) != 0); } } // Affinity Demonbuddy if (bot.Demonbuddy.CpuCount != Environment.ProcessorCount) { bot.Demonbuddy.ProcessorAffinity = bot.Demonbuddy.AllProcessors; bot.Demonbuddy.CpuCount = Environment.ProcessorCount; } if (AffinityDemonbuddy.cpus.Count != bot.Demonbuddy.CpuCount) { Logger.Instance.Write( "For whatever reason Demonbuddy and UI see different number of CPUs, affinity disabled"); } else { for (int i = 0; i < bot.Demonbuddy.CpuCount; i++) { AffinityDemonbuddy.cpus[i].Checked = ((bot.Demonbuddy.ProcessorAffinity & (1 << i)) != 0); } } //d.Serial = string.Format("{0}-{1}-{2}-{3}", ucDiablo.textBox4.Text, ucDiablo.textBox5.Text, ucDiablo.textBox7.Text, ucDiablo.textBox6.Text); //ucDiablo.textBox8.Text = bot.diablo.RestoreCode; _ucDiablo.comboBox3.SelectedIndex = bot.Diablo.Priority; // Diablo manual position _ucDiablo.checkBox3.Checked = bot.Diablo.ManualPosSize; _ucDiablo.textBox2.Text = bot.Diablo.X.ToString(); _ucDiablo.textBox9.Text = bot.Diablo.Y.ToString(); _ucDiablo.textBox10.Text = bot.Diablo.W.ToString(); _ucDiablo.textBox11.Text = bot.Diablo.H.ToString(); // Profile Schedule _ucProfileSchedule.Profiles = bot.ProfileSchedule.Profiles; _ucProfileSchedule.textBox1.Text = bot.ProfileSchedule.MaxRandomTime.ToString(); _ucProfileSchedule.textBox2.Text = bot.ProfileSchedule.MaxRandomRuns.ToString(); _ucProfileSchedule.checkBox1.Checked = bot.ProfileSchedule.Random; // Load Weekschedule _ucWeekSchedule.textBox1.Text = bot.Week.MinRandom.ToString(); _ucWeekSchedule.textBox2.Text = bot.Week.MaxRandom.ToString(); _ucWeekSchedule.checkBox1.Checked = bot.Week.Shuffle; _ucWeekSchedule.LoadSchedule(bot); }
private void LoadData() { // Load data _ucDemonbuddy.textBox1.Text = _bot.Name; _ucDemonbuddy.textBox2.Text = _bot.Description; // Advanced section _ucAdvanced.checkBox2.Checked = _bot.CreateWindowsUser; _ucAdvanced.checkBox1.Checked = _bot.UseWindowsUser; _ucAdvanced.textBox1.Text = _bot.WindowsUserName; _ucAdvanced.maskedTextBox1.Text = _bot.WindowsUserPassword; _ucAdvanced.textBox3.Text = _bot.D3PrefsLocation; _ucAdvanced.checkBox3.Checked = _bot.UseDiabloClone; _ucAdvanced.textBox2.Text = _bot.DiabloCloneLocation; // Demonbuddy _ucDemonbuddy.textBox4.Text = _bot.Demonbuddy.Location; _ucDemonbuddy.textBox3.Text = _bot.Demonbuddy.Key; _ucDemonbuddy.comboBox1.Text = _bot.Demonbuddy.CombatRoutine; _ucDemonbuddy.checkBox1.Checked = _bot.Demonbuddy.NoFlash; _ucDemonbuddy.checkBox2.Checked = _bot.Demonbuddy.AutoUpdate; _ucDemonbuddy.checkBox3.Checked = _bot.Demonbuddy.NoUpdate; _ucDemonbuddy.textBox9.Text = _bot.Demonbuddy.BuddyAuthUsername; _ucDemonbuddy.maskedTextBox2.Text = _bot.Demonbuddy.BuddyAuthPassword; _ucDemonbuddy.comboBox2.SelectedIndex = _bot.Demonbuddy.Priority; _ucDemonbuddy.checkBox5.Checked = _bot.Demonbuddy.ForceEnableAllPlugins; // Demonbuddy manual position _ucDemonbuddy.checkBox4.Checked = _bot.Demonbuddy.ManualPosSize; _ucDemonbuddy.textBox6.Text = _bot.Demonbuddy.X.ToString(); _ucDemonbuddy.textBox5.Text = _bot.Demonbuddy.Y.ToString(); _ucDemonbuddy.textBox10.Text = _bot.Demonbuddy.W.ToString(); _ucDemonbuddy.textBox11.Text = _bot.Demonbuddy.H.ToString(); // Diablo UcDiablo.username.Text = _bot.Diablo.Username; UcDiablo.password.Text = _bot.Diablo.Password; UcDiablo.diablo3Path.Text = _bot.Diablo.Location; UcDiablo.language.SelectedItem = _bot.Diablo.Language; UcDiablo.region.SelectedItem = _bot.Diablo.Region; UcDiablo.checkBox1.Checked = _bot.Diablo.UseAuthenticator; UcDiablo.useInnerSpace.Checked = _bot.Diablo.UseIsBoxer; UcDiablo.isBoxerLaunchAll.Checked = _bot.Diablo.IsBoxerLaunchCharacterSet; UcDiablo.characterSet.Text = _bot.Diablo.CharacterSet; UcDiablo.displaySlot.Text = _bot.Diablo.DisplaySlot; UcDiablo.removeWindowFrame.Checked = _bot.Diablo.NoFrame; // Affinity Diablo if (_bot.Diablo.CpuCount != Environment.ProcessorCount) { _bot.Diablo.ProcessorAffinity = _bot.Diablo.AllProcessors; _bot.Diablo.CpuCount = Environment.ProcessorCount; } if (AffinityDiablo.Cpus.Count != _bot.Diablo.CpuCount) { Logger.Instance.Write( "For whatever reason Diablo and UI see different number of CPUs, affinity disabled"); } else { for (var i = 0; i < _bot.Diablo.CpuCount; i++) { AffinityDiablo.Cpus[i].Checked = ((_bot.Diablo.ProcessorAffinity & (1 << i)) != 0); } } // Affinity Demonbuddy if (_bot.Demonbuddy.CpuCount != Environment.ProcessorCount) { _bot.Demonbuddy.ProcessorAffinity = _bot.Demonbuddy.AllProcessors; _bot.Demonbuddy.CpuCount = Environment.ProcessorCount; } if (AffinityDemonbuddy.Cpus.Count != _bot.Demonbuddy.CpuCount) { Logger.Instance.Write( "For whatever reason Demonbuddy and UI see different number of CPUs, affinity disabled"); } else { for (var i = 0; i < _bot.Demonbuddy.CpuCount; i++) { AffinityDemonbuddy.Cpus[i].Checked = ((_bot.Demonbuddy.ProcessorAffinity & (1 << i)) != 0); } } //!!!d.Serial = string.Format("{0}-{1}-{2}-{3}", ucDiablo.textBox4.Text, ucDiablo.textBox5.Text, ucDiablo.textBox7.Text, ucDiablo.textBox6.Text); //!!!ucDiablo.textBox8.Text = bot.diablo.RestoreCode; /* * d.Serial = string.Format("{0}-{1}-{2}-{3}", _ucDiablo.textBox4.Text, _ucDiablo.textBox5.Text, * _ucDiablo.textBox7.Text, _ucDiablo.textBox6.Text); * d.RestoreCode = _ucDiablo.textBox8.Text; */ var serialCode = _bot.Diablo.Serial; string[] words; words = serialCode.Split('-'); UcDiablo.authField1.Text = words[0]; UcDiablo.authField2.Text = words[1]; UcDiablo.authField3.Text = words[2]; UcDiablo.authField4.Text = words[3]; UcDiablo.textBox8.Text = _bot.Diablo.RestoreCode; UcDiablo.processorAffinity.SelectedIndex = _bot.Diablo.Priority; // Diablo manual position UcDiablo.manualPositionAndSize.Checked = _bot.Diablo.ManualPosSize; UcDiablo.positionX.Text = _bot.Diablo.X.ToString(); UcDiablo.positionY.Text = _bot.Diablo.Y.ToString(); UcDiablo.width.Text = _bot.Diablo.W.ToString(); UcDiablo.height.Text = _bot.Diablo.H.ToString(); // Profile Schedule _ucProfileSchedule.Profiles = _bot.ProfileSchedule.Profiles; _ucProfileSchedule.textBox1.Text = _bot.ProfileSchedule.MaxRandomTime.ToString(); _ucProfileSchedule.textBox2.Text = _bot.ProfileSchedule.MaxRandomRuns.ToString(); _ucProfileSchedule.checkBox1.Checked = _bot.ProfileSchedule.Random; // Load Weekschedule _ucWeekSchedule.textBox1.Text = _bot.Week.MinRandom.ToString(); _ucWeekSchedule.textBox2.Text = _bot.Week.MaxRandom.ToString(); _ucWeekSchedule.checkBox1.Checked = _bot.Week.Shuffle; _ucWeekSchedule.LoadSchedule(_bot); }