Browse Source

完善 重建索引操作

master
VIVIMAN 3 years ago
parent
commit
06f76964ec
  1. 2
      golang_learn/data_func/go_to_windows/build/build.bat
  2. 501
      golang_learn/data_func/go_to_windows/main.go
  3. 461
      golang_learn/data_func/go_to_windows/winStruct.go
  4. 415
      golang_learn/data_func/go_to_windows/winView.go

2
golang_learn/data_func/go_to_windows/build/build.bat

@ -3,4 +3,4 @@ set GOARCH=386
cd ../ cd ../
rsrc -manifest main.manifest -ico main.ico -o main.syso rsrc -manifest main.manifest -ico main.ico -o main.syso
go generate go generate
go build -ldflags="-s -w -H=windowsgui" -o HyServer.exe go build -ldflags="-s -w -H=windowsgui" -o 运行监控.exe

501
golang_learn/data_func/go_to_windows/main.go

@ -9,8 +9,6 @@ import (
"fmt" "fmt"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/lxn/walk" "github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
"github.com/mzky/zip" "github.com/mzky/zip"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
"golang.org/x/sys/windows/registry" "golang.org/x/sys/windows/registry"
@ -27,19 +25,11 @@ import (
"time" "time"
) )
var version = "V2021 1.0.1" var app myApp
var passwordname = "Qw^e1@10&++Hzb...?8" var service1, service3 myService
var Version = "V2021 1.0.1" // 版本号
func (mw *myApp) aboutactionTriggered() { var passwordname = "Qw^e1@10&++Hzb...?8" // 解压密码
walk.MsgBox(mw.mw, "功能说明", strings.Join([]string{ var path string // 该部分不存在最后 横线 (格式为 D:\hzb2021),使用时需要补充横线
"1. 启动、终止并设置 应用和数据库 服务",
"2. 清除 浏览器和应用 缓存",
"3. 设置 应用和数据库 内存大小",
"4. 实现 数据备份 压缩备份库文件与备份照片",
"5. 实现 数据还原 执行还原库文件与还原照片",
fmt.Sprintf("版本:%s", version)}, "\n"),
walk.MsgBoxIconQuestion)
}
type myApp struct { type myApp struct {
title string title string
@ -47,7 +37,6 @@ type myApp struct {
msg *walk.TextEdit msg *walk.TextEdit
mw *walk.MainWindow mw *walk.MainWindow
} }
type myService struct { type myService struct {
text string text string
serviceName string serviceName string
@ -56,26 +45,10 @@ type myService struct {
btnStart *walk.PushButton btnStart *walk.PushButton
btnStop *walk.PushButton btnStop *walk.PushButton
} }
type tabIdx struct {
var app myApp tabName string // 表名
var service1, service3 myService idxName string // 索引名
idxColumn string // 索引字段
// 该部分不存在最后 横线 (格式为 D:\hzb2021),使用时需要补充横线
var path string
// 基础库部分脚本(除 a01 和 b01)
var tableName = []string{
"a02", "a05", "a06", "a08", "a14", "a15", "a17", "a36", "a30", "a33", "a57", "a65", "a99z1",
}
// 统计部分脚本
var tableNameTj = []string{
"tj_un", "tb_set_unit", "tb_rpt_cv_cfg",
"J2001", "J2002", "J2003", "J2004", "J2005", "J2006", "J2007", "J2008", "J2101", "J2102", "J2103", "J2104",
"J2105", "J2106", "J2107", "J2108", "M_M01", "M_M02", "M_M03", "M_M04", "M_M05", "M_M06", "M_M07", "M_M09",
"M_N01", "M_N02", "M_N03", "M_N04", "M_N05", "M_P01", "M_P02", "M_P03", "M_Q01", "M_Q02", "M_Q03", "M_Q04",
"M_Q05", "M_Q06", "M_Q07", "M_Q08", "M_Q09", "M_Q10", "M_Q11", "M_Q12", "M_Q13",
"inner_check_result", "outer_check_result", "statistics_state", "middleverify_error_list", "tj_tbsm_item_list", "tb_zyhz",
} }
// init 初始化 // init 初始化
@ -95,7 +68,12 @@ func init() {
// main 程序入口 // main 程序入口
func main() { func main() {
_ = getWindows() err := GetWindows()
if err != nil {
walk.MsgBox(app.mw, "错误", "程序初始化错误!", walk.MsgBoxIconWarning)
return
}
runMain() runMain()
} }
@ -146,170 +124,6 @@ func runMain() {
app.mw.Run() app.mw.Run()
} }
// 初始始化窗体
func getWindows() error {
icon, _ := walk.NewIconFromResourceId(3)
err := MainWindow{
Visible: false,
AssignTo: &app.mw,
Title: app.title,
Size: Size{Width: 500, Height: 360},
Font: Font{Family: "微软雅黑", PointSize: 9},
Icon: icon,
Layout: VBox{},
MenuItems: []MenuItem{
Menu{
Text: "&编辑",
// Image: "./image//media.png",
Items: []MenuItem{
Separator{},
Action{
// Image: "./image//qinghuancun.png",
Text: "清除缓存",
OnTriggered: clearAll,
},
Action{
// Image: "./image//beifen.png",
Text: "数据备份",
OnTriggered: dbBak,
},
/*Action{
// Image: "./image//huanyuan.png",
Text: "数据还原",
OnTriggered: reDbBak,
},*/
Action{
// Image: "./image//tuichu.png",
Text: "退出",
OnTriggered: func() {
walk.App().Exit(0)
},
},
},
},
Menu{
Text: "&设置",
// Image: "./image//shezhi.png",
Items: []MenuItem{
Separator{},
Action{
// Image: "./image//shujuku.png",
Text: "设置数据库内存",
OnTriggered: setDbSize,
},
Action{
// Image: "./image//yingyong.png",
Text: "设置应用内存",
OnTriggered: setServerSize,
},
},
},
Menu{
Text: "&帮助",
// Image: "./image//bangzhu.png",
Items: []MenuItem{
Action{
// Image: "./image//guanyu.png",
Text: "关于",
OnTriggered: app.aboutactionTriggered,
},
/*Action{
// Image: "./image//yaoqiu.png",
Text: "要求",
OnTriggered: app.aboutactionTriggered,
},*/
},
},
},
Children: []Widget{GroupBox{
Title: "基础服务状态",
Layout: Grid{Columns: 3},
Children: []Widget{
Label{Text: service1.text, MinSize: Size{Width: 220, Height: 30}, TextColor: walk.RGB(255, 255, 0)},
Label{AssignTo: &service1.labelState, Text: "正在运行", MinSize: Size{Width: 80, Height: 30}},
Composite{
Layout: HBox{},
MaxSize: Size{Width: 198, Height: 30},
Children: []Widget{
PushButton{
AssignTo: &service1.btnRegister,
MaxSize: Size{Width: 60, Height: 30},
Text: "注册表",
},
PushButton{
AssignTo: &service1.btnStop,
MaxSize: Size{Width: 60, Height: 30},
Text: "停止",
},
PushButton{
AssignTo: &service1.btnStart,
MaxSize: Size{Width: 60, Height: 30},
Text: "启动",
},
},
},
},
}, GroupBox{
Title: "业务服务状态",
Layout: Grid{Columns: 3},
Children: []Widget{
Label{Text: service3.text, MinSize: Size{Width: 220, Height: 30}},
Label{AssignTo: &service3.labelState, Text: "正在运行", MinSize: Size{Width: 80, Height: 30}},
Composite{
Layout: HBox{},
MaxSize: Size{Width: 198, Height: 30},
Children: []Widget{
PushButton{
AssignTo: &service3.btnRegister,
MaxSize: Size{Width: 60, Height: 30},
Text: "注册表",
},
PushButton{
AssignTo: &service3.btnStop,
MaxSize: Size{Width: 60, Height: 30},
Text: "停止",
},
PushButton{
AssignTo: &service3.btnStart,
MaxSize: Size{Width: 60, Height: 30},
Text: "启动",
},
},
},
},
}, TextEdit{AssignTo: &app.msg, VScroll: true, ReadOnly: true}, Composite{
Layout: HBox{},
Children: []Widget{
PushButton{
MinSize: Size{Width: 200, Height: 30},
Text: "打开windows服务管理程序",
OnClicked: openServices,
},
HSpacer{},
PushButton{
MinSize: Size{Width: 140, Height: 30},
Text: "关闭本监控窗口",
OnClicked: func() {
walk.App().Exit(0)
},
},
},
}},
OnSizeChanged: func() {
_ = app.mw.SetSize(walk.Size(Size{Width: 500, Height: 360}))
},
}.Create()
winLong := win.GetWindowLong(app.mw.Handle(), win.GWL_STYLE)
// 不能调整窗口大小,禁用最大化按钮
win.SetWindowLong(app.mw.Handle(), win.GWL_STYLE, winLong & ^win.WS_SIZEBOX & ^win.WS_MAXIMIZEBOX & ^win.WS_SIZEBOX)
// 设置窗体生成在屏幕的正中间,并处理高分屏的情况
// 窗体横坐标 = ( 屏幕宽度 - 窗体宽度 ) / 2
// 窗体纵坐标 = ( 屏幕高度 - 窗体高度 ) / 2
_ = app.mw.SetX((int(win.GetSystemMetrics(0)) - app.mw.Width()) / 2 / app.mw.DPI() * 96)
_ = app.mw.SetY((int(win.GetSystemMetrics(1)) - app.mw.Height()) / 2 / app.mw.DPI() * 96)
return err
}
// setServiceState 设置 服务状态描述和按钮状态 // setServiceState 设置 服务状态描述和按钮状态
func setServiceState(service myService, msg string, btnStartStatus, btnStopStatus, btnRegisterStatus bool) { func setServiceState(service myService, msg string, btnStartStatus, btnStopStatus, btnRegisterStatus bool) {
_ = service.labelState.SetText(msg) _ = service.labelState.SetText(msg)
@ -638,6 +452,34 @@ func setServerSize() {
}) })
} }
// reDbIndex 重新构建索引
func reDbIndex() {
// 判断 mysql 服务应用启动
if service1.btnStart.Enabled() {
walk.MsgBox(app.mw, "错误", "数据库服务未启动,即将进行数据库服务启动!", walk.MsgBoxIconWarning)
startService(service1)
}
time.Sleep(time.Second)
db, _ := sql.Open("mysql", "root:admin@tcp(127.0.0.1:35017)/hy_qggwy?charset=utf8")
showMsg("连接数据库成功!\n请不要进行其他操作,否则影响执行...")
for i := 0; i < len(DbIndex); i++ {
ExecSql(db, fmt.Sprintf(`DROP INDEX %s ON %s`, DbIndex[i].idxName, DbIndex[i].tabName))
ExecSql(db, fmt.Sprintf(`ALTER TABLE %s ADD INDEX %s (%s) USING BTREE`, DbIndex[i].tabName, DbIndex[i].idxName, DbIndex[i].idxColumn))
}
showMsg("已完成重新构建索引!")
}
func ExecSql(db *sql.DB, sql string) {
stmt, err := db.Prepare(sql)
if err != nil {
log.Fatal(err)
}
_, _ = stmt.Exec()
defer stmt.Close()
}
// dbBak 数据备份功能 // dbBak 数据备份功能
func dbBak() { func dbBak() {
// 判断 mysql 服务应用启动 // 判断 mysql 服务应用启动
@ -661,14 +503,14 @@ func dbBak() {
} }
// 【sql方式】统计库部分 // 【sql方式】统计库部分
/* for i := 0; i < len(tableNameTj); i++ { /* for i := 0; i < len(TableNameTj); i++ {
QuerySQL(db, dir, "select * from "+tableNameTj[i], tableNameTj[i], []string{}) QuerySQL(db, dir, "select * from "+TableNameTj[i], TableNameTj[i], []string{})
}*/ }*/
// 【sql方式】基础库部分 // 【sql方式】基础库部分
/* QuerySQL(db, dir, "select * from a01 where STATUS=1", "a01", []string{"A0155", "JSNLSJ", "TBSJ", "XGSJ"}) /* QuerySQL(db, dir, "select * from a01 where STATUS=1", "a01", []string{"A0155", "JSNLSJ", "TBSJ", "XGSJ"})
for i := 0; i < len(tableName); i++ { for i := 0; i < len(TableName); i++ {
QuerySQL(db, dir, "select * from "+tableName[i]+" where a0000 in (select a0000 from a01 where status=1)", tableName[i], []string{}) QuerySQL(db, dir, "select * from "+TableName[i]+" where a0000 in (select a0000 from a01 where status=1)", TableName[i], []string{})
} }
QuerySQL(db, dir, "select * from b01", "b01", []string{})*/ QuerySQL(db, dir, "select * from b01", "b01", []string{})*/
@ -677,6 +519,7 @@ func dbBak() {
// 关闭服务 // 关闭服务
stopService(service1) stopService(service1)
showMsg("程序可能出现【未响应】属于正常!")
time.Sleep(time.Second) time.Sleep(time.Second)
@ -714,257 +557,19 @@ func reDbBak() {
}) })
} }
//数据库配置结构
type DbSetings struct {
InnodbBufferPoolSize int // 数据库缓存大小
}
// 运行 数据库设置 Dialog
func (mw *myApp) RunDbSetingDialog(owner walk.Form, confirmCall func(*DbSetings)) {
var seting *DbSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(DbSetings)
// 设置预定值
seting.InnodbBufferPoolSize = 512
_, _ = Dialog{
AssignTo: &dlg,
Title: "数据源内存设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 160},
Layout: VBox{},
Children: []Widget{
Composite{
Layout: Grid{Columns: 2},
Children: []Widget{
Label{Text: `      数据库内存:`},
NumberEdit{Value: Bind("InnodbBufferPoolSize", Range{Min: 64, Max: 10240}), Suffix: " M", Decimals: 0},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "保存",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】处理设置数据库内存时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// 应用 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
//应用配置结构
type AppSetings struct {
PermSize int // 非堆区初始内存分配大小
MaxPermSize int // 非堆区分配的内存的最大上限
Xms int // 堆区内存初始内存分配的大小
Xmx int // 堆区内存可被分配的最大上限
}
// 运行 应用设置 Dialog
func (mw *myApp) RunAppSetingDialog(owner walk.Form, confirmCall func(*AppSetings)) {
var seting *AppSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(AppSetings)
// 设置预定值
seting.PermSize = 128
seting.MaxPermSize = 256
seting.Xmx = 512
seting.Xms = 512
_, _ = Dialog{
AssignTo: &dlg,
Title: "应用内存设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 270},
Layout: VBox{},
Children: []Widget{
Composite{
Layout: Grid{Columns: 2},
Children: []Widget{
Label{Text: `  PermSize(非堆区)初始内存分配大小:`},
NumberEdit{Value: Bind("PermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `MaxPermSize(非堆区)最大内存分配上限:`},
NumberEdit{Value: Bind("MaxPermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `      Xms(堆区)初始内存分配大小:`},
NumberEdit{Value: Bind("Xms", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `      Xmx(堆区)最大内存分配上限:`},
NumberEdit{Value: Bind("Xmx", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "保存",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】处理设置数据库内存时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// DB 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
//数据还原设置
type DbBakSetings struct {
*walk.MainWindow
searchBox *walk.LineEdit
path string
}
// 运行 数据还原设置 Dialog
func (mw *myApp) RunDbBakSetingDialog(owner walk.Form, confirmCall func(*DbBakSetings)) {
var seting *DbBakSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(DbBakSetings)
// 设置预定值
_, _ = Dialog{
AssignTo: &dlg,
Title: "数据还原设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 220},
Layout: VBox{},
Children: []Widget{
GroupBox{
Layout: HBox{},
Children: []Widget{
LineEdit{
ReadOnly: true,
AssignTo: &seting.searchBox,
},
PushButton{
Text: "选择",
OnClicked: seting.selectFile,
},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "恢复",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】选择恢复文件时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// DB 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
func (mw *DbBakSetings) selectFile() { func (mw *DbBakSetings) selectFile() {
dlg := new(walk.FileDialog) dlg := new(walk.FileDialog)
dlg.Title = "选择还原文件(格式:gz)" dlg.Title = "选择还原文件(格式:gz)"
dlg.Filter = "可执行文件 (*.gz)|*.gz" dlg.Filter = "可执行文件 (*.gz)|*.gz"
mw.searchBox.SetText("") //通过重定向变量设置TextEdit的Text _ = mw.searchBox.SetText("") //通过重定向变量设置TextEdit的Text
if ok, err := dlg.ShowOpen(mw); err != nil { if ok, err := dlg.ShowOpen(mw); err != nil {
showMsg("【异常】选择打开文件!") showMsg("【异常】选择打开文件!")
} else if !ok { } else if !ok {
showMsg("Cancel\n") showMsg("Cancel\n")
} }
mw.searchBox.SetText(mw.path) _ = mw.searchBox.SetText(mw.path)
} }
// QuerySQL 获取表数据 // QuerySQL 获取表数据
@ -1028,7 +633,7 @@ func QuerySQL(db *sql.DB, dir, sqlStr, tableName string, colNil []string) {
path = fmt.Sprintf("%s/%s.sql", dir, tableName) path = fmt.Sprintf("%s/%s.sql", dir, tableName)
file3, _ := os.Create(path) file3, _ := os.Create(path)
_, _ = file3.WriteString(aa) _, _ = file3.WriteString(aa)
file3.Close() _ = file3.Close()
} }
// inStr 判断字段关系 // inStr 判断字段关系
@ -1176,3 +781,7 @@ func Contains(array []fs.FileInfo, val string) (index int) {
} }
return return
} }
func (mw *myApp) aboutactionTriggered() {
walk.MsgBox(mw.mw, "功能说明", Info, walk.MsgBoxIconQuestion)
}

461
golang_learn/data_func/go_to_windows/winStruct.go

@ -0,0 +1,461 @@
package main
import (
"fmt"
"strings"
)
// 说明
var Info = strings.Join([]string{
"1. 启动、终止并设置 应用和数据库 服务",
"2. 清除 浏览器和应用 缓存",
"3. 设置 应用和数据库 内存大小",
"4. 实现 数据库索引 重新构建",
"5. 实现 数据备份 压缩备份库文件与备份照片",
//"6. 实现 数据还原 执行还原库文件与还原照片",
fmt.Sprintf("版本:%s", Version)}, "\n")
// 【废弃】基础库部分脚本(除 a01 和 b01)
var TableName = []string{
"a02", "a05", "a06", "a08", "a14", "a15", "a17", "a36", "a30", "a33", "a57", "a65", "a99z1",
}
// 【废弃】统计部分脚本
var TableNameTj = []string{
"tj_un", "tb_set_unit", "tb_rpt_cv_cfg",
"J2001", "J2002", "J2003", "J2004", "J2005", "J2006", "J2007", "J2008", "J2101", "J2102", "J2103", "J2104",
"J2105", "J2106", "J2107", "J2108", "M_M01", "M_M02", "M_M03", "M_M04", "M_M05", "M_M06", "M_M07", "M_M09",
"M_N01", "M_N02", "M_N03", "M_N04", "M_N05", "M_P01", "M_P02", "M_P03", "M_Q01", "M_Q02", "M_Q03", "M_Q04",
"M_Q05", "M_Q06", "M_Q07", "M_Q08", "M_Q09", "M_Q10", "M_Q11", "M_Q12", "M_Q13",
"inner_check_result", "outer_check_result", "statistics_state", "middleverify_error_list", "tj_tbsm_item_list", "tb_zyhz",
}
// 索引脚本
var DbIndex = []tabIdx{
{tabName: "a01", idxName: "A01_IDX_001", idxColumn: "A0000,A0163,STATUS"},
{tabName: "a01", idxName: "A01_IDX_002", idxColumn: "A0107"},
{tabName: "a01", idxName: "A01_IDX_003", idxColumn: "A0134"},
{tabName: "a01", idxName: "A01_IDX_004", idxColumn: "A0184"},
{tabName: "a01", idxName: "A01_IDX_005", idxColumn: "A0192F"},
{tabName: "a01", idxName: "A01_IDX_006", idxColumn: "A0221"},
{tabName: "a01", idxName: "A01_IDX_007", idxColumn: "STATUS"},
{tabName: "a01", idxName: "A01_IDX_008", idxColumn: "TORDER"},
{tabName: "a02", idxName: "A02_IDX_001", idxColumn: "A0000,A0255"},
{tabName: "a02", idxName: "A02_IDX_002", idxColumn: "A0000,A0201B"},
{tabName: "a02", idxName: "A02_IDX_003", idxColumn: "A0000"},
{tabName: "a02", idxName: "A02_IDX_004", idxColumn: "A0000,A0201B,A0281"},
{tabName: "a02", idxName: "A02_IDX_005", idxColumn: "A0000,A0279"},
{tabName: "a05", idxName: "A05_IDX_001", idxColumn: "A0524"},
{tabName: "a05", idxName: "A05_IDX_002", idxColumn: "A0531"},
{tabName: "a05", idxName: "A05_IDX_003", idxColumn: "A0000,A0531"},
{tabName: "a05", idxName: "A05_IDX_004", idxColumn: "A0000,A0524"},
{tabName: "a06", idxName: "A06_IDX_001", idxColumn: "A0000,A0601"},
{tabName: "a06", idxName: "A06_IDX_002", idxColumn: "A0000,A0604"},
{tabName: "a06", idxName: "A06_IDX_003", idxColumn: "A0000,A0699"},
{tabName: "a08", idxName: "A08_IDX_001", idxColumn: "A0000"},
{tabName: "a08", idxName: "A08_IDX_002", idxColumn: "A0000,A0801B"},
{tabName: "a08", idxName: "A08_IDX_003", idxColumn: "A0000,A0831"},
{tabName: "a08", idxName: "A08_IDX_004", idxColumn: "A0000,A0834"},
{tabName: "a08", idxName: "A08_IDX_005", idxColumn: "A0000,A0835"},
{tabName: "a08", idxName: "A08_IDX_006", idxColumn: "A0000,A0901B"},
{tabName: "a14", idxName: "A14_IDX_001", idxColumn: "A0000,A1404b"},
{tabName: "a14", idxName: "A14_IDX_002", idxColumn: "A0000,A1407"},
{tabName: "a14", idxName: "A14_IDX_003", idxColumn: "A0000,A1414"},
{tabName: "a15", idxName: "A15_IDX_001", idxColumn: "A0000,A1517"},
{tabName: "a15", idxName: "A15_IDX_002", idxColumn: "A0000,A1521"},
{tabName: "a30", idxName: "A30_IDX_001", idxColumn: "A0000"},
{tabName: "a30", idxName: "A30_IDX_002", idxColumn: "A0000,A3001"},
{tabName: "a30", idxName: "A30_IDX_003", idxColumn: "A0000,A3004"},
{tabName: "a33", idxName: "A33_IDX_001", idxColumn: "A0000"},
{tabName: "a33", idxName: "A33_IDX_002", idxColumn: "A0000,A3361"},
{tabName: "a33", idxName: "A33_IDX_003", idxColumn: "A0000,A3362"},
{tabName: "a33", idxName: "A33_IDX_004", idxColumn: "A0000,A3371"},
{tabName: "a33", idxName: "A33_IDX_005", idxColumn: "A0000,A3372"},
{tabName: "a36", idxName: "A36_IDX_001", idxColumn: "A0000"},
{tabName: "a36", idxName: "A36_IDX_002", idxColumn: "A0000,A3604A"},
{tabName: "a36", idxName: "A36_IDX_003", idxColumn: "A0000,A3627"},
{tabName: "a36", idxName: "A36_IDX_004", idxColumn: "A0000,A3607"},
{tabName: "a65", idxName: "A65_IDX_001", idxColumn: "A0000"},
{tabName: "A99Z1", idxName: "A99Z1_IDX_001", idxColumn: "A0000"},
{tabName: "A99Z1", idxName: "A99Z1_IDX_002", idxColumn: "A0000,A99Z101"},
{tabName: "A99Z1", idxName: "A99Z1_IDX_003", idxColumn: "A0000,A99Z103"},
{tabName: "A99Z1", idxName: "A99Z1_IDX_004", idxColumn: "A0000,A99Z191"},
{tabName: "b01", idxName: "B01_IDX_001", idxColumn: "B0121"},
{tabName: "b01", idxName: "B01_IDX_002", idxColumn: "B0131"},
{tabName: "M_M01", idxName: "M_M01_IDX_001", idxColumn: "M0105"},
{tabName: "M_M01", idxName: "M_M01_IDX_002", idxColumn: "M0101"},
{tabName: "M_M01", idxName: "M_M01_IDX_003", idxColumn: "M0103"},
{tabName: "M_M01", idxName: "M_M01_IDX_004", idxColumn: "M0104"},
{tabName: "M_M01", idxName: "M_M01_IDX_005", idxColumn: "M0109"},
{tabName: "M_M01", idxName: "M_M01_IDX_006", idxColumn: "M0110"},
{tabName: "M_M01", idxName: "M_M01_IDX_007", idxColumn: "M0111"},
{tabName: "M_M01", idxName: "M_M01_IDX_008", idxColumn: "UNID"},
{tabName: "M_M01", idxName: "M_M01_IDX_009", idxColumn: "RPT"},
{tabName: "M_M01", idxName: "M_M01_IDX_010", idxColumn: "RPT,UNID"},
{tabName: "M_M02", idxName: "M_M02_IDX_001", idxColumn: "OUUID"},
{tabName: "M_M02", idxName: "M_M02_IDX_002", idxColumn: "RPT,UNID"},
{tabName: "M_M02", idxName: "M_M02_IDX_003", idxColumn: "M0203"},
{tabName: "M_M02", idxName: "M_M02_IDX_004", idxColumn: "RPT"},
{tabName: "M_M02", idxName: "M_M02_IDX_005", idxColumn: "UNID"},
{tabName: "M_M02", idxName: "M_M02_IDX_006", idxColumn: "M0201"},
{tabName: "M_M02", idxName: "M_M02_IDX_007", idxColumn: "M0202"},
{tabName: "M_M02", idxName: "M_M02_IDX_008", idxColumn: "M0204"},
{tabName: "M_M02", idxName: "M_M02_IDX_009", idxColumn: "M0205"},
{tabName: "M_M02", idxName: "M_M02_IDX_010", idxColumn: "M0206"},
{tabName: "M_M02", idxName: "M_M02_IDX_011", idxColumn: "M0208"},
{tabName: "M_M02", idxName: "M_M02_IDX_012", idxColumn: "M0212"},
{tabName: "M_M02", idxName: "M_M02_IDX_013", idxColumn: "M0213"},
{tabName: "M_M02", idxName: "M_M02_IDX_014", idxColumn: "M0216"},
{tabName: "M_M02", idxName: "M_M02_IDX_015", idxColumn: "M0233_1"},
{tabName: "M_M02", idxName: "M_M02_IDX_016", idxColumn: "M0234"},
{tabName: "M_M02", idxName: "M_M02_IDX_017", idxColumn: "ORDERBY"},
{tabName: "M_M03", idxName: "M_M03_IDX_001", idxColumn: "M0309"},
{tabName: "M_M03", idxName: "M_M03_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M03", idxName: "M_M03_IDX_003", idxColumn: "UNID"},
{tabName: "M_M03", idxName: "M_M03_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_M03", idxName: "M_M03_IDX_005", idxColumn: "RPT"},
{tabName: "M_M03", idxName: "M_M03_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_M04", idxName: "M_M04_IDX_001", idxColumn: "M0403"},
{tabName: "M_M04", idxName: "M_M04_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M04", idxName: "M_M04_IDX_003", idxColumn: "UNID"},
{tabName: "M_M04", idxName: "M_M04_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_M04", idxName: "M_M04_IDX_005", idxColumn: "RPT"},
{tabName: "M_M04", idxName: "M_M04_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_M05", idxName: "M_M05_IDX_001", idxColumn: "M0503"},
{tabName: "M_M05", idxName: "M_M05_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M05", idxName: "M_M05_IDX_003", idxColumn: "UNID"},
{tabName: "M_M05", idxName: "M_M05_IDX_004", idxColumn: "M0501"},
{tabName: "M_M05", idxName: "M_M05_IDX_005", idxColumn: "M0502"},
{tabName: "M_M05", idxName: "M_M05_IDX_006", idxColumn: "M0503"},
{tabName: "M_M05", idxName: "M_M05_IDX_007", idxColumn: "M0504"},
{tabName: "M_M05", idxName: "M_M05_IDX_008", idxColumn: "M0505"},
{tabName: "M_M05", idxName: "M_M05_IDX_009", idxColumn: "M0506"},
{tabName: "M_M05", idxName: "M_M05_IDX_010", idxColumn: "M0507"},
{tabName: "M_M05", idxName: "M_M05_IDX_011", idxColumn: "M0508"},
{tabName: "M_M05", idxName: "M_M05_IDX_012", idxColumn: "ORDERBY"},
{tabName: "M_M05", idxName: "M_M05_IDX_013", idxColumn: "RPT"},
{tabName: "M_M05", idxName: "M_M05_IDX_014", idxColumn: "RPT,UNID"},
{tabName: "M_M06", idxName: "M_M06_IDX_001", idxColumn: "M0602"},
{tabName: "M_M06", idxName: "M_M06_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M06", idxName: "M_M06_IDX_003", idxColumn: "UNID"},
{tabName: "M_M06", idxName: "M_M06_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_M06", idxName: "M_M06_IDX_005", idxColumn: "RPT"},
{tabName: "M_M06", idxName: "M_M06_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_M07", idxName: "M_M07_IDX_001", idxColumn: "M0702"},
{tabName: "M_M07", idxName: "M_M07_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M07", idxName: "M_M07_IDX_003", idxColumn: "UNID"},
{tabName: "M_M07", idxName: "M_M07_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_M07", idxName: "M_M07_IDX_005", idxColumn: "RPT"},
{tabName: "M_M07", idxName: "M_M07_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_M09", idxName: "M_M09_IDX_001", idxColumn: "M0903"},
{tabName: "M_M09", idxName: "M_M09_IDX_002", idxColumn: "OUUID"},
{tabName: "M_M09", idxName: "M_M09_IDX_003", idxColumn: "UNID"},
{tabName: "M_M09", idxName: "M_M09_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_M09", idxName: "M_M09_IDX_005", idxColumn: "RPT"},
{tabName: "M_M09", idxName: "M_M09_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_M09", idxName: "M_M09_IDX_007", idxColumn: "ORDERBY"},
{tabName: "M_N01", idxName: "M_N01_IDX_001", idxColumn: "UNID"},
{tabName: "M_N01", idxName: "M_N01_IDX_002", idxColumn: "RPT"},
{tabName: "M_N01", idxName: "M_N01_IDX_003", idxColumn: "RPT,UNID"},
{tabName: "M_N02", idxName: "M_N02_IDX_001", idxColumn: "N0202"},
{tabName: "M_N02", idxName: "M_N02_IDX_002", idxColumn: "OUUID"},
{tabName: "M_N02", idxName: "M_N02_IDX_003", idxColumn: "UNID"},
{tabName: "M_N02", idxName: "M_N02_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_N02", idxName: "M_N02_IDX_005", idxColumn: "RPT"},
{tabName: "M_N02", idxName: "M_N02_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_N03", idxName: "M_N03_IDX_001", idxColumn: "N0302"},
{tabName: "M_N03", idxName: "M_N03_IDX_002", idxColumn: "OUUID"},
{tabName: "M_N03", idxName: "M_N03_IDX_003", idxColumn: "UNID"},
{tabName: "M_N03", idxName: "M_N03_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_N03", idxName: "M_N03_IDX_005", idxColumn: "RPT"},
{tabName: "M_N03", idxName: "M_N03_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_N04", idxName: "M_N04_IDX_001", idxColumn: "N0402"},
{tabName: "M_N04", idxName: "M_N04_IDX_002", idxColumn: "OUUID"},
{tabName: "M_N04", idxName: "M_N04_IDX_003", idxColumn: "UNID"},
{tabName: "M_N04", idxName: "M_N04_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_N04", idxName: "M_N04_IDX_005", idxColumn: "RPT"},
{tabName: "M_N04", idxName: "M_N04_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_N05", idxName: "M_N05_IDX_001", idxColumn: "N0502"},
{tabName: "M_N05", idxName: "M_N05_IDX_002", idxColumn: "OUUID"},
{tabName: "M_N05", idxName: "M_N05_IDX_003", idxColumn: "UNID"},
{tabName: "M_N05", idxName: "M_N05_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_N05", idxName: "M_N05_IDX_005", idxColumn: "RPT"},
{tabName: "M_N05", idxName: "M_N05_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_P01", idxName: "M_P01_IDX_001", idxColumn: "UNID"},
{tabName: "M_P01", idxName: "M_P01_IDX_002", idxColumn: "RPT"},
{tabName: "M_P01", idxName: "M_P01_IDX_003", idxColumn: "RPT,UNID"},
{tabName: "M_P02", idxName: "M_P02_IDX_001", idxColumn: "OUUID"},
{tabName: "M_P02", idxName: "M_P02_IDX_002", idxColumn: "P0204"},
{tabName: "M_P02", idxName: "M_P02_IDX_003", idxColumn: "UNID"},
{tabName: "M_P02", idxName: "M_P02_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_P02", idxName: "M_P02_IDX_005", idxColumn: "RPT"},
{tabName: "M_P02", idxName: "M_P02_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_P03", idxName: "M_P03_IDX_001", idxColumn: "OUUID"},
{tabName: "M_P03", idxName: "M_P03_IDX_002", idxColumn: "P0304"},
{tabName: "M_P03", idxName: "M_P03_IDX_003", idxColumn: "UNID"},
{tabName: "M_P03", idxName: "M_P03_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_P03", idxName: "M_P03_IDX_005", idxColumn: "RPT"},
{tabName: "M_P03", idxName: "M_P03_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q01", idxName: "M_Q01_IDX_001", idxColumn: "UNID"},
{tabName: "M_Q01", idxName: "M_Q01_IDX_002", idxColumn: "RPT"},
{tabName: "M_Q01", idxName: "M_Q01_IDX_003", idxColumn: "RPT,UNID"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_002", idxColumn: "Q0203"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q02", idxName: "M_Q02_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_002", idxColumn: "Q0303"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q03", idxName: "M_Q03_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_002", idxColumn: "Q0403"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q04", idxName: "M_Q04_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_002", idxColumn: "Q0503"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q05", idxName: "M_Q05_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_002", idxColumn: "Q0603"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q06", idxName: "M_Q06_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_002", idxColumn: "Q0703"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q07", idxName: "M_Q07_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_002", idxColumn: "Q0803"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q08", idxName: "M_Q08_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_002", idxColumn: "Q0903"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q09", idxName: "M_Q09_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_002", idxColumn: "Q1003"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q10", idxName: "M_Q10_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_002", idxColumn: "Q1103"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_003", idxColumn: "UNID"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_005", idxColumn: "RPT"},
{tabName: "M_Q11", idxName: "M_Q11_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_002", idxColumn: "RPT,UNID"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_003", idxColumn: "Q1203"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_004", idxColumn: "RPT"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_005", idxColumn: "UNID"},
{tabName: "M_Q12", idxName: "M_Q12_IDX_006", idxColumn: "ORDERBY"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_001", idxColumn: "OUUID"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_002", idxColumn: "RPT,UNID"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_003", idxColumn: "Q1303"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_004", idxColumn: "RPT"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_005", idxColumn: "UNID"},
{tabName: "M_Q13", idxName: "M_Q13_IDX_006", idxColumn: "ORDERBY"},
{tabName: "M_RPT_NODE", idxName: "M_RPT_NODE_IDX_001", idxColumn: "RPCODE,RPTABLEID"},
{tabName: "M_S01", idxName: "M_S01_IDX_004", idxColumn: "S0103"},
{tabName: "M_S01", idxName: "M_S01_IDX_001", idxColumn: "UNID"},
{tabName: "M_S01", idxName: "M_S01_IDX_003", idxColumn: "S0102"},
{tabName: "M_S01", idxName: "M_S01_IDX_005", idxColumn: "RPT"},
{tabName: "M_S01", idxName: "M_S01_IDX_002", idxColumn: "S0101"},
{tabName: "M_S02", idxName: "M_S02_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S02", idxName: "M_S02_IDX_002", idxColumn: "S0202"},
{tabName: "M_S02", idxName: "M_S02_IDX_003", idxColumn: "UNID"},
{tabName: "M_S02", idxName: "M_S02_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S02", idxName: "M_S02_IDX_005", idxColumn: "RPT"},
{tabName: "M_S02", idxName: "M_S02_IDX_006", idxColumn: "S0201"},
{tabName: "M_S02", idxName: "M_S02_IDX_007", idxColumn: "S0205"},
{tabName: "M_S02", idxName: "M_S02_IDX_008", idxColumn: "S0204"},
{tabName: "M_S02", idxName: "M_S02_IDX_009", idxColumn: "S0206"},
{tabName: "M_S03", idxName: "M_S03_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S03", idxName: "M_S03_IDX_002", idxColumn: "S0303"},
{tabName: "M_S03", idxName: "M_S03_IDX_003", idxColumn: "UNID"},
{tabName: "M_S03", idxName: "M_S03_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S03", idxName: "M_S03_IDX_005", idxColumn: "RPT"},
{tabName: "M_S03", idxName: "M_S03_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_S03", idxName: "M_S03_IDX_007", idxColumn: "S0301"},
{tabName: "M_S03", idxName: "M_S03_IDX_008", idxColumn: "S0305"},
{tabName: "M_S03", idxName: "M_S03_IDX_009", idxColumn: "S0304"},
{tabName: "M_S03", idxName: "M_S03_IDX_010", idxColumn: "S0306"},
{tabName: "M_S04", idxName: "M_S04_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S04", idxName: "M_S04_IDX_002", idxColumn: "S0403"},
{tabName: "M_S04", idxName: "M_S04_IDX_003", idxColumn: "UNID"},
{tabName: "M_S04", idxName: "M_S04_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S04", idxName: "M_S04_IDX_005", idxColumn: "RPT"},
{tabName: "M_S04", idxName: "M_S04_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_S04", idxName: "M_S04_IDX_007", idxColumn: "S0401"},
{tabName: "M_S04", idxName: "M_S04_IDX_008", idxColumn: "S0405"},
{tabName: "M_S04", idxName: "M_S04_IDX_009", idxColumn: "S0404"},
{tabName: "M_S04", idxName: "M_S04_IDX_010", idxColumn: "S0406"},
{tabName: "M_S05", idxName: "M_S05_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S05", idxName: "M_S05_IDX_002", idxColumn: "S0503"},
{tabName: "M_S05", idxName: "M_S05_IDX_003", idxColumn: "UNID"},
{tabName: "M_S05", idxName: "M_S05_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S05", idxName: "M_S05_IDX_005", idxColumn: "RPT"},
{tabName: "M_S05", idxName: "M_S05_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_S05", idxName: "M_S05_IDX_007", idxColumn: "S0501"},
{tabName: "M_S05", idxName: "M_S05_IDX_008", idxColumn: "S0505"},
{tabName: "M_S05", idxName: "M_S05_IDX_009", idxColumn: "S0504"},
{tabName: "M_S05", idxName: "M_S05_IDX_010", idxColumn: "S0506"},
{tabName: "M_S06", idxName: "M_S06_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S06", idxName: "M_S06_IDX_002", idxColumn: "S0603"},
{tabName: "M_S06", idxName: "M_S06_IDX_003", idxColumn: "UNID"},
{tabName: "M_S06", idxName: "M_S06_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S06", idxName: "M_S06_IDX_005", idxColumn: "RPT"},
{tabName: "M_S06", idxName: "M_S06_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_S06", idxName: "M_S06_IDX_007", idxColumn: "S0601"},
{tabName: "M_S06", idxName: "M_S06_IDX_008", idxColumn: "S0605"},
{tabName: "M_S06", idxName: "M_S06_IDX_009", idxColumn: "S0604"},
{tabName: "M_S06", idxName: "M_S06_IDX_010", idxColumn: "S0606"},
{tabName: "M_S07", idxName: "M_S07_IDX_001", idxColumn: "OUUID"},
{tabName: "M_S07", idxName: "M_S07_IDX_002", idxColumn: "S0703"},
{tabName: "M_S07", idxName: "M_S07_IDX_003", idxColumn: "UNID"},
{tabName: "M_S07", idxName: "M_S07_IDX_004", idxColumn: "ORDERBY"},
{tabName: "M_S07", idxName: "M_S07_IDX_005", idxColumn: "RPT"},
{tabName: "M_S07", idxName: "M_S07_IDX_006", idxColumn: "RPT,UNID"},
{tabName: "M_S07", idxName: "M_S07_IDX_007", idxColumn: "S0701"},
{tabName: "M_S07", idxName: "M_S07_IDX_008", idxColumn: "S0705"},
{tabName: "M_S07", idxName: "M_S07_IDX_009", idxColumn: "S0704"},
{tabName: "M_S07", idxName: "M_S07_IDX_010", idxColumn: "S0706"},
{tabName: "TJ_UN", idxName: "TJ_UN_IDX_001", idxColumn: "RPTYEAR"},
{tabName: "TJ_UN", idxName: "TJ_UN_IDX_002", idxColumn: "SID"},
{tabName: "TJ_UN", idxName: "TJ_UN_IDX_003", idxColumn: "SID,ID"},
{tabName: "TJ_UN", idxName: "TJ_UN_IDX_004", idxColumn: "UORDER"},
{tabName: "J0801", idxName: "J0801_IDX_001", idxColumn: "UNITID"},
{tabName: "J0802", idxName: "J0802_IDX_001", idxColumn: "UNITID"},
{tabName: "J0803", idxName: "J0803_IDX_001", idxColumn: "UNITID"},
{tabName: "J0804", idxName: "J0804_IDX_001", idxColumn: "UNITID"},
{tabName: "J0805", idxName: "J0805_IDX_001", idxColumn: "UNITID"},
{tabName: "J0806", idxName: "J0806_IDX_001", idxColumn: "UNITID"},
{tabName: "J0901", idxName: "J0901_IDX_001", idxColumn: "UNITID"},
{tabName: "J0902", idxName: "J0902_IDX_001", idxColumn: "UNITID"},
{tabName: "J0903", idxName: "J0903_IDX_001", idxColumn: "UNITID"},
{tabName: "J0904", idxName: "J0904_IDX_001", idxColumn: "UNITID"},
{tabName: "J0905", idxName: "J0905_IDX_001", idxColumn: "UNITID"},
{tabName: "J0906", idxName: "J0906_IDX_001", idxColumn: "UNITID"},
{tabName: "J1001", idxName: "J1001_IDX_001", idxColumn: "UNITID"},
{tabName: "J1002", idxName: "J1002_IDX_001", idxColumn: "UNITID"},
{tabName: "J1003", idxName: "J1003_IDX_001", idxColumn: "UNITID"},
{tabName: "J1004", idxName: "J1004_IDX_001", idxColumn: "UNITID"},
{tabName: "J1005", idxName: "J1005_IDX_001", idxColumn: "UNITID"},
{tabName: "J1006", idxName: "J1006_IDX_001", idxColumn: "UNITID"},
{tabName: "J1101", idxName: "J1101_IDX_001", idxColumn: "UNITID"},
{tabName: "J1102", idxName: "J1102_IDX_001", idxColumn: "UNITID"},
{tabName: "J1103", idxName: "J1103_IDX_001", idxColumn: "UNITID"},
{tabName: "J1104", idxName: "J1104_IDX_001", idxColumn: "UNITID"},
{tabName: "J1105", idxName: "J1105_IDX_001", idxColumn: "UNITID"},
{tabName: "J1106", idxName: "J1106_IDX_001", idxColumn: "UNITID"},
{tabName: "J1201", idxName: "J1201_IDX_001", idxColumn: "UNITID"},
{tabName: "J1202", idxName: "J1202_IDX_001", idxColumn: "UNITID"},
{tabName: "J1203", idxName: "J1203_IDX_001", idxColumn: "UNITID"},
{tabName: "J1204", idxName: "J1204_IDX_001", idxColumn: "UNITID"},
{tabName: "J1205", idxName: "J1205_IDX_001", idxColumn: "UNITID"},
{tabName: "J1206", idxName: "J1206_IDX_001", idxColumn: "UNITID"},
{tabName: "J1301", idxName: "J1301_IDX_001", idxColumn: "UNITID"},
{tabName: "J1302", idxName: "J1302_IDX_001", idxColumn: "UNITID"},
{tabName: "J1303", idxName: "J1303_IDX_001", idxColumn: "UNITID"},
{tabName: "J1304", idxName: "J1304_IDX_001", idxColumn: "UNITID"},
{tabName: "J1305", idxName: "J1305_IDX_001", idxColumn: "UNITID"},
{tabName: "J1306", idxName: "J1306_IDX_001", idxColumn: "UNITID"},
{tabName: "J1401", idxName: "J1401_IDX_001", idxColumn: "UNITID"},
{tabName: "J1402", idxName: "J1402_IDX_001", idxColumn: "UNITID"},
{tabName: "J1403", idxName: "J1403_IDX_001", idxColumn: "UNITID"},
{tabName: "J1404", idxName: "J1404_IDX_001", idxColumn: "UNITID"},
{tabName: "J1405", idxName: "J1405_IDX_001", idxColumn: "UNITID"},
{tabName: "J1406", idxName: "J1406_IDX_001", idxColumn: "UNITID"},
{tabName: "J1501", idxName: "J1501_IDX_001", idxColumn: "UNITID"},
{tabName: "J1502", idxName: "J1502_IDX_001", idxColumn: "UNITID"},
{tabName: "J1503", idxName: "J1503_IDX_001", idxColumn: "UNITID"},
{tabName: "J1504", idxName: "J1504_IDX_001", idxColumn: "UNITID"},
{tabName: "J1505", idxName: "J1505_IDX_001", idxColumn: "UNITID"},
{tabName: "J1506", idxName: "J1506_IDX_001", idxColumn: "UNITID"},
{tabName: "J1507", idxName: "J1507_IDX_001", idxColumn: "UNITID"},
{tabName: "J1601", idxName: "J1601_IDX_001", idxColumn: "UNITID"},
{tabName: "J1602", idxName: "J1602_IDX_001", idxColumn: "UNITID"},
{tabName: "J1603", idxName: "J1603_IDX_001", idxColumn: "UNITID"},
{tabName: "J1604", idxName: "J1604_IDX_001", idxColumn: "UNITID"},
{tabName: "J1605", idxName: "J1605_IDX_001", idxColumn: "UNITID"},
{tabName: "J1606", idxName: "J1606_IDX_001", idxColumn: "UNITID"},
{tabName: "J1607", idxName: "J1607_IDX_001", idxColumn: "UNITID"},
{tabName: "J1701", idxName: "J1701_IDX_001", idxColumn: "UNITID"},
{tabName: "J1702", idxName: "J1702_IDX_001", idxColumn: "UNITID"},
{tabName: "J1703", idxName: "J1703_IDX_001", idxColumn: "UNITID"},
{tabName: "J1704", idxName: "J1704_IDX_001", idxColumn: "UNITID"},
{tabName: "J1705", idxName: "J1705_IDX_001", idxColumn: "UNITID"},
{tabName: "J1706", idxName: "J1706_IDX_001", idxColumn: "UNITID"},
{tabName: "J1707", idxName: "J1707_IDX_001", idxColumn: "UNITID"},
{tabName: "J1801", idxName: "J1801_IDX_001", idxColumn: "UNITID"},
{tabName: "J1802", idxName: "J1802_IDX_001", idxColumn: "UNITID"},
{tabName: "J1803", idxName: "J1803_IDX_001", idxColumn: "UNITID"},
{tabName: "J1804", idxName: "J1804_IDX_001", idxColumn: "UNITID"},
{tabName: "J1805", idxName: "J1805_IDX_001", idxColumn: "UNITID"},
{tabName: "J1806", idxName: "J1806_IDX_001", idxColumn: "UNITID"},
{tabName: "J1807", idxName: "J1807_IDX_001", idxColumn: "UNITID"},
{tabName: "J1901", idxName: "J1901_IDX_001", idxColumn: "UNITID"},
{tabName: "J1901", idxName: "J1901_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1902", idxName: "J1902_IDX_001", idxColumn: "UNITID"},
{tabName: "J1902", idxName: "J1902_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1903", idxName: "J1903_IDX_001", idxColumn: "UNITID"},
{tabName: "J1903", idxName: "J1903_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1904", idxName: "J1904_IDX_001", idxColumn: "UNITID"},
{tabName: "J1904", idxName: "J1904_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1905", idxName: "J1905_IDX_001", idxColumn: "UNITID"},
{tabName: "J1905", idxName: "J1905_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1906", idxName: "J1906_IDX_001", idxColumn: "UNITID"},
{tabName: "J1906", idxName: "J1906_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1907", idxName: "J1907_IDX_001", idxColumn: "UNITID"},
{tabName: "J1907", idxName: "J1907_IDX_002", idxColumn: "TABLEID"},
{tabName: "J1908", idxName: "J1908_IDX_001", idxColumn: "UNITID"},
{tabName: "J1908", idxName: "J1908_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2001", idxName: "J2001_IDX_001", idxColumn: "UNITID"},
{tabName: "J2001", idxName: "J2001_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2002", idxName: "J2002_IDX_001", idxColumn: "UNITID"},
{tabName: "J2002", idxName: "J2002_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2003", idxName: "J2003_IDX_001", idxColumn: "UNITID"},
{tabName: "J2003", idxName: "J2003_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2004", idxName: "J2004_IDX_001", idxColumn: "UNITID"},
{tabName: "J2004", idxName: "J2004_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2005", idxName: "J2005_IDX_001", idxColumn: "UNITID"},
{tabName: "J2005", idxName: "J2005_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2006", idxName: "J2006_IDX_001", idxColumn: "UNITID"},
{tabName: "J2006", idxName: "J2006_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2007", idxName: "J2007_IDX_001", idxColumn: "UNITID"},
{tabName: "J2007", idxName: "J2007_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2008", idxName: "J2008_IDX_001", idxColumn: "UNITID"},
{tabName: "J2008", idxName: "J2008_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2101", idxName: "J2101_IDX_001", idxColumn: "UNITID"},
{tabName: "J2101", idxName: "J2101_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2102", idxName: "J2102_IDX_001", idxColumn: "UNITID"},
{tabName: "J2102", idxName: "J2102_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2103", idxName: "J2103_IDX_001", idxColumn: "UNITID"},
{tabName: "J2103", idxName: "J2103_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2104", idxName: "J2104_IDX_001", idxColumn: "UNITID"},
{tabName: "J2104", idxName: "J2104_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2105", idxName: "J2105_IDX_001", idxColumn: "UNITID"},
{tabName: "J2105", idxName: "J2105_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2106", idxName: "J2106_IDX_001", idxColumn: "UNITID"},
{tabName: "J2106", idxName: "J2106_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2107", idxName: "J2107_IDX_001", idxColumn: "UNITID"},
{tabName: "J2107", idxName: "J2107_IDX_002", idxColumn: "TABLEID"},
{tabName: "J2108", idxName: "J2108_IDX_001", idxColumn: "UNITID"},
{tabName: "J2108", idxName: "J2108_IDX_002", idxColumn: "TABLEID"},
}

415
golang_learn/data_func/go_to_windows/winView.go

@ -0,0 +1,415 @@
package main
import (
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
"log"
)
// 初始始化窗体
func GetWindows() error {
icon, _ := walk.NewIconFromResourceId(3)
err := MainWindow{
Visible: false,
AssignTo: &app.mw,
Title: app.title,
Size: Size{Width: 500, Height: 360},
Font: Font{Family: "微软雅黑", PointSize: 9},
Icon: icon,
Layout: VBox{},
MenuItems: []MenuItem{
Menu{
Text: "&编辑",
// Image: "./image//media.png",
Items: []MenuItem{
Separator{},
Action{
// Image: "./image//qinghuancun.png",
Text: "清除缓存",
OnTriggered: clearAll,
},
Action{
// Image: "./image//beifen.png",
Text: "重构索引",
OnTriggered: reDbIndex,
},
Action{
// Image: "./image//beifen.png",
Text: "数据备份",
OnTriggered: dbBak,
},
/*Action{
// Image: "./image//huanyuan.png",
Text: "数据还原",
OnTriggered: reDbBak,
},*/
Action{
// Image: "./image//tuichu.png",
Text: "退出",
OnTriggered: func() {
walk.App().Exit(0)
},
},
},
},
Menu{
Text: "&设置",
// Image: "./image//shezhi.png",
Items: []MenuItem{
Separator{},
Action{
// Image: "./image//shujuku.png",
Text: "设置数据库内存",
OnTriggered: setDbSize,
},
Action{
// Image: "./image//yingyong.png",
Text: "设置应用内存",
OnTriggered: setServerSize,
},
},
},
Menu{
Text: "&帮助",
// Image: "./image//bangzhu.png",
Items: []MenuItem{
Action{
// Image: "./image//guanyu.png",
Text: "关于",
OnTriggered: app.aboutactionTriggered,
},
/*Action{
// Image: "./image//yaoqiu.png",
Text: "要求",
OnTriggered: app.aboutactionTriggered,
},*/
},
},
},
Children: []Widget{GroupBox{
Title: "基础服务状态",
Layout: Grid{Columns: 3},
Children: []Widget{
Label{Text: service1.text, MinSize: Size{Width: 220, Height: 30}, TextColor: walk.RGB(255, 255, 0)},
Label{AssignTo: &service1.labelState, Text: "正在运行", MinSize: Size{Width: 80, Height: 30}},
Composite{
Layout: HBox{},
MaxSize: Size{Width: 198, Height: 30},
Children: []Widget{
PushButton{
AssignTo: &service1.btnRegister,
MaxSize: Size{Width: 60, Height: 30},
Text: "注册表",
},
PushButton{
AssignTo: &service1.btnStop,
MaxSize: Size{Width: 60, Height: 30},
Text: "停止",
},
PushButton{
AssignTo: &service1.btnStart,
MaxSize: Size{Width: 60, Height: 30},
Text: "启动",
},
},
},
},
}, GroupBox{
Title: "业务服务状态",
Layout: Grid{Columns: 3},
Children: []Widget{
Label{Text: service3.text, MinSize: Size{Width: 220, Height: 30}},
Label{AssignTo: &service3.labelState, Text: "正在运行", MinSize: Size{Width: 80, Height: 30}},
Composite{
Layout: HBox{},
MaxSize: Size{Width: 198, Height: 30},
Children: []Widget{
PushButton{
AssignTo: &service3.btnRegister,
MaxSize: Size{Width: 60, Height: 30},
Text: "注册表",
},
PushButton{
AssignTo: &service3.btnStop,
MaxSize: Size{Width: 60, Height: 30},
Text: "停止",
},
PushButton{
AssignTo: &service3.btnStart,
MaxSize: Size{Width: 60, Height: 30},
Text: "启动",
},
},
},
},
}, TextEdit{AssignTo: &app.msg, VScroll: true, ReadOnly: true}, Composite{
Layout: HBox{},
Children: []Widget{
PushButton{
MinSize: Size{Width: 200, Height: 30},
Text: "打开windows服务管理程序",
OnClicked: openServices,
},
HSpacer{},
PushButton{
MinSize: Size{Width: 140, Height: 30},
Text: "关闭本监控窗口",
OnClicked: func() {
walk.App().Exit(0)
},
},
},
}},
OnSizeChanged: func() {
_ = app.mw.SetSize(walk.Size(Size{Width: 500, Height: 360}))
},
}.Create()
winLong := win.GetWindowLong(app.mw.Handle(), win.GWL_STYLE)
// 不能调整窗口大小,禁用最大化按钮
win.SetWindowLong(app.mw.Handle(), win.GWL_STYLE, winLong & ^win.WS_SIZEBOX & ^win.WS_MAXIMIZEBOX & ^win.WS_SIZEBOX)
// 设置窗体生成在屏幕的正中间,并处理高分屏的情况
// 窗体横坐标 = ( 屏幕宽度 - 窗体宽度 ) / 2
// 窗体纵坐标 = ( 屏幕高度 - 窗体高度 ) / 2
_ = app.mw.SetX((int(win.GetSystemMetrics(0)) - app.mw.Width()) / 2 / app.mw.DPI() * 96)
_ = app.mw.SetY((int(win.GetSystemMetrics(1)) - app.mw.Height()) / 2 / app.mw.DPI() * 96)
return err
}
//数据库配置结构
type DbSetings struct {
InnodbBufferPoolSize int // 数据库缓存大小
}
// 运行 数据库设置 Dialog
func (mw *myApp) RunDbSetingDialog(owner walk.Form, confirmCall func(*DbSetings)) {
var seting *DbSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(DbSetings)
// 设置预定值
seting.InnodbBufferPoolSize = 512
_, _ = Dialog{
AssignTo: &dlg,
Title: "数据源内存设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 160},
Layout: VBox{},
Children: []Widget{
Composite{
Layout: Grid{Columns: 2},
Children: []Widget{
Label{Text: `      数据库内存:`},
NumberEdit{Value: Bind("InnodbBufferPoolSize", Range{Min: 64, Max: 10240}), Suffix: " M", Decimals: 0},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "保存",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】处理设置数据库内存时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// 应用 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
//应用配置结构
type AppSetings struct {
PermSize int // 非堆区初始内存分配大小
MaxPermSize int // 非堆区分配的内存的最大上限
Xms int // 堆区内存初始内存分配的大小
Xmx int // 堆区内存可被分配的最大上限
}
// 运行 应用设置 Dialog
func (mw *myApp) RunAppSetingDialog(owner walk.Form, confirmCall func(*AppSetings)) {
var seting *AppSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(AppSetings)
// 设置预定值
seting.PermSize = 128
seting.MaxPermSize = 256
seting.Xmx = 512
seting.Xms = 512
_, _ = Dialog{
AssignTo: &dlg,
Title: "应用内存设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 270},
Layout: VBox{},
Children: []Widget{
Composite{
Layout: Grid{Columns: 2},
Children: []Widget{
Label{Text: `  PermSize(非堆区)初始内存分配大小:`},
NumberEdit{Value: Bind("PermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `MaxPermSize(非堆区)最大内存分配上限:`},
NumberEdit{Value: Bind("MaxPermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `      Xms(堆区)初始内存分配大小:`},
NumberEdit{Value: Bind("Xms", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
Label{Text: `      Xmx(堆区)最大内存分配上限:`},
NumberEdit{Value: Bind("Xmx", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "保存",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】处理设置数据库内存时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// DB 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
//数据还原设置
type DbBakSetings struct {
*walk.MainWindow
searchBox *walk.LineEdit
path string
}
// 运行 数据还原设置 Dialog
func (mw *myApp) RunDbBakSetingDialog(owner walk.Form, confirmCall func(*DbBakSetings)) {
var seting *DbBakSetings
var dlg *walk.Dialog
var db *walk.DataBinder
var acceptPB, cancelPB *walk.PushButton
seting = new(DbBakSetings)
// 设置预定值
_, _ = Dialog{
AssignTo: &dlg,
Title: "数据还原设置",
Font: Font{Family: "微软雅黑", PointSize: 9},
DefaultButton: &acceptPB,
CancelButton: &cancelPB,
DataBinder: DataBinder{
AssignTo: &db,
Name: "setings",
DataSource: seting,
ErrorPresenter: ToolTipErrorPresenter{},
},
MinSize: Size{Width: 450, Height: 220},
Layout: VBox{},
Children: []Widget{
GroupBox{
Layout: HBox{},
Children: []Widget{
LineEdit{
ReadOnly: true,
AssignTo: &seting.searchBox,
},
PushButton{
Text: "选择",
OnClicked: seting.selectFile,
},
},
},
Composite{
Layout: HBox{},
Children: []Widget{
HSpacer{},
PushButton{
AssignTo: &acceptPB,
Text: "恢复",
OnClicked: func() {
if err := db.Submit(); err != nil {
showMsg("【异常】选择恢复文件时,发生异常!")
log.Fatal(err)
return
}
// 关闭页面
dlg.Cancel()
// DB 回调函数
confirmCall(seting)
},
},
PushButton{
AssignTo: &cancelPB,
Text: "取消",
OnClicked: func() {
dlg.Cancel()
},
},
},
},
},
}.Run(owner)
}
Loading…
Cancel
Save