diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs index 1cf69de809518a627da8c2a5c835cba067a897c6..b0ecde1d48395a8a84e23d24a41e240afdf471db 100644 --- a/Source/Core/Controls/SectorInfoPanel.cs +++ b/Source/Core/Controls/SectorInfoPanel.cs @@ -53,7 +53,7 @@ namespace CodeImp.DoomBuilder.Controls effectinfo = s.Effect.ToString() + " - Unknown"; // Sector info - sectorinfo.Text = " Sector " + s.Index + " "; + sectorinfo.Text = " Sector " + s.Index + " (" + (s.Sidedefs == null ? "no" : s.Sidedefs.Count.ToString()) + " sidedefs)"; //mxd effect.Text = effectinfo; ceiling.Text = s.CeilHeight.ToString(); floor.Text = s.FloorHeight.ToString(); diff --git a/Source/Core/GZBuilder/Windows/ExceptionDialog.cs b/Source/Core/GZBuilder/Windows/ExceptionDialog.cs index cf541ab76ad88f3e8c5875acb5a62da8406d35d1..fa30c9c466eb891162173ea9ab38ee09bb8f295e 100644 --- a/Source/Core/GZBuilder/Windows/ExceptionDialog.cs +++ b/Source/Core/GZBuilder/Windows/ExceptionDialog.cs @@ -15,12 +15,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows logPath = Path.Combine(General.SettingsPath, @"GZCrash.txt"); Exception ex = (Exception)e.ExceptionObject; - errorDescription.Text = "Error in " + ex.Source + ": " + ex.Message; + errorDescription.Text = "Error in " + ex.Source + ":"; using(StreamWriter sw = File.CreateText(logPath)) { sw.Write(ex.Source + ": " + ex.Message + Environment.NewLine + ex.StackTrace); } - errorMessage.Text = ex.StackTrace; + errorMessage.Text = ex.Message + Environment.NewLine + ex.StackTrace; cannotContinue = true; //cannot recover from this... } @@ -28,12 +28,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows InitializeComponent(); logPath = Path.Combine(General.SettingsPath, @"GZCrash.txt"); - errorDescription.Text = "Error in " + e.Exception.Source + ": " + e.Exception.Message; + errorDescription.Text = "Error in " + e.Exception.Source + ":"; using(StreamWriter sw = File.CreateText(logPath)) { sw.Write(e.Exception.Source + ": " + e.Exception.Message + Environment.NewLine + e.Exception.StackTrace); } - errorMessage.Text = e.Exception.StackTrace; + errorMessage.Text = e.Exception.Message + Environment.NewLine + e.Exception.StackTrace; } public void Setup() { diff --git a/Source/Core/Geometry/Tools.cs b/Source/Core/Geometry/Tools.cs index ec1891f71f73188392d31101e72300d9c8c8000c..dcb4218a61e635e295db2173d2ada7fbfe37cb7d 100644 --- a/Source/Core/Geometry/Tools.cs +++ b/Source/Core/Geometry/Tools.cs @@ -427,7 +427,7 @@ namespace CodeImp.DoomBuilder.Geometry // properties from the nearest line in this collection when the // default properties can't be found in the alllines collection. // Return null when no new sector could be made. - public static Sector MakeSector(List<LinedefSide> alllines, List<Linedef> nearbylines) + public static Sector MakeSector(List<LinedefSide> alllines, List<Linedef> nearbylines, bool useDefaultTextures) { Sector sourcesector = null; SidedefSettings sourceside = new SidedefSettings(); @@ -519,7 +519,7 @@ namespace CodeImp.DoomBuilder.Geometry } // Use defaults where no settings could be found - TakeSidedefDefaults(ref sourceside); + TakeSidedefDefaults(ref sourceside, useDefaultTextures); // Found a source sector? if(sourcesector != null) @@ -528,7 +528,7 @@ namespace CodeImp.DoomBuilder.Geometry sourcesector.CopyPropertiesTo(newsector); //mxd - if(General.Settings.GZForceDefaultTextures) { + if(useDefaultTextures) { newsector.SetCeilTexture(General.Settings.DefaultCeilingTexture); newsector.SetFloorTexture(General.Settings.DefaultFloorTexture); } @@ -579,7 +579,7 @@ namespace CodeImp.DoomBuilder.Geometry // This joins a sector with the given lines and sides. Returns null when operation could not be completed. - public static Sector JoinSector(List<LinedefSide> alllines, Sidedef original) + public static Sector JoinSector(List<LinedefSide> alllines, Sidedef original, bool useDefaultTextures) { SidedefSettings sourceside = new SidedefSettings(); @@ -587,7 +587,7 @@ namespace CodeImp.DoomBuilder.Geometry TakeSidedefSettings(ref sourceside, original); // Use defaults where no settings could be found - TakeSidedefDefaults(ref sourceside); + TakeSidedefDefaults(ref sourceside, useDefaultTextures); // Go for all sides to make sidedefs foreach(LinedefSide ls in alllines) @@ -657,7 +657,7 @@ namespace CodeImp.DoomBuilder.Geometry List<Linedef> oldlines = General.Map.Map.GetMarkedLinedefs(true); // Make the sector - Sector s = Tools.MakeSector(sides, oldlines); + Sector s = Tools.MakeSector(sides, oldlines, false); if(s != null) { // Now we go for all the lines along the sector to @@ -679,12 +679,12 @@ namespace CodeImp.DoomBuilder.Geometry } // This takes default settings if not taken yet - private static void TakeSidedefDefaults(ref SidedefSettings settings) + private static void TakeSidedefDefaults(ref SidedefSettings settings, bool useDefaultTextures) { // Use defaults where no settings could be found - if(settings.newtexhigh == null || General.Settings.GZForceDefaultTextures) settings.newtexhigh = General.Settings.DefaultTexture; - if(settings.newtexmid == null || General.Settings.GZForceDefaultTextures) settings.newtexmid = General.Settings.DefaultTexture; - if(settings.newtexlow == null || General.Settings.GZForceDefaultTextures) settings.newtexlow = General.Settings.DefaultTexture; + if(settings.newtexhigh == null || useDefaultTextures) settings.newtexhigh = General.Settings.DefaultTexture; + if(settings.newtexmid == null || useDefaultTextures) settings.newtexmid = General.Settings.DefaultTexture; + if(settings.newtexlow == null || useDefaultTextures) settings.newtexlow = General.Settings.DefaultTexture; } // This takes sidedef settings if not taken yet @@ -849,7 +849,7 @@ namespace CodeImp.DoomBuilder.Geometry //mxd public static bool DrawLines(IList<DrawnVertex> points) { - return DrawLines(points, false); + return DrawLines(points, false, false); } /// <summary> @@ -857,7 +857,7 @@ namespace CodeImp.DoomBuilder.Geometry /// marks and marks the new lines and vertices when done. Also marks the sectors that were added. /// Returns false when the drawing failed. /// </summary> - public static bool DrawLines(IList<DrawnVertex> points, bool autoAlignTextureOffsets) + public static bool DrawLines(IList<DrawnVertex> points, bool useDefaultTextures, bool autoAlignTextureOffsets) { List<Vertex> newverts = new List<Vertex>(); List<Vertex> intersectverts = new List<Vertex>(); @@ -971,13 +971,12 @@ namespace CodeImp.DoomBuilder.Geometry // We prefer a closed polygon, because then we can determine the interior properly // Check if the two ends of the polygon are closed - bool drawingclosed = false; bool splittingonly = false; if(newlines.Count > 0) { Linedef firstline = newlines[0]; Linedef lastline = newlines[newlines.Count - 1]; - drawingclosed = (firstline.Start == lastline.End); + bool drawingclosed = (firstline.Start == lastline.End); if(!drawingclosed) { // When not closed, we will try to find a path to close it. @@ -1324,7 +1323,7 @@ namespace CodeImp.DoomBuilder.Geometry if(!istruenewsector || !splittingonly) { // Make the new sector - Sector newsector = Tools.MakeSector(sectorlines, oldlines); + Sector newsector = Tools.MakeSector(sectorlines, oldlines, useDefaultTextures); if(newsector == null) return false; if(istruenewsector) newsector.Marked = true; @@ -1399,7 +1398,7 @@ namespace CodeImp.DoomBuilder.Geometry } // Have our new lines join the existing sector - if(Tools.JoinSector(newsectorlines, joinsidedef) == null) + if(Tools.JoinSector(newsectorlines, joinsidedef, useDefaultTextures) == null) return false; } } diff --git a/Source/Core/Map/BlockEntry.cs b/Source/Core/Map/BlockEntry.cs index 06ade5d463b9480a222d2f95f4dbc81bd33c177e..e7c56cb2295b6f8a563d6d8f1e41d8a7ee3fcb60 100644 --- a/Source/Core/Map/BlockEntry.cs +++ b/Source/Core/Map/BlockEntry.cs @@ -30,6 +30,7 @@ namespace CodeImp.DoomBuilder.Map private List<Linedef> lines; private List<Thing> things; private List<Sector> sectors; + private List<Vertex> verts; //mxd #endregion @@ -38,6 +39,7 @@ namespace CodeImp.DoomBuilder.Map public List<Linedef> Lines { get { return lines; } } public List<Thing> Things { get { return things; } } public List<Sector> Sectors { get { return sectors; } } + public List<Vertex> Vertices { get { return verts; } } //mxd #endregion @@ -49,6 +51,7 @@ namespace CodeImp.DoomBuilder.Map lines = new List<Linedef>(2); things = new List<Thing>(2); sectors = new List<Sector>(2); + verts = new List<Vertex>(2); //mxd } #endregion diff --git a/Source/Core/Map/BlockMap.cs b/Source/Core/Map/BlockMap.cs index 0eedda01566db04aa5664465005b359b61cc3fea..5c60a1c688341d06e230e17d62c1072f7b9996d9 100644 --- a/Source/Core/Map/BlockMap.cs +++ b/Source/Core/Map/BlockMap.cs @@ -321,7 +321,7 @@ namespace CodeImp.DoomBuilder.Map return entries; } - // This puts a thing in the blockmap + // This puts things in the blockmap public virtual void AddThingsSet(ICollection<Thing> things) { foreach(Thing t in things) AddThing(t); @@ -334,7 +334,18 @@ namespace CodeImp.DoomBuilder.Map if(IsInRange(p)) blockmap[p.X, p.Y].Things.Add(t); } - // This puts a secotr in the blockmap + //mxd. This puts vertices in the blockmap + public virtual void AddVerticesSet(ICollection<Vertex> verts) { + foreach(Vertex v in verts) AddVertex(v); + } + + //mxd. This puts a vertex in the blockmap + public virtual void AddVertex(Vertex v) { + Point p = GetBlockCoordinates(v.Position); + if(IsInRange(p)) blockmap[p.X, p.Y].Vertices.Add(v); + } + + // This puts sectors in the blockmap public virtual void AddSectorsSet(ICollection<Sector> sectors) { foreach(Sector s in sectors) AddSector(s); diff --git a/Source/Core/Map/Linedef.cs b/Source/Core/Map/Linedef.cs index 597dcc9b2bc4868da78383d6c50511ce04b2145d..a5e48236360dbffe5988844196c2c7e603ff120c 100644 --- a/Source/Core/Map/Linedef.cs +++ b/Source/Core/Map/Linedef.cs @@ -862,18 +862,15 @@ namespace CodeImp.DoomBuilder.Map // Returns false when the operation could not be completed public bool Join(Linedef other) { - Sector l1fs, l1bs, l2fs, l2bs; - bool l1was2s, l2was2s; - // Check which lines were 2 sided - l1was2s = ((other.Front != null) && (other.Back != null)); - l2was2s = ((this.Front != null) && (this.Back != null)); + bool l1was2s = ((other.Front != null) && (other.Back != null)); + bool l2was2s = ((this.Front != null) && (this.Back != null)); // Get sector references - if(other.front != null) l1fs = other.front.Sector; else l1fs = null; - if(other.back != null) l1bs = other.back.Sector; else l1bs = null; - if(this.front != null) l2fs = this.front.Sector; else l2fs = null; - if(this.back != null) l2bs = this.back.Sector; else l2bs = null; + Sector l1fs = other.front != null ? other.front.Sector : null; + Sector l1bs = other.back != null ? other.back.Sector : null; + Sector l2fs = this.front != null ? this.front.Sector : null; + Sector l2bs = this.back != null ? this.back.Sector : null; // This line has no sidedefs? if((l2fs == null) && (l2bs == null)) diff --git a/Source/Core/Windows/OpenMapOptionsForm.cs b/Source/Core/Windows/OpenMapOptionsForm.cs index 8130b8cad06aed23381a2b1e0217d1d5e7852231..4bc2e5cdcaf6c8b9f6bd46bb1718ebbb3058d6bb 100644 --- a/Source/Core/Windows/OpenMapOptionsForm.cs +++ b/Source/Core/Windows/OpenMapOptionsForm.cs @@ -260,8 +260,8 @@ namespace CodeImp.DoomBuilder.Windows // Go for all the lumps in the wad for(scanindex = 0; scanindex < (wadfile.Lumps.Count - 1); scanindex++) { - // Make sure this lump is not part of the map - if(!maplumpnames.Contains(wadfile.Lumps[scanindex].Name)) + // Make sure this lump is not part of the map. Also make sure that no data is stored in that lump (mxd) + if(!maplumpnames.Contains(wadfile.Lumps[scanindex].Name) && wadfile.Lumps[scanindex].Length == 0) { // Reset check lumpsfound = 0; diff --git a/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs b/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs index f6f99207cf682bcec258d5ee2b2d9447ae0ad6ad..61648b47b0f88ec812122783da448b34f217aedd 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs @@ -200,7 +200,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes { //sector in row for (int c = 0; c < drawShapes[i].Count; c++) { - if (!Tools.DrawLines(drawShapes[i][c])) { + if(!Tools.DrawLines(drawShapes[i][c], false, true)) { // Drawing failed // NOTE: I have to call this twice, because the first time only cancels this volatile mode General.Interface.DisplayStatus(StatusType.Warning, "Failed to create a Bezier Path..."); diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs index 79e87379b7c69cc8c7a80752281227b9d9054a33..94420ce4b5e0bc958eac0bec50543b9bc749ec71 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs @@ -180,7 +180,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes } // Make the drawing - if(!Tools.DrawLines(verts, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) //mxd + if(!Tools.DrawLines(verts, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) //mxd { // Drawing failed // NOTE: I have to call this twice, because the first time only cancels this volatile mode diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs index 3052a16fa9a616f8f2924660a13d492a1406b0fb..a5829c01fbb6562a2fa62f662bacbf9b130ba0ca 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs @@ -471,7 +471,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " drawing."); // Make the drawing - if(!Tools.DrawLines(points, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) //mxd + if(!Tools.DrawLines(points, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) //mxd { // Drawing failed // NOTE: I have to call this twice, because the first time only cancels this volatile mode diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs index 471d51a81dddb78c25e5c637dbe57776fc1bce01..afa029a8cfabb48221f917b871cc970077b800c1 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs @@ -37,7 +37,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes protected PixelColor cornersColor; - public DrawRectangleMode() : base() { + public DrawRectangleMode() { snaptogrid = true; cornersColor = General.Colors.BrightColors[new Random().Next(General.Colors.BrightColors.Length - 1)]; } @@ -52,17 +52,15 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes override protected void Update() { PixelColor stitchcolor = General.Colors.Highlight; PixelColor losecolor = General.Colors.Selection; - PixelColor color; snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; DrawnVertex curp = GetCurrentPosition(); - float vsize = ((float)renderer.VertexSize + 1.0f) / renderer.Scale; - float vsizeborder = ((float)renderer.VertexSize + 3.0f) / renderer.Scale; + float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale; // Render drawing lines if (renderer.StartOverlay(true)) { - color = snaptonearest ? stitchcolor : losecolor; + PixelColor color = snaptonearest ? stitchcolor : losecolor; if (points.Count == 1) { updateReferencePoints(points[0], curp); @@ -77,7 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes renderer.RenderRectangleFilled(new RectangleF(shape[i].x - vsize, shape[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); //and labels - Vector2D[] labelCoords = new Vector2D[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; + Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; for (int i = 1; i < 5; i++) { labels[i - 1].Start = labelCoords[i - 1]; labels[i - 1].End = labelCoords[i]; @@ -122,13 +120,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes //line if(pEnd.x == pStart.x || pEnd.y == pStart.y) { currentBevelWidth = 0; - return new Vector2D[] { pStart, pEnd }; + return new[] { pStart, pEnd }; } //no corners if (bevelWidth == 0) { currentBevelWidth = 0; - return new Vector2D[] { pStart, new Vector2D((int)pEnd.x, (int)pStart.y), pEnd, new Vector2D((int)pStart.x, (int)pEnd.y), pStart }; + return new[] { pStart, new Vector2D((int)pEnd.x, (int)pStart.y), pEnd, new Vector2D((int)pStart.x, (int)pEnd.y), pStart }; } //got corners @@ -219,7 +217,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes points.Add(newpoint); if (points.Count == 1) { //add point and labels - labels.AddRange(new LineLengthLabel[] { new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false) }); + labels.AddRange(new[] { new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false) }); hintLabel = new HintLabel(); Update(); } else if (points[0].pos == points[1].pos) { //nothing is drawn @@ -256,14 +254,14 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes General.Map.UndoRedo.CreateUndo(undoName); // Make an analysis and show info - string[] adjectives = new string[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) + string[] adjectives = new[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) string word = adjectives[new Random().Next(adjectives.Length - 1)]; string a = (word[0] == 'u' ? "an " : "a "); General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " " + shapeName+"."); // Make the drawing - if (!Tools.DrawLines(points, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) { + if (!Tools.DrawLines(points, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) { // Drawing failed // NOTE: I have to call this twice, because the first time only cancels this volatile mode General.Map.UndoRedo.WithdrawUndo(); diff --git a/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs b/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs index 28e23865f84016ba6ec2da35563186351ff40cfe..2ec6ea22fdecd0daabd738226f67c3eff32d0736 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs @@ -231,7 +231,7 @@ namespace CodeImp.DoomBuilder.BuilderModes List<Linedef> oldlines = General.Map.Map.GetMarkedLinedefs(true); // Make the sector - Sector s = Tools.MakeSector(allsides, oldlines); + Sector s = Tools.MakeSector(allsides, oldlines, false); if(s != null) { // Now we go for all the lines along the sector to diff --git a/Source/Plugins/BuilderModes/ClassicModes/SnapVerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SnapVerticesMode.cs index 9967b6f70cfd33560a75f59119c5dce1abbddcc7..99a883920eb2aff2a07c505d9bbfbe7a13bc1128 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SnapVerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SnapVerticesMode.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; using System.Windows.Forms; using CodeImp.DoomBuilder.Editing; using CodeImp.DoomBuilder.Geometry; @@ -67,14 +69,25 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes } } - //merge overlapping vertices - Dictionary<Vector2D, Vertex> vertsByPosition = new Dictionary<Vector2D, Vertex>(); - foreach(Vertex v in General.Map.Map.Vertices){ - if(v == null || v.IsDisposed) continue; - if(!vertsByPosition.ContainsKey(v.Position)) - vertsByPosition.Add(v.Position, v); - else - v.Join(vertsByPosition[v.Position]); + //Create blockmap + RectangleF area = MapSet.CreateArea(General.Map.Map.Vertices); + BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area); + blockmap.AddVerticesSet(General.Map.Map.Vertices); + + //merge overlapping vertices using teh power of BLOCKMAP!!!11 + BlockEntry block; + foreach (Vertex v in movedVerts) { + block = blockmap.GetBlockAt(v.Position); + if (block == null) continue; + + foreach (Vertex blockVert in block.Vertices) { + if(!blockVert.IsDisposed && blockVert.Index != v.Index && blockVert.Position == v.Position) { + foreach(Linedef l in blockVert.Linedefs) + if(!movedLines.Contains(l)) movedLines.Add(l); + v.Join(blockVert); + break; + } + } } // Update cached values of lines because we may need their length/angle @@ -85,16 +98,41 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes MapSet.JoinOverlappingLines(movedLines); General.Map.Map.EndAddRemove(); - // Redraw changed lines - foreach(Linedef line in movedLines) { - if(line == null || line.IsDisposed) continue; - DrawnVertex start = new DrawnVertex { pos = line.Start.Position, stitch = true, stitchline = true }; - DrawnVertex end = new DrawnVertex { pos = line.End.Position, stitch = true, stitchline = true }; - Tools.DrawLines(new List<DrawnVertex> { start, end }); + //get changed sectors + List<Sector> changedSectors = new List<Sector>(); + foreach(Linedef l in movedLines) { + if(l == null || l.IsDisposed) continue; + if(l.Front != null && l.Front.Sector != null && !changedSectors.Contains(l.Front.Sector)) + changedSectors.Add(l.Front.Sector); + if(l.Back != null && l.Back.Sector != null && !changedSectors.Contains(l.Back.Sector)) + changedSectors.Add(l.Back.Sector); + } + + // Now update area of sectors + General.Map.Map.Update(false, true); + + //fix invalid sectors + foreach (Sector s in changedSectors) { + if(s.BBox.IsEmpty) { + s.Dispose(); + }else if (s.Sidedefs.Count < 3) { + bool merged = false; + foreach(Sidedef side in s.Sidedefs) { + if(side.Other != null && side.Other.Sector != null) { + s.Join(side.Other.Sector); + merged = true; + break; + } + } + + //oh well, I don't know what else I can do here... + if(!merged) s.Dispose(); + } } //done General.Interface.DisplayStatus(StatusType.Info, "Snapped " + snappedCount + " vertices."); + MessageBox.Show("Snapped " + snappedCount + " vertices." + Environment.NewLine + "It's a good idea to run Map Analysis Mode now."); base.OnAccept(); General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name); } diff --git a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs index 67b3753031aa6213a78a6b1ab615ead43f49319e..9c9369413ff3c8d6dda96128d89a77b255ee5561 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs @@ -830,16 +830,16 @@ namespace CodeImp.DoomBuilder.BuilderModes //collect linedefs count per vertex Dictionary<Vertex, int> linesPerVertex = new Dictionary<Vertex, int>(); - List<Sector> affectedSectors = new List<Sector>(); + //List<Sector> affectedSectors = new List<Sector>(); foreach(Vertex v in selected) { linesPerVertex.Add(v, v.Linedefs.Count); - foreach(Linedef l in v.Linedefs) { + /*foreach(Linedef l in v.Linedefs) { if(l.Front != null && l.Front.Sector != null && !affectedSectors.Contains(l.Front.Sector)) affectedSectors.Add(l.Front.Sector); if(l.Back != null && l.Back.Sector != null && !affectedSectors.Contains(l.Back.Sector)) affectedSectors.Add(l.Back.Sector); - } + }*/ } // Go for all vertices that need to be removed @@ -935,7 +935,7 @@ namespace CodeImp.DoomBuilder.BuilderModes dv2.stitch = true; dv1.pos = start; dv2.pos = end; - Tools.DrawLines(new List<DrawnVertex>() { dv1, dv2 }); + Tools.DrawLines(new List<DrawnVertex>() { dv1, dv2 }, false, false); // Update cache values General.Map.Map.Update(); diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs index 7cb4935eecf842fe1ec764c75ffb152204770ac1..e62272a34d1b1e686cb965dd00bdc77ea960988e 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs @@ -67,14 +67,26 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach (Linedef line in lines) if (line.Length == 0) line.Dispose(); - if(lines.Count == 0) { + if (lines.Count == 0) { sector.Dispose(); + } else if(lines.Count < 3) { //merge with surrounding geometry + bool merged = false; + foreach(Sidedef side in sector.Sidedefs) { + if(side.Other != null && side.Other.Sector != null) { + sector.Join(side.Other.Sector); + merged = true; + break; + } + } + + //oh well, I don't know what else I can do here... + if(!merged) sector.Dispose(); } else { //redraw the lines foreach(Linedef line in lines) { if(line.IsDisposed) continue; DrawnVertex start = new DrawnVertex { pos = line.Start.Position, stitch = true, stitchline = true }; DrawnVertex end = new DrawnVertex { pos = line.End.Position, stitch = true, stitchline = true }; - Tools.DrawLines(new List<DrawnVertex> { start, end }); + Tools.DrawLines(new List<DrawnVertex> { start, end }, false, false); } } diff --git a/Source/Plugins/BuilderModes/General/BuilderPlug.cs b/Source/Plugins/BuilderModes/General/BuilderPlug.cs index e529180932937bff9a25388c292c80a7f220ea1d..136ffbcd5f66e6aa0713735b24ae1a115906f7de 100644 --- a/Source/Plugins/BuilderModes/General/BuilderPlug.cs +++ b/Source/Plugins/BuilderModes/General/BuilderPlug.cs @@ -663,10 +663,9 @@ namespace CodeImp.DoomBuilder.BuilderModes public Type[] FindClasses(Type t) { List<Type> found = new List<Type>(); - Type[] types; // Get all exported types - types = Assembly.GetExecutingAssembly().GetTypes(); + Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach(Type it in types) { // Compare types @@ -799,7 +798,6 @@ namespace CodeImp.DoomBuilder.BuilderModes } if(General.Settings.GZShowEventLines) { //mxd - //renderer.PlotArrows(lines, General.Colors.InfoLine); foreach(Line3D l in lines) { renderer.PlotArrow(l, l.LineType == Line3DType.ACTIVATOR ? General.Colors.Selection : General.Colors.InfoLine); } @@ -836,7 +834,6 @@ namespace CodeImp.DoomBuilder.BuilderModes } if(General.Settings.GZShowEventLines) {//mxd - //renderer.RenderArrows(lines, General.Colors.InfoLine); foreach(Line3D l in lines) { renderer.RenderArrow(l, l.LineType == Line3DType.ACTIVATOR ? General.Colors.Selection : General.Colors.InfoLine); } @@ -859,7 +856,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //show settings form WavefrontSettingsForm form = new WavefrontSettingsForm(General.Map.Map.SelectedSectorsCount == 0 ? -1 : sectors.Count); - if(form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { + if(form.ShowDialog() == DialogResult.OK) { WavefrontExportSettings data = new WavefrontExportSettings(Path.GetFileNameWithoutExtension(form.FilePath), Path.GetDirectoryName(form.FilePath), BuilderPlug.Me.ObjScale, BuilderPlug.Me.ObjGZDoomScale, BuilderPlug.Me.ObjExportTextures); WavefrontExporter e = new WavefrontExporter(); e.Export(sectors, data); diff --git a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs index c451f677dba4ead38b3963f970f4846e8d5a5a27..4c00d829f9b5744d067ce07bc02b76a311aa9f42 100644 --- a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs @@ -28,195 +28,197 @@ namespace CodeImp.DoomBuilder.BuilderModes /// </summary> private void InitializeComponent() { - this.checks = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); - this.buttoncheck = new System.Windows.Forms.Button(); - this.results = new System.Windows.Forms.ListBox(); - this.resultspanel = new System.Windows.Forms.Panel(); - this.cbApplyToAll = new System.Windows.Forms.CheckBox(); - this.fix3 = new System.Windows.Forms.Button(); - this.fix2 = new System.Windows.Forms.Button(); - this.resultinfo = new System.Windows.Forms.Label(); - this.fix1 = new System.Windows.Forms.Button(); - this.progress = new System.Windows.Forms.ProgressBar(); - this.closebutton = new System.Windows.Forms.Button(); - this.bExport = new System.Windows.Forms.Button(); - this.resultspanel.SuspendLayout(); - this.SuspendLayout(); - // - // checks - // - this.checks.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.checks.AutoScroll = true; - this.checks.AutoSize = true; - this.checks.Columns = 2; - this.checks.Location = new System.Drawing.Point(10, 15); - this.checks.Margin = new System.Windows.Forms.Padding(1); - this.checks.Name = "checks"; - this.checks.Size = new System.Drawing.Size(360, 63); - this.checks.TabIndex = 0; - // - // buttoncheck - // - this.buttoncheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttoncheck.Location = new System.Drawing.Point(254, 89); - this.buttoncheck.Margin = new System.Windows.Forms.Padding(1); - this.buttoncheck.Name = "buttoncheck"; - this.buttoncheck.Size = new System.Drawing.Size(116, 25); - this.buttoncheck.TabIndex = 1; - this.buttoncheck.Text = "Start Analysis"; - this.buttoncheck.UseVisualStyleBackColor = true; - this.buttoncheck.Click += new System.EventHandler(this.buttoncheck_Click); - // - // results - // - this.results.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.results.FormattingEnabled = true; - this.results.IntegralHeight = false; - this.results.ItemHeight = 14; - this.results.Location = new System.Drawing.Point(10, 34); - this.results.Margin = new System.Windows.Forms.Padding(1); - this.results.Name = "results"; - this.results.Size = new System.Drawing.Size(360, 168); - this.results.TabIndex = 0; - this.results.SelectedIndexChanged += new System.EventHandler(this.results_SelectedIndexChanged); - // - // resultspanel - // - this.resultspanel.Controls.Add(this.cbApplyToAll); - this.resultspanel.Controls.Add(this.fix3); - this.resultspanel.Controls.Add(this.fix2); - this.resultspanel.Controls.Add(this.resultinfo); - this.resultspanel.Controls.Add(this.fix1); - this.resultspanel.Controls.Add(this.progress); - this.resultspanel.Controls.Add(this.results); - this.resultspanel.Location = new System.Drawing.Point(0, 124); - this.resultspanel.Name = "resultspanel"; - this.resultspanel.Size = new System.Drawing.Size(383, 343); - this.resultspanel.TabIndex = 2; - // - // cbApplyToAll - // - this.cbApplyToAll.AutoSize = true; - this.cbApplyToAll.Location = new System.Drawing.Point(12, 317); - this.cbApplyToAll.Name = "cbApplyToAll"; - this.cbApplyToAll.Size = new System.Drawing.Size(169, 18); - this.cbApplyToAll.TabIndex = 6; - this.cbApplyToAll.Text = "Apply to all errors of this type"; - this.cbApplyToAll.UseVisualStyleBackColor = true; - // - // fix3 - // - this.fix3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.fix3.Location = new System.Drawing.Point(256, 285); - this.fix3.Name = "fix3"; - this.fix3.Size = new System.Drawing.Size(114, 26); - this.fix3.TabIndex = 3; - this.fix3.Text = "Fix 3"; - this.fix3.UseVisualStyleBackColor = true; - this.fix3.Visible = false; - this.fix3.Click += new System.EventHandler(this.fix3_Click); - // - // fix2 - // - this.fix2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.fix2.Location = new System.Drawing.Point(133, 285); - this.fix2.Name = "fix2"; - this.fix2.Size = new System.Drawing.Size(114, 26); - this.fix2.TabIndex = 2; - this.fix2.Text = "Fix 2"; - this.fix2.UseVisualStyleBackColor = true; - this.fix2.Visible = false; - this.fix2.Click += new System.EventHandler(this.fix2_Click); - // - // resultinfo - // - this.resultinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.resultinfo.Enabled = false; - this.resultinfo.Location = new System.Drawing.Point(12, 208); - this.resultinfo.Name = "resultinfo"; - this.resultinfo.Size = new System.Drawing.Size(358, 74); - this.resultinfo.TabIndex = 5; - this.resultinfo.Text = "Select a result from the list to see more information."; - // - // fix1 - // - this.fix1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.fix1.Location = new System.Drawing.Point(10, 285); - this.fix1.Name = "fix1"; - this.fix1.Size = new System.Drawing.Size(114, 26); - this.fix1.TabIndex = 1; - this.fix1.Text = "Fix 1"; - this.fix1.UseVisualStyleBackColor = true; - this.fix1.Visible = false; - this.fix1.Click += new System.EventHandler(this.fix1_Click); - // - // progress - // - this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.progress.Location = new System.Drawing.Point(10, 3); - this.progress.Margin = new System.Windows.Forms.Padding(1); - this.progress.Name = "progress"; - this.progress.Size = new System.Drawing.Size(360, 18); - this.progress.TabIndex = 3; - this.progress.Value = 30; - // - // closebutton - // - this.closebutton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.closebutton.Location = new System.Drawing.Point(-500, 134); - this.closebutton.Name = "closebutton"; - this.closebutton.Size = new System.Drawing.Size(116, 25); - this.closebutton.TabIndex = 4; - this.closebutton.Text = "Close"; - this.closebutton.UseVisualStyleBackColor = true; - this.closebutton.Click += new System.EventHandler(this.closebutton_Click); - // - // bExport - // - this.bExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bExport.Enabled = false; - this.bExport.Location = new System.Drawing.Point(10, 89); - this.bExport.Margin = new System.Windows.Forms.Padding(1); - this.bExport.Name = "bExport"; - this.bExport.Size = new System.Drawing.Size(116, 25); - this.bExport.TabIndex = 5; - this.bExport.Text = "Export results to file"; - this.bExport.UseVisualStyleBackColor = true; - this.bExport.Click += new System.EventHandler(this.bExport_Click); - // - // ErrorCheckForm - // - this.AcceptButton = this.buttoncheck; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.closebutton; - this.ClientSize = new System.Drawing.Size(380, 468); - this.Controls.Add(this.bExport); - this.Controls.Add(this.closebutton); - this.Controls.Add(this.resultspanel); - this.Controls.Add(this.buttoncheck); - this.Controls.Add(this.checks); - this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ErrorCheckForm"; - this.Opacity = 0; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "Map Analysis"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ErrorCheckForm_FormClosing); - this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ErrorCheckForm_HelpRequested); - this.resultspanel.ResumeLayout(false); - this.resultspanel.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.checks = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.buttoncheck = new System.Windows.Forms.Button(); + this.results = new System.Windows.Forms.ListBox(); + this.resultspanel = new System.Windows.Forms.Panel(); + this.cbApplyToAll = new System.Windows.Forms.CheckBox(); + this.fix3 = new System.Windows.Forms.Button(); + this.fix2 = new System.Windows.Forms.Button(); + this.resultinfo = new System.Windows.Forms.Label(); + this.fix1 = new System.Windows.Forms.Button(); + this.progress = new System.Windows.Forms.ProgressBar(); + this.closebutton = new System.Windows.Forms.Button(); + this.bExport = new System.Windows.Forms.Button(); + this.resultspanel.SuspendLayout(); + this.SuspendLayout(); + // + // checks + // + this.checks.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.checks.AutoScroll = true; + this.checks.AutoSize = true; + this.checks.Columns = 2; + this.checks.Location = new System.Drawing.Point(10, 15); + this.checks.Margin = new System.Windows.Forms.Padding(1); + this.checks.Name = "checks"; + this.checks.Size = new System.Drawing.Size(360, 63); + this.checks.TabIndex = 0; + this.checks.VerticalSpacing = 1; + // + // buttoncheck + // + this.buttoncheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttoncheck.Location = new System.Drawing.Point(254, 89); + this.buttoncheck.Margin = new System.Windows.Forms.Padding(1); + this.buttoncheck.Name = "buttoncheck"; + this.buttoncheck.Size = new System.Drawing.Size(116, 25); + this.buttoncheck.TabIndex = 1; + this.buttoncheck.Text = "Start Analysis"; + this.buttoncheck.UseVisualStyleBackColor = true; + this.buttoncheck.Click += new System.EventHandler(this.buttoncheck_Click); + // + // results + // + this.results.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.results.FormattingEnabled = true; + this.results.IntegralHeight = false; + this.results.ItemHeight = 14; + this.results.Location = new System.Drawing.Point(10, 34); + this.results.Margin = new System.Windows.Forms.Padding(1); + this.results.Name = "results"; + this.results.Size = new System.Drawing.Size(360, 168); + this.results.Sorted = true; + this.results.TabIndex = 0; + this.results.SelectedIndexChanged += new System.EventHandler(this.results_SelectedIndexChanged); + // + // resultspanel + // + this.resultspanel.Controls.Add(this.cbApplyToAll); + this.resultspanel.Controls.Add(this.fix3); + this.resultspanel.Controls.Add(this.fix2); + this.resultspanel.Controls.Add(this.resultinfo); + this.resultspanel.Controls.Add(this.fix1); + this.resultspanel.Controls.Add(this.progress); + this.resultspanel.Controls.Add(this.results); + this.resultspanel.Location = new System.Drawing.Point(0, 124); + this.resultspanel.Name = "resultspanel"; + this.resultspanel.Size = new System.Drawing.Size(383, 343); + this.resultspanel.TabIndex = 2; + // + // cbApplyToAll + // + this.cbApplyToAll.AutoSize = true; + this.cbApplyToAll.Location = new System.Drawing.Point(12, 317); + this.cbApplyToAll.Name = "cbApplyToAll"; + this.cbApplyToAll.Size = new System.Drawing.Size(169, 18); + this.cbApplyToAll.TabIndex = 6; + this.cbApplyToAll.Text = "Apply to all errors of this type"; + this.cbApplyToAll.UseVisualStyleBackColor = true; + // + // fix3 + // + this.fix3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.fix3.Location = new System.Drawing.Point(256, 285); + this.fix3.Name = "fix3"; + this.fix3.Size = new System.Drawing.Size(114, 26); + this.fix3.TabIndex = 3; + this.fix3.Text = "Fix 3"; + this.fix3.UseVisualStyleBackColor = true; + this.fix3.Visible = false; + this.fix3.Click += new System.EventHandler(this.fix3_Click); + // + // fix2 + // + this.fix2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.fix2.Location = new System.Drawing.Point(133, 285); + this.fix2.Name = "fix2"; + this.fix2.Size = new System.Drawing.Size(114, 26); + this.fix2.TabIndex = 2; + this.fix2.Text = "Fix 2"; + this.fix2.UseVisualStyleBackColor = true; + this.fix2.Visible = false; + this.fix2.Click += new System.EventHandler(this.fix2_Click); + // + // resultinfo + // + this.resultinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.resultinfo.Enabled = false; + this.resultinfo.Location = new System.Drawing.Point(12, 208); + this.resultinfo.Name = "resultinfo"; + this.resultinfo.Size = new System.Drawing.Size(358, 74); + this.resultinfo.TabIndex = 5; + this.resultinfo.Text = "Select a result from the list to see more information."; + // + // fix1 + // + this.fix1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.fix1.Location = new System.Drawing.Point(10, 285); + this.fix1.Name = "fix1"; + this.fix1.Size = new System.Drawing.Size(114, 26); + this.fix1.TabIndex = 1; + this.fix1.Text = "Fix 1"; + this.fix1.UseVisualStyleBackColor = true; + this.fix1.Visible = false; + this.fix1.Click += new System.EventHandler(this.fix1_Click); + // + // progress + // + this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.progress.Location = new System.Drawing.Point(10, 3); + this.progress.Margin = new System.Windows.Forms.Padding(1); + this.progress.Name = "progress"; + this.progress.Size = new System.Drawing.Size(360, 18); + this.progress.TabIndex = 3; + this.progress.Value = 30; + // + // closebutton + // + this.closebutton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closebutton.Location = new System.Drawing.Point(-500, 134); + this.closebutton.Name = "closebutton"; + this.closebutton.Size = new System.Drawing.Size(116, 25); + this.closebutton.TabIndex = 4; + this.closebutton.Text = "Close"; + this.closebutton.UseVisualStyleBackColor = true; + this.closebutton.Click += new System.EventHandler(this.closebutton_Click); + // + // bExport + // + this.bExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bExport.Enabled = false; + this.bExport.Location = new System.Drawing.Point(10, 89); + this.bExport.Margin = new System.Windows.Forms.Padding(1); + this.bExport.Name = "bExport"; + this.bExport.Size = new System.Drawing.Size(116, 25); + this.bExport.TabIndex = 5; + this.bExport.Text = "Export results to file"; + this.bExport.UseVisualStyleBackColor = true; + this.bExport.Click += new System.EventHandler(this.bExport_Click); + // + // ErrorCheckForm + // + this.AcceptButton = this.buttoncheck; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.CancelButton = this.closebutton; + this.ClientSize = new System.Drawing.Size(380, 468); + this.Controls.Add(this.bExport); + this.Controls.Add(this.closebutton); + this.Controls.Add(this.resultspanel); + this.Controls.Add(this.buttoncheck); + this.Controls.Add(this.checks); + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ErrorCheckForm"; + this.Opacity = 0; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Map Analysis"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ErrorCheckForm_FormClosing); + this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ErrorCheckForm_HelpRequested); + this.resultspanel.ResumeLayout(false); + this.resultspanel.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.resx b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.resx index aa42f258673428b58b7d9beaac1f6112a2c5bfcf..d784b06664319f6a135304da72ad4b8cd59c69ea 100644 --- a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.resx +++ b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.resx @@ -123,9 +123,6 @@ <metadata name="progress.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="progress.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="closebutton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata>