a3a722689e
- 列表重建:KPI 卡、状态+时间列、操作改眼睛开右侧详情抽屉、重置右置 - 详情抽屉(order_detail_drawer) 100% 还原原型 + SelectionArea 可选中复制 - 详细搜索弹窗:ComboSearchField/滚轮日期、字段重构、白底盒子按钮 - 工具栏:搜索框×清除+占位精简、供应商/客户下拉取全部、状态菜单收窄 - 加载不白屏(半透明遮罩)、输入框与下拉等高、windows/macOS 默认窗口尺寸调大 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
58 lines
1.9 KiB
C++
58 lines
1.9 KiB
C++
#include <flutter/dart_project.h>
|
|
#include <flutter/flutter_view_controller.h>
|
|
#include <windows.h>
|
|
|
|
#include <string>
|
|
|
|
#include "flutter_window.h"
|
|
#include "utils.h"
|
|
|
|
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|
_In_ wchar_t *command_line, _In_ int show_command) {
|
|
// Attach to console when present (e.g., 'flutter run') or create a
|
|
// new console when running with a debugger.
|
|
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
|
|
CreateAndAttachConsole();
|
|
}
|
|
|
|
// Initialize COM, so that it is available for use in the library and/or
|
|
// plugins.
|
|
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
|
|
|
flutter::DartProject project(L"data");
|
|
|
|
std::vector<std::string> command_line_arguments =
|
|
GetCommandLineArguments();
|
|
|
|
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
|
|
|
FlutterWindow window(project);
|
|
Win32Window::Point origin(10, 10);
|
|
Win32Window::Size size(1440, 900);
|
|
// Window title as UTF-8 bytes (hex-escaped to keep this source pure ASCII and
|
|
// avoid MSVC C4819 under GBK code page 936). Decoded to UTF-16 for Win32.
|
|
// Bytes below are the UTF-8 encoding of the Chinese app title.
|
|
const std::string title_utf8 =
|
|
"\xE5\xB2\xA9\xE7\xBE\x8E\xE9\x85\x92\xE5\xBA\x93";
|
|
int title_len = ::MultiByteToWideChar(CP_UTF8, 0, title_utf8.c_str(), -1,
|
|
nullptr, 0);
|
|
std::wstring window_title(title_len > 0 ? title_len - 1 : 0, L'\0');
|
|
if (title_len > 0) {
|
|
::MultiByteToWideChar(CP_UTF8, 0, title_utf8.c_str(), -1, &window_title[0],
|
|
title_len);
|
|
}
|
|
if (!window.Create(window_title, origin, size)) {
|
|
return EXIT_FAILURE;
|
|
}
|
|
window.SetQuitOnClose(true);
|
|
|
|
::MSG msg;
|
|
while (::GetMessage(&msg, nullptr, 0, 0)) {
|
|
::TranslateMessage(&msg);
|
|
::DispatchMessage(&msg);
|
|
}
|
|
|
|
::CoUninitialize();
|
|
return EXIT_SUCCESS;
|
|
}
|