private void NextButton_Click(object sender, RoutedEventArgs e) { bool bypass = false; if (MainTabItem.Visibility == Visibility.Visible) { if (CheckMainTabFields()) { InputFileParameterOrder.Visibility = Visibility.Visible; MainTabItem.Visibility = Visibility.Collapsed; OutputFileParameterOrder.Visibility = Visibility.Collapsed; InputFileParameterOrder.IsSelected = true; bypass = true; RowItemCount(); BackButton.Visibility = Visibility.Visible; } } if (InputFileParameterOrder.Visibility == Visibility.Visible && bypass == false) { if (inputFileParametersUserControl.CheckFields()) { InputFileParameterOrder.Visibility = Visibility.Collapsed; MainTabItem.Visibility = Visibility.Collapsed; OutputFileParameterOrder.Visibility = Visibility.Visible; OutputFileParameterOrder.IsSelected = true; bypass = true; } else { MessageBox.Show("Tutti i valori devono essere diversi!"); } } if (OutputFileParameterOrder.Visibility == Visibility.Visible && bypass == false) { if (outputColumnOrderUserControl.CheckList() == true) { InputFileParameterOrder.Visibility = Visibility.Collapsed; MainTabItem.Visibility = Visibility.Visible; OutputFileParameterOrder.Visibility = Visibility.Collapsed; MainTabItem.IsSelected = true; BackButton.Visibility = Visibility.Collapsed; MainTabItem.IsEnabled = true; MainTabControl.UpdateLayout(); using (new WpfWaitCursor()) { foreach (var item in fileInformation) { double valore_diff = 0; if (SelectValueFromFilename) { valore_diff = getDiffValueFromFilename(item.FileName); } else { valore_diff = m_DifferenceQuoteValue.Value; } RunCalculation(item.Path, valore_diff); } } } else { MessageBox.Show("La lista di destra è vuota!"); } } MainTabControl.UpdateLayout(); }