improve:自动更新

This commit is contained in:
CJK_mkp
2025-06-18 22:40:48 +08:00
parent 6f961225d7
commit a3fee5d77c
6 changed files with 189 additions and 135 deletions
+1 -1
View File
@@ -1 +1 @@
1.6.4.0
1.6.4
+141 -87
View File
@@ -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;
}
}
+1 -1
View File
@@ -399,7 +399,7 @@ namespace Ink_Canvas {
App.IsAppExitByUser = true;
// 准备批处理脚本
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false);
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false);
// 关闭软件,让安装程序接管
Application.Current.Shutdown();
@@ -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"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
@@ -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
@@ -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"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
@@ -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