[#] 修复切换RadioButton后,安装补丁的启用状态不正常的情况 #346 #344

This commit is contained in:
huiyadanli 2022-05-28 18:06:29 +08:00
parent 0a0834c597
commit 6b172e2a1b

View File

@ -349,8 +349,14 @@ namespace RevokeMsgPatcher
private void radioButtons_CheckedChanged(object sender, EventArgs e) private void radioButtons_CheckedChanged(object sender, EventArgs e)
{ {
EnableAllButton(false);
RadioButton radioButton = sender as RadioButton; RadioButton radioButton = sender as RadioButton;
if (!radioButton.Checked)
{
return;
}
EnableAllButton(false);
// 切换使用不同的防撤回对象 // 切换使用不同的防撤回对象
if (rbtWechat.Checked) if (rbtWechat.Checked)
{ {
@ -368,11 +374,11 @@ namespace RevokeMsgPatcher
{ {
modifier = (QQLiteModifier)rbtQQLite.Tag; modifier = (QQLiteModifier)rbtQQLite.Tag;
} }
txtPath.Text = modifier.FindInstallPath();
EnableAllButton(true); EnableAllButton(true);
// 触发了 txtPath_TextChanged 方法 已经调用了 InitEditorsAndUI(txtPath.Text);
// 也就是说 重新计算显示是否能够备份还原、版本和功能
txtPath.Text = modifier.FindInstallPath();
// 重新计算显示是否能够备份还原、版本和功能
//InitEditorsAndUI(txtPath.Text);
ga.RequestPageView($"{GetCheckedRadioButtonNameEn()}/{lblVersion.Text}/switch", "切换标签页"); ga.RequestPageView($"{GetCheckedRadioButtonNameEn()}/{lblVersion.Text}/switch", "切换标签页");
} }