Skip to content

Commit fa6d1e5

Browse files
authored
Merge pull request #115 from killkimno/1.290v
1.295 업데이트
2 parents c0bd0ee + ae66d5d commit fa6d1e5

File tree

11 files changed

+33
-25
lines changed

11 files changed

+33
-25
lines changed

CloudVision/CloudVision.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Library</OutputType>
55
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
6+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
67
<Platforms>x64</Platforms>
78
</PropertyGroup>
89

GSTrans/GSTrans.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Library</OutputType>
55
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
6+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
67
<Copyright>Copyright © Bada Im 2017</Copyright>
78
<Platforms>x64</Platforms>
89
</PropertyGroup>

MORT/Form1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ private void OpenGeminiKeyFile()
15881588
tbGeminiApi.Text = api;
15891589

15901590
string model = reader.ReadLine();
1591-
int index = cbGeminiModel.FindString(model);
1591+
int index = cbGeminiModel.FindStringExact(model);
15921592

15931593
if(index >= 0)
15941594
{

MORT/MORT.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<Nullable>enable</Nullable>
2323
<ApplicationIcon>mainIcon.ico</ApplicationIcon>
2424
<ApplicationManifest>app.manifest</ApplicationManifest>
25+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
2526
</PropertyGroup>
2627

2728
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -39,6 +40,7 @@
3940
</ItemGroup>
4041

4142
<ItemGroup>
43+
<PackageReference Include="Google.GenAI" Version="0.3.0" />
4244
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2045.28" />
4345
<PackageReference Include="Python.Included" Version="3.11.6" />
4446
<PackageReference Include="RestSharp" Version="106.12.0" />

MORT/Properties/Settings.Designer.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MORT/Properties/Settings.settings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<Profiles />
44
<Settings>
55
<Setting Name="MORT_VERSION" Type="System.String" Scope="Application">
6-
<Value Profile="(Default)">1.294V</Value>
6+
<Value Profile="(Default)">1.295V</Value>
77
</Setting>
88
<Setting Name="LAYER_TEXT" Type="System.String" Scope="Application">
99
<Value Profile="(Default)">MORT {0}
1010
레이어 번역창</Value>
1111
</Setting>
1212
<Setting Name="MORT_VERSION_VALUE" Type="System.Int32" Scope="Application">
13-
<Value Profile="(Default)">1294</Value>
13+
<Value Profile="(Default)">1295</Value>
1414
</Setting>
1515
<Setting Name="TOOLTIP_LIST" Type="System.String" Scope="Application">
1616
<Value Profile="(Default)">MORT를 처음 쓰시면 그 외-&gt; MORT 사용법을 확인해 주세요,
@@ -45,7 +45,7 @@ OCR 영역을 빠르게 추가하고 싶을 땐 빠른 OCR 영역을 사용하
4545
구글 OCR의 사용량은 실제 사용량과 다를 수 있습니다. 수시로 구글 콘솔에서 확인하셔야 합니다</Value>
4646
</Setting>
4747
<Setting Name="MORT_RELEASE" Type="System.String" Scope="Application">
48-
<Value Profile="(Default)">2025 10 05</Value>
48+
<Value Profile="(Default)">2025 11 02</Value>
4949
</Setting>
5050
<Setting Name="BASIC_TEXT" Type="System.String" Scope="Application">
5151
<Value Profile="(Default)">

MORT/Service/ProcessTranslateService/ProcessTranslateService.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ private bool CheckOcrAreaWarning(OcrMethodType ocrMethodType)
496496
/// 실제 OCR 번역을 시작한다
497497
/// </summary>
498498
/// <param name="ocrMethodType"></param>
499-
private void DoTrans(OcrMethodType ocrMethodType)
499+
private async Task DoTrans(OcrMethodType ocrMethodType)
500500
{
501501
bool requireDisplayOcrAreaWarning = CheckOcrAreaWarning(ocrMethodType);
502502
_requreGetOriginalScreen = _settingManager.NowSkin == Skin.over && AdvencedOptionManager.OverlayAutoColor;
@@ -672,8 +672,10 @@ private void DoTrans(OcrMethodType ocrMethodType)
672672
_winOcr.StartMakeBitmap();
673673
imgDataList[j].Clear();
674674
_winOcr.ProcessOCR();
675-
_oneOcr.ConvertToTextAsync(imgDataList[j].data, imgDataList[j].channels, imgDataList[j].x, imgDataList[j].y).ConfigureAwait(false);
676-
675+
/*
676+
var task = _oneOcr.ConvertToTextAsync(imgDataList[j].data, imgDataList[j].channels, imgDataList[j].x, imgDataList[j].y).ConfigureAwait(false);
677+
var result = task.GetAwaiter().GetResult();
678+
*/
677679
while(!isEndFlag && !_winOcr.GetIsAvailable())
678680
{
679681
Thread.Sleep(2);

MORT/TransAPI/GeminiTranslatorAPI.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
using Newtonsoft.Json;
22
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
53
using System.Net.Http;
64
using System.Text;
75
using System.Threading;
86
using System.Threading.Tasks;
9-
using Windows.UI.Popups;
10-
using static System.Net.Mime.MediaTypeNames;
117

128
namespace MORT.TransAPI
139
{
@@ -63,26 +59,30 @@ private async Task<string> InternalTranslateTextAsync(string requestText, bool s
6359
}
6460
string apiEndpoint = $"{ApiEndpointBase}{modelName}:generateContent";
6561

62+
6663
var requestBody = new
6764
{
6865
contents = new[]
6966
{
7067
new { role = "user", parts = new[] { new { text = requestText } } }
7168
},
72-
73-
// generationConfig 객체를 추가하여 모델 생성 설정을 합니다.
69+
7470
generationConfig = new
7571
{
72+
//추론기능 - 0은 끈 상태
73+
thinkingConfig = new
74+
{
75+
thinkingBudget = 0
76+
},
7677
temperature = 0.2f // float 값으로 설정 (0.0f ~ 1.0f 사이)
77-
// 번역에는 보통 0.0f (가장 일관적) 또는 0.1f, 0.2f 와 같이 낮은 값을 권장
7878
}
7979
};
8080

8181
var jsonRequest = JsonConvert.SerializeObject(requestBody);
8282
var content = new StringContent(jsonRequest, Encoding.UTF8, "application/json");
8383

8484
// API 호출
85-
using(var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10)))
85+
using(var cts = new CancellationTokenSource(TimeSpan.FromSeconds(300)))
8686
{
8787
try
8888
{
@@ -106,7 +106,7 @@ private async Task<string> InternalTranslateTextAsync(string requestText, bool s
106106
catch(Exception ex)
107107
{
108108
return $"Error: 예기치 않은 오류가 발생했습니다. {ex.Message}";
109-
}
109+
}
110110

111111
}
112112
}
@@ -129,8 +129,8 @@ private void InitializeCommand()
129129
}
130130
_resultCommand += $"{_defaultCommand}";
131131
}
132-
133-
132+
133+
134134
_inited = true;
135135
}
136136

@@ -145,7 +145,7 @@ private string CombineText(string text)
145145
}
146146

147147
public async Task<string> TranslateTextAsync(string text)
148-
{
148+
{
149149
if(!_inited)
150150
{
151151
InitializeCommand();

MORT/app.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@
7373
<applicationSettings>
7474
<MORT.Properties.Settings>
7575
<setting name="MORT_VERSION" serializeAs="String">
76-
<value>1.294V</value>
76+
<value>1.295V</value>
7777
</setting>
7878
<setting name="LAYER_TEXT" serializeAs="String">
7979
<value>MORT {0}
8080
레이어 번역창</value>
8181
</setting>
8282
<setting name="MORT_VERSION_VALUE" serializeAs="String">
83-
<value>1294</value>
83+
<value>1295</value>
8484
</setting>
8585
<setting name="TOOLTIP_LIST" serializeAs="String">
8686
<value>MORT를 처음 쓰시면 그 외-&gt; MORT 사용법을 확인해 주세요,
@@ -115,7 +115,7 @@ OCR 영역을 빠르게 추가하고 싶을 땐 빠른 OCR 영역을 사용하
115115
구글 OCR의 사용량은 실제 사용량과 다를 수 있습니다. 수시로 구글 콘솔에서 확인하셔야 합니다</value>
116116
</setting>
117117
<setting name="MORT_RELEASE" serializeAs="String">
118-
<value>2025 10 05</value>
118+
<value>2025 11 02</value>
119119
</setting>
120120
<setting name="BASIC_TEXT" serializeAs="String">
121121
<value>

PipeClient/PipeClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Platforms>x64</Platforms>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<PlatformTarget>x86</PlatformTarget>
9+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
910
</PropertyGroup>
1011

1112
<ItemGroup>

0 commit comments

Comments
 (0)