Created
October 2, 2024 19:40
-
-
Save hishaamn/f2cb5a7c370f7ab0456136f4e1f23d69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static StartMenu.ApplicationShortcut GetApplicationShortcut(Item item) | |
{ | |
Assert.ArgumentNotNull((object) item, nameof (item)); | |
LinkField field = (LinkField) item.Fields["Application"]; | |
Assert.IsNotNull((object) field, "link field"); | |
string internalPath = field.InternalPath; | |
if (internalPath.Length > 0) | |
{ | |
Item obj = Client.Site.Database.Items[internalPath]; | |
if (obj != null) | |
return new StartMenu.ApplicationShortcut() | |
{ | |
ID = obj.ID.ToString(), | |
Icon = obj["Icon"], | |
DisplayName = obj["Display name"], | |
ToolTip = obj["Tool tip"], | |
Path = obj.Paths.Path, | |
Parameters = obj["Parameters"], | |
Click = "RunShortcut(\"" + (object) item.ID + "\")" | |
}; | |
} | |
return (StartMenu.ApplicationShortcut) null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment