From 1d3929b84df19389e8244c81b0e20da9e2cd64da Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Tue, 16 May 2023 13:14:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=B3=91=EB=A0=AC=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Million Hunter/HunterMainForm.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Million Hunter/HunterMainForm.cs b/Million Hunter/HunterMainForm.cs index e6a54a6..655fe89 100644 --- a/Million Hunter/HunterMainForm.cs +++ b/Million Hunter/HunterMainForm.cs @@ -350,10 +350,10 @@ namespace Million sellExceptionScript.regularExpressionString = savedResult.SellExceptionRegularExpression; var dic = new Dictionary>(); - //Parallel.For(0, tableList.Count, i => - //{ - for (var i = 0; i < tableList.Count; i++) + Parallel.For(0, tableList.Count, i => { + // for (var i = 0; i < tableList.Count; i++) + //{ var market = tableList[i]; var distinctIndicator = IndicatorSetupManager.Distinct(totalIndicator); @@ -369,8 +369,8 @@ namespace Million market, distinctIndicator, overlapBuyManagementList, buyScript, sellScript, sellExceptionScript); dic[market.CoinFullName] = list; } - } - //}); + //} + }); foreach (var item in dic.Keys) { From b614d31df97fab7ea1b3f0a576640df22af974c6 Mon Sep 17 00:00:00 2001 From: JHLEE Date: Tue, 16 May 2023 13:22:30 +0900 Subject: [PATCH 2/3] =?UTF-8?q?update=20server=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EB=B0=8F=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EA=B8=B8=EC=9D=B4=20?= =?UTF-8?q?=EB=8A=98=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Million Update Server/App.config | 6 +-- Million Update Server/Form1.Designer.cs | 1 + Million Update Server/Form1.cs | 47 +++-------------- .../Million Update Server.csproj | 39 +++++++++++++- .../Million Update Server.csproj.user | 13 +++++ .../Properties/Resources.Designer.cs | 52 ++++++++----------- .../Properties/Settings.Designer.cs | 30 +++++------ 7 files changed, 97 insertions(+), 91 deletions(-) create mode 100644 Million Update Server/Million Update Server.csproj.user diff --git a/Million Update Server/App.config b/Million Update Server/App.config index 88fa402..4bfa005 100644 --- a/Million Update Server/App.config +++ b/Million Update Server/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Million Update Server/Form1.Designer.cs b/Million Update Server/Form1.Designer.cs index 530a5a1..b90e8da 100644 --- a/Million Update Server/Form1.Designer.cs +++ b/Million Update Server/Form1.Designer.cs @@ -39,6 +39,7 @@ this.textBox_log.Location = new System.Drawing.Point(12, 12); this.textBox_log.Multiline = true; this.textBox_log.Name = "textBox_log"; + this.textBox_log.ReadOnly = true; this.textBox_log.Size = new System.Drawing.Size(284, 579); this.textBox_log.TabIndex = 0; // diff --git a/Million Update Server/Form1.cs b/Million Update Server/Form1.cs index 74441d4..7e54691 100644 --- a/Million Update Server/Form1.cs +++ b/Million Update Server/Form1.cs @@ -1,14 +1,8 @@ using System; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; -using System.Threading.Tasks; using System.Windows.Forms; using Newtonsoft.Json; @@ -28,7 +22,7 @@ namespace Million_Update_Server private void writeLog(string text) { - log = text + log; + log = text+"\r\n" + log; Invoke(new MethodInvoker(delegate () { @@ -72,43 +66,18 @@ namespace Million_Update_Server try { - // 수신한 데이터를 저장할 버퍼 - byte[] messageBuffer = new byte[4096]; - // 받은 데이터의 총 길이 - int bytesRead; - - while (true) + string data = ""; + do { - bytesRead = 0; - try - { - // 클라이언트에서 데이터 수신 대기 - bytesRead = clientStream.Read(messageBuffer, 0, 4096); - } - catch - { - // 연결이 끊어졌을 경우 예외 발생 - break; - } + byte[] buffer = new byte[tcpClient.ReceiveBufferSize]; + int bytesRead = clientStream.Read(buffer, 0, buffer.Length); + data += Encoding.UTF8.GetString(buffer, 0, bytesRead); + } while (clientStream.DataAvailable); - // 수신한 데이터가 없을 경우 - if (bytesRead == 0) - { - // 연결이 끊어졌음을 알리기 위해 예외 발생 - throw new Exception("연결이 끊어졌습니다."); - } + var receivedPeople = JsonConvert.DeserializeObject(data); - // 수신한 데이터를 문자열로 변환 - string message = Encoding.UTF8.GetString(messageBuffer, 0, bytesRead); - // 문자열을 Person 객체로 역직렬화 - /*Person person = JsonConvert.DeserializeObject(message); - // 수신한 Person 객체를 출력 - Console.WriteLine("수신한 Person 객체:"); - Console.WriteLine("이름: " + person.Name); - Console.WriteLine("나이: " + person.Age);*/ - } } catch (Exception ex) { diff --git a/Million Update Server/Million Update Server.csproj b/Million Update Server/Million Update Server.csproj index 5eb4e47..8f8e0df 100644 --- a/Million Update Server/Million Update Server.csproj +++ b/Million Update Server/Million Update Server.csproj @@ -8,13 +8,29 @@ WinExe Million_Update_Server Million Update Server - v4.5.2 + v4.8 512 true true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true - AnyCPU + x64 true full false @@ -68,6 +84,7 @@ True Resources.resx + True @@ -83,5 +100,23 @@ + + + {10ef08cb-bf38-4882-a92a-30db34e8e8bd} + Million Core + + + + + False + Microsoft .NET Framework 4.8%28x86 및 x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file diff --git a/Million Update Server/Million Update Server.csproj.user b/Million Update Server/Million Update Server.csproj.user new file mode 100644 index 0000000..58b4d25 --- /dev/null +++ b/Million Update Server/Million Update Server.csproj.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + ko-KR + false + + \ No newline at end of file diff --git a/Million Update Server/Properties/Resources.Designer.cs b/Million Update Server/Properties/Resources.Designer.cs index 7f0077b..74a969f 100644 --- a/Million Update Server/Properties/Resources.Designer.cs +++ b/Million Update Server/Properties/Resources.Designer.cs @@ -8,62 +8,54 @@ // //------------------------------------------------------------------------------ -namespace Million_Update_Server.Properties -{ - - +namespace Million_Update_Server.Properties { + using System; + + /// /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder // 클래스에서 자동으로 생성되었습니다. - // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 - // ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Million_Update_Server.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 - /// 재정의합니다. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Million Update Server/Properties/Settings.Designer.cs b/Million Update Server/Properties/Settings.Designer.cs index 142b0ed..94dd5ae 100644 --- a/Million Update Server/Properties/Settings.Designer.cs +++ b/Million Update Server/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ -namespace Million_Update_Server.Properties -{ - - +namespace Million_Update_Server.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } From 5e868ae37374eec20ce2b643b8ea7305e1e43706 Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Tue, 16 May 2023 13:25:36 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EB=B6=84=EB=B4=89=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Million Hunter/HunterMainForm.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Million Hunter/HunterMainForm.cs b/Million Hunter/HunterMainForm.cs index 655fe89..4e1e8f3 100644 --- a/Million Hunter/HunterMainForm.cs +++ b/Million Hunter/HunterMainForm.cs @@ -455,8 +455,11 @@ namespace Million var totalCandleTypeList = totalIndicator.Select(t => t.MCandleTimeType).ToList(); var maxCandleType = totalCandleTypeList.Max(); - var minMaxCandleType = totalCandleTypeList.Where(t => t < MCandleTimeType.H1).Max(); + var list = totalCandleTypeList.Where(t => t < MCandleTimeType.H1).ToList(); + var minMaxCandleType = MCandleTimeType.M1; + if (!(list == null || list.Count == 0)) + minMaxCandleType = list.Max(); var buyList = new List(); var subBuyList = new List();