Skip to content

Commit

Permalink
기타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sch6393 committed Aug 28, 2022
1 parent 0ab0f6f commit 5a63f7d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 19 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ EZ2ON METER

### 히스토리
* 1.0 : 초기 업로드
* 1.1 : 기타 수정

<br>
30 changes: 17 additions & 13 deletions ez2on_meter/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

// 추가
Expand All @@ -27,7 +22,7 @@ public partial class Form1 : Form
/// <summary>
/// EZ2ON Process Name
/// </summary>
private readonly static string m_ro_strEZ2ONProcessName = "EZ2ON";
private const string m_const_strEZ2ONProcessName = "EZ2ON";

/// <summary>
/// EZ2ON Point
Expand Down Expand Up @@ -82,6 +77,12 @@ private void Form1_Load(object sender, EventArgs e)

button_start.Enabled = true;
button_stop.Enabled = false;

StringBuilder sb = new StringBuilder();
sb.Append("Ver ");
sb.Append(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 3));

label_version.Text = sb.ToString();
}

/// <summary>
Expand All @@ -97,7 +98,7 @@ private void button_start_Click(object sender, EventArgs e)

foreach (Process process in processes)
{
if (process.ProcessName.Contains(m_ro_strEZ2ONProcessName))
if (process.ProcessName.Contains(m_const_strEZ2ONProcessName))
{
iFlag = 0;
break;
Expand All @@ -112,7 +113,7 @@ private void button_start_Click(object sender, EventArgs e)
button_start.Enabled = false;
button_stop.Enabled = true;
label_message.ForeColor = Color.Green;
label_message.Text = "START!";
label_message.Text = "PROCESSING...";
timer.Start();
timer_position.Start();
}
Expand Down Expand Up @@ -167,10 +168,10 @@ private void timer_Tick(object sender, EventArgs e)
/// </summary>
private void UpdatePosition()
{
GetWindowPos(FindWindow(null, m_ro_strEZ2ONProcessName), ref m_pointEZ2ON, ref m_sizeEZ2ON);
GetWindowPos(FindWindow(null, m_const_strEZ2ONProcessName), ref m_pointEZ2ON, ref m_sizeEZ2ON);

StringBuilder sb = new StringBuilder();
sb.Append(m_ro_strEZ2ONProcessName);
sb.Append(m_const_strEZ2ONProcessName);
sb.Append(" X : ");
sb.Append(m_pointEZ2ON.X.ToString("D4"));
sb.Append(", Y : ");
Expand Down Expand Up @@ -266,9 +267,12 @@ 정확한 좌표 값이 아님...

if (m_form2 != null)
{
Size size = new Size(bitmap.Width + 5, bitmap.Height + 30);
Size size = new Size(bitmap.Width, bitmap.Height + 30);
m_form2.Size = size;
}

label_message.ForeColor = Color.Green;
label_message.Text = "MEMORY STREAM OK!";
}
catch (Exception)// ex)
{
Expand Down Expand Up @@ -327,8 +331,8 @@ private void trackBar_opacity_Scroll(object sender, EventArgs e)
/// <param name="class_name"></param>
/// <param name="window_name"></param>
/// <returns>Window Handler</returns>
[DllImport("USER32.DLL", SetLastError = true)]
public static extern IntPtr FindWindow(string class_name, string window_name);
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr FindWindow(string class_name, string window_name);

/// <summary>
/// Window Position 반환
Expand Down
8 changes: 4 additions & 4 deletions ez2on_meter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("ez2on_meter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("https://github.com/sch6393/ez2on-meter")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("sch6393")]
[assembly: AssemblyProduct("ez2on_meter")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
Expand All @@ -32,5 +32,5 @@
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
36 changes: 34 additions & 2 deletions ez2on_meter/ez2on_meter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>게시\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -62,11 +78,17 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>C58EFCFCD9F13C917A3A097E91198E2BE99842B9</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>ez2on_meter_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -118,6 +140,7 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="ez2on_meter_TemporaryKey.pfx" />
<None Include="lib\Windows.winmd" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
Expand All @@ -134,7 +157,16 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8%28x86 및 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit 5a63f7d

Please sign in to comment.