gpt4 book ai didi

c# - StatusIcon 未出现在通知区域

转载 作者:太空宇宙 更新时间:2023-11-03 11:28:44 33 4
gpt4 key购买 nike

我正在使用以下代码在 ubuntu 11.10 (gtksharp 2.12) 中显示通知图标

StatusIcon icon = StatusIcon.NewFromStock(Stock.Harddisk);
icon.Visible = true;

但是图标没有出现。

你有什么建议吗?

最佳答案

较新版本的 Ubuntu(使用 Unity)使用名为 Application Indicators 的通知图标新系统/库使用应用程序库。我建议您查看使用 appindicator-sharp 来创建指标。您可以查看示例补丁,了解它是如何在 Tomboy here 中实现的。 .为了让某些东西同时适用于 Unity/Ubuntu 和其他传统桌面环境,我建议您采用类似于 Tomboy 中的方法,在运行时检测您应该创建哪种样式的“通知图标”。

关于c# - StatusIcon 未出现在通知区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8521458/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com