FileAssociationsFileOpenedEventArgs
class cAlgo.API Since 5.1
DesktopCLICloud
Provides data for plugin file associations file opened event.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public class FileAssociationsFileOpenedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
FileAssociations.Add("csv");
FileAssociations.FileOpened += OnFileOpened;
}
private void OnFileOpened(FileAssociationsFileOpenedEventArgs args)
{
Print("File opened: {0}", args.FilePath);
}
def on_start(self):
api.FileAssociations.Add("csv")
api.FileAssociations.FileOpened += self.on_file_opened
def on_file_opened(self, args):
api.Print(f"File opened: {args.FilePath}")
Properties
| Name | Description |
|---|---|
FilePathDesktopCLICloudstring | Gets opened file path. |