Skip to content

Commit

Permalink
Show additional message boxes when compiled in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alchemistmatt committed Oct 3, 2022
1 parent a07c89d commit dac9a58
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LcmsSpectator/LcmsSpectator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;SHOW_DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
Expand Down
20 changes: 20 additions & 0 deletions LcmsSpectator/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ private async Task OpenFromDmsImplementation()

foreach (var file in rawFilePaths)
{
#if SHOW_DEBUG
System.Windows.Forms.MessageBox.Show(string.Format("Reading instrument data: {0}",
PRISM.PathUtils.CompactPathString(file, 120)));
#endif

var dataSetViewModel = await ReadRawFile(file);

if (dataSetViewModel.MsPfParameters == null)
Expand All @@ -418,10 +423,25 @@ private async Task OpenFromDmsImplementation()
IdFileLoading = true;
if (!string.IsNullOrWhiteSpace(dataSetViewModel.FastaDbFilePath) && File.Exists(dataSetViewModel.FastaDbFilePath))
{
#if SHOW_DEBUG
System.Windows.Forms.MessageBox.Show(string.Format("Reading FASTA file: {0}",
PRISM.PathUtils.CompactPathString(dataSetViewModel.FastaDbFilePath, 120)));
#endif

await ScanViewModel.IdTree.AddFastaEntriesAsync(await dataReader.ReadFastaFile(dataSetViewModel.FastaDbFilePath));
}

#if SHOW_DEBUG
System.Windows.Forms.MessageBox.Show(string.Format("Reading .mzid file: {0}",
PRISM.PathUtils.CompactPathString(idFilePath, 120)));
#endif

await ReadIdFile(idFilePath, dataSetViewModel);

#if SHOW_DEBUG
System.Windows.Forms.MessageBox.Show("Calling dataReader.OpenDataSet()");
#endif

await dataReader.OpenDataSet(dataSetViewModel, file, featureFilePath: featureFilePath);
IdFileLoadProgress = 0;
IdFileLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion LcmsSpectator/Views/AboutBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace LcmsSpectator.Views
/// </summary>
public partial class AboutBox : Window
{
private const string PROGRAM_DATE = "September 27, 2022";
private const string PROGRAM_DATE = "October 3, 2022";

/// <summary>
/// Initializes a new instance of the <see cref="AboutBox"/> class.
Expand Down

0 comments on commit dac9a58

Please sign in to comment.