Beispiel #1
0
        private void TrayContextMenuHandler(object sender, EventArgs e, string name, Func <string> run)
        {
            string takenMessage = string.Empty;

            takenMessage += $"\n--------------RUNNING--------------\nUtility name: \"{name}\"\n";
            var startTime = DateTime.Now;

            takenMessage += $"Message: {run.Invoke()}\n";
            takenMessage += $"Execution time: {DateTime.Now.Subtract(startTime)}\n---------------!-!-!---------------\n";
            _windowsService.AddMessageToLogger(takenMessage);
            //RefreshTrayItems();
        }