From a3fee5d77c2d11fea255fea88778330ec3ff34f0 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:40:48 +0800 Subject: [PATCH] =?UTF-8?q?improve:=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutomaticUpdateVersionControl.txt | 2 +- Ink Canvas/Helpers/AutoUpdateHelper.cs | 228 +++++++++++------- Ink Canvas/MainWindow.xaml.cs | 2 +- .../net472/InkCanvasForClass.g.resources | Bin 5181066 -> 5180946 bytes .../obj/Debug/net472/Windows/RandWindow.g.cs | 46 ++-- .../Debug/net472/Windows/RandWindow.g.i.cs | 46 ++-- 6 files changed, 189 insertions(+), 135 deletions(-) diff --git a/AutomaticUpdateVersionControl.txt b/AutomaticUpdateVersionControl.txt index 7ce9c17c..6463e95e 100644 --- a/AutomaticUpdateVersionControl.txt +++ b/AutomaticUpdateVersionControl.txt @@ -1 +1 @@ -1.6.4.0 \ No newline at end of file +1.6.4 \ No newline at end of file diff --git a/Ink Canvas/Helpers/AutoUpdateHelper.cs b/Ink Canvas/Helpers/AutoUpdateHelper.cs index f5921a18..eed1b84e 100644 --- a/Ink Canvas/Helpers/AutoUpdateHelper.cs +++ b/Ink Canvas/Helpers/AutoUpdateHelper.cs @@ -23,9 +23,20 @@ namespace Ink_Canvas.Helpers LogHelper.WriteLogToFile($"AutoUpdate | Local version: {localVersion}"); string remoteAddress = proxy; - remoteAddress += "https://raw.githubusercontent.com/awesome-iwb/icc-ce/refs/heads/main/AutomaticUpdateVersionControl.txt"; + string primaryUrl = "https://raw.githubusercontent.com/awesome-iwb/icc-ce/refs/heads/main/AutomaticUpdateVersionControl.txt"; + string fallbackUrl = "https://raw.bgithub.xyz/awesome-iwb/icc-ce/refs/heads/main/AutomaticUpdateVersionControl.txt"; + + // 先尝试主地址 + remoteAddress += primaryUrl; string remoteVersion = await GetRemoteVersion(remoteAddress); + // 如果主地址失败,尝试备用地址 + if (remoteVersion == null) + { + LogHelper.WriteLogToFile($"AutoUpdate | Primary URL failed, trying fallback URL"); + remoteVersion = await GetRemoteVersion(proxy + fallbackUrl); + } + if (remoteVersion != null) { LogHelper.WriteLogToFile($"AutoUpdate | Remote version: {remoteVersion}"); @@ -44,7 +55,7 @@ namespace Ink_Canvas.Helpers } else { - LogHelper.WriteLogToFile("AutoUpdate | Failed to retrieve remote version.", LogHelper.LogType.Error); + LogHelper.WriteLogToFile("AutoUpdate | Failed to retrieve remote version from both URLs.", LogHelper.LogType.Error); return null; } } @@ -62,10 +73,23 @@ namespace Ink_Canvas.Helpers try { // Set a reasonable timeout - client.Timeout = TimeSpan.FromSeconds(15); + client.Timeout = TimeSpan.FromSeconds(10); // 减少超时时间以便更快切换到备用地址 LogHelper.WriteLogToFile($"AutoUpdate | Sending HTTP request to: {fileUrl}"); - HttpResponseMessage response = await client.GetAsync(fileUrl); + + // 使用带超时的Task.WhenAny来确保请求不会无限期等待 + var downloadTask = client.GetAsync(fileUrl); + var timeoutTask = Task.Delay(client.Timeout); + + var completedTask = await Task.WhenAny(downloadTask, timeoutTask); + if (completedTask == timeoutTask) + { + LogHelper.WriteLogToFile($"AutoUpdate | Request timed out after {client.Timeout.TotalSeconds} seconds", LogHelper.LogType.Error); + return null; + } + + // 请求完成,检查结果 + HttpResponseMessage response = await downloadTask; LogHelper.WriteLogToFile($"AutoUpdate | HTTP response status: {response.StatusCode}"); response.EnsureSuccessStatusCode(); @@ -145,15 +169,26 @@ namespace Ink_Canvas.Helpers LogHelper.WriteLogToFile($"AutoUpdate | Created updates directory: {updatesFolderPath}"); } - // Use the correct URL format for GitHub releases - string downloadUrl = $"{proxy}https://github.com/awesome-iwb/icc-ce/releases/download/{version}/InkCanvasForClass.CE.{version}.zip"; - LogHelper.WriteLogToFile($"AutoUpdate | Download URL: {downloadUrl}"); + // 主下载地址 + string primaryUrl = $"{proxy}https://github.com/awesome-iwb/icc-ce/releases/download/{version}/InkCanvasForClass.CE.{version}.zip"; + // 备用下载地址 + string fallbackUrl = $"{proxy}https://bgithub.xyz/awesome-iwb/icc-ce/releases/download/{version}/InkCanvasForClass.CE.{version}.zip"; + + LogHelper.WriteLogToFile($"AutoUpdate | Primary download URL: {primaryUrl}"); SaveDownloadStatus(false); string zipFilePath = Path.Combine(updatesFolderPath, $"InkCanvasForClass.CE.{version}.zip"); LogHelper.WriteLogToFile($"AutoUpdate | Target file path: {zipFilePath}"); - bool downloadSuccess = await DownloadFile(downloadUrl, zipFilePath); + // 先尝试主地址下载 + bool downloadSuccess = await DownloadFile(primaryUrl, zipFilePath); + + // 如果主地址下载失败,尝试备用地址 + if (!downloadSuccess) + { + LogHelper.WriteLogToFile($"AutoUpdate | Primary download failed, trying fallback URL: {fallbackUrl}"); + downloadSuccess = await DownloadFile(fallbackUrl, zipFilePath); + } if (downloadSuccess) { @@ -163,7 +198,7 @@ namespace Ink_Canvas.Helpers } else { - LogHelper.WriteLogToFile("AutoUpdate | Failed to download the update file.", LogHelper.LogType.Error); + LogHelper.WriteLogToFile("AutoUpdate | Failed to download the update file from both URLs.", LogHelper.LogType.Error); return false; } } @@ -200,101 +235,108 @@ namespace Ink_Canvas.Helpers if (!Directory.Exists(directory)) { Directory.CreateDirectory(directory); - LogHelper.WriteLogToFile($"AutoUpdate | Created directory: {directory}"); } - // 删除可能存在的临时文件 - if (File.Exists(tempFilePath)) + // 使用带超时的Task.WhenAny来确保请求不会无限期等待 + var downloadTask = client.GetAsync(fileUrl, HttpCompletionOption.ResponseHeadersRead); + var initialTimeoutTask = Task.Delay(TimeSpan.FromSeconds(30)); // 30秒内必须有响应 + + var completedTask = await Task.WhenAny(downloadTask, initialTimeoutTask); + if (completedTask == initialTimeoutTask) { - File.Delete(tempFilePath); - LogHelper.WriteLogToFile($"AutoUpdate | Deleted existing temp file"); - } - - // 使用流式下载而不是一次性加载到内存 - LogHelper.WriteLogToFile($"AutoUpdate | Starting download..."); - - // 获取响应但不读取内容 - HttpResponseMessage response = await client.GetAsync(fileUrl, HttpCompletionOption.ResponseHeadersRead); - response.EnsureSuccessStatusCode(); - - // 获取文件大小(如果服务器提供) - long? totalBytes = response.Content.Headers.ContentLength; - LogHelper.WriteLogToFile($"AutoUpdate | Expected file size: {(totalBytes.HasValue ? totalBytes.Value.ToString() : "unknown")} bytes"); - - // 使用流式方式下载文件 - using (var contentStream = await response.Content.ReadAsStreamAsync()) - using (var fileStream = new FileStream(tempFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true)) - { - byte[] buffer = new byte[8192]; - int bytesRead; - long totalBytesRead = 0; - int progressPercent = 0; - - while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0) - { - await fileStream.WriteAsync(buffer, 0, bytesRead); - - totalBytesRead += bytesRead; - - // 报告进度(每10%) - if (totalBytes.HasValue) - { - int newProgressPercent = (int)((totalBytesRead * 100) / totalBytes.Value); - if (newProgressPercent >= progressPercent + 10) - { - progressPercent = newProgressPercent; - LogHelper.WriteLogToFile($"AutoUpdate | Download progress: {progressPercent}%"); - } - } - } - - // 确保所有数据都写入到文件 - await fileStream.FlushAsync(); - } - - // 检查临时文件大小 - if (new FileInfo(tempFilePath).Length == 0) - { - LogHelper.WriteLogToFile($"AutoUpdate | Downloaded file is empty", LogHelper.LogType.Error); - if (File.Exists(tempFilePath)) File.Delete(tempFilePath); + LogHelper.WriteLogToFile($"AutoUpdate | Initial connection timed out after 30 seconds", LogHelper.LogType.Error); return false; } - // 如果目标文件已存在,先删除 - if (File.Exists(destinationPath)) + // 请求完成,检查结果 + HttpResponseMessage response = await downloadTask; + LogHelper.WriteLogToFile($"AutoUpdate | HTTP response status: {response.StatusCode}"); + response.EnsureSuccessStatusCode(); + + // 获取文件总大小 + long? totalBytes = response.Content.Headers.ContentLength; + LogHelper.WriteLogToFile($"AutoUpdate | File size: {(totalBytes.HasValue ? (totalBytes.Value / 1024.0 / 1024.0).ToString("F2") + " MB" : "Unknown")}"); + + // 创建临时文件流 + using (var fileStream = new FileStream(tempFilePath, FileMode.Create, FileAccess.Write, FileShare.None)) { - File.Delete(destinationPath); - LogHelper.WriteLogToFile($"AutoUpdate | Deleted existing destination file"); + // 获取下载流 + using (var downloadStream = await response.Content.ReadAsStreamAsync()) + { + byte[] buffer = new byte[8192]; // 8KB buffer + long totalBytesRead = 0; + int bytesRead; + DateTime lastProgressUpdate = DateTime.Now; + + // 设置下载超时 - 如果60秒内没有数据传输,则认为下载超时 + var downloadTimeoutTask = Task.Delay(TimeSpan.FromSeconds(60)); + var readTask = Task.Run(async () => { + while ((bytesRead = await downloadStream.ReadAsync(buffer, 0, buffer.Length)) > 0) + { + await fileStream.WriteAsync(buffer, 0, bytesRead); + totalBytesRead += bytesRead; + + // 每5秒更新一次进度 + if ((DateTime.Now - lastProgressUpdate).TotalSeconds >= 5) + { + if (totalBytes.HasValue) + { + double percentage = (double)totalBytesRead / totalBytes.Value * 100; + LogHelper.WriteLogToFile($"AutoUpdate | Download progress: {percentage:F1}% ({(totalBytesRead / 1024.0 / 1024.0):F2} MB / {(totalBytes.Value / 1024.0 / 1024.0):F2} MB)"); + } + else + { + LogHelper.WriteLogToFile($"AutoUpdate | Downloaded: {(totalBytesRead / 1024.0 / 1024.0):F2} MB"); + } + lastProgressUpdate = DateTime.Now; + + // 重置下载超时 + downloadTimeoutTask = Task.Delay(TimeSpan.FromSeconds(60)); + } + } + return true; + }); + + // 等待下载完成或超时 + if (await Task.WhenAny(readTask, downloadTimeoutTask) == downloadTimeoutTask) + { + LogHelper.WriteLogToFile($"AutoUpdate | Download timed out after 60 seconds of inactivity", LogHelper.LogType.Error); + return false; + } + + // 确保下载任务完成 + bool downloadCompleted = await readTask; + + if (downloadCompleted) + { + LogHelper.WriteLogToFile($"AutoUpdate | Download completed: {(totalBytesRead / 1024.0 / 1024.0):F2} MB"); + } + } } - // 将临时文件移动到最终位置 - File.Move(tempFilePath, destinationPath); - LogHelper.WriteLogToFile($"AutoUpdate | File saved to: {destinationPath}"); + // 如果临时文件存在,则将其移动到目标位置 + if (File.Exists(tempFilePath)) + { + // 如果目标文件已存在,先删除 + if (File.Exists(destinationPath)) + { + File.Delete(destinationPath); + } + + File.Move(tempFilePath, destinationPath); + LogHelper.WriteLogToFile($"AutoUpdate | File saved to: {destinationPath}"); + return true; + } - return true; + return false; } catch (HttpRequestException ex) { LogHelper.WriteLogToFile($"AutoUpdate | HTTP request error: {ex.Message}", LogHelper.LogType.Error); - if (ex.InnerException != null) - { - LogHelper.WriteLogToFile($"AutoUpdate | Inner exception: {ex.InnerException.Message}", LogHelper.LogType.Error); - } - return false; } catch (TaskCanceledException ex) { LogHelper.WriteLogToFile($"AutoUpdate | Download timed out: {ex.Message}", LogHelper.LogType.Error); - return false; - } - catch (IOException ex) - { - LogHelper.WriteLogToFile($"AutoUpdate | IO error while downloading: {ex.Message}", LogHelper.LogType.Error); - if (ex.InnerException != null) - { - LogHelper.WriteLogToFile($"AutoUpdate | Inner exception: {ex.InnerException.Message}", LogHelper.LogType.Error); - } - return false; } catch (Exception ex) { @@ -303,8 +345,20 @@ namespace Ink_Canvas.Helpers { LogHelper.WriteLogToFile($"AutoUpdate | Inner exception: {ex.InnerException.Message}", LogHelper.LogType.Error); } - return false; } + + // 清理临时文件 + try + { + string tempFilePath = destinationPath + ".tmp"; + if (File.Exists(tempFilePath)) + { + File.Delete(tempFilePath); + } + } + catch { } + + return false; } } diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index 0718f238..ebf8d79c 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -399,7 +399,7 @@ namespace Ink_Canvas { App.IsAppExitByUser = true; // 准备批处理脚本 - AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false); + AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false); // 关闭软件,让安装程序接管 Application.Current.Shutdown(); diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.g.resources b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.g.resources index a20b3b96c776035e5d6da3528641ace36cf90a03..c87135fb2625c19aa04bb33b7ac681c6d5ca9099 100644 GIT binary patch delta 1845 zcmZ9MTWnNS6o${9IpvfNoI(rq-sxp}onEF>PFvanby{jKu!hT^pw$AUEhtbZ1>~k! zjD(t)NUckwM2$*(kf#Vi^ zefBv$m-{W3KIpf6^_@p__x5|d!rl8rjpG|v^^dit+3TtfJMZYZ;OG&+0<1s#Tws=yP#1FAs{*Z^w5 zlb{aNg9gwDHu@bso8J08bcFfrx=i8z$QJUrL(VY&={{=FLhF1#l0HxVZ*4y0?x)G{ z$DF*Qg`)g#-=Nue%hePX>6FO@eUxsdUHglCTC*jf*ln8feLzt+wzhRSG))n%Pv=Xb z6-BWx373Jet^3>eArfvz(q$xKv5Z)K9fuv-V$;7``jA^PK@I5-Zp?NbiZ2{MjJoVY)p?N5v|x9iklmb&#St zWtf^Gtykt1BL;=yLB7h~Axad*d|-$=<5eRTP8n2WA8OZP6vF{`fy}E%UIsUgl22svN2BD_v*0e5p}9H5$mTnv)FyJd>K+Yw zoN$){)yTtG48m1ImXQINE=;niY7}9#2Q4?o1Yqq(xne#zM)^2|_s8fJv6>UcDF+i| zrEu#wW#|SnlV!FQXHmlMj#G^&GZn50D$J5w3n{F?LMoJ!Dlvy7t>sMk$e`s^V`as8V?R_b2GM*j$a6si_9mf~H!S3!3U+nwsiinVK44NlmKJh*7@9;Je!h zV^!Z6uE(wWv_)*<)JZDG)HI1VO8mwot%>v^Cs@vU4JW^uf19Liv6*Kl$tkvQ_5;dD z+WK#bYHWiUD(`!=yp1nDpjxq=e|bPfQQH?DacDmUcr^*^bUs~(a=?BUjjbXISHTb^0)?eFD#52-1(6>GCa8>~=^ zcHTQfZqd#>Lp#Mj*}^CGbL}kI#S7dvONIK2k5)UtpUhHw-oa3{LkrbZqXU-wqEzEB zM)^HkrHCV3G6xYyc=sH+^$10j;nyLr4E`4U@f@AgJFy6U`c_=Oqg*(T>vxR1=BZR1 z=P%|dMV#Q9^W@TBLSk^|@>ZW@TL6EBle{)Sr(#bbWHvtyE7bf9-wIGh_8IuL07pcY zqWU_IwcZYttdwi*|NH4n^xo9ZA`sfn%W^wu94EY~;v829Z<2VGcM5M|PB+rbj^|;? fj;iq*MqAK&9itYsF7VgF>wE0C>u;VNzSJuP(1?BR3H@Am(l-}#-> z(+@ux)b(8%)Lr|gT1@v3RyPPw|93U&b*JxkT}146`eH7qeV5ce0dznQ3?K$907hT} zu^98PxmLzAYd87Hy$}oma@@PiUrUchnf;KQ}m?m-$iy=oZbS>atg|uu%>d4UjDocH=%Z8d+@>Nxf}N-6u|V9&&WFA3o_SI@;O#N6@=e zQ4}@yhmgL+>AV{BmP55JGAcJi%7W^y?(VJ*HO{CQ94?Ra)=BR|lk^(u54Ciwu_i_D z@T`JsuXM%5N|(N|>!=zVt01KZo(^~n-nSK{R?+K1ik1M~3{;~@5i)BM6l;8({4{1; zduv;_YK)6`Y~irjh~fz=M!x=lTFi@~Bm(_s$hd@ahbTQ=>dR%2=~+nUDo{e+Txf>) zB6~<%%1uM$idiN@`0G1V!S{w}w^+`Ohg67Z&qF#PlKJjK%EvS*H47hk1kEC~&Qybz zf^U;$LM;`eELyKq6fKQ2hN(!T@s?paE>`fj!?a4I^VBe{#&lEP;`G4Pzr!CS<%*Dj&5=-6j{{*kELJi_u4BV%Ozz8RAY)FTw6n49}Gr| zqE%sz_Fx@XJ);WY^Y=WXQ=+~GzDN^lAlw6nF)j>CmoOT`(tBJc Q8X8~tbMXHq8tn1^0L{oU0ssI2 diff --git a/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.cs b/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.cs index 63730e11..1549dbc5 100644 --- a/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.cs +++ b/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\..\..\Windows\RandWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A29F1514A9DC6332F074303F230464CD5C24A898" +#pragma checksum "..\..\..\..\Windows\RandWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4254CE0F9A30960C1D574123EA132E6F47F23758" //------------------------------------------------------------------------------ // // 此代码由工具生成。 @@ -59,7 +59,7 @@ namespace Ink_Canvas { public partial class RandWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { - #line 22 "..\..\..\..\Windows\RandWindow.xaml" + #line 21 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput; @@ -67,7 +67,7 @@ namespace Ink_Canvas { #line hidden - #line 23 "..\..\..\..\Windows\RandWindow.xaml" + #line 22 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput2; @@ -75,7 +75,7 @@ namespace Ink_Canvas { #line hidden - #line 24 "..\..\..\..\Windows\RandWindow.xaml" + #line 23 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput3; @@ -83,7 +83,7 @@ namespace Ink_Canvas { #line hidden - #line 27 "..\..\..\..\Windows\RandWindow.xaml" + #line 26 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane; @@ -91,7 +91,7 @@ namespace Ink_Canvas { #line hidden - #line 29 "..\..\..\..\Windows\RandWindow.xaml" + #line 28 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnMinus; @@ -99,7 +99,7 @@ namespace Ink_Canvas { #line hidden - #line 52 "..\..\..\..\Windows\RandWindow.xaml" + #line 51 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock LabelNumberCount; @@ -107,7 +107,7 @@ namespace Ink_Canvas { #line hidden - #line 53 "..\..\..\..\Windows\RandWindow.xaml" + #line 52 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnAdd; @@ -115,7 +115,7 @@ namespace Ink_Canvas { #line hidden - #line 78 "..\..\..\..\Windows\RandWindow.xaml" + #line 77 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox NoHotStudents; @@ -123,7 +123,7 @@ namespace Ink_Canvas { #line hidden - #line 81 "..\..\..\..\Windows\RandWindow.xaml" + #line 80 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox NoShengPiZi; @@ -131,7 +131,7 @@ namespace Ink_Canvas { #line hidden - #line 86 "..\..\..\..\Windows\RandWindow.xaml" + #line 85 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox ComboBoxRandMode; @@ -139,7 +139,7 @@ namespace Ink_Canvas { #line hidden - #line 96 "..\..\..\..\Windows\RandWindow.xaml" + #line 95 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnRand; @@ -147,7 +147,7 @@ namespace Ink_Canvas { #line hidden - #line 99 "..\..\..\..\Windows\RandWindow.xaml" + #line 98 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart; @@ -155,7 +155,7 @@ namespace Ink_Canvas { #line hidden - #line 104 "..\..\..\..\Windows\RandWindow.xaml" + #line 103 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnIslandCaller; @@ -163,7 +163,7 @@ namespace Ink_Canvas { #line hidden - #line 114 "..\..\..\..\Windows\RandWindow.xaml" + #line 113 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnHelp; @@ -171,7 +171,7 @@ namespace Ink_Canvas { #line hidden - #line 122 "..\..\..\..\Windows\RandWindow.xaml" + #line 121 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock TextBlockPeopleCount; @@ -179,7 +179,7 @@ namespace Ink_Canvas { #line hidden - #line 125 "..\..\..\..\Windows\RandWindow.xaml" + #line 124 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BtnClose; @@ -239,7 +239,7 @@ namespace Ink_Canvas { case 6: this.BorderBtnMinus = ((System.Windows.Controls.Border)(target)); - #line 29 "..\..\..\..\Windows\RandWindow.xaml" + #line 28 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnMinus.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnMinus_MouseUp); #line default @@ -251,7 +251,7 @@ namespace Ink_Canvas { case 8: this.BorderBtnAdd = ((System.Windows.Controls.Border)(target)); - #line 53 "..\..\..\..\Windows\RandWindow.xaml" + #line 52 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnAdd.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnAdd_MouseUp); #line default @@ -269,7 +269,7 @@ namespace Ink_Canvas { case 12: this.BorderBtnRand = ((System.Windows.Controls.Border)(target)); - #line 96 "..\..\..\..\Windows\RandWindow.xaml" + #line 95 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnRand.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnRand_MouseUp); #line default @@ -281,7 +281,7 @@ namespace Ink_Canvas { case 14: this.BorderBtnIslandCaller = ((System.Windows.Controls.Border)(target)); - #line 104 "..\..\..\..\Windows\RandWindow.xaml" + #line 103 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnIslandCaller.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnIslandCaller_MouseUp); #line default @@ -290,7 +290,7 @@ namespace Ink_Canvas { case 15: this.BorderBtnHelp = ((System.Windows.Controls.Border)(target)); - #line 114 "..\..\..\..\Windows\RandWindow.xaml" + #line 113 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnHelp.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnHelp_MouseUp); #line default @@ -302,7 +302,7 @@ namespace Ink_Canvas { case 17: this.BtnClose = ((System.Windows.Controls.Border)(target)); - #line 125 "..\..\..\..\Windows\RandWindow.xaml" + #line 124 "..\..\..\..\Windows\RandWindow.xaml" this.BtnClose.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnClose_MouseUp); #line default diff --git a/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.i.cs b/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.i.cs index 63730e11..1549dbc5 100644 --- a/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.i.cs +++ b/Ink Canvas/obj/Debug/net472/Windows/RandWindow.g.i.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\..\..\Windows\RandWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A29F1514A9DC6332F074303F230464CD5C24A898" +#pragma checksum "..\..\..\..\Windows\RandWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4254CE0F9A30960C1D574123EA132E6F47F23758" //------------------------------------------------------------------------------ // // 此代码由工具生成。 @@ -59,7 +59,7 @@ namespace Ink_Canvas { public partial class RandWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { - #line 22 "..\..\..\..\Windows\RandWindow.xaml" + #line 21 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput; @@ -67,7 +67,7 @@ namespace Ink_Canvas { #line hidden - #line 23 "..\..\..\..\Windows\RandWindow.xaml" + #line 22 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput2; @@ -75,7 +75,7 @@ namespace Ink_Canvas { #line hidden - #line 24 "..\..\..\..\Windows\RandWindow.xaml" + #line 23 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Label LabelOutput3; @@ -83,7 +83,7 @@ namespace Ink_Canvas { #line hidden - #line 27 "..\..\..\..\Windows\RandWindow.xaml" + #line 26 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane; @@ -91,7 +91,7 @@ namespace Ink_Canvas { #line hidden - #line 29 "..\..\..\..\Windows\RandWindow.xaml" + #line 28 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnMinus; @@ -99,7 +99,7 @@ namespace Ink_Canvas { #line hidden - #line 52 "..\..\..\..\Windows\RandWindow.xaml" + #line 51 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock LabelNumberCount; @@ -107,7 +107,7 @@ namespace Ink_Canvas { #line hidden - #line 53 "..\..\..\..\Windows\RandWindow.xaml" + #line 52 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnAdd; @@ -115,7 +115,7 @@ namespace Ink_Canvas { #line hidden - #line 78 "..\..\..\..\Windows\RandWindow.xaml" + #line 77 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox NoHotStudents; @@ -123,7 +123,7 @@ namespace Ink_Canvas { #line hidden - #line 81 "..\..\..\..\Windows\RandWindow.xaml" + #line 80 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox NoShengPiZi; @@ -131,7 +131,7 @@ namespace Ink_Canvas { #line hidden - #line 86 "..\..\..\..\Windows\RandWindow.xaml" + #line 85 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox ComboBoxRandMode; @@ -139,7 +139,7 @@ namespace Ink_Canvas { #line hidden - #line 96 "..\..\..\..\Windows\RandWindow.xaml" + #line 95 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnRand; @@ -147,7 +147,7 @@ namespace Ink_Canvas { #line hidden - #line 99 "..\..\..\..\Windows\RandWindow.xaml" + #line 98 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart; @@ -155,7 +155,7 @@ namespace Ink_Canvas { #line hidden - #line 104 "..\..\..\..\Windows\RandWindow.xaml" + #line 103 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnIslandCaller; @@ -163,7 +163,7 @@ namespace Ink_Canvas { #line hidden - #line 114 "..\..\..\..\Windows\RandWindow.xaml" + #line 113 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BorderBtnHelp; @@ -171,7 +171,7 @@ namespace Ink_Canvas { #line hidden - #line 122 "..\..\..\..\Windows\RandWindow.xaml" + #line 121 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock TextBlockPeopleCount; @@ -179,7 +179,7 @@ namespace Ink_Canvas { #line hidden - #line 125 "..\..\..\..\Windows\RandWindow.xaml" + #line 124 "..\..\..\..\Windows\RandWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Border BtnClose; @@ -239,7 +239,7 @@ namespace Ink_Canvas { case 6: this.BorderBtnMinus = ((System.Windows.Controls.Border)(target)); - #line 29 "..\..\..\..\Windows\RandWindow.xaml" + #line 28 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnMinus.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnMinus_MouseUp); #line default @@ -251,7 +251,7 @@ namespace Ink_Canvas { case 8: this.BorderBtnAdd = ((System.Windows.Controls.Border)(target)); - #line 53 "..\..\..\..\Windows\RandWindow.xaml" + #line 52 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnAdd.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnAdd_MouseUp); #line default @@ -269,7 +269,7 @@ namespace Ink_Canvas { case 12: this.BorderBtnRand = ((System.Windows.Controls.Border)(target)); - #line 96 "..\..\..\..\Windows\RandWindow.xaml" + #line 95 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnRand.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnRand_MouseUp); #line default @@ -281,7 +281,7 @@ namespace Ink_Canvas { case 14: this.BorderBtnIslandCaller = ((System.Windows.Controls.Border)(target)); - #line 104 "..\..\..\..\Windows\RandWindow.xaml" + #line 103 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnIslandCaller.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnIslandCaller_MouseUp); #line default @@ -290,7 +290,7 @@ namespace Ink_Canvas { case 15: this.BorderBtnHelp = ((System.Windows.Controls.Border)(target)); - #line 114 "..\..\..\..\Windows\RandWindow.xaml" + #line 113 "..\..\..\..\Windows\RandWindow.xaml" this.BorderBtnHelp.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnHelp_MouseUp); #line default @@ -302,7 +302,7 @@ namespace Ink_Canvas { case 17: this.BtnClose = ((System.Windows.Controls.Border)(target)); - #line 125 "..\..\..\..\Windows\RandWindow.xaml" + #line 124 "..\..\..\..\Windows\RandWindow.xaml" this.BtnClose.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnClose_MouseUp); #line default