Skip to content

Commit

Permalink
Merge pull request #64 from lastbattle/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
LastBattle authored Jul 12, 2020
2 parents 986cbd8 + 6093ec6 commit 549de0d
Show file tree
Hide file tree
Showing 38 changed files with 448 additions and 413 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\!Release\EmptyKeysUI\Common\AnyCPU</OutputPath>
<DocumentationFile>..\..\!Release\EmptyKeysUI\Common\AnyCPU\netstandard2.0\EmptyKeys.UserInterface.Core.xml</DocumentationFile>
<OutputPath>..\Compiled\Release\</OutputPath>
<DocumentationFile>..\Compiled\Release\EmptyKeysUI\Common\AnyCPU\netstandard2.0\EmptyKeys.UserInterface.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\Compiled\Debug\</OutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
<RootNamespace>EmptyKeys.UserInterface.MonoGame</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\Compiled\Debug\</OutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Compiled\Release\</OutputPath>
</PropertyGroup>

<ItemGroup>
<Compile Remove="UserInterface\**" />
<EmbeddedResource Remove="UserInterface\**" />
Expand Down
16 changes: 5 additions & 11 deletions HaCreator/GUI/EditorPanels/BackgroundPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,11 @@ private void bgItem_Click(object sender, MouseEventArgs e)
WzStringProperty stringObj = (WzStringProperty)spineAtlasProp;
Thread thread = new Thread(() =>
{
try
{
WzSpineAnimationItem item = new WzSpineAnimationItem(stringObj);

// Create xna window
SpineAnimationWindow Window = new SpineAnimationWindow(item);
Window.Run();
}
catch (Exception ex)
{
}
WzSpineAnimationItem item = new WzSpineAnimationItem(stringObj);

// Create xna window
SpineAnimationWindow Window = new SpineAnimationWindow(item);
Window.Run();
});
thread.Start();
thread.Join();
Expand Down
6 changes: 5 additions & 1 deletion HaCreator/GUI/EditorPanels/ObjPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ private void objL1ListBox_SelectedIndexChanged(object sender, EventArgs e)
item.MaxHeight = UserSettings.ImageViewerHeight;
item.MaxWidth = UserSettings.ImageViewerWidth;
}
}catch(InvalidCastException ex) { return; }
}
catch(InvalidCastException)
{
return;
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion HaCreator/GUI/EditorPanels/PortalPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public void Initialize(HaCreatorStateManager hcsm)
item.MouseDown += new MouseEventHandler(portal_MouseDown);
item.MouseUp += new MouseEventHandler(ImageViewer.item_MouseUp);
}
catch (KeyNotFoundException e) { }
catch (KeyNotFoundException)
{
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion HaCreator/GUI/InstanceEditor/PortalInstanceEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public PortalInstanceEditor(PortalInstance item)
try
{
portals.Add(Tables.PortalTypeNames[Program.InfoManager.PortalTypeById[i]]);
}catch(KeyNotFoundException e) { continue; }
}
catch(KeyNotFoundException)
{
continue;
}
}

ptComboBox.Items.AddRange(portals.ToArray());
Expand Down
14 changes: 7 additions & 7 deletions HaCreator/GUI/Load.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public partial class Load : System.Windows.Forms.Form
private System.Windows.Controls.TabControl Tabs;
private System.Windows.RoutedEventHandler[] rightClickHandler;

private string defaultMapNameFilter;
private readonly string defaultMapNameFilter;

/// <summary>
///
Expand Down Expand Up @@ -78,7 +78,7 @@ private void Load_Load(object sender, EventArgs e)
}
}

private void selectionChanged(object sender, EventArgs e)
private void SelectionChanged(object sender, EventArgs e)
{
if (HAMSelect.Checked)
{
Expand Down Expand Up @@ -109,7 +109,7 @@ private void selectionChanged(object sender, EventArgs e)
}
}

private void browseXML_Click(object sender, EventArgs e)
private void BrowseXML_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Title = "Select XML to load...";
Expand All @@ -122,7 +122,7 @@ private void browseXML_Click(object sender, EventArgs e)
loadButton.Enabled = true;
}

private void browseHAM_Click(object sender, EventArgs e)
private void BrowseHAM_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Title = "Select Map to load...";
Expand All @@ -135,7 +135,7 @@ private void browseHAM_Click(object sender, EventArgs e)
loadButton.Enabled = true;
}

private void loadButton_Click(object sender, EventArgs e)
private void LoadButton_Click(object sender, EventArgs e)
{
//Hide();
WaitWindow ww = new WaitWindow("Loading...");
Expand Down Expand Up @@ -207,7 +207,7 @@ private void loadButton_Click(object sender, EventArgs e)
Close();
}

private void mapBrowser_SelectionChanged()
private void MapBrowser_SelectionChanged()
{
loadButton.Enabled = mapBrowser.LoadAvailable;
}
Expand All @@ -220,7 +220,7 @@ private void Load_KeyDown(object sender, KeyEventArgs e)
}
else if (e.KeyCode == Keys.Enter)
{
loadButton_Click(null, null);
LoadButton_Click(null, null);
}
}

Expand Down
12 changes: 6 additions & 6 deletions HaCreator/GUI/Load.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions HaCreator/GUI/Repack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace HaCreator.GUI
{
public partial class Repack : Form
{
List<WzFile> toRepack = new List<WzFile>();
private readonly List<WzFile> toRepack = new List<WzFile>();

public Repack()
{
Expand Down Expand Up @@ -103,7 +103,7 @@ private void ChangeRepackState(string state)
/// <param name="bSaveFileInHaCreatorDirectory"></param>
private void FinishSuccess(bool bSaveFileInHaCreatorDirectory)
{
MessageBox.Show("Repacked successfully. " + (!bSaveFileInHaCreatorDirectory ? "press OK to restart." : "Please replace the files in HaCreator\\Output."));
MessageBox.Show("Repacked successfully. " + (!bSaveFileInHaCreatorDirectory ? "Please replace the files under the MapleStory directory." : "Please replace the files in HaCreator\\Output."));

if (!bSaveFileInHaCreatorDirectory)
{
Expand Down Expand Up @@ -247,14 +247,7 @@ private void RepackerThread()

if (!bSaveFileInHaCreatorDirectory) // only replace the original file if its saving in the maplestory folder
{
string buPath = Path.Combine(orgBackupDir, Path.GetFileName(orgFile));
// Try to backup to /Originals/ First, if there is already a file there, we are not original, so just backup to /Backup/
if (File.Exists(buPath))
{
buPath = Path.Combine(backupDir, Path.GetFileName(orgFile));
}
File.Move(orgFile, buPath);
File.Move(tmpFile, orgFile);
File.Move(tmpFile, orgFile + "_NewCreated.wz");
}
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion HaCreator/HaCreator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HaCreator</RootNamespace>
<AssemblyName>HaCreator</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand Down
2 changes: 1 addition & 1 deletion HaCreator/MapEditor/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void RenderBoard(SpriteBatch sprite)

public void CreateLayers()
{
for (int i = 0; i < MapConstants.MaxMapLayers; i++)
for (int i = 0; i <= MapConstants.MaxMapLayers; i++)
{
new Layer(this);
}
Expand Down
Loading

0 comments on commit 549de0d

Please sign in to comment.