private void PrintStartScreen() { Version version = Assembly.GetExecutingAssembly().GetName().Version; if (version is not null) { SimpleUi.Print($"Jobb V{version}"); } }
private void PrintCurrentlyActiveJobbs() { foreach (var jobb in JobbList) { SimpleUi.Print($"Name: {jobb.Parameters.Name}"); SimpleUi.Print($"Time Period: {jobb.Parameters.Schedule.Period.ToString()}"); SimpleUi.Print($"Interval: {jobb.Parameters.Schedule.Unit.ToString()}"); SimpleUi.Print($"Current state: {jobb.Parameters.ReturnCode.ToString()}"); } }
private void RemoveJobb() { SimpleUi.PrintWithColor("Press the number of the Jobb you wish to remove: ", ConsoleColor.Green); for (int i = 0; i < JobbList.Count; i++) { SimpleUi.Print($"[{i}] {JobbList[i].Parameters.Name}"); } string chosenJobb = SimpleUi.ReadLine(); int chosenJobbIndex = int.Parse(chosenJobb); JobbList[chosenJobbIndex].StopTimer(); JobbList.RemoveAt(chosenJobbIndex); SimpleUi.Print("Job removed."); }