mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
Displaying "no errors found" when nothing is found in Map Analysis mode
This commit is contained in:
parent
6e98b29c5c
commit
26739a7f2d
3 changed files with 82 additions and 1 deletions
|
@ -228,6 +228,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ErrorChecks\CheckUnknownTextures.cs" />
|
||||
<Compile Include="ErrorChecks\ResultNoErrors.cs" />
|
||||
<Compile Include="ErrorChecks\ResultUnknownTexture.cs" />
|
||||
<Compile Include="FindReplace\FindAnyTextureFlat.cs" />
|
||||
<Compile Include="FindReplace\FindThingSectorRef.cs" />
|
||||
|
@ -273,4 +274,4 @@
|
|||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
72
Source/Plugins/BuilderModes/ErrorChecks/ResultNoErrors.cs
Normal file
72
Source/Plugins/BuilderModes/ErrorChecks/ResultNoErrors.cs
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
||||
* This program is released under GNU General Public License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
public class ResultNoErrors : ErrorResult
|
||||
{
|
||||
#region ================== Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public override int Buttons { get { return 0; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
||||
// Constructor
|
||||
public ResultNoErrors()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "No errors were found.";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -174,6 +174,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
running = false;
|
||||
blockmap.Dispose();
|
||||
blockmap = null;
|
||||
|
||||
// When no results found, show "no results" and disable the list
|
||||
if(results.Items.Count == 0)
|
||||
{
|
||||
results.Items.Add(new ResultNoErrors());
|
||||
results.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,6 +203,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.Size = new Size(this.Width, this.Height - this.ClientSize.Height + resultspanel.Top + resultspanel.Height);
|
||||
progress.Value = 0;
|
||||
results.Items.Clear();
|
||||
results.Enabled = true;
|
||||
ClearSelectedResult();
|
||||
resultspanel.Visible = true;
|
||||
buttoncheck.Text = "Abort Analysis";
|
||||
|
|
Loading…
Reference in a new issue