private void onError(iMonErrorType error) { this.OnLogError("Error received: " + error); if (this.Error != null) { this.Error(this, new iMonErrorEventArgs(error)); } this.onStateChanged(false); }
public iMonErrorEventArgs(iMonErrorType errorType) : base() { this.type = errorType; }
public iMonErrorEventArgs(iMonErrorType errorType) { this.type = errorType; }
private void iMonError(iMonErrorType error) { Logging.Error("iMON reports an error of type " + error); switch (error) { case iMonErrorType.Unknown: this.showBalloonTip("Unknown error in iMON", ToolTipIcon.Error); break; case iMonErrorType.OutOfMemory: this.showBalloonTip("iMON is out of memory!" + Environment.NewLine + "Please restart XBMC on iMON.", ToolTipIcon.Warning); break; case iMonErrorType.InvalidPointer: case iMonErrorType.InvalidArguments: this.showBalloonTip("Invalid arguments in a call to iMON", ToolTipIcon.Warning); break; case iMonErrorType.ApiNotInitialized: case iMonErrorType.NotInitialized: this.showBalloonTip("Invalid operation because" + Environment.NewLine + "iMON is not initialized.", ToolTipIcon.Error); break; case iMonErrorType.NotInPluginMode: this.showBalloonTip("Invalid operation because" + Environment.NewLine + "iMON is not in plugin mode.", ToolTipIcon.Error); break; case iMonErrorType.iMonClosed: this.showBalloonTip("iMON Manager has been closed.", ToolTipIcon.Info); break; case iMonErrorType.HardwareDisconnected: this.showBalloonTip("The iMON Display has been disconnected.", ToolTipIcon.Warning); break; case iMonErrorType.PluginModeAlreadyInUse: this.showBalloonTip("Cannot use iMON Display because it" + Environment.NewLine + "is already used by another application.", ToolTipIcon.Error); break; case iMonErrorType.HardwareNotConnected: this.showBalloonTip("Cannot use iMON Display because" + Environment.NewLine + "it is not connected.", ToolTipIcon.Error); break; case iMonErrorType.HardwareNotSupported: this.showBalloonTip("Cannot use iMON Display because" + Environment.NewLine + "this hardware is not supported.", ToolTipIcon.Error); break; case iMonErrorType.PluginModeDisabled: this.showBalloonTip("Plugin mode must be" + Environment.NewLine + "enabled in iMON Manager.", ToolTipIcon.Error); break; case iMonErrorType.iMonNotResponding: this.showBalloonTip("iMON is not responding." + Environment.NewLine + "Please restart iMON Manager.", ToolTipIcon.Error); break; } if (Settings.Default.ImonUninitializeOnError) { this.iMonUninitialize(); } }