예제 #1
0
 /**
  * Removes first occurance of a listener for callbacks.
  * @param listener listener for callbacks
  * @return true if the listener was found
  */
 public static bool removeListener(IGlpkTerminalListener listener)
 {
     if (listeners.Contains(listener)) {
         listeners.Remove(listener);
         return true;
     } else {
         return false;
     }
 }
예제 #2
0
 /**
  * Removes first occurance of a listener for callbacks.
  * @param listener listener for callbacks
  * @return true if the listener was found
  */
 public static bool removeListener(IGlpkTerminalListener listener)
 {
     if (listeners.Value.Contains(listener))
     {
         listeners.Value.Remove(listener);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 /**
  * Adds a listener for callbacks.
  * @param listener listener for callbacks
  */
 public static void addListener(IGlpkTerminalListener listener)
 {
     GLPK.glp_term_hook(null, null);
     listeners.Value.AddLast(listener);
 }
예제 #4
0
 /**
  * Adds a listener for callbacks.
  * @param listener listener for callbacks
  */
 public static void addListener(IGlpkTerminalListener listener)
 {
     GLPK.glp_term_hook(null, null);
     listeners.AddLast(listener);
 }