Documentation
¶
Index ¶
- func AutoUpdate(configFile string, execJS func(jsCode string))
- func CareteDir(path string)
- func ExecJS(jsCode string)
- func GetCurrentDirectory() string
- func HtmlPrint(htmlInfo, printerDrive string) map[string]interface{}
- func HtmlToPdf(htmlInfo string) map[string]interface{}
- func InitLog()
- func LockFile() bool
- func PathExists(path string) (bool, error)
- func PrintPdf(pdfPath, params, printerDrive string) map[string]interface{}
- func Read(cfg *ini.File, section string, key string) string
- func ReadConfig(file string, section string, key string) string
- func SaveWindowInfo(ctx context.Context)
- func SendUdp(msg string)
- func WailsOptions(jsBind []interface{}, iconInfos map[string][]byte, assets embed.FS, ...) *options.App
- type AppFun
- func (a *AppFun) BeforeClose(ctx context.Context) (prevent bool)
- func (a *AppFun) ChangeWindowOnTop() bool
- func (a *AppFun) CloseApp() string
- func (a *AppFun) CloseAppNoQuest()
- func (a *AppFun) DomReady(ctx context.Context)
- func (a *AppFun) ErrorMsg(sTitle, sMessage string)
- func (a *AppFun) GetPrintName() map[string]interface{}
- func (a *AppFun) HasWindow() string
- func (a *AppFun) HtmlPrint(htmlInfo, printerDrive string) map[string]interface{}
- func (a *AppFun) HtmlToPdf(htmlInfo string) map[string]interface{}
- func (a *AppFun) InfoMsg(sTitle, sMessage string)
- func (a *AppFun) IsWindowOnTop() bool
- func (a *AppFun) OpenDirectoryDialog(dialogOption string) (bool, string, interface{})
- func (a *AppFun) OpenFile(defaultPath string) (bool, string, interface{})
- func (a *AppFun) OpenFileDialog(dialogOption string) (bool, string, interface{})
- func (a *AppFun) OpenProgram(programPath, params string) map[string]interface{}
- func (a *AppFun) PrintPdf(pdfPath, params, printerDrive string) map[string]interface{}
- func (a *AppFun) QuestionMsg(sTitle, sMessage string) string
- func (a *AppFun) ReadAppConfig(section, key string) map[string]interface{}
- func (a *AppFun) ReadFile(path string) (bool, string, interface{})
- func (a *AppFun) SaveAsFile(defaultPath string, text string) (bool, string, interface{})
- func (a *AppFun) SaveFile(path string, text string) (bool, string, interface{})
- func (a *AppFun) SaveFileDialog(dialogOption string) (bool, string, interface{})
- func (a *AppFun) SendMsg(msg string)
- func (a *AppFun) SetPositionByIni()
- func (a *AppFun) SetWindwIsShow(bl bool)
- func (a *AppFun) Shutdown(ctx context.Context)
- func (a *AppFun) Startup(ctx context.Context)
- func (a *AppFun) SystemType() string
- func (a *AppFun) WarningMsg(sTitle, sMessage string)
- func (a *AppFun) WindowExecJS(jsCode string)
- func (a *AppFun) WindowFullscreen()
- func (a *AppFun) WindowHide()
- func (a *AppFun) WindowIsMaximised() bool
- func (a *AppFun) WindowIsMinimised() bool
- func (a *AppFun) WindowMaximise()
- func (a *AppFun) WindowMinimise()
- func (a *AppFun) WindowOnTop(top bool)
- func (a *AppFun) WindowPrint() string
- func (a *AppFun) WindowShow()
- func (a *AppFun) WindowToggleMaximise()
- func (a *AppFun) WindowUnminimise()
- func (a *AppFun) WindwIsShow() bool
- type CustomLogger
- func (*CustomLogger) Critical(message string)
- func (*CustomLogger) Debug(message string)
- func (*CustomLogger) Error(message string)
- func (*CustomLogger) Fatal(message string)
- func (*CustomLogger) Info(message string)
- func (*CustomLogger) Print(message string)
- func (*CustomLogger) Trace(message string)
- func (*CustomLogger) Warning(message string)
- type FileLoaderServer
- type HtmlToPdfInfo
- type SystemTray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveWindowInfo ¶
Types ¶
type AppFun ¶
type AppFun struct {
SysType string //系统类型
IsShow bool //窗体当前是否显示
UseBeforeClose bool //是否显示关闭前提示
IsOnTop bool //窗口是否置顶
Ctx context.Context
Width int
Height int
Top int
Left int
IsMaxWindow bool
ClearTrayFun func() //清理托盘函数
// contains filtered or unexported fields
}
App struct
func (*AppFun) CloseAppNoQuest ¶
func (a *AppFun) CloseAppNoQuest()
func (*AppFun) OpenDirectoryDialog ¶
打开选择目录对话框
func (*AppFun) OpenFileDialog ¶
打开选择文件对话框
func (*AppFun) OpenProgram ¶
打开外部程序,并传递参数
func (*AppFun) PrintPdf ¶
*
- 打印机PDF文件
- @param pdfPath 待打印文件路径
- @param params 打印参数
- @param printerDrive 打印机名称
func (*AppFun) QuestionMsg ¶
Question消息
func (*AppFun) ReadAppConfig ¶
读取系统配置文件配置值
func (*AppFun) SaveAsFile ¶
另存文件
func (*AppFun) SaveFileDialog ¶
打开保存文件对话框
func (*AppFun) SystemType ¶
type CustomLogger ¶
type CustomLogger struct{}
CustomLogger 实现github.com/wailsapp/wails/v2/pkg/logger里logger.Logger接口的自定义日志器的结构体
func GetLog ¶
func GetLog() *CustomLogger
func (*CustomLogger) Critical ¶
func (*CustomLogger) Critical(message string)
Critical 实现了 logger.Logger 接口的 Critical 方法
func (*CustomLogger) Debug ¶
func (*CustomLogger) Debug(message string)
Debug 实现了 logger.Logger 接口的 Debug 方法
func (*CustomLogger) Error ¶
func (*CustomLogger) Error(message string)
Error 实现了 logger.Logger 接口的 Error 方法
func (*CustomLogger) Fatal ¶
func (*CustomLogger) Fatal(message string)
Fatal 实现了 logger.Logger 接口的 Fatal 方法
func (*CustomLogger) Info ¶
func (*CustomLogger) Info(message string)
Info 实现了 logger.Logger 接口的 Info 方法
func (*CustomLogger) Print ¶
func (*CustomLogger) Print(message string)
Panic 实现了 logger.Logger 接口的 Panic 方法
func (*CustomLogger) Trace ¶
func (*CustomLogger) Trace(message string)
Panic 实现了 logger.Logger 接口的 Panic 方法
func (*CustomLogger) Warning ¶
func (*CustomLogger) Warning(message string)
Warning 实现了 logger.Logger 接口的 Warning 方法
type FileLoaderServer ¶
func NewFileLoader ¶
func NewFileLoader() *FileLoaderServer
func (*FileLoaderServer) ServeHTTP ¶
func (h *FileLoaderServer) ServeHTTP(res http.ResponseWriter, req *http.Request)
type HtmlToPdfInfo ¶
type HtmlToPdfInfo struct {
PdfName string `json:"pdfName"` //生成的pdf文件名
CenterHtml string `json:"centerHtml"` //正文
HeadHtml string `json:"headHtml"` //页头
FootHtml string `json:"footHtml"` //页脚
PageSize string `json:"pageSize"` //纸张大小(类型)
PageWidth string `json:"pageWidth"` //自定义纸张宽度
PageHeight string `json:"pageHeight"` //自定义纸张高度
Orientation int `json:"orientation"` //纸张方向
Margin []float64 `json:"margin"` //页边距(上下左右)
}
html打印信息
type SystemTray ¶
type SystemTray struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.