tankcr

Untitled

Jun 2nd, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Diagnostics;
  7.  
  8. namespace GetLogs
  9. {
  10.  
  11. public class Eventlogs
  12. {
  13. string eventLog;
  14. public string EventLog
  15. {
  16. get { return eventLog; }
  17. set { eventLog = value; }
  18. }
  19.  
  20. public Eventlogs()
  21. {
  22. }
  23. }
  24. public class GetEvents
  25. {
  26.  
  27. public static List<EventLog> GetLogTypes(string computername)
  28. {
  29. EventLog[] remoteEventLogs;
  30. remoteEventLogs = EventLog.GetEventLogs(computername);
  31. int lognums = remoteEventLogs.Length;
  32. for (int i = 0; i < lognums; i++)
  33. foreach(string logtype in remoteEventLogs[i].Log) { }
  34. }
  35. public static List<EventLog> GetEventLogs(string logtype, string computername)
  36. {
  37. //logType can be Application, Security, System or any other Custom Log.
  38. List<Eventlogs> log = new List<Eventlogs>();
  39. List<Eventlogs> logtypes = new List<Eventlogs>();
  40. GetEvents ev = new GetEvents();
  41. return ev;
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment