11
FARR Plugins and Aliases / Re: FARR C# SDK and Documentation V2 (19/10/2008)
« on: January 12, 2009, 03:33 PM »
Still no luck. I understand what you're saying, it makes sense to have the results on the this Object, but I don't see why I should also need to populate SourceList. Anyways, whether I do or don't, it still doesn't work; again, this.Count returns the correct number of items, so it is populated correctly (I had a msgbox in there):
It seems the same as your code, except I do nothing with the search keywords as I don't need to (I think). I also need to reset the SL using SourceList.Clear()
public override int GetActionsCount(string KeyKeywords)
{
string[] Files = Directory.GetFiles(m_TempPath); // remove temp icon files
foreach (string FileName in Files)
File.Delete(FileName);
SourceList.Clear();
EnumTray.GetTrayData(out buttonData); // populate tray data
if (buttonData != null)
{
foreach (TrayIconData trayData in buttonData) // fill SourceList
{
if (trayData.button.fsState != 8) // only add if button is not invisible
SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
if (SourceList.Count > 10)
break;
}
this.ClearTemporaryItems();
foreach (Actions.FARRTrayAction item in SourceList) // Copy SourceList to thisList
this.Add(item);
return this.Count;
}
else return 0;
}
{
string[] Files = Directory.GetFiles(m_TempPath); // remove temp icon files
foreach (string FileName in Files)
File.Delete(FileName);
SourceList.Clear();
EnumTray.GetTrayData(out buttonData); // populate tray data
if (buttonData != null)
{
foreach (TrayIconData trayData in buttonData) // fill SourceList
{
if (trayData.button.fsState != 8) // only add if button is not invisible
SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
if (SourceList.Count > 10)
break;
}
this.ClearTemporaryItems();
foreach (Actions.FARRTrayAction item in SourceList) // Copy SourceList to thisList
this.Add(item);
return this.Count;
}
else return 0;
}
It seems the same as your code, except I do nothing with the search keywords as I don't need to (I think). I also need to reset the SL using SourceList.Clear()