/// <summary> /// Get the singleton instance /// </summary> /// <returns></returns> public static NPPWarningHandler GetInstance() { if (_instance == null) { lock (_lock) { if (_instance == null) { _instance = new NPPWarningHandler(); } } } return(_instance); }
/// <summary> /// Get the singleton instance /// </summary> /// <returns></returns> public static NPPWarningHandler GetInstance() { if (_instance == null) { lock (_lock) { if (_instance == null) { _instance = new NPPWarningHandler(); } } } return _instance; }
internal static void CheckNppStatus(NppStatus status, bool throwWarnings, object sender) { if (status == NppStatus.NoError) { return; } if ((int)status < 0) { throw new NPPException(status); } if (throwWarnings) { throw new NPPWarning(status); } else { NPPWarningHandler.GetInstance().NotifyNPPWarning(sender, status, GetErrorMessageFromNppStatus(status)); } }
void nppwarnings_OnNPPWarning(object sender, NPPWarningHandler.NPPWarningEventArgs e) { txt_info.AppendText("NPP Warning: " + e.Message + "\n"); }