Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method)

This commit is contained in:
Regalis
2016-10-31 20:35:04 +02:00
parent 5cc605bc01
commit eb2c51c2f1
46 changed files with 93 additions and 200 deletions
+3 -5
View File
@@ -304,7 +304,7 @@ namespace Barotrauma
for (int i = 0; i<dummyCharacter.Inventory.SlotPositions.Length; i++)
{
dummyCharacter.Inventory.SlotPositions[i].X += false ? -1000 : leftPanel.Rect.Width+10;
dummyCharacter.Inventory.SlotPositions[i].X += leftPanel.Rect.Width+10;
}
Character.Controlled = dummyCharacter;
@@ -472,16 +472,14 @@ namespace Barotrauma
var deleteButton = new GUIButton(new Rectangle(0, 0, 70, 20), "Delete", Alignment.BottomLeft, GUI.Style, loadFrame);
deleteButton.Enabled = false;
deleteButton.UserData = "delete";
deleteButton.OnClicked = (GUIButton btn, object userdata) =>
deleteButton.OnClicked = (btn, userdata) =>
{
var subListBox = loadFrame.GetChild<GUIListBox>();
if (subList.Selected!=null)
{
Submarine sub = subList.Selected.UserData as Submarine;
try
{
System.IO.File.Delete(sub.FilePath);
File.Delete(sub.FilePath);
}
catch (Exception e)
{