Skip to content

IGUI

Namespace: VideoCataloger

Type: Interface

Program user interface. This is the interface for scripts.

Definition

public interface IGUI

Methods

Method Description
Refresh(string) Refresh all windows
RunCommand(string) Run a command. A command is anything you can bind a hotkey to.
SetQuery(VideoQuery, SceneQuery) Run a query and set it to the user interface.
IsWindowOpened(string) Check if a window is opened
SetCancelSupported(bool) Tell the ui if the script should be possible to cancel
IsCancelRequested() Check if a user has requested this script to end
SetProgress(int, int, int, string) Update console progress message
SetProgress(int, int, int, string) Update console progress message

Refresh

Refresh all windows

void Refresh(string hint)

Parameters:

Name Type Description
hint String Hint on what to refresh, nothing refresh all or pass "bin,playlist,companion" for limited refresh

RunCommand

Run a command. A command is anything you can bind a hotkey to.

void RunCommand(string command_name)

Parameters:

Name Type Description
command_name String Name of the command as listed in the hotkey editor

SetQuery

Run a query and set it to the user interface.

void SetQuery(VideoQuery video_query, SceneQuery scene_query)

Parameters:

Name Type Description
video_query VideoCataloger.RemoteCatalogService.VideoQuery Video query, this need to be specificed
scene_query VideoCataloger.RemoteCatalogService.SceneQuery Scene query, pass null to only search videos

IsWindowOpened

Check if a window is opened

bool IsWindowOpened(string WindowName)

Parameters:

Name Type Description
WindowName String >-

Returns: Boolean - True if the window is opened


SetCancelSupported

Tell the ui if the script should be possible to cancel

void SetCancelSupported(bool can_cancel)

Parameters:

Name Type Description
can_cancel Boolean True if the script can be cancelled

IsCancelRequested

Check if a user has requested this script to end

bool IsCancelRequested()

Returns: Boolean - true if the user wants to cancel the script


SetProgress

Update console progress message

void SetProgress(int value, int min, int max, string message)

Parameters:

Name Type Description
value Int32 Current progress, positive integer between min and max. -1 to hide the progress bar.
min Int32 Minimum progress value. if min is same or larger than max, the progress is indeterminate and will animate but not show progress
max Int32 Maximum progress value
message String Progress text message

SetProgress

Update console progress message

void SetProgress(int value, int min, int max, string message)

Parameters:

Name Type Description
value Int32 Current progress, positive integer between min and max. -1 to hide the progress bar.
min Int32 Minimum progress value. if min is same or larger than max, the progress is indeterminate and will animate but not show progress
max Int32 Maximum progress value
message String Progress text message