private void StartButton_Click(object sender, RoutedEventArgs e)
        {
            InputPath.IsEnabled   = false;
            OutputPath.IsEnabled  = false;
            StartButton.IsEnabled = false;

            string inputPath  = InputPath.Text;
            string outputPath = OutputPath.Text;

            dispatcherTimer          = new DispatcherTimer();
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = TimeSpan.FromMilliseconds(1000);
            dispatcherTimer.Start();

            task = Task.Run(() => ConversionParser.ConvertFile(inputPath, outputPath));
        }
示例#2
0
        private static void AssertParseFailure(string conversionLine)
        {
            var conversionResult = new ConversionParser().Parse(conversionLine);

            conversionResult.IsFailure.Should().BeTrue();
        }