Skip to main content

Events

IDashboard

CustomDataChanged

Custom data on dashboard has changed.

MFiles.Event.CustomDataChanged

Arguments:

  • data : any New custom data for the dashboard

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.CustomDataChanged,
(
data, // `any`
) => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Refresh

MFiles.Event.Refresh

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.Refresh,
() => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

ISearchPane

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await searchPane.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
searchPane.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await searchPane.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});

// Later unregister the event
searchPane.Events.Unregister(eventHandle);

IShellFrame

NewCommands

Triggered when a new commands object is created.

MFiles.Event.NewCommands

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.NewCommands,
() => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

NewRightPane

Triggered when a shell pane container is created for right shell pane.

MFiles.Event.NewRightPane

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.NewRightPane,
() => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

NewShellListing

Triggered when a new shell listing object is created.

MFiles.Event.NewShellListing

Arguments:

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.NewShellListing,
(
newShellisting, // [IShellListing](/UIExt2/Interfaces/IShellListing/)
) => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

ViewLocationChanged

MFiles.Event.ViewLocationChanged

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.ViewLocationChanged,
() => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

ViewLocationChangedAsync

MFiles.Event.ViewLocationChangedAsync

Event has no arguments

Example Code

const eventHandle = await shellFrame.Events.Register(
MFiles.Event.ViewLocationChangedAsync,
() => {
// Handle event
},
);

// Later unregister the event
shellFrame.Events.Unregister(eventHandle);

IShellListing

ContentChanged

Triggered when the current listing content is changed, or listed items are modified.

MFiles.Event.ContentChanged

Arguments:

  • shellItems : IShellItems Contains all items in the listing.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ContentChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListingActivated

Triggered when the listing object becomes active and receives the input focus.

MFiles.Event.ListingActivated

Arguments:

  • shellListing : IShellListing The previous active shell listing object. Can be null.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListingActivated,
(
shellListing, // [IShellListing](/UIExt2/Interfaces/IShellListing/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListingDeactivated

Triggered when the listing object becomes inactive and loses the input focus.

MFiles.Event.ListingDeactivated

Arguments:

  • shellListing : IShellListing The next active shell listing object. Can be null.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListingDeactivated,
(
shellListing, // [IShellListing](/UIExt2/Interfaces/IShellListing/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemAdded

MFiles.Event.ListItemAdded

Arguments:

  • objectVersion : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemAdded,
(
objectVersion, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemModified

?

MFiles.Event.ListItemModified

Arguments:

  • oldServerObjVer : Array <any > Array
  • newObjVer : Array <any > Array

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemModified,
(
oldServerObjVer, // `Array` <`any` >
newObjVer, // `Array` <`any` >
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemRemoved

MFiles.Event.ListItemRemoved

Arguments:

  • listItem : Array <any > Array
  • removecExternalFolder : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemRemoved,
(
listItem, // `Array` <`any` >
removecExternalFolder, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectedItemsChanged

Triggered when one or more of the items that are currently selected are modified.

MFiles.Event.SelectedItemsChanged

Arguments:

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectedItemsChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectionChanged

Triggered when the selection in the listing view is set, changed or removed.

MFiles.Event.SelectionChanged

Arguments:

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectionChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextFolder

MFiles.Event.SelectNextFolder

Arguments:

  • folderType : number Number

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextFolder,
(
folderType, // `number`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextObject

MFiles.Event.SelectNextObject

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextObject,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextObjectFile

MFiles.Event.SelectNextObjectFile

Arguments:

  • allowMoveToNextObject : boolean Boolean

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextObjectFile,
(
allowMoveToNextObject, // `boolean`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousFolder

MFiles.Event.SelectPreviousFolder

Arguments:

  • folderType : number Number

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousFolder,
(
folderType, // `number`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousObject

MFiles.Event.SelectPreviousObject

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousObject,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousObjectFile

MFiles.Event.SelectPreviousObjectFile

Arguments:

  • allowMoveToPrevObject : boolean Boolean

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousObjectFile,
(
allowMoveToPrevObject, // `boolean`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SendTelemetry

MFiles.Event.SendTelemetry

Arguments:

  • telemetryEvent : TelemetryEvents TelemetryEvents
  • eventProperties : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SendTelemetry,
(
telemetryEvent, // `TelemetryEvents`
eventProperties, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.Stop,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

IShellPaneTab

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellPaneTab.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
shellPaneTab.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellPaneTab.Events.Register(
MFiles.Event.Stop,
() => {
// Handle event
},
);

// Later unregister the event
shellPaneTab.Events.Unregister(eventHandle);

IShellPaneContainer

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellPaneContainer.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
shellPaneContainer.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellPaneContainer.Events.Register(
MFiles.Event.Stop,
() => {
// Handle event
},
);

// Later unregister the event
shellPaneContainer.Events.Unregister(eventHandle);

IShellUI

CrossApplicationNotification

Broadcasted message to multiple applications.

MFiles.Event.CrossApplicationNotification

Arguments:

  • appGUID : string - GUID of the target application, this can be also null
  • msgId : String - ID of the message which is sent to the other application
  • data : any - data to be sent

Example Code

const eventHandle = await shellUI.Events.Register(
MFiles.Event.CrossApplicationNotification,
(
appGUID, // `string`
msgId, // `String`
data, // `any`
) => {
// Handle event
},
);

// Later unregister the event
shellUI.Events.Unregister(eventHandle);

NewNormalShellFrame

Triggered when a normal shell frame object (not a common dialog, and not an embedded or special shell frame) is created.

MFiles.Event.NewNormalShellFrame

Arguments:

Example Code

const eventHandle = await shellUI.Events.Register(
MFiles.Event.NewNormalShellFrame,
(
shellFrame, // [IShellFrame](/UIExt2/Interfaces/IShellFrame/)
) => {
// Handle event
},
);

// Later unregister the event
shellUI.Events.Unregister(eventHandle);

NewShellFrame

Triggered when any shell frame object is created.

MFiles.Event.NewShellFrame

Arguments:

Example Code

const eventHandle = await shellUI.Events.Register(
MFiles.Event.NewShellFrame,
(
shellFrame, // [IShellFrame](/UIExt2/Interfaces/IShellFrame/)
) => {
// Handle event
},
);

// Later unregister the event
shellUI.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellUI.Events.Register(MFiles.Event.Started, () => {
// Handle event
});

// Later unregister the event
shellUI.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellUI.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});

// Later unregister the event
shellUI.Events.Unregister(eventHandle);

IWindow

CloseWindow

Sent for a window when the window is requested to closed.

MFiles.Event.CloseWindow

Event has no arguments

Example Code

const eventHandle = await window.Events.Register(
MFiles.Event.CloseWindow,
() => {
// Handle event
},
);

// Later unregister the event
window.Events.Unregister(eventHandle);