public void Success(string key, string message) { if (!dataCounter.ContainsKey(key)) { dataCounter.Add(key, new Counter() { Success = 0, Error = 0 }); } ++((Counter)dataCounter[key]).Success; LogProcess.WriteLog(LogProcess.LOGTYPE.SUCCESS, message); }
static void Main() { var trace = ComputerTraceProcess.CreateComputerTrace(); var log = new LogProcess().log; var textFile = new StudyProcess().study; var t = new Timer(1000); t.Start(); t.Elapsed += delegate { t.Stop(); try { //var ct= ComputerTraceProcess.CreateComputerTrace(); //var lst = ct.GetLastInputTime(); //var tm = ct.GetIdleTime(); //Console.WriteLine($"Last : {lst},MiliSecond : {tm}"); ////Console.WriteLine(GetLastUserInput.GetLastUserInput.GetLastInputTime()); ////Console.WriteLine(GetLastUserInput.GetIdleTickCount()); var msj = $"Last : {trace.GetLastInputTime()},MiliSecond : {trace.GetIdleTime()}"; Console.WriteLine(msj); log.WriteLog(msj); textFile.WriteDetail("test.txt", $"Merhaba Dünya {DateTime.Now.Millisecond}"); } catch (Exception e) { Console.WriteLine(e); } finally { t.Start(); } }; Console.ReadLine(); }