package main import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) type App struct { app fyne.App window fyne.Window serverContent []byte platformContent []byte fileName string filePath string fileSize int64 // Виджеты, которые часто обновляем statusLabel *widget.Label fileInfo *widget.Label version *widget.Label progressBar *widget.ProgressBar contentArea *fyne.Container serverTab *container.AppTabs platformTab *container.AppTabs } var iconData = []byte{0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x04, 0x03, 0x00, 0x00, 0x00, 0x81, 0x54, 0x67, 0xc7, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x00, 0x00, 0x7a, 0x26, 0x00, 0x00, 0x80, 0x84, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x00, 0x80, 0xe8, 0x00, 0x00, 0x75, 0x30, 0x00, 0x00, 0xea, 0x60, 0x00, 0x00, 0x3a, 0x98, 0x00, 0x00, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x00, 0x00, 0x00, 0x30, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x93, 0xd6, 0xff, 0x90, 0xd5, 0xff, 0x91, 0xd5, 0xff, 0x92, 0xd6, 0xff, 0xae, 0xe0, 0xff, 0xf2, 0xfa, 0xff, 0xfb, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xef, 0xff, 0xd9, 0xf0, 0xff, 0xd1, 0xed, 0xff, 0xfc, 0xfe, 0xff, 0xa0, 0xdb, 0xff, 0xa7, 0xde, 0xff, 0xc0, 0xe7, 0xff, 0x52, 0x19, 0x63, 0x47, 0x00, 0x00, 0x00, 0x01, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x88, 0x05, 0x1d, 0x48, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x37, 0x5c, 0x00, 0x00, 0x37, 0x5c, 0x01, 0xcb, 0xc7, 0xa4, 0xb9, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xea, 0x02, 0x0e, 0x09, 0x10, 0x08, 0xaa, 0xdc, 0x17, 0xfb, 0x00, 0x00, 0x00, 0xe2, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x6d, 0x92, 0xbd, 0x0d, 0xc2, 0x30, 0x10, 0x85, 0x1f, 0x47, 0x45, 0x87, 0xa3, 0x0c, 0xe0, 0x38, 0x80, 0x04, 0x08, 0x84, 0xb2, 0x41, 0x50, 0x26, 0x40, 0x62, 0x01, 0x0a, 0x60, 0x02, 0x68, 0xa8, 0x11, 0x25, 0x62, 0x04, 0x46, 0x60, 0x09, 0x7a, 0x7a, 0x1a, 0x16, 0x81, 0x3b, 0xe3, 0x38, 0xc8, 0xe6, 0x2b, 0x2c, 0xbf, 0x17, 0xfb, 0x7c, 0x3f, 0x41, 0x4b, 0x31, 0xb9, 0xd2, 0xa4, 0x0a, 0xd9, 0x75, 0x21, 0xab, 0x21, 0x31, 0xb4, 0x91, 0xbd, 0x35, 0x34, 0x34, 0x40, 0x20, 0x67, 0xa4, 0x6a, 0x06, 0x4b, 0x5b, 0x95, 0xd6, 0xd0, 0x06, 0x30, 0x0c, 0xaf, 0x24, 0x46, 0xca, 0xdf, 0x72, 0x39, 0x5c, 0xf0, 0xa6, 0xb4, 0x27, 0x60, 0xa3, 0x71, 0x6c, 0xd0, 0xf7, 0x0a, 0x55, 0x0e, 0x2d, 0x46, 0x92, 0xa3, 0xbf, 0x74, 0x2c, 0x50, 0x64, 0x48, 0x80, 0xcd, 0xde, 0xb1, 0x03, 0x32, 0xce, 0x80, 0x4e, 0x1e, 0x16, 0x28, 0xd0, 0x69, 0x8c, 0x33, 0x72, 0x28, 0x3d, 0x6a, 0x8c, 0x2b, 0xf1, 0x2b, 0xf8, 0x35, 0x58, 0x1a, 0x8c, 0xef, 0x75, 0xd0, 0xc3, 0x8d, 0x25, 0x30, 0x59, 0x7a, 0x1e, 0xb6, 0xa6, 0x5e, 0xe5, 0x99, 0xb3, 0x34, 0x98, 0xbe, 0x3d, 0x2f, 0x96, 0x0a, 0xc3, 0x26, 0xe8, 0x85, 0x65, 0xf4, 0x6c, 0x94, 0x58, 0x94, 0x3a, 0x17, 0xb7, 0xad, 0xf5, 0x51, 0x8a, 0xe3, 0xf2, 0x07, 0x6b, 0xc7, 0x4a, 0xca, 0x97, 0x06, 0x3d, 0x1d, 0xda, 0x75, 0x2c, 0x68, 0xe1, 0x9f, 0x26, 0x07, 0x63, 0x88, 0x07, 0x15, 0x8d, 0x32, 0x18, 0x76, 0xf8, 0x3b, 0x7c, 0x00, 0x1a, 0xb4, 0x74, 0x9d, 0x66, 0xa4, 0x3d, 0x9a, 0x00, 0x00, 0x00, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x00, 0x32, 0x30, 0x32, 0x36, 0x2d, 0x30, 0x32, 0x2d, 0x31, 0x34, 0x54, 0x30, 0x38, 0x3a, 0x33, 0x32, 0x3a, 0x33, 0x35, 0x2b, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x42, 0xed, 0xf0, 0x52, 0x00, 0x00, 0x00, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x00, 0x32, 0x30, 0x32, 0x36, 0x2d, 0x30, 0x31, 0x2d, 0x31, 0x34, 0x54, 0x31, 0x34, 0x3a, 0x33, 0x39, 0x3a, 0x31, 0x35, 0x2b, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x2d, 0x96, 0x6a, 0x40, 0x00, 0x00, 0x00, 0x28, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x32, 0x30, 0x32, 0x36, 0x2d, 0x30, 0x32, 0x2d, 0x31, 0x34, 0x54, 0x30, 0x39, 0x3a, 0x31, 0x36, 0x3a, 0x30, 0x38, 0x2b, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x07, 0xec, 0xcf, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82} func NewApp() *App { a := &App{ app: app.NewWithID("com.ispsystem.dci6-support-reader"), } a.window = a.app.NewWindow("ISPSystem Техподдержка DCImanager6") // icon, err := fyne.LoadResourceFromPath("./dci6-support-reader.jpg") // if err != nil { // log.Printf("Загрузка иконки: %s", err) // } icon := fyne.NewStaticResource("dci6-support-reader.png", iconData) a.window.SetIcon(icon) return a } func (a *App) Run() { a.buildUI() a.window.Resize(fyne.NewSize(1200, 600)) a.window.ShowAndRun() } func main() { app := NewApp() app.Run() }