Skip to content

Commit

Permalink
Some minor changes, as well as updating NuGet package for MathNet.
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberBotX committed Apr 10, 2017
1 parent 30f5871 commit 61f4d1f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ColorToWall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void FlashInternal(int interval, Color flashColor, int flashes)

void cbWall_SelectedIndexChanged(object sender, EventArgs e)
{
var wallItemName = this.CurrentWallName;
string wallItemName = this.CurrentWallName;
this.cbWallColor.Enabled = wallItemName != "No Wall";

this.WallSelectorChanged?.Invoke(sender, new WallSelectorChangedEventArgs(this.Color, wallItemName, this.CurrentColorName));
Expand Down
4 changes: 1 addition & 3 deletions FindClosestColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ public Color SelectedColor
public void UpdateSelectedColorLabel() =>
this.lblSelectedColor.Text = FormattableString.Invariant($"({this.SelectedColor.R}, {this.SelectedColor.G}, {this.SelectedColor.B}, {this.SelectedColor.A})");

public void UpdateSelectedColorWall()
{
public void UpdateSelectedColorWall() =>
this.pnlWall.BackgroundImage = MainForm.GetWallFrame(this.selectedColorItem.WallItem.Name, this.selectedColorItem.Color, 0, 0, 0);
}

void lbColors_SelectedIndexChanged(object sender, EventArgs e)
{
Expand Down
4 changes: 2 additions & 2 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void pictureBox_Click(object sender, EventArgs e)
int x = mouseArgs.X / 16;
int y = mouseArgs.Y / 16;
var color = MainForm.currentBitmap.GetPixel(x, y);
var colorIndex = MainForm.currentImageColors.Keys.ToList().IndexOf(color);
int colorIndex = MainForm.currentImageColors.Keys.ToList().IndexOf(color);
(this.flpColorToWall.Controls[colorIndex] as ColorToWall).Flash(500, Color.Red, 3);
this.flpColorToWall.ScrollControlIntoView(this.flpColorToWall.Controls[colorIndex]);
}
Expand Down Expand Up @@ -171,7 +171,7 @@ void picutreBox_MouseMove(object sender, MouseEventArgs e)
if (x == MainForm.currentBitmap.Width || y == MainForm.currentBitmap.Height)
return;
var color = MainForm.currentBitmap.GetPixel(x, y);
var colorIndex = MainForm.currentImageColors.Keys.ToList().IndexOf(color);
int colorIndex = MainForm.currentImageColors.Keys.ToList().IndexOf(color);
var colorToWall = this.flpColorToWall.Controls[colorIndex] as ColorToWall;
this.tsslPipe.Visible = true;
this.tsslCurrentPixel.Text = FormattableString.Invariant($"Current Pixel: {x}, {y} | Currently Selected Wall: {colorToWall.SelectedWall}");
Expand Down
5 changes: 2 additions & 3 deletions TerrariaPixelArtHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@
<StartupObject>TerrariaPixelArtHelper.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="MathNet.Numerics, Version=3.17.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MathNet.Numerics.3.17.0\lib\net40\MathNet.Numerics.dll</HintPath>
<Private>True</Private>
<Reference Include="MathNet.Numerics, Version=3.18.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MathNet.Numerics.3.18.0\lib\net40\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="nQuant.Core, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\nQuant.1.0.3\lib\net40\nQuant.Core.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MathNet.Numerics" version="3.17.0" targetFramework="net46" />
<package id="MathNet.Numerics" version="3.18.0" targetFramework="net46" />
<package id="nQuant" version="1.0.3" targetFramework="net46" />
</packages>

0 comments on commit 61f4d1f

Please sign in to comment.