Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented the integrated system tray #59

Merged
merged 13 commits into from
Jan 31, 2024
Merged

Conversation

half-nothing
Copy link
Contributor

@half-nothing half-nothing commented Jan 31, 2024

Finish feature from #40

  1. 整合所有桌宠到一个系统托盘图标内
  2. 现在启动器不会退出(退出需要右键托盘->退出程序),而是会一直在后台运行,点击托盘图标即可呼出
    image
  3. 可以在系统托盘内控制所有桌宠,也可以直接右键桌宠(这是本来就有的功能)
    image
    image
  4. 所有桌宠会随着启动器的退出而一并退出(可以选择开启或者关闭)

PS: 还有一个分支,改了一下资源文件的位置,不知道要不要交PR

@isHarryh isHarryh self-requested a review January 31, 2024 14:05
@isHarryh
Copy link
Owner

That's a REALLY exciting feature. Thank you for your commitment. Let me have a detailed check.

@isHarryh isHarryh added the Enhancement New feature or request label Jan 31, 2024
Copy link
Owner

@isHarryh isHarryh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@isHarryh isHarryh merged commit 0567d38 into isHarryh:v3.x Jan 31, 2024
1 check passed
@isHarryh
Copy link
Owner

isHarryh commented Feb 2, 2024

There are still something to be accomplished. Sending a new PR is appreciated.

下面总结一下新托盘系统待完善的内容:

  1. 现状:当前托盘建立在一个与JavaFX绑定的SocketServer上,该服务器使用8080端口进行,端口号可以通过配置文件更改。建议:硬编码一个静态的备选端口列表(8080端口常用于代理服务器所以不建议使用,考虑下列端口,8686 8866 8989 8899 8800),每次启动服务器前,查询上述端口占用情况,并选择第一个空闲端口。

  2. 现状:启动器未实现单实例启动。建议:结合(1)的方案,每次启动启动器时,验证上述所有端口是否为ArkPets服务器。如果已存在一个服务器,那么这个启动器就是多余实例,此时这个启动器向已存在的服务器发送ACTIVATE_LAUNCHER激活消息,然后服务器弹出它的启动器界面,同时,多余实例结束运行。如果不存在服务器,那么它将在第一个空闲备选端口建立服务器,并继续程序逻辑运行。

@half-nothing
Copy link
Contributor Author

There are still something to be accomplished. Sending a new PR is appreciated.

下面总结一下新托盘系统待完善的内容:

  1. 现状:当前托盘建立在一个与JavaFX绑定的SocketServer上,该服务器使用8080端口进行,端口号可以通过配置文件更改。建议:硬编码一个静态的备选端口列表(8080端口常用于代理服务器所以不建议使用,考虑下列端口,8686 8866 8989 8899 8800),每次启动服务器前,查询上述端口占用情况,并选择第一个空闲端口。
  2. 现状:启动器未实现单实例启动。建议:结合(1)的方案,每次启动启动器时,验证上述所有端口是否为ArkPets服务器。如果已存在一个服务器,那么这个启动器就是多余实例,此时这个启动器向已存在的服务器发送ACTIVATE_LAUNCHER激活消息,然后服务器弹出它的启动器界面,同时,多余实例结束运行。如果不存在服务器,那么它将在第一个空闲备选端口建立服务器,并继续程序逻辑运行。

Take your advice. I'll make it happen sometime.Maybe not until next year

@isHarryh isHarryh changed the title System tray icon function enhanced Implemented the integrated system tray Feb 3, 2024
isHarryh added a commit that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants