Skip to content

Commit

Permalink
Merge pull request #5 from kemo14331/main
Browse files Browse the repository at this point in the history
ライブラリの整理
  • Loading branch information
kemo14331 committed Feb 3, 2021
2 parents a4564ac + 53d7869 commit 4281f7a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 24 deletions.
2 changes: 0 additions & 2 deletions ParticleConverter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Publish|Any CPU = Publish|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B5006587-6179-4CBD-80E0-DD423E9690AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5006587-6179-4CBD-80E0-DD423E9690AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5006587-6179-4CBD-80E0-DD423E9690AE}.Publish|Any CPU.ActiveCfg = Release|Any CPU
{B5006587-6179-4CBD-80E0-DD423E9690AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5006587-6179-4CBD-80E0-DD423E9690AE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
Expand Down
2 changes: 0 additions & 2 deletions ParticleConverter/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using ParticleConverter.util;
using System;
using System.IO;
using System.Windows;
using System.Windows.Threading;

Expand Down
8 changes: 4 additions & 4 deletions ParticleConverter/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Media;
using System.Reflection;
Expand All @@ -18,7 +19,6 @@
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Globalization;
using Color = System.Windows.Media.Color;
using ColorConverter = System.Windows.Media.ColorConverter;
using Particle = ParticleConverter.util.Particle;
Expand Down Expand Up @@ -278,7 +278,7 @@ private void Update_Preview()
double size = double.Parse(ParticleSizeBox.Text);
ParticleModel.Size = new System.Windows.Size(3 * Math.Sqrt(size), 3 * Math.Sqrt(size));
ParticleCounter.Text = $"Particles: {particles.Length}";
if(particles.Length >= 2000)
if (particles.Length >= 2000)
{
ParticleCounter.Foreground = new SolidColorBrush(Colors.Red);
CounterAlert.Visibility = Visibility.Visible;
Expand Down Expand Up @@ -374,7 +374,7 @@ private void BrowsImageButton_Click(object sender, RoutedEventArgs e)
private void Sync_SizeBoxes()
{
System.Windows.Size size = ImageConverter.GetBlocks();
Update_FilterTextBox(SizeWBox, size.Width.ToString("R",format));
Update_FilterTextBox(SizeWBox, size.Width.ToString("R", format));
Update_FilterTextBox(SizeHBox, size.Height.ToString("R", format));
}

Expand Down Expand Up @@ -522,7 +522,7 @@ private void SizeBox_LostFocus(object sender, RoutedEventArgs e)
{
double reheight = ImageConverter.ResizedHeight / (ImageConverter.ResizedWidth / double.Parse(sb.Text));
Update_FilterTextBox(SizeHBox, reheight.ToString("R", format));
Update_FilterTextBox(ParticleDensityBox, (ImageConverter.ResizedWidth / double.Parse(sb.Text)).ToString("R",format));
Update_FilterTextBox(ParticleDensityBox, (ImageConverter.ResizedWidth / double.Parse(sb.Text)).ToString("R", format));
ImageConverter.Density = ImageConverter.ResizedWidth / double.Parse(sb.Text);
}
if (sender.Equals(SizeHBox))
Expand Down
Binary file added ParticleConverter/OpenCvSharpExtern.dll
Binary file not shown.
29 changes: 22 additions & 7 deletions ParticleConverter/ParticleConverter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
<RepositoryUrl>https://github.com/kemo14331/Particle-Converter</RepositoryUrl>
<PackageIcon>icon.png</PackageIcon>
<ApplicationIcon>icon.ico</ApplicationIcon>
<AssemblyVersion>1.0.3.*</AssemblyVersion>
<Version>1.0.3</Version>
<FileVersion>1.0.2</FileVersion>
<AssemblyVersion>1.0.4.*</AssemblyVersion>
<Version>1.0.4</Version>
<FileVersion>1.0.4</FileVersion>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -35,7 +36,8 @@
<ItemGroup>
<PackageReference Include="HelixToolkit.SharpDX.Core.Wpf" Version="2.13.0" />
<PackageReference Include="MaterialDesignThemes" Version="3.2.0" />
<PackageReference Include="OpenCvSharp4" Version="4.4.0.20200915" />
<PackageReference Include="OpenCV" Version="2.4.11" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
</ItemGroup>

Expand All @@ -53,31 +55,44 @@
</ItemGroup>

<ItemGroup>
<None Update="OpenCvSharpExtern.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="OpenCvSharpExtern.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<Reference Include="OpenCvSharp">
<HintPath>..\..\..\..\..\Desktop\a\OpenCvSharp.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Page Update="lang\en-US.xaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Page>
<Page Update="lang\ja-JP.xaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Page>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(ProjectDir)\lang&quot; $(TargetDir) /Y" />
<Exec Command="xcopy &quot;$(ProjectDir)\lang\*&quot; &quot;$(TargetDir)\lang&quot; /e /y /i" />
</Target>

</Project>
3 changes: 1 addition & 2 deletions ParticleConverter/dialogs/About.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

Expand All @@ -15,7 +14,7 @@ public About()
{
InitializeComponent();
Assembly assembly = Assembly.GetExecutingAssembly();

var fullname = typeof(App).Assembly.Location;
var info = System.Diagnostics.FileVersionInfo.GetVersionInfo(fullname);
var ver = assembly.GetName().Version.ToString();
Expand Down
Binary file added ParticleConverter/dll/OpenCvSharp.dll
Binary file not shown.
2 changes: 0 additions & 2 deletions ParticleConverter/util/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace ParticleConverter.util
{
Expand Down
6 changes: 1 addition & 5 deletions ParticleConverter/util/UpdateUtil.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ParticleConverter.util
namespace ParticleConverter.util
{
public static class UpdateUtil
{
Expand Down

0 comments on commit 4281f7a

Please sign in to comment.