Changeset 418
- Timestamp:
- 9/27/2008 9:52:08 AM (5 years ago)
- Location:
- branches/eraser6
- Files:
-
- 6 edited
-
Eraser/LogForm.cs (modified) (2 diffs)
-
Eraser/ToolBar.cs (modified) (1 diff)
-
Manager/Logger.cs (modified) (1 diff)
-
Manager/Method.cs (modified) (7 diffs)
-
Manager/Plugins.cs (modified) (3 diffs)
-
Manager/Settings.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/LogForm.cs
r365 r418 54 54 55 55 //Register our event handler to get live log messages 56 task.Log.OnLogged += new Logger.LogEvent (task_Logged);56 task.Log.OnLogged += new Logger.LogEventFunction(task_Logged); 57 57 } 58 58 59 59 private void LogForm_FormClosed(object sender, FormClosedEventArgs e) 60 60 { 61 task.Log.OnLogged -= new Logger.LogEvent (task_Logged);61 task.Log.OnLogged -= new Logger.LogEventFunction(task_Logged); 62 62 } 63 63 … … 69 69 try 70 70 { 71 Invoke(new Logger.LogEvent (task_Logged), new object[] { e });71 Invoke(new Logger.LogEventFunction(task_Logged), new object[] { e }); 72 72 } 73 73 catch (ObjectDisposedException) -
branches/eraser6/Eraser/ToolBar.cs
r349 r418 234 234 /// Item click event handler 235 235 /// </summary> 236 public ToolbarItemClickedHandler ToolbarItemClicked 237 { 238 get { return toolbarItemClicked; } 239 set { toolbarItemClicked = value; } 240 } 241 242 public delegate void ToolbarItemClickedHandler(object sender, EventArgs e); 243 private event ToolbarItemClickedHandler toolbarItemClicked; 236 public event ToolbarItemClickedEventFunction ToolbarItemClicked; 237 public delegate void ToolbarItemClickedEventFunction(object sender, EventArgs e); 244 238 internal void OnToolbarItemClicked(object sender) 245 239 { -
branches/eraser6/Manager/Logger.cs
r348 r418 95 95 /// </summary> 96 96 /// <param name="e"></param> 97 public delegate void LogEvent (LogEntry e);97 public delegate void LogEventFunction(LogEntry e); 98 98 99 99 /// <summary> 100 100 /// All the registered event handlers for the log event of this task. 101 101 /// </summary> 102 public event LogEvent OnLogged;102 public event LogEventFunction OnLogged; 103 103 104 104 /// <summary> -
branches/eraser6/Manager/Method.cs
r412 r418 92 92 /// <param name="currentPass">The current pass number. The total number 93 93 /// of passes can be found from the Passes property.</param> 94 public delegate void OnProgress(long lastWritten, int currentPass);94 public delegate void ProgressFunction(long lastWritten, int currentPass); 95 95 96 96 /// <summary> … … 109 109 /// <param name="callback">The progress callback function.</param> 110 110 public abstract void Erase(Stream strm, long erasureLength, PRNG prng, 111 OnProgresscallback);111 ProgressFunction callback); 112 112 113 113 /// <summary> … … 253 253 /// <param name="prng">The PRNG source for random data.</param> 254 254 /// <param name="callback">The progress callback function.</param> 255 public virtual void EraseUnusedSpace(Stream strm, PRNG prng, OnProgresscallback)255 public virtual void EraseUnusedSpace(Stream strm, PRNG prng, ProgressFunction callback) 256 256 { 257 257 Erase(strm, long.MaxValue, prng, callback); … … 299 299 300 300 public override void Erase(Stream strm, long erasureLength, PRNG prng, 301 OnProgresscallback)301 ProgressFunction callback) 302 302 { 303 303 //Randomize the order of the passes … … 389 389 390 390 public override void Erase(Stream strm, long erasureLength, PRNG prng, 391 OnProgresscallback)391 ProgressFunction callback) 392 392 { 393 393 throw new NotImplementedException("The DefaultMethod class should never be " + … … 494 494 ManagerLibrary.Instance.ErasureMethodManager.methods.Add(method.GUID, info); 495 495 } 496 497 //Broadcast the event 498 OnMethodRegistered(method.GUID); 496 499 } 497 500 … … 517 520 private Dictionary<Guid, MethodConstructorInfo> methods = 518 521 new Dictionary<Guid, MethodConstructorInfo>(); 522 523 /// <summary> 524 /// The delegate prototype of the Method Registered event. 525 /// </summary> 526 /// <param name="method">The GUID of the method being registered.</param> 527 public delegate void MethodRegisteredFunction(Guid guid); 528 529 /// <summary> 530 /// Called whenever an erasure method is registered. 531 /// </summary> 532 public static event MethodRegisteredFunction MethodRegistered; 533 534 /// <summary> 535 /// Executes the MethodRegistered event handlers 536 /// </summary> 537 private static void OnMethodRegistered(Guid guid) 538 { 539 if (MethodRegistered != null) 540 MethodRegistered(guid); 541 } 519 542 #endregion 520 543 -
branches/eraser6/Manager/Plugins.cs
r414 r418 60 60 /// </summary> 61 61 /// <param name="instance">The instance of the plugin loaded.</param> 62 public delegate void OnPluginLoadEventHandler(PluginInstance instance);62 public delegate void PluginLoadedFunction(PluginInstance instance); 63 63 64 64 /// <summary> 65 65 /// The plugin loaded event. 66 66 /// </summary> 67 public event OnPluginLoadEventHandler PluginLoad;67 public event PluginLoadedFunction PluginLoaded; 68 68 69 69 /// <summary> … … 71 71 /// </summary> 72 72 /// <param name="instance"></param> 73 protected void OnPluginLoad (PluginInstance instance)74 { 75 if (PluginLoad != null)76 PluginLoad (instance);73 protected void OnPluginLoaded(PluginInstance instance) 74 { 75 if (PluginLoaded != null) 76 PluginLoaded(instance); 77 77 } 78 78 … … 152 152 153 153 //And broadcast the plugin load event 154 OnPluginLoad (instance);154 OnPluginLoaded(instance); 155 155 } 156 156 } -
branches/eraser6/Manager/Settings.cs
r412 r418 253 253 /// The prototype of functions which will handle a SettingsChanged Event. 254 254 /// </summary> 255 public delegate void OnSettingsChangedEvent();255 public delegate void SettingsChangedFunction(); 256 256 257 257 /// <summary> 258 258 /// The event handler handling a change in settings. 259 259 /// </summary> 260 public event OnSettingsChangedEventSettingsChanged;260 public event SettingsChangedFunction SettingsChanged; 261 261 262 262 private string uiLanguage;
Note: See TracChangeset
for help on using the changeset viewer.
