提交 95823763 编写于 作者: yanghye's avatar yanghye

up: check update demo

上级 cfb24425
......@@ -193,22 +193,31 @@ func main() {
updateContent.Lines().Add(downUrl)
//
ok := lcl.NewButton(m.UpdatePromptPanel)
ok.SetParent(m.UpdatePromptPanel)
ok.SetCaption("提示")
ok.SetOnClick(func(sender lcl.IObject) {
fmt.Println("提示")
m.UpdatePromptPanel.SetVisible(false)
m.UpdateProgressPanel.SetVisible(true)
cancelBtn := lcl.NewImageButton(m)
cancelBtn.SetParent(m)
cancelBtn.SetImageCount(3)
cancelBtn.SetAutoSize(true)
cancelBtn.SetCursor(types.CrHandPoint)
cancelBtn.Picture().LoadFromFSFile("resources/btn-cancel.png")
cancelBtn.SetLeft(300)
cancelBtn.SetTop(290)
cancelBtn.SetHint(i18n.Resource("cancel"))
cancelBtn.SetOnClick(func(lcl.IObject) {
fmt.Println("cancel")
})
process := lcl.NewButton(m.UpdateProgressPanel)
process.SetParent(m.UpdateProgressPanel)
process.SetCaption("进度")
process.SetOnClick(func(sender lcl.IObject) {
fmt.Println("进度")
m.UpdatePromptPanel.SetVisible(true)
m.UpdateProgressPanel.SetVisible(false)
//
updateBtn := lcl.NewImageButton(m)
updateBtn.SetParent(m)
updateBtn.SetImageCount(3)
updateBtn.SetAutoSize(true)
updateBtn.SetCursor(types.CrHandPoint)
updateBtn.Picture().LoadFromFSFile("resources/btn-update.png")
updateBtn.SetLeft(400)
updateBtn.SetTop(290)
updateBtn.SetHint(i18n.Resource("update"))
updateBtn.SetOnClick(func(lcl.IObject) {
fmt.Println("update")
})
}
// run and create update form
......
{
"title": "liblcl Update",
"close": "close",
"cancel": "cancel",
"update": "update",
"updateContent": "Update Content",
"downloadURL": "Update URL"
}
\ No newline at end of file
{
"title": "liblcl更新",
"close": "关闭",
"cancel": "取消",
"update": "更新",
"updateContent": "更新内容",
"downloadURL": "更新地址"
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册