Exemplo n.º 1
0
        public static string GetData(AdventDays day)
        {
            var textFilePath = $"data/day-{(int)day:00}.dat";

            using var reader = new StreamReader(File.OpenRead(textFilePath));
            var dataString = reader.ReadToEnd();

            return(dataString);
        }
Exemplo n.º 2
0
        private string GetData(AdventDays day)
        {
            if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
            {
                var inputWindow = new InputDataWindow();
                if (inputWindow.ShowDialog() ?? false)
                {
                    return(inputWindow.InputData);
                }
            }

            return(PuzzleData.GetData(day));
        }