2using System.Threading.Tasks;
3using System.Windows.Input;
34 : this(null, ExecuteCallback)
45 this.canExecuteCallback = CanExecuteCallback;
46 this.executeCallback = ExecuteCallback;
63 this.CanExecuteChanged?.Invoke(
this, EventArgs.Empty);
70 return Task.CompletedTask;
81 if (this.canExecuteCallback is
null)
87 return this.canExecuteCallback(parameter);
103 if (this.executeCallback is not
null)
107 this.executeCallback(parameter);
Interaction logic for MainWindow.xaml
static void ErrorBox(string ErrorMessage)
Displays an error message on the screen, on the main UI thread.
static void UpdateGui(GuiDelegate Method)
Calls a method from the Main UI thread.
Defines a custom parametrized command.
ParametrizedCommand(CanExecuteParametrizedHandler CanExecuteCallback, ExecuteParametrizedHandler ExecuteCallback)
Defines a custom parametrized command.
void Execute(object parameter)
Defines the method to be called when the command is invoked.
void RaiseCanExecuteChanged()
Raises the CanExecuteChanged event.
bool CanExecute(object parameter)
Defines the method that determines whether the command can execute in its current state.
EventHandler CanExecuteChanged
Occurs when changes occur that affect whether or not the command should execute.
ParametrizedCommand(ExecuteParametrizedHandler ExecuteCallback)
Defines a custom parametrized command.
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
delegate bool CanExecuteParametrizedHandler(object Parameter)
Delegate for callback methods called when evaluating if a command can be executed or not.
delegate void ExecuteParametrizedHandler(object Parameter)
Delegate for callback methods called when a parametrized command is executed.