Documentation
¶
Index ¶
- Constants
- Variables
- func ColumnSortable2() walk.KeyEventHandler
- func InitWin()
- func OpenDB() (db *sql.DB, err error)
- func Ping() bool
- type CanAddPage
- type CustomWindow
- type DBToolBar
- type DataModel
- type EnvItem
- type EnvModel
- type LineNumberTextEdit
- type MyTreeView
- type Option
- type Organization
- type OrganizationEntity
- type OrganizationTreeModel
- type SearchCanTable
- type Session
- type SessionModel
- type Settings
- type TabMainWindow
- type TargetCanTable
- type TreeNode
- type TreeViewModel
- func (tvm *TreeViewModel) ChildCount(index int) int
- func (tvm *TreeViewModel) Count() int
- func (tvm *TreeViewModel) Data() interface{}
- func (tvm *TreeViewModel) Index(parent int, childIndex int, childCount int) int
- func (tvm *TreeViewModel) Parent(index int) int
- func (tvm *TreeViewModel) Value(index int) interface{}
- type VehicleTypeAddForm
Constants ¶
View Source
const ( USER = "root" // MySQL username PASSWORD = "password" // MySQL password HOST = "localhost" // MySQL server host DATABASE = "your_database" // Database name )
MySQL connection parameters
Variables ¶
View Source
var LIB_OPTIONS = []Option{
{Key: "01", Value: "libmariadb.dll"},
{Key: "02", Value: "libmysql-6.1.dll"},
{Key: "03", Value: "libmysql.dll"},
}
View Source
var NET_TYPE_OPTIONS = []Option{
{Key: "01", Value: "MariaDB or MySQL (TCP/IP)"},
{Key: "02", Value: "MariaDB or MySQL (named pipe)"},
{Key: "03", Value: "MariaDB or MySQL (SSH tunnel)"},
{Key: "04", Value: "ProxySQL Admin (Experimental)"},
{Key: "05", Value: "MySQL on RDS"},
{Key: "06", Value: "Microsoft SQL Server (named pipe) "},
{Key: "07", Value: "Microsoft SQL Server (TCP/P)"},
{Key: "08", Value: "Microsoft SQL Server (SPX/IPX)"},
{Key: "09", Value: "Microsoft SQL Server (Banyan VINES)"},
{Key: "10", Value: "Microsoft SQL Server (Windows RPC)"},
{Key: "11", Value: "PostgreSQL (TCP/IP)"},
{Key: "12", Value: "PostgreSQL (SSH tunnel)"},
}
Functions ¶
func ColumnSortable2 ¶
func ColumnSortable2() walk.KeyEventHandler
Types ¶
type CanAddPage ¶
VehicleTypeAddPage 页面对象
func ImportCanFromBigdataPanel ¶
func ImportCanFromBigdataPanel(parent walk.Container, mainWin *TabMainWindow) (*CanAddPage, error)
ImportCanFromBigdataPanel 从大数据XML导入CAN
type CustomWindow ¶
type CustomWindow struct {
// contains filtered or unexported fields
}
CustomWindow 结构体定义了新窗口
func NewCustomWindow ¶
func NewCustomWindow(owner walk.Form) *CustomWindow
NewCustomWindow 创建并返回一个 CustomWindow 的实例
type DataModel ¶
type DataModel struct { walk.TableModelBase // contains filtered or unexported fields }
DataModel to be used in TableView
func (*DataModel) ColumnCount ¶
type EnvModel ¶
type EnvModel struct { walk.ListModelBase // contains filtered or unexported fields }
func NewEnvModel ¶
func NewEnvModel() *EnvModel
type LineNumberTextEdit ¶
func NewLineNumberTextEdit ¶
func NewLineNumberTextEdit(parent walk.Container) (*LineNumberTextEdit, error)
func (*LineNumberTextEdit) Create ¶
func (ln *LineNumberTextEdit) Create(builder *Builder) error
type MyTreeView ¶
type Organization ¶
type Organization struct {
// contains filtered or unexported fields
}
func NewOrganization ¶
func NewOrganization(id string, orgName string, parent *Organization) *Organization
func (*Organization) ChildCount ¶
func (org *Organization) ChildCount() int
func (*Organization) Parent ¶
func (org *Organization) Parent() walk.TreeItem
func (*Organization) ResetChildren ¶
func (org *Organization) ResetChildren() error
func (*Organization) Text ¶
func (org *Organization) Text() string
type OrganizationEntity ¶
func (*OrganizationEntity) ListSubOrg ¶
func (org *OrganizationEntity) ListSubOrg() ([]*OrganizationEntity, error)
type OrganizationTreeModel ¶
type OrganizationTreeModel struct { walk.TreeModelBase // contains filtered or unexported fields }
func NewOrganizationTreeModel ¶
func NewOrganizationTreeModel() (*OrganizationTreeModel, error)
func NewOrganizationTreeModel2 ¶
func NewOrganizationTreeModel2() *OrganizationTreeModel
func (*OrganizationTreeModel) LazyPopulation ¶
func (*OrganizationTreeModel) LazyPopulation() bool
func (*OrganizationTreeModel) RootAt ¶
func (m *OrganizationTreeModel) RootAt(index int) walk.TreeItem
func (*OrganizationTreeModel) RootCount ¶
func (m *OrganizationTreeModel) RootCount() int
type SearchCanTable ¶
type SearchCanTable struct { walk.TableModelBase walk.SorterBase // contains filtered or unexported fields }
过滤can
type Session ¶
type Session struct { SessionName string // 会话名称 Host string // 主机 LastConnectTime string // 上次连接 Remark string // 注释 }
定义数据模型结构体
type SessionModel ¶
type SessionModel struct { walk.TableModelBase walk.SorterBase // contains filtered or unexported fields }
定义 Session 模型
func NewSessionModel ¶
func NewSessionModel(data []Session) *SessionModel
NewSessionModel 创建一个新的 SessionModel
func (*SessionModel) ColumnSortable ¶
func (m *SessionModel) ColumnSortable(col int) bool
ColumnSortable 返回指定列是否可排序
type TabMainWindow ¶
type TabMainWindow struct { *walk.MainWindow TabWidget *walk.TabWidget // contains filtered or unexported fields }
func (*TabMainWindow) AddVehicleType ¶
func (mw *TabMainWindow) AddVehicleType()
type TargetCanTable ¶
type TargetCanTable struct { walk.TableModelBase walk.SorterBase // contains filtered or unexported fields }
TargetCanTable 目标can
type TreeViewModel ¶
TreeViewModel 用于将 TreeNode 数据绑定到 TreeView
func NewTreeViewModel ¶
func NewTreeViewModel(rootNodes []*TreeNode) *TreeViewModel
func (*TreeViewModel) ChildCount ¶
func (tvm *TreeViewModel) ChildCount(index int) int
func (*TreeViewModel) Count ¶
func (tvm *TreeViewModel) Count() int
func (*TreeViewModel) Data ¶
func (tvm *TreeViewModel) Data() interface{}
func (*TreeViewModel) Index ¶
func (tvm *TreeViewModel) Index(parent int, childIndex int, childCount int) int
func (*TreeViewModel) Parent ¶
func (tvm *TreeViewModel) Parent(index int) int
func (*TreeViewModel) Value ¶
func (tvm *TreeViewModel) Value(index int) interface{}
type VehicleTypeAddForm ¶
func NewVehicleTypeAddPage ¶
func NewVehicleTypeAddPage(parent walk.Container, mw *TabMainWindow) (*VehicleTypeAddForm, error)
Click to show internal directories.
Click to hide internal directories.