我正在编写一个天气应用程序。我正在将它与任务栏集成。当您右键单击任务栏上的图标时,它会显示当前温度等。当前,如果您单击显示“当前:...”的文本,它将打开应用程序的另一个实例。
截屏:
我怎样才能让它在我的程序中运行一个过程或函数?因此,如果用户单击“当前:...”,它应该在同一应用程序中打开一个新表单。它不应该打开另一个应用程序吗?
我的代码目前是:
JumpListCustomCategory userActionsCategory = new JumpListCustomCategory("Weather");
userActionLink.Arguments = "-1";
JumpListLink userActionLink = new JumpListLink(Assembly.GetEntryAssembly().Location, Conditions + ": " + reader.ReadToEnd());
userActionLink.IconReference = new IconReference(testicon, 0);
userActionsCategory.AddJumpListItems(userActionLink);
list.AddCustomCategories(userActionsCategory);
list.Refresh();