SetResult Method
Sets the result of the save file dialog i.e. the path of a file to save to.
Type: SaveFileDialogEventArgs
Namespace: XJTAG.Integration.XJRunner
Syntax
public void SetResult(string savePath, bool overwriteExistingFile)
Parameters
- savePath
Type: string
The path to a file on disk. This may be relative or absolute - if relative then it is taken relative to InitialDirectory.
- overwriteExistingFile
Type: bool
Optional parameter which allows the path to an existing file to be given without an exception being thrown.
Exceptions
- RuntimeException
The given path is invalid, points to an existing directory, or to an existing file (if overwriteExistingFile is false).
Remarks
Calling this method causes the save file dialog to close and return the provided filename.
You can call SetResult synchronously inside the event handler, or preserve the supplied SaveFileDialogEventArgs reference and call SetResult later. The save file dialog will close when a user selects one of its buttons, or when SetResult is called, whichever happens first.
XJTAG v4.2.5
