Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
		/// <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;
		}
Ejemplo n.º 3
0
 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));
     }
 }
Ejemplo n.º 4
0
 void nppwarnings_OnNPPWarning(object sender, NPPWarningHandler.NPPWarningEventArgs e)
 {
     txt_info.AppendText("NPP Warning: " + e.Message + "\n");
 }