示例#1
0
 private void OnMethodRegistered(object sender, ErasureMethodRegistrationEventArgs e)
 {
     ErasureMethod method = ErasureMethodManager.GetInstance(e.Guid);
        eraseFilesMethod.Items.Add(method);
        if (method is UnusedSpaceErasureMethod)
     eraseUnusedMethod.Items.Add(method);
 }
示例#2
0
 private void OnMethodUnregistered(object sender, ErasureMethodRegistrationEventArgs e)
 {
     foreach (object obj in eraseFilesMethod.Items)
     if (((ErasureMethod)obj).Guid == e.Guid)
     {
      eraseFilesMethod.Items.Remove(obj);
      break;
     }
        foreach (object obj in eraseUnusedMethod.Items)
     if (((ErasureMethod)obj).Guid == e.Guid)
     {
      eraseUnusedMethod.Items.Remove(obj);
      break;
     }
        if (eraseFilesMethod.SelectedIndex == -1)
     eraseFilesMethod.SelectedIndex = 0;
        if (eraseUnusedMethod.SelectedIndex == -1)
     eraseUnusedMethod.SelectedIndex = 0;
 }
示例#3
0
 private static void OnMethodUnregistered(ErasureMethodRegistrationEventArgs e)
 {
     if (MethodUnregistered != null)
     MethodUnregistered(ManagerLibrary.Instance.ErasureMethodManager, e);
 }