private void Machine_FilePositionChanged()
        {
            RunFilePosition.Text = machine.FilePosition.ToString();

            if (ListViewFile.SelectedItem is TextBlock)
            {
                if (ListViewFile.SelectedIndex >= 0 && ListViewFile.SelectedIndex < machine.File.Count && machine.PauseLines[ListViewFile.SelectedIndex])
                {
                    ((TextBlock)ListViewFile.SelectedItem).Background = Brushes.YellowGreen;
                }
                else
                {
                    ((TextBlock)ListViewFile.SelectedItem).Background = Brushes.Transparent;
                }
            }

            ListViewFile.SelectedIndex = machine.FilePosition;

            if (ListViewFile.SelectedItem is TextBlock)
            {
                ((TextBlock)ListViewFile.SelectedItem).Background = Brushes.Gray;
            }

            ListViewFile.ScrollIntoView(ListViewFile.SelectedItem);
        }
        private void Machine_FilePositionChanged()
        {
            LabelFilePosition.Content = machine.FilePosition;

            if (ListViewFile.SelectedItem is TextBlock)
            {
                ((TextBlock)ListViewFile.SelectedItem).Background = Brushes.Transparent;
            }

            ListViewFile.SelectedIndex = machine.FilePosition;

            if (ListViewFile.SelectedItem is TextBlock)
            {
                ((TextBlock)ListViewFile.SelectedItem).Background = Brushes.Gray;
            }

            ListViewFile.ScrollIntoView(ListViewFile.SelectedItem);
        }