Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public static void McDownloadClientUpdateHint(string versionName, JsonObject jso
? Lang.Text("Minecraft.Update.UpdateTime") + Lang.Date(time)
: Lang.Text("Minecraft.Update.UpdatedAt") + Lang.TimeSpan(time - DateTime.Now));
var msgResult = ModMain.MyMsgBox(msgBoxText, Lang.Text("Minecraft.Update.Title"),
Lang.Text("Common.Action.Confirm"), Lang.Text("Common.Action.Download"),
(DateTime.Now - time).TotalHours > 3d ? Lang.Text("Common.Action.UpdateLog") : "",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重新看了一下这处修改,根据 MyMsgBox (MyMsgText) 的实现,

try
{
InitializeComponent();
Btn1.Name = Btn1.Name + ModBase.GetUuid();
Btn2.Name = Btn2.Name + ModBase.GetUuid();
Btn3.Name = Btn3.Name + ModBase.GetUuid();
MyConverter = Converter;
LabTitle.Text = Converter.Title;
LabCaption.Text = Converter.Text;
Btn1.Text = Converter.Button1;
if (Converter.IsWarn)
{
Btn1.ColorType = MyButton.ColorState.Red;
LabTitle.SetResourceReference(TextBlock.ForegroundProperty, "ColorBrushRedLight");
}
Btn2.Text = Converter.Button2;
Btn3.Text = Converter.Button3;
Btn2.Visibility = string.IsNullOrEmpty(Converter.Button2) ? Visibility.Collapsed : Visibility.Visible;
Btn3.Visibility = string.IsNullOrEmpty(Converter.Button3) ? Visibility.Collapsed : Visibility.Visible;
ShapeLine.StrokeThickness = ModBase.GetWPFSize(1d);
}

把一个可选按钮放到第一按钮位置会导致逻辑上不显示这个按钮的时候生成一个空按钮

Button3Action: () => ModDownloadLib.McUpdateLogShow(version));
Lang.Text("Common.Action.Download"),
Lang.Text("Common.Action.Close"),
Button1Action: () => ModDownloadLib.McUpdateLogShow(version));
// 弹窗结果
if (msgResult == 2)
// 下载
Expand Down
Loading