JumpTask.ApplicationPath Eigenschap

Definitie

Hiermee haalt u het pad naar de toepassing op of stelt u het in.

public:
 property System::String ^ ApplicationPath { System::String ^ get(); void set(System::String ^ value); };
public string ApplicationPath { get; set; }
member this.ApplicationPath : string with get, set
Public Property ApplicationPath As String

Waarde van eigenschap

Het pad naar de toepassing. De standaardwaarde is null.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een JumpTask markering declareert. Hiermee JumpTask opent u een tekstbestand met de naam readme.txt in de toepassing Kladblok.

<JumpTask Title="Read Me" 
          Description="Open readme.txt in Notepad." 
          ApplicationPath="C:\Windows\notepad.exe"
          IconResourcePath="C:\Windows\System32\imageres.dll"
          IconResourceIndex="14"
          WorkingDirectory="C:\Users\Public\Documents"
          Arguments="readme.txt"/>

In het volgende voorbeeld ziet u hoe u een JumpTask code configureert. Hiermee JumpTask opent u de rekenmachinetoepassing.

// Configure a new JumpTask.
JumpTask jumpTask1 = new JumpTask();
// Get the path to Calculator and set the JumpTask properties.
jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.Title = "Calculator";
jumpTask1.Description = "Open Calculator.";
jumpTask1.CustomCategory = "User Added Tasks";

Opmerkingen

Als de ApplicationPath eigenschap niet is opgegeven, wordt het pad van het huidige actieve proces geïmpliceerd. Een toepassing kan taken bevatten voor andere uitvoerbare bestanden dan zichzelf.

Van toepassing op