public static async void ShowTaskSwitcher(string taskName = "")
{
try
{
Context.AppTalkWindowManager.CloseTalkWindow();
IApplicationAgent switchWindowsAgent = Context.AppAgentMgr.GetAgentByName("Switch Windows Agent");
if (switchWindowsAgent == null)
{
return;
}
IExtension extension = switchWindowsAgent;
extension.GetInvoker().SetValue("FilterByProcessName", taskName);
await Context.AppAgentMgr.ActivateAgent(switchWindowsAgent as IFunctionalAgent);
Log.Debug("Returned from activate agent");
}
catch (Exception ex)
{
Log.Debug(ex.ToString());
}
}