Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab67ea48f0 | |||
| 912c1b91e4 | |||
| d4f1d21634 | |||
| 6c0e7c2e64 | |||
| e054a50b55 | |||
| ff005e6398 | |||
| 74cc8e7dda | |||
| 254d70a787 | |||
| 28b728822c | |||
| 5a53471bcd | |||
| a3fee5d77c | |||
| 6f961225d7 | |||
| 1b0b4f7505 | |||
| fac66fafbd |
@@ -1 +1 @@
|
|||||||
1.6.3.0
|
1.6.6
|
||||||
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.6.3.0")]
|
[assembly: AssemblyVersion("1.6.6")]
|
||||||
[assembly: AssemblyFileVersion("1.6.3.0")]
|
[assembly: AssemblyFileVersion("1.6.6")]
|
||||||
|
|||||||
@@ -23,9 +23,20 @@ namespace Ink_Canvas.Helpers
|
|||||||
LogHelper.WriteLogToFile($"AutoUpdate | Local version: {localVersion}");
|
LogHelper.WriteLogToFile($"AutoUpdate | Local version: {localVersion}");
|
||||||
|
|
||||||
string remoteAddress = proxy;
|
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);
|
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)
|
if (remoteVersion != null)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Remote version: {remoteVersion}");
|
LogHelper.WriteLogToFile($"AutoUpdate | Remote version: {remoteVersion}");
|
||||||
@@ -44,7 +55,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
}
|
}
|
||||||
else
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,10 +73,23 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Set a reasonable timeout
|
// Set a reasonable timeout
|
||||||
client.Timeout = TimeSpan.FromSeconds(15);
|
client.Timeout = TimeSpan.FromSeconds(10); // 减少超时时间以便更快切换到备用地址
|
||||||
|
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Sending HTTP request to: {fileUrl}");
|
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}");
|
LogHelper.WriteLogToFile($"AutoUpdate | HTTP response status: {response.StatusCode}");
|
||||||
response.EnsureSuccessStatusCode();
|
response.EnsureSuccessStatusCode();
|
||||||
@@ -145,15 +169,26 @@ namespace Ink_Canvas.Helpers
|
|||||||
LogHelper.WriteLogToFile($"AutoUpdate | Created updates directory: {updatesFolderPath}");
|
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";
|
string primaryUrl = $"{proxy}https://github.com/awesome-iwb/icc-ce/releases/download/{version}/InkCanvasForClass.CE.{version}.zip";
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Download URL: {downloadUrl}");
|
// 备用下载地址
|
||||||
|
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);
|
SaveDownloadStatus(false);
|
||||||
string zipFilePath = Path.Combine(updatesFolderPath, $"InkCanvasForClass.CE.{version}.zip");
|
string zipFilePath = Path.Combine(updatesFolderPath, $"InkCanvasForClass.CE.{version}.zip");
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Target file path: {zipFilePath}");
|
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)
|
if (downloadSuccess)
|
||||||
{
|
{
|
||||||
@@ -163,7 +198,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
}
|
}
|
||||||
else
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,101 +235,108 @@ namespace Ink_Canvas.Helpers
|
|||||||
if (!Directory.Exists(directory))
|
if (!Directory.Exists(directory))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(directory);
|
Directory.CreateDirectory(directory);
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Created directory: {directory}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除可能存在的临时文件
|
// 使用带超时的Task.WhenAny来确保请求不会无限期等待
|
||||||
if (File.Exists(tempFilePath))
|
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 | Initial connection timed out after 30 seconds", LogHelper.LogType.Error);
|
||||||
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);
|
|
||||||
return false;
|
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);
|
if (File.Exists(tempFilePath))
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | File saved to: {destinationPath}");
|
{
|
||||||
|
// 如果目标文件已存在,先删除
|
||||||
|
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)
|
catch (HttpRequestException ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | HTTP request error: {ex.Message}", LogHelper.LogType.Error);
|
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)
|
catch (TaskCanceledException ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Download timed out: {ex.Message}", LogHelper.LogType.Error);
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -303,8 +345,20 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Inner exception: {ex.InnerException.Message}", LogHelper.LogType.Error);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,6 +411,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Current application directory: {currentAppDir}");
|
LogHelper.WriteLogToFile($"AutoUpdate | Current application directory: {currentAppDir}");
|
||||||
LogHelper.WriteLogToFile($"AutoUpdate | Current process ID: {currentProcessId}");
|
LogHelper.WriteLogToFile($"AutoUpdate | Current process ID: {currentProcessId}");
|
||||||
|
LogHelper.WriteLogToFile($"AutoUpdate | Silent update mode: {isInSilence}");
|
||||||
|
|
||||||
// 创建批处理文件来执行更新操作
|
// 创建批处理文件来执行更新操作
|
||||||
string batchFilePath = Path.Combine(Path.GetTempPath(), "UpdateICC_" + Guid.NewGuid().ToString().Substring(0, 8) + ".bat");
|
string batchFilePath = Path.Combine(Path.GetTempPath(), "UpdateICC_" + Guid.NewGuid().ToString().Substring(0, 8) + ".bat");
|
||||||
@@ -414,21 +469,45 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
// 启动更新后的应用程序
|
// 启动更新后的应用程序
|
||||||
batchContent.AppendLine($"echo echo Update completed successfully! >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo echo Update completed successfully! >> \"{updateBatPath}\"");
|
||||||
batchContent.AppendLine($"echo :: 检查应用程序是否已经在运行 >> \"{updateBatPath}\"");
|
|
||||||
batchContent.AppendLine($"echo tasklist /FI \"IMAGENAME eq Ink Canvas.exe\" | find /i \"Ink Canvas.exe\" > nul >> \"{updateBatPath}\"");
|
// 根据是否为静默更新模式决定是否自动启动应用程序
|
||||||
batchContent.AppendLine($"echo if %%ERRORLEVEL%% neq 0 ( >> \"{updateBatPath}\"");
|
if (isInSilence)
|
||||||
batchContent.AppendLine($"echo echo 启动应用程序... >> \"{updateBatPath}\"");
|
{
|
||||||
batchContent.AppendLine($"echo start \"\" \"{appPath}\" >> \"{updateBatPath}\"");
|
// 静默更新模式下,自动启动应用程序
|
||||||
batchContent.AppendLine($"echo ) else ( >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo echo 自动启动应用程序... >> \"{updateBatPath}\"");
|
||||||
batchContent.AppendLine($"echo echo 应用程序已经在运行,不再重复启动 >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo start \"\" \"{appPath}\" >> \"{updateBatPath}\"");
|
||||||
batchContent.AppendLine($"echo ) >> \"{updateBatPath}\"");
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 非静默模式下,检查应用程序是否已经在运行
|
||||||
|
batchContent.AppendLine($"echo :: 检查应用程序是否已经在运行 >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo tasklist /FI \"IMAGENAME eq Ink Canvas.exe\" | find /i \"Ink Canvas.exe\" > nul >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo if %%ERRORLEVEL%% neq 0 ( >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo echo 启动应用程序... >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo start \"\" \"{appPath}\" >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo ) else ( >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo echo 应用程序已经在运行,不再重复启动 >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo ) >> \"{updateBatPath}\"");
|
||||||
|
}
|
||||||
|
|
||||||
batchContent.AppendLine($"echo exit /b 0 >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo exit /b 0 >> \"{updateBatPath}\"");
|
||||||
batchContent.AppendLine($"echo goto EXIT >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo goto EXIT >> \"{updateBatPath}\"");
|
||||||
|
|
||||||
// 错误退出处理
|
// 错误退出处理
|
||||||
batchContent.AppendLine($"echo :ERROR_EXIT >> \"{updateBatPath}\"");
|
if (isInSilence)
|
||||||
batchContent.AppendLine($"echo start \"\" cmd /c \"echo Update failed! ^& pause\" >> \"{updateBatPath}\"");
|
{
|
||||||
batchContent.AppendLine($"echo exit /b 1 >> \"{updateBatPath}\"");
|
// 静默模式下,不显示错误提示
|
||||||
|
batchContent.AppendLine($"echo :ERROR_EXIT >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo echo Update failed! >> \"%temp%\\icc_update_error.log\" >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo exit /b 1 >> \"{updateBatPath}\"");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 非静默模式下,显示错误提示
|
||||||
|
batchContent.AppendLine($"echo :ERROR_EXIT >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo start \"\" cmd /c \"echo Update failed! ^& pause\" >> \"{updateBatPath}\"");
|
||||||
|
batchContent.AppendLine($"echo exit /b 1 >> \"{updateBatPath}\"");
|
||||||
|
}
|
||||||
|
|
||||||
// 删除批处理文件自身
|
// 删除批处理文件自身
|
||||||
batchContent.AppendLine($"echo :EXIT >> \"{updateBatPath}\"");
|
batchContent.AppendLine($"echo :EXIT >> \"{updateBatPath}\"");
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
<Grid x:Name="Main_Grid">
|
<Grid x:Name="Main_Grid">
|
||||||
|
|
||||||
<!--// 设置界面 //-->
|
<!--// 设置界面 //-->
|
||||||
<Grid Panel.ZIndex="999" x:Name="BorderSettingsMask" MouseDown="SettingsOverlayClick" IsHitTestVisible="False"
|
<Grid Panel.ZIndex="999" x:Name="BorderSettingsMask" MouseDown="SettingsOverlayClick" IsHitTestVisible="True"
|
||||||
Margin="0,0,0,0">
|
Margin="0,0,0,0">
|
||||||
<Border Name="BorderSettings" Background="#ee18181b" ui:ThemeManager.RequestedTheme="Dark" Width="490"
|
<Border Name="BorderSettings" Background="#ee18181b" ui:ThemeManager.RequestedTheme="Dark" Width="490"
|
||||||
HorizontalAlignment="Left" Margin="300,150,0,350" Visibility="Visible">
|
HorizontalAlignment="Left" Margin="300,150,0,350" Visibility="Visible">
|
||||||
@@ -2432,7 +2432,7 @@
|
|||||||
<ui:SimpleStackPanel Orientation="Horizontal">
|
<ui:SimpleStackPanel Orientation="Horizontal">
|
||||||
<TextBlock FontSize="18" FontWeight="Bold" Text="Version:" />
|
<TextBlock FontSize="18" FontWeight="Bold" Text="Version:" />
|
||||||
<TextBlock x:Name="AppVersionTextBlock" FontSize="18" FontWeight="Bold"
|
<TextBlock x:Name="AppVersionTextBlock" FontSize="18" FontWeight="Bold"
|
||||||
Text="1.X.X.X" />
|
Text="1.X.X" />
|
||||||
</ui:SimpleStackPanel>
|
</ui:SimpleStackPanel>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="# 使用和分发本软件前,请您应当且务必知晓相关开源协议,且您应当知晓本软件基于 https://github.com/WXRIW/Ink-Canvas 修改而成。"
|
Text="# 使用和分发本软件前,请您应当且务必知晓相关开源协议,且您应当知晓本软件基于 https://github.com/WXRIW/Ink-Canvas 修改而成。"
|
||||||
|
|||||||
@@ -363,9 +363,35 @@ namespace Ink_Canvas {
|
|||||||
HasNewUpdateWindow updateWindow = new HasNewUpdateWindow(currentVersion, AvailableLatestVersion, releaseDate, releaseNotes);
|
HasNewUpdateWindow updateWindow = new HasNewUpdateWindow(currentVersion, AvailableLatestVersion, releaseDate, releaseNotes);
|
||||||
bool? dialogResult = updateWindow.ShowDialog();
|
bool? dialogResult = updateWindow.ShowDialog();
|
||||||
|
|
||||||
|
// 声明下载结果变量
|
||||||
|
bool isDownloadSuccessful;
|
||||||
|
|
||||||
// 如果窗口被关闭但没有点击按钮,视为"稍后更新"
|
// 如果窗口被关闭但没有点击按钮,视为"稍后更新"
|
||||||
if (dialogResult != true) {
|
if (dialogResult != true) {
|
||||||
LogHelper.WriteLogToFile("AutoUpdate | Update dialog closed without selection");
|
LogHelper.WriteLogToFile("AutoUpdate | Update dialog closed without selection");
|
||||||
|
|
||||||
|
// 更新自动更新设置并保存
|
||||||
|
Settings.Startup.IsAutoUpdate = updateWindow.IsAutoUpdateEnabled;
|
||||||
|
Settings.Startup.IsAutoUpdateWithSilence = updateWindow.IsSilentUpdateEnabled;
|
||||||
|
SaveSettingsToFile();
|
||||||
|
|
||||||
|
// 如果启用了静默更新,则自动下载更新
|
||||||
|
if (Settings.Startup.IsAutoUpdateWithSilence) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Silent update enabled, downloading update automatically");
|
||||||
|
|
||||||
|
// 静默下载更新
|
||||||
|
isDownloadSuccessful = await AutoUpdateHelper.DownloadSetupFileAndSaveStatus(AvailableLatestVersion);
|
||||||
|
|
||||||
|
if (isDownloadSuccessful) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Update downloaded successfully, will install when application closes");
|
||||||
|
|
||||||
|
// 启动检查定时器
|
||||||
|
timerCheckAutoUpdateWithSilence.Start();
|
||||||
|
} else {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Silent update download failed", LogHelper.LogType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,9 +400,6 @@ namespace Ink_Canvas {
|
|||||||
Settings.Startup.IsAutoUpdateWithSilence = updateWindow.IsSilentUpdateEnabled;
|
Settings.Startup.IsAutoUpdateWithSilence = updateWindow.IsSilentUpdateEnabled;
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
|
|
||||||
// 声明下载结果变量
|
|
||||||
bool isDownloadSuccessful;
|
|
||||||
|
|
||||||
// 根据用户选择处理更新
|
// 根据用户选择处理更新
|
||||||
switch (updateWindow.Result) {
|
switch (updateWindow.Result) {
|
||||||
case HasNewUpdateWindow.UpdateResult.UpdateNow:
|
case HasNewUpdateWindow.UpdateResult.UpdateNow:
|
||||||
@@ -399,7 +422,7 @@ namespace Ink_Canvas {
|
|||||||
App.IsAppExitByUser = true;
|
App.IsAppExitByUser = true;
|
||||||
|
|
||||||
// 准备批处理脚本
|
// 准备批处理脚本
|
||||||
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false);
|
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false);
|
||||||
|
|
||||||
// 关闭软件,让安装程序接管
|
// 关闭软件,让安装程序接管
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
@@ -480,7 +503,22 @@ namespace Ink_Canvas {
|
|||||||
canvas.Cursor = Cursors.Cross;
|
canvas.Cursor = Cursors.Cross;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 确保光标可见,无论是鼠标、触控还是手写笔
|
||||||
System.Windows.Forms.Cursor.Show();
|
System.Windows.Forms.Cursor.Show();
|
||||||
|
|
||||||
|
// 强制应用光标设置
|
||||||
|
canvas.ForceCursor = true;
|
||||||
|
|
||||||
|
// 确保手写笔模式下也能显示光标
|
||||||
|
if (Tablet.TabletDevices.Count > 0) {
|
||||||
|
foreach (TabletDevice device in Tablet.TabletDevices) {
|
||||||
|
if (device.Type == TabletDeviceType.Stylus) {
|
||||||
|
// 手写笔设备存在,强制显示光标
|
||||||
|
System.Windows.Forms.Cursor.Show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
canvas.UseCustomCursor = false;
|
canvas.UseCustomCursor = false;
|
||||||
canvas.ForceCursor = false;
|
canvas.ForceCursor = false;
|
||||||
|
|||||||
@@ -36,42 +36,10 @@ namespace Ink_Canvas {
|
|||||||
} else {
|
} else {
|
||||||
forceEraser = true;
|
forceEraser = true;
|
||||||
forcePointEraser = true;
|
forcePointEraser = true;
|
||||||
double k = 1;
|
|
||||||
if (Settings.Canvas.EraserShapeType == 0) {
|
// 使用统一的方法应用橡皮擦形状,确保一致性
|
||||||
switch (BoardComboBoxEraserSize.SelectedIndex)
|
ApplyCurrentEraserShape();
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
k = 0.5;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
k = 0.8;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.25;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.8;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(k * 90, k * 90);
|
|
||||||
} else if (Settings.Canvas.EraserShapeType == 1) {
|
|
||||||
switch (BoardComboBoxEraserSize.SelectedIndex)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
k = 0.7;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
k = 0.9;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.2;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.6;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
inkCanvas.EraserShape = new RectangleStylusShape(k * 90 * 0.6, k * 90);
|
|
||||||
}
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
||||||
drawingShapeMode = 0;
|
drawingShapeMode = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -282,6 +282,7 @@ namespace Ink_Canvas {
|
|||||||
AnimationsHelper.HideWithSlideAndFade(BoardBorderRightPageListView);
|
AnimationsHelper.HideWithSlideAndFade(BoardBorderRightPageListView);
|
||||||
|
|
||||||
if (BorderSettings.Visibility == Visibility.Visible) {
|
if (BorderSettings.Visibility == Visibility.Visible) {
|
||||||
|
// 设置蒙版为不可点击,并移除背景
|
||||||
BorderSettingsMask.IsHitTestVisible = false;
|
BorderSettingsMask.IsHitTestVisible = false;
|
||||||
BorderSettingsMask.Background = null;
|
BorderSettingsMask.Background = null;
|
||||||
var sb = new Storyboard();
|
var sb = new Storyboard();
|
||||||
@@ -403,6 +404,11 @@ namespace Ink_Canvas {
|
|||||||
System.Windows.Controls.Canvas.SetLeft(FloatingbarSelectionBG, 28 * 5);
|
System.Windows.Controls.Canvas.SetLeft(FloatingbarSelectionBG, 28 * 5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "shape": {
|
||||||
|
// 对图形模式进行特殊处理,不修改按钮UI状态
|
||||||
|
// 只隐藏相关面板,但保持图形绘制模式
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1422,44 +1428,9 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
forceEraser = true;
|
forceEraser = true;
|
||||||
forcePointEraser = true;
|
forcePointEraser = true;
|
||||||
if (Settings.Canvas.EraserShapeType == 0) {
|
|
||||||
double k = 1;
|
// 即使手掌触发过面积擦,也强制应用当前的EraserShapeType设置
|
||||||
switch (Settings.Canvas.EraserSize) {
|
ApplyCurrentEraserShape();
|
||||||
case 0:
|
|
||||||
k = 0.5;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
k = 0.8;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.25;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.8;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(k * 90, k * 90);
|
|
||||||
}
|
|
||||||
else if (Settings.Canvas.EraserShapeType == 1) {
|
|
||||||
double k = 1;
|
|
||||||
switch (Settings.Canvas.EraserSize) {
|
|
||||||
case 0:
|
|
||||||
k = 0.7;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
k = 0.9;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.2;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.6;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new RectangleStylusShape(k * 90 * 0.6, k * 90);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint) {
|
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint) {
|
||||||
if (EraserSizePanel.Visibility == Visibility.Collapsed) {
|
if (EraserSizePanel.Visibility == Visibility.Collapsed) {
|
||||||
@@ -1498,6 +1469,33 @@ namespace Ink_Canvas {
|
|||||||
inkCanvas_EditingModeChanged(inkCanvas, null);
|
inkCanvas_EditingModeChanged(inkCanvas, null);
|
||||||
CancelSingleFingerDragMode();
|
CancelSingleFingerDragMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增方法,根据当前设置应用橡皮擦形状
|
||||||
|
public void ApplyCurrentEraserShape() {
|
||||||
|
double k = 1;
|
||||||
|
switch (Settings.Canvas.EraserSize) {
|
||||||
|
case 0:
|
||||||
|
k = Settings.Canvas.EraserShapeType == 0 ? 0.5 : 0.7;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
k = Settings.Canvas.EraserShapeType == 0 ? 0.8 : 0.9;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
k = Settings.Canvas.EraserShapeType == 0 ? 1.25 : 1.2;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
k = Settings.Canvas.EraserShapeType == 0 ? 1.8 : 1.6;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Settings.Canvas.EraserShapeType == 0) {
|
||||||
|
// 圆形擦
|
||||||
|
inkCanvas.EraserShape = new EllipseStylusShape(k * 90, k * 90);
|
||||||
|
} else if (Settings.Canvas.EraserShapeType == 1) {
|
||||||
|
// 矩形黑板擦
|
||||||
|
inkCanvas.EraserShape = new RectangleStylusShape(k * 90 * 0.6, k * 90);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void EraserIconByStrokes_Click(object sender, RoutedEventArgs e) {
|
private void EraserIconByStrokes_Click(object sender, RoutedEventArgs e) {
|
||||||
|
|
||||||
@@ -1549,7 +1547,8 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
private void DrawShapePromptToPen() {
|
private void DrawShapePromptToPen() {
|
||||||
if (isLongPressSelected == true) {
|
if (isLongPressSelected == true) {
|
||||||
HideSubPanels("pen");
|
// 如果是长按选中的状态,只隐藏面板,不切换到笔模式
|
||||||
|
HideSubPanels("shape");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (StackPanelCanvasControls.Visibility == Visibility.Visible)
|
if (StackPanelCanvasControls.Visibility == Visibility.Visible)
|
||||||
@@ -1629,7 +1628,23 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
private void SettingsOverlayClick(object sender, MouseButtonEventArgs e) {
|
private void SettingsOverlayClick(object sender, MouseButtonEventArgs e) {
|
||||||
if (isOpeningOrHidingSettingsPane == true) return;
|
if (isOpeningOrHidingSettingsPane == true) return;
|
||||||
BtnSettings_Click(null, null);
|
|
||||||
|
// 获取点击的位置
|
||||||
|
Point clickPoint = e.GetPosition(BorderSettingsMask);
|
||||||
|
|
||||||
|
// 获取BorderSettings的位置和大小
|
||||||
|
Point settingsPosition = BorderSettings.TranslatePoint(new Point(0, 0), BorderSettingsMask);
|
||||||
|
Rect settingsRect = new Rect(
|
||||||
|
settingsPosition.X,
|
||||||
|
settingsPosition.Y,
|
||||||
|
BorderSettings.ActualWidth,
|
||||||
|
BorderSettings.ActualHeight
|
||||||
|
);
|
||||||
|
|
||||||
|
// 如果点击位置不在设置界面内部,才关闭设置界面
|
||||||
|
if (!settingsRect.Contains(clickPoint)) {
|
||||||
|
BtnSettings_Click(null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isOpeningOrHidingSettingsPane = false;
|
private bool isOpeningOrHidingSettingsPane = false;
|
||||||
@@ -1639,6 +1654,7 @@ namespace Ink_Canvas {
|
|||||||
HideSubPanels();
|
HideSubPanels();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// 设置蒙版为可点击,并添加半透明背景
|
||||||
BorderSettingsMask.IsHitTestVisible = true;
|
BorderSettingsMask.IsHitTestVisible = true;
|
||||||
BorderSettingsMask.Background = new SolidColorBrush(Color.FromArgb(1, 0, 0, 0));
|
BorderSettingsMask.Background = new SolidColorBrush(Color.FromArgb(1, 0, 0, 0));
|
||||||
SettingsPanelScrollViewer.ScrollToTop();
|
SettingsPanelScrollViewer.ScrollToTop();
|
||||||
|
|||||||
@@ -792,46 +792,17 @@ namespace Ink_Canvas {
|
|||||||
ComboBoxEraserSizeFloatingBar.SelectedIndex = s.SelectedIndex;
|
ComboBoxEraserSizeFloatingBar.SelectedIndex = s.SelectedIndex;
|
||||||
ComboBoxEraserSize.SelectedIndex = s.SelectedIndex;
|
ComboBoxEraserSize.SelectedIndex = s.SelectedIndex;
|
||||||
}
|
}
|
||||||
if (Settings.Canvas.EraserShapeType == 0) {
|
|
||||||
double k = 1;
|
// 使用统一的方法应用橡皮擦形状
|
||||||
switch (s.SelectedIndex) {
|
ApplyCurrentEraserShape();
|
||||||
case 0:
|
|
||||||
k = 0.5;
|
// 确保当前处于橡皮擦模式时能立即看到效果
|
||||||
break;
|
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint) {
|
||||||
case 1:
|
// 先切换一下模式,再切回来,确保橡皮擦形状得到刷新
|
||||||
k = 0.8;
|
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
||||||
break;
|
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
||||||
case 3:
|
|
||||||
k = 1.25;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.8;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(k * 90, k * 90);
|
|
||||||
} else if (Settings.Canvas.EraserShapeType == 1) {
|
|
||||||
double k = 1;
|
|
||||||
switch (s.SelectedIndex) {
|
|
||||||
case 0:
|
|
||||||
k = 0.7;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
k = 0.9;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.2;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.6;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new RectangleStylusShape(k * 90 * 0.6, k * 90);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,23 +811,11 @@ namespace Ink_Canvas {
|
|||||||
Settings.Canvas.EraserShapeType = 0;
|
Settings.Canvas.EraserShapeType = 0;
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
CheckEraserTypeTab();
|
CheckEraserTypeTab();
|
||||||
double k = 1;
|
|
||||||
switch (ComboBoxEraserSizeFloatingBar.SelectedIndex) {
|
// 使用统一的方法应用橡皮擦形状
|
||||||
case 0:
|
ApplyCurrentEraserShape();
|
||||||
k = 0.5;
|
|
||||||
break;
|
// 确保当前处于橡皮擦模式时能立即看到效果
|
||||||
case 1:
|
|
||||||
k = 0.8;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.25;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.8;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(k * 90, k * 90);
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
||||||
}
|
}
|
||||||
@@ -866,23 +825,11 @@ namespace Ink_Canvas {
|
|||||||
Settings.Canvas.EraserShapeType = 1;
|
Settings.Canvas.EraserShapeType = 1;
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
CheckEraserTypeTab();
|
CheckEraserTypeTab();
|
||||||
double k = 1;
|
|
||||||
switch (ComboBoxEraserSizeFloatingBar.SelectedIndex) {
|
// 使用统一的方法应用橡皮擦形状
|
||||||
case 0:
|
ApplyCurrentEraserShape();
|
||||||
k = 0.7;
|
|
||||||
break;
|
// 确保当前处于橡皮擦模式时能立即看到效果
|
||||||
case 1:
|
|
||||||
k = 0.9;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
k = 1.2;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
k = 1.6;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inkCanvas.EraserShape = new RectangleStylusShape(k * 90 * 0.6, k * 90);
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
||||||
}
|
}
|
||||||
@@ -1347,29 +1294,52 @@ namespace Ink_Canvas {
|
|||||||
BoardToggleSwitchEnableMultiTouchMode.IsOn = ToggleSwitchEnableMultiTouchMode.IsOn;
|
BoardToggleSwitchEnableMultiTouchMode.IsOn = ToggleSwitchEnableMultiTouchMode.IsOn;
|
||||||
else
|
else
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = BoardToggleSwitchEnableMultiTouchMode.IsOn;
|
ToggleSwitchEnableMultiTouchMode.IsOn = BoardToggleSwitchEnableMultiTouchMode.IsOn;
|
||||||
|
|
||||||
if (ToggleSwitchEnableMultiTouchMode.IsOn) {
|
if (ToggleSwitchEnableMultiTouchMode.IsOn) {
|
||||||
if (!isInMultiTouchMode) {
|
if (!isInMultiTouchMode) {
|
||||||
|
// 保存当前编辑模式和绘图工具状态
|
||||||
|
InkCanvasEditingMode currentEditingMode = inkCanvas.EditingMode;
|
||||||
|
int currentDrawingShapeMode = drawingShapeMode;
|
||||||
|
bool currentForceEraser = forceEraser;
|
||||||
|
|
||||||
inkCanvas.StylusDown += MainWindow_StylusDown;
|
inkCanvas.StylusDown += MainWindow_StylusDown;
|
||||||
inkCanvas.StylusMove += MainWindow_StylusMove;
|
inkCanvas.StylusMove += MainWindow_StylusMove;
|
||||||
inkCanvas.StylusUp += MainWindow_StylusUp;
|
inkCanvas.StylusUp += MainWindow_StylusUp;
|
||||||
inkCanvas.TouchDown += MainWindow_TouchDown;
|
inkCanvas.TouchDown += MainWindow_TouchDown;
|
||||||
inkCanvas.TouchDown -= Main_Grid_TouchDown;
|
inkCanvas.TouchDown -= Main_Grid_TouchDown;
|
||||||
|
|
||||||
|
// 先设为None再设回原来的模式,避免可能的事件冲突
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
|
||||||
inkCanvas.Children.Clear();
|
inkCanvas.Children.Clear();
|
||||||
isInMultiTouchMode = true;
|
isInMultiTouchMode = true;
|
||||||
|
|
||||||
|
// 恢复到之前的编辑状态
|
||||||
|
inkCanvas.EditingMode = currentEditingMode;
|
||||||
|
drawingShapeMode = currentDrawingShapeMode;
|
||||||
|
forceEraser = currentForceEraser;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isInMultiTouchMode) {
|
if (isInMultiTouchMode) {
|
||||||
|
// 保存当前编辑模式和绘图工具状态
|
||||||
|
InkCanvasEditingMode currentEditingMode = inkCanvas.EditingMode;
|
||||||
|
int currentDrawingShapeMode = drawingShapeMode;
|
||||||
|
bool currentForceEraser = forceEraser;
|
||||||
|
|
||||||
inkCanvas.StylusDown -= MainWindow_StylusDown;
|
inkCanvas.StylusDown -= MainWindow_StylusDown;
|
||||||
inkCanvas.StylusMove -= MainWindow_StylusMove;
|
inkCanvas.StylusMove -= MainWindow_StylusMove;
|
||||||
inkCanvas.StylusUp -= MainWindow_StylusUp;
|
inkCanvas.StylusUp -= MainWindow_StylusUp;
|
||||||
inkCanvas.TouchDown -= MainWindow_TouchDown;
|
inkCanvas.TouchDown -= MainWindow_TouchDown;
|
||||||
inkCanvas.TouchDown += Main_Grid_TouchDown;
|
inkCanvas.TouchDown += Main_Grid_TouchDown;
|
||||||
|
|
||||||
|
// 先设为None再设回原来的模式,避免可能的事件冲突
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
|
||||||
inkCanvas.Children.Clear();
|
inkCanvas.Children.Clear();
|
||||||
isInMultiTouchMode = false;
|
isInMultiTouchMode = false;
|
||||||
|
|
||||||
|
// 恢复到之前的编辑状态
|
||||||
|
inkCanvas.EditingMode = currentEditingMode;
|
||||||
|
drawingShapeMode = currentDrawingShapeMode;
|
||||||
|
forceEraser = currentForceEraser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,16 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
private Task<bool> CheckIsDrawingShapesInMultiTouchMode() {
|
private Task<bool> CheckIsDrawingShapesInMultiTouchMode() {
|
||||||
if (isInMultiTouchMode) {
|
if (isInMultiTouchMode) {
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = false;
|
// 不关闭多指书写模式,而是保存状态,暂时禁用多指书写相关的事件处理
|
||||||
|
// 不再调用 ToggleSwitchEnableMultiTouchMode.IsOn = false;
|
||||||
|
|
||||||
|
// 暂时禁用多指书写事件处理,以避免冲突
|
||||||
|
inkCanvas.StylusDown -= MainWindow_StylusDown;
|
||||||
|
inkCanvas.StylusMove -= MainWindow_StylusMove;
|
||||||
|
inkCanvas.StylusUp -= MainWindow_StylusUp;
|
||||||
|
inkCanvas.TouchDown -= MainWindow_TouchDown;
|
||||||
|
|
||||||
|
// 记录已暂时禁用多指书写模式,但实际上多指书写开关仍然为打开状态
|
||||||
lastIsInMultiTouchMode = true;
|
lastIsInMultiTouchMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,6 +138,14 @@ namespace Ink_Canvas {
|
|||||||
inkCanvas.IsManipulationEnabled = true;
|
inkCanvas.IsManipulationEnabled = true;
|
||||||
CancelSingleFingerDragMode();
|
CancelSingleFingerDragMode();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// 即使不是长按,也设置必要的绘图状态
|
||||||
|
forceEraser = true;
|
||||||
|
drawingShapeMode = 1;
|
||||||
|
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
||||||
|
inkCanvas.IsManipulationEnabled = true;
|
||||||
|
isLongPressSelected = true; // 设置为选中状态,避免抬笔后切换回笔模式
|
||||||
|
}
|
||||||
|
|
||||||
lastMouseDownSender = null;
|
lastMouseDownSender = null;
|
||||||
if (isLongPressSelected) {
|
if (isLongPressSelected) {
|
||||||
@@ -189,6 +206,14 @@ namespace Ink_Canvas {
|
|||||||
inkCanvas.IsManipulationEnabled = true;
|
inkCanvas.IsManipulationEnabled = true;
|
||||||
CancelSingleFingerDragMode();
|
CancelSingleFingerDragMode();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// 即使不是长按,也设置必要的绘图状态
|
||||||
|
forceEraser = true;
|
||||||
|
drawingShapeMode = 2;
|
||||||
|
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
||||||
|
inkCanvas.IsManipulationEnabled = true;
|
||||||
|
isLongPressSelected = true; // 设置为选中状态,避免抬笔后切换回笔模式
|
||||||
|
}
|
||||||
|
|
||||||
lastMouseDownSender = null;
|
lastMouseDownSender = null;
|
||||||
if (isLongPressSelected) {
|
if (isLongPressSelected) {
|
||||||
@@ -276,6 +301,7 @@ namespace Ink_Canvas {
|
|||||||
drawingShapeMode = 3;
|
drawingShapeMode = 3;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
inkCanvas.EditingMode = InkCanvasEditingMode.None;
|
||||||
inkCanvas.IsManipulationEnabled = true;
|
inkCanvas.IsManipulationEnabled = true;
|
||||||
|
isLongPressSelected = true; // 设置为选中状态,避免抬笔后切换回笔模式
|
||||||
CancelSingleFingerDragMode();
|
CancelSingleFingerDragMode();
|
||||||
DrawShapePromptToPen();
|
DrawShapePromptToPen();
|
||||||
}
|
}
|
||||||
@@ -435,7 +461,12 @@ namespace Ink_Canvas {
|
|||||||
if (isLastTouchEraser) return;
|
if (isLastTouchEraser) return;
|
||||||
//EraserContainer.Background = null;
|
//EraserContainer.Background = null;
|
||||||
//ImageEraser.Visibility = Visibility.Visible;
|
//ImageEraser.Visibility = Visibility.Visible;
|
||||||
if (isWaitUntilNextTouchDown) return;
|
|
||||||
|
// 修复触屏状态下几何绘制功能不可用的问题
|
||||||
|
// 在几何绘制模式下,即使isWaitUntilNextTouchDown为true,也应该处理触摸移动事件
|
||||||
|
// 只有当多点触控时才需要等待下一次触摸
|
||||||
|
if (isWaitUntilNextTouchDown && dec.Count > 1) return;
|
||||||
|
|
||||||
if (dec.Count > 1) {
|
if (dec.Count > 1) {
|
||||||
isWaitUntilNextTouchDown = true;
|
isWaitUntilNextTouchDown = true;
|
||||||
try {
|
try {
|
||||||
@@ -447,6 +478,11 @@ namespace Ink_Canvas {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 在几何绘制模式下,确保处理单点触控的移动事件
|
||||||
|
Point touchPoint = e.GetTouchPoint(inkCanvas).Position;
|
||||||
|
MouseTouchMove(touchPoint);
|
||||||
|
return; // 处理完几何绘制后直接返回,不执行后面的代码
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触摸移动时保持自定义光标显示
|
// 触摸移动时保持自定义光标显示
|
||||||
@@ -1346,8 +1382,34 @@ namespace Ink_Canvas {
|
|||||||
ViewboxFloatingBar.IsHitTestVisible = true;
|
ViewboxFloatingBar.IsHitTestVisible = true;
|
||||||
BlackboardUIGridForInkReplay.IsHitTestVisible = true;
|
BlackboardUIGridForInkReplay.IsHitTestVisible = true;
|
||||||
|
|
||||||
|
// 在几何绘制模式下,确保正确处理触摸抬起事件
|
||||||
|
if (drawingShapeMode != 0) {
|
||||||
|
// 如果是几何绘制模式,确保将临时绘制的图形添加到永久图形中
|
||||||
|
if (lastTempStroke != null) {
|
||||||
|
// 将临时笔画添加到历史记录中
|
||||||
|
var strokes = new StrokeCollection();
|
||||||
|
strokes.Add(lastTempStroke);
|
||||||
|
timeMachine.CommitStrokeUserInputHistory(strokes);
|
||||||
|
// 清除临时笔画引用,以便下次绘制
|
||||||
|
lastTempStroke = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastTempStrokeCollection != null && lastTempStrokeCollection.Count > 0) {
|
||||||
|
// 将临时笔画集合添加到历史记录中
|
||||||
|
timeMachine.CommitStrokeUserInputHistory(lastTempStrokeCollection);
|
||||||
|
// 清除临时笔画集合引用,以便下次绘制
|
||||||
|
lastTempStrokeCollection = new StrokeCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果不是长按选中的状态,则需要在抬起手指后重置isWaitUntilNextTouchDown
|
||||||
|
if (!isLongPressSelected && dec.Count == 0) {
|
||||||
|
isWaitUntilNextTouchDown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inkCanvas_MouseUp(sender, null);
|
inkCanvas_MouseUp(sender, null);
|
||||||
if (dec.Count == 0) isWaitUntilNextTouchDown = false;
|
// 修改此处逻辑,在长按选择图形模式下保持isWaitUntilNextTouchDown
|
||||||
|
if (dec.Count == 0 && !isLongPressSelected) isWaitUntilNextTouchDown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stroke lastTempStroke = null;
|
private Stroke lastTempStroke = null;
|
||||||
@@ -1537,17 +1599,37 @@ namespace Ink_Canvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lastIsInMultiTouchMode) {
|
if (lastIsInMultiTouchMode) {
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
// 不再重新启用开关,而是恢复多指书写相关的事件处理
|
||||||
|
// ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||||
|
|
||||||
|
// 恢复多指书写事件处理
|
||||||
|
inkCanvas.StylusDown += MainWindow_StylusDown;
|
||||||
|
inkCanvas.StylusMove += MainWindow_StylusMove;
|
||||||
|
inkCanvas.StylusUp += MainWindow_StylusUp;
|
||||||
|
inkCanvas.TouchDown += MainWindow_TouchDown;
|
||||||
|
|
||||||
lastIsInMultiTouchMode = false;
|
lastIsInMultiTouchMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改此处逻辑,确保在正确的情况下才切换回笔模式
|
||||||
if (drawingShapeMode != 9 && drawingShapeMode != 0 && drawingShapeMode != 24 && drawingShapeMode != 25) {
|
if (drawingShapeMode != 9 && drawingShapeMode != 0 && drawingShapeMode != 24 && drawingShapeMode != 25) {
|
||||||
if (isLongPressSelected) { }
|
if (isLongPressSelected) {
|
||||||
|
// 如果是长按选中的情况,保持图形模式,不做任何切换
|
||||||
|
isWaitUntilNextTouchDown = true; // 保持当前绘图模式直到下一次触摸
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
BtnPen_Click(null, null); //画完一次还原到笔模式
|
BtnPen_Click(null, null); //画完一次还原到笔模式
|
||||||
if (lastIsInMultiTouchMode) {
|
if (lastIsInMultiTouchMode) {
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
// 不再重新启用开关,而是恢复多指书写相关的事件处理
|
||||||
|
// ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||||
|
|
||||||
|
// 恢复多指书写事件处理
|
||||||
|
inkCanvas.StylusDown += MainWindow_StylusDown;
|
||||||
|
inkCanvas.StylusMove += MainWindow_StylusMove;
|
||||||
|
inkCanvas.StylusUp += MainWindow_StylusUp;
|
||||||
|
inkCanvas.TouchDown += MainWindow_TouchDown;
|
||||||
|
|
||||||
lastIsInMultiTouchMode = false;
|
lastIsInMultiTouchMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1573,7 +1655,15 @@ namespace Ink_Canvas {
|
|||||||
else {
|
else {
|
||||||
BtnPen_Click(null, null); //画完还原到笔模式
|
BtnPen_Click(null, null); //画完还原到笔模式
|
||||||
if (lastIsInMultiTouchMode) {
|
if (lastIsInMultiTouchMode) {
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
// 不再重新启用开关,而是恢复多指书写相关的事件处理
|
||||||
|
// ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||||
|
|
||||||
|
// 恢复多指书写事件处理
|
||||||
|
inkCanvas.StylusDown += MainWindow_StylusDown;
|
||||||
|
inkCanvas.StylusMove += MainWindow_StylusMove;
|
||||||
|
inkCanvas.StylusUp += MainWindow_StylusUp;
|
||||||
|
inkCanvas.TouchDown += MainWindow_TouchDown;
|
||||||
|
|
||||||
lastIsInMultiTouchMode = false;
|
lastIsInMultiTouchMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1619,7 +1709,15 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
BtnPen_Click(null, null); //画完还原到笔模式
|
BtnPen_Click(null, null); //画完还原到笔模式
|
||||||
if (lastIsInMultiTouchMode) {
|
if (lastIsInMultiTouchMode) {
|
||||||
ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
// 不再重新启用开关,而是恢复多指书写相关的事件处理
|
||||||
|
// ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||||
|
|
||||||
|
// 恢复多指书写事件处理
|
||||||
|
inkCanvas.StylusDown += MainWindow_StylusDown;
|
||||||
|
inkCanvas.StylusMove += MainWindow_StylusMove;
|
||||||
|
inkCanvas.StylusUp += MainWindow_StylusUp;
|
||||||
|
inkCanvas.TouchDown += MainWindow_TouchDown;
|
||||||
|
|
||||||
lastIsInMultiTouchMode = false;
|
lastIsInMultiTouchMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -682,14 +682,32 @@ namespace Ink_Canvas {
|
|||||||
private StylusPointCollection CreateStraightLine(Point start, Point end) {
|
private StylusPointCollection CreateStraightLine(Point start, Point end) {
|
||||||
StylusPointCollection points = new StylusPointCollection();
|
StylusPointCollection points = new StylusPointCollection();
|
||||||
|
|
||||||
// Create a more natural pressure profile for the line
|
// 根据是否启用压感触屏模式决定如何设置压感
|
||||||
if (Settings.InkToShape.IsInkToShapeNoFakePressureRectangle == true || penType == 1) {
|
// 如果未启用压感触屏模式,则使用均匀粗细
|
||||||
points.Add(new StylusPoint(start.X, start.Y));
|
if (!Settings.Canvas.EnablePressureTouchMode || Settings.Canvas.DisablePressure ||
|
||||||
points.Add(new StylusPoint(end.X, end.Y));
|
Settings.InkToShape.IsInkToShapeNoFakePressureRectangle == true || penType == 1) {
|
||||||
|
// 使用均匀粗细(所有点压感值都是0.5f)
|
||||||
|
points.Add(new StylusPoint(start.X, start.Y, 0.5f));
|
||||||
|
|
||||||
|
// 可以添加一些额外的中间点使线条更平滑(均匀粗细)
|
||||||
|
double distance = GetDistance(start, end);
|
||||||
|
if (distance > 100) {
|
||||||
|
// 对于较长的线条,添加几个中间点
|
||||||
|
for (int i = 1; i < 3; i++) {
|
||||||
|
double ratio = i / 3.0;
|
||||||
|
Point midPoint = new Point(
|
||||||
|
start.X + (end.X - start.X) * ratio,
|
||||||
|
start.Y + (end.Y - start.Y) * ratio);
|
||||||
|
points.Add(new StylusPoint(midPoint.X, midPoint.Y, 0.5f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
points.Add(new StylusPoint(end.X, end.Y, 0.5f));
|
||||||
} else {
|
} else {
|
||||||
|
// 启用了压感触屏模式,使用变化的粗细(原有行为)
|
||||||
points.Add(new StylusPoint(start.X, start.Y, 0.4f));
|
points.Add(new StylusPoint(start.X, start.Y, 0.4f));
|
||||||
|
|
||||||
// Add a middle point with higher pressure
|
// 添加中点,压感值较高,使线条中间较粗
|
||||||
Point midPoint = new Point((start.X + end.X) / 2, (start.Y + end.Y) / 2);
|
Point midPoint = new Point((start.X + end.X) / 2, (start.Y + end.Y) / 2);
|
||||||
points.Add(new StylusPoint(midPoint.X, midPoint.Y, 0.8f));
|
points.Add(new StylusPoint(midPoint.X, midPoint.Y, 0.8f));
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ink_Canvas {
|
namespace Ink_Canvas {
|
||||||
public class TimeViewModel : INotifyPropertyChanged {
|
public class TimeViewModel : INotifyPropertyChanged {
|
||||||
@@ -302,24 +305,102 @@ namespace Ink_Canvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void timerCheckAutoUpdateWithSilence_Elapsed(object sender, ElapsedEventArgs e) {
|
private void timerCheckAutoUpdateWithSilence_Elapsed(object sender, ElapsedEventArgs e) {
|
||||||
Dispatcher.Invoke(() => {
|
// 停止计时器,避免重复触发
|
||||||
try {
|
timerCheckAutoUpdateWithSilence.Stop();
|
||||||
if (!Topmost || inkCanvas.Strokes.Count > 0) return;
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
if (AutoUpdateWithSilenceTimeComboBox.CheckIsInSilencePeriod(
|
// 检查是否有可用的更新
|
||||||
Settings.Startup.AutoUpdateWithSilenceStartTime,
|
if (string.IsNullOrEmpty(AvailableLatestVersion)) {
|
||||||
Settings.Startup.AutoUpdateWithSilenceEndTime)) {
|
LogHelper.WriteLogToFile("AutoUpdate | No available update version found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否启用了静默更新
|
||||||
|
if (!Settings.Startup.IsAutoUpdateWithSilence) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Silent update is disabled");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查更新文件是否已下载
|
||||||
|
string updatesFolderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "AutoUpdate");
|
||||||
|
string statusFilePath = Path.Combine(updatesFolderPath, $"DownloadV{AvailableLatestVersion}Status.txt");
|
||||||
|
|
||||||
|
if (!File.Exists(statusFilePath) || File.ReadAllText(statusFilePath).Trim().ToLower() != "true") {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Update file not downloaded yet");
|
||||||
|
|
||||||
|
// 尝试下载更新文件
|
||||||
|
Task.Run(async () => {
|
||||||
|
bool isDownloadSuccessful = await AutoUpdateHelper.DownloadSetupFileAndSaveStatus(AvailableLatestVersion);
|
||||||
|
if (isDownloadSuccessful) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Update downloaded successfully, will check again for installation");
|
||||||
|
// 重新启动计时器,下次检查时安装
|
||||||
|
timerCheckAutoUpdateWithSilence.Start();
|
||||||
|
} else {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Failed to download update", LogHelper.LogType.Error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否在静默更新时间段内
|
||||||
|
bool isInSilencePeriod = AutoUpdateWithSilenceTimeComboBox.CheckIsInSilencePeriod(
|
||||||
|
Settings.Startup.AutoUpdateWithSilenceStartTime,
|
||||||
|
Settings.Startup.AutoUpdateWithSilenceEndTime);
|
||||||
|
|
||||||
|
if (!isInSilencePeriod) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Not in silence update time period");
|
||||||
|
// 重新启动计时器,稍后再检查
|
||||||
|
timerCheckAutoUpdateWithSilence.Start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查应用程序状态,确保可以安全更新
|
||||||
|
bool canSafelyUpdate = false;
|
||||||
|
|
||||||
|
Dispatcher.Invoke(() => {
|
||||||
|
try {
|
||||||
|
// 检查是否处于桌面模式(Topmost为true)且没有墨迹内容
|
||||||
|
if (Topmost && inkCanvas.Strokes.Count == 0) {
|
||||||
|
// 检查是否有未保存的内容或正在进行的操作
|
||||||
|
if (!isHidingSubPanelsWhenInking) {
|
||||||
|
canSafelyUpdate = true;
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Application is in a safe state for update");
|
||||||
|
} else {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Application is currently performing operations");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Application has unsaved content or is not in desktop mode");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
LogHelper.WriteLogToFile($"AutoUpdate | Error checking application state: {ex.Message}", LogHelper.LogType.Error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canSafelyUpdate) {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Installing update now");
|
||||||
|
|
||||||
|
// 设置为用户主动退出,避免被看门狗判定为崩溃
|
||||||
|
App.IsAppExitByUser = true;
|
||||||
|
|
||||||
|
// 执行更新安装
|
||||||
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, true);
|
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, true);
|
||||||
timerCheckAutoUpdateWithSilence.Stop();
|
|
||||||
|
// 关闭应用程序
|
||||||
|
Dispatcher.Invoke(() => {
|
||||||
|
Application.Current.Shutdown();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
LogHelper.WriteLogToFile("AutoUpdate | Cannot safely update now, will try again later");
|
||||||
|
// 重新启动计时器,稍后再检查
|
||||||
|
timerCheckAutoUpdateWithSilence.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"AutoUpdate | Error in silent update check: {ex.Message}", LogHelper.LogType.Error);
|
||||||
|
// 出错时重新启动计时器,稍后再检查
|
||||||
|
timerCheckAutoUpdateWithSilence.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,24 @@ namespace Ink_Canvas {
|
|||||||
ViewboxFloatingBar.IsHitTestVisible = false;
|
ViewboxFloatingBar.IsHitTestVisible = false;
|
||||||
BlackboardUIGridForInkReplay.IsHitTestVisible = false;
|
BlackboardUIGridForInkReplay.IsHitTestVisible = false;
|
||||||
|
|
||||||
|
// 确保手写笔模式下显示光标
|
||||||
|
if (Settings.Canvas.IsShowCursor) {
|
||||||
|
inkCanvas.ForceCursor = true;
|
||||||
|
inkCanvas.UseCustomCursor = true;
|
||||||
|
|
||||||
|
// 根据当前编辑模式设置不同的光标
|
||||||
|
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint) {
|
||||||
|
inkCanvas.Cursor = Cursors.Cross;
|
||||||
|
} else if (inkCanvas.EditingMode == InkCanvasEditingMode.Ink) {
|
||||||
|
var sri = Application.GetResourceStream(new Uri("Resources/Cursors/Pen.cur", UriKind.Relative));
|
||||||
|
if (sri != null)
|
||||||
|
inkCanvas.Cursor = new Cursor(sri.Stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制显示光标
|
||||||
|
System.Windows.Forms.Cursor.Show();
|
||||||
|
}
|
||||||
|
|
||||||
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint
|
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint
|
||||||
|| inkCanvas.EditingMode == InkCanvasEditingMode.EraseByStroke
|
|| inkCanvas.EditingMode == InkCanvasEditingMode.EraseByStroke
|
||||||
|| inkCanvas.EditingMode == InkCanvasEditingMode.Select) return;
|
|| inkCanvas.EditingMode == InkCanvasEditingMode.Select) return;
|
||||||
@@ -137,6 +155,13 @@ namespace Ink_Canvas {
|
|||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
// 确保手写笔移动时光标保持可见
|
||||||
|
if (Settings.Canvas.IsShowCursor) {
|
||||||
|
inkCanvas.ForceCursor = true;
|
||||||
|
inkCanvas.UseCustomCursor = true;
|
||||||
|
System.Windows.Forms.Cursor.Show();
|
||||||
|
}
|
||||||
|
|
||||||
var strokeVisual = GetStrokeVisual(e.StylusDevice.Id);
|
var strokeVisual = GetStrokeVisual(e.StylusDevice.Id);
|
||||||
var stylusPointCollection = e.GetStylusPoints(this);
|
var stylusPointCollection = e.GetStylusPoints(this);
|
||||||
foreach (var stylusPoint in stylusPointCollection)
|
foreach (var stylusPoint in stylusPointCollection)
|
||||||
@@ -224,8 +249,17 @@ namespace Ink_Canvas {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(boundsWidth * k * eraserMultiplier,
|
// 根据EraserShapeType设置合适的橡皮擦形状
|
||||||
boundsWidth * k * eraserMultiplier);
|
if (Settings.Canvas.EraserShapeType == 0) {
|
||||||
|
// 圆形擦
|
||||||
|
inkCanvas.EraserShape = new EllipseStylusShape(boundsWidth * k * eraserMultiplier,
|
||||||
|
boundsWidth * k * eraserMultiplier);
|
||||||
|
} else if (Settings.Canvas.EraserShapeType == 1) {
|
||||||
|
// 矩形黑板擦
|
||||||
|
inkCanvas.EraserShape = new RectangleStylusShape(boundsWidth * k * eraserMultiplier * 0.6,
|
||||||
|
boundsWidth * k * eraserMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -245,7 +279,8 @@ namespace Ink_Canvas {
|
|||||||
isLastTouchEraser = false;
|
isLastTouchEraser = false;
|
||||||
// 修复面积擦时不显示橡皮形状:无论 forcePointEraser 状态,均显示 50x50 橡皮
|
// 修复面积擦时不显示橡皮形状:无论 forcePointEraser 状态,均显示 50x50 橡皮
|
||||||
inkCanvas.EraserShape = new EllipseStylusShape(50, 50);
|
inkCanvas.EraserShape = new EllipseStylusShape(50, 50);
|
||||||
if (forceEraser) return;
|
// 修复触屏状态下几何绘制功能不可用的问题:在几何绘制模式下不应该因为forceEraser而直接返回
|
||||||
|
if (forceEraser && drawingShapeMode == 0) return;
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -304,6 +339,16 @@ namespace Ink_Canvas {
|
|||||||
inkCanvas.EditingMode = lastInkCanvasEditingMode;
|
inkCanvas.EditingMode = lastInkCanvasEditingMode;
|
||||||
dec.Remove(e.TouchDevice.Id);
|
dec.Remove(e.TouchDevice.Id);
|
||||||
inkCanvas.Opacity = 1;
|
inkCanvas.Opacity = 1;
|
||||||
|
|
||||||
|
// 如果是手掌触发的面积擦抬起,需要确保橡皮擦形状被正确重置
|
||||||
|
if (isLastTouchEraser && dec.Count == 0) {
|
||||||
|
isLastTouchEraser = false;
|
||||||
|
if (inkCanvas.EditingMode == InkCanvasEditingMode.EraseByPoint && forcePointEraser) {
|
||||||
|
// 重新应用当前设置的橡皮擦形状
|
||||||
|
ApplyCurrentEraserShape();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dec.Count == 0)
|
if (dec.Count == 0)
|
||||||
if (lastTouchDownStrokeCollection.Count() != inkCanvas.Strokes.Count() &&
|
if (lastTouchDownStrokeCollection.Count() != inkCanvas.Strokes.Count() &&
|
||||||
!(drawingShapeMode == 9 && !isFirstTouchCuboid)) {
|
!(drawingShapeMode == 9 && !isFirstTouchCuboid)) {
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.6.4.0")]
|
[assembly: AssemblyVersion("1.6.6")]
|
||||||
[assembly: AssemblyFileVersion("1.6.4.0")]
|
[assembly: AssemblyFileVersion("1.6.6")]
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
Title="Ink Canvas 抽奖" Height="500" Width="900">
|
Title="Ink Canvas 抽奖" Height="500" Width="900">
|
||||||
<Border Background="#F0F3F9" CornerRadius="10" BorderThickness="1" BorderBrush="#0066BF" Margin="0" ClipToBounds="True">
|
<Border Background="#F0F3F9" CornerRadius="10" BorderThickness="1" BorderBrush="#0066BF" Margin="0" ClipToBounds="True">
|
||||||
<Canvas>
|
<Canvas>
|
||||||
<Image Source="/Resources/hatsune-miku1.png" Width="300" Canvas.Bottom="-140" Canvas.Left="-48" Canvas.Top="304"></Image>
|
|
||||||
<Grid Canvas.Left="0" Canvas.Right="0" Canvas.Top="0" Canvas.Bottom="0" Width="900" Height="309" HorizontalAlignment="Center" VerticalAlignment="Top">
|
<Grid Canvas.Left="0" Canvas.Right="0" Canvas.Top="0" Canvas.Bottom="0" Width="900" Height="309" HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.8*"/>
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BEAF49735E7E2FFA883C57571D23313D74E5483B"
|
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C618DEE2BF2FDFC3FC9E2911171FB8CC42684DCF"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BEAF49735E7E2FFA883C57571D23313D74E5483B"
|
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C618DEE2BF2FDFC3FC9E2911171FB8CC42684DCF"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
|
|||||||
@@ -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>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
@@ -59,7 +59,7 @@ namespace Ink_Canvas {
|
|||||||
public partial class RandWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
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")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput;
|
internal System.Windows.Controls.Label LabelOutput;
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 23 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 22 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput2;
|
internal System.Windows.Controls.Label LabelOutput2;
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 24 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 23 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput3;
|
internal System.Windows.Controls.Label LabelOutput3;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 27 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 26 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane;
|
internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 29 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 28 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnMinus;
|
internal System.Windows.Controls.Border BorderBtnMinus;
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 52 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 51 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.TextBlock LabelNumberCount;
|
internal System.Windows.Controls.TextBlock LabelNumberCount;
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 53 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 52 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnAdd;
|
internal System.Windows.Controls.Border BorderBtnAdd;
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 78 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 77 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.CheckBox NoHotStudents;
|
internal System.Windows.Controls.CheckBox NoHotStudents;
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 81 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 80 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.CheckBox NoShengPiZi;
|
internal System.Windows.Controls.CheckBox NoShengPiZi;
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 86 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 85 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.ComboBox ComboBoxRandMode;
|
internal System.Windows.Controls.ComboBox ComboBoxRandMode;
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 96 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 95 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnRand;
|
internal System.Windows.Controls.Border BorderBtnRand;
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 99 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 98 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart;
|
internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart;
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 104 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 103 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnIslandCaller;
|
internal System.Windows.Controls.Border BorderBtnIslandCaller;
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 114 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 113 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnHelp;
|
internal System.Windows.Controls.Border BorderBtnHelp;
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 122 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 121 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.TextBlock TextBlockPeopleCount;
|
internal System.Windows.Controls.TextBlock TextBlockPeopleCount;
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 125 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 124 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BtnClose;
|
internal System.Windows.Controls.Border BtnClose;
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ namespace Ink_Canvas {
|
|||||||
case 6:
|
case 6:
|
||||||
this.BorderBtnMinus = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnMinus.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnMinus_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -251,7 +251,7 @@ namespace Ink_Canvas {
|
|||||||
case 8:
|
case 8:
|
||||||
this.BorderBtnAdd = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnAdd.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnAdd_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -269,7 +269,7 @@ namespace Ink_Canvas {
|
|||||||
case 12:
|
case 12:
|
||||||
this.BorderBtnRand = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnRand.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnRand_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -281,7 +281,7 @@ namespace Ink_Canvas {
|
|||||||
case 14:
|
case 14:
|
||||||
this.BorderBtnIslandCaller = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnIslandCaller.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnIslandCaller_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -290,7 +290,7 @@ namespace Ink_Canvas {
|
|||||||
case 15:
|
case 15:
|
||||||
this.BorderBtnHelp = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnHelp.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnHelp_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -302,7 +302,7 @@ namespace Ink_Canvas {
|
|||||||
case 17:
|
case 17:
|
||||||
this.BtnClose = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BtnClose.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnClose_MouseUp);
|
||||||
|
|
||||||
#line default
|
#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>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
@@ -59,7 +59,7 @@ namespace Ink_Canvas {
|
|||||||
public partial class RandWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
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")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput;
|
internal System.Windows.Controls.Label LabelOutput;
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 23 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 22 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput2;
|
internal System.Windows.Controls.Label LabelOutput2;
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 24 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 23 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Label LabelOutput3;
|
internal System.Windows.Controls.Label LabelOutput3;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 27 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 26 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane;
|
internal iNKORE.UI.WPF.Modern.Controls.SimpleStackPanel PeopleControlPane;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 29 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 28 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnMinus;
|
internal System.Windows.Controls.Border BorderBtnMinus;
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 52 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 51 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.TextBlock LabelNumberCount;
|
internal System.Windows.Controls.TextBlock LabelNumberCount;
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 53 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 52 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnAdd;
|
internal System.Windows.Controls.Border BorderBtnAdd;
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 78 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 77 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.CheckBox NoHotStudents;
|
internal System.Windows.Controls.CheckBox NoHotStudents;
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 81 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 80 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.CheckBox NoShengPiZi;
|
internal System.Windows.Controls.CheckBox NoShengPiZi;
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 86 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 85 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.ComboBox ComboBoxRandMode;
|
internal System.Windows.Controls.ComboBox ComboBoxRandMode;
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 96 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 95 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnRand;
|
internal System.Windows.Controls.Border BorderBtnRand;
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 99 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 98 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart;
|
internal iNKORE.UI.WPF.Modern.Controls.SymbolIcon SymbolIconStart;
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 104 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 103 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnIslandCaller;
|
internal System.Windows.Controls.Border BorderBtnIslandCaller;
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 114 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 113 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BorderBtnHelp;
|
internal System.Windows.Controls.Border BorderBtnHelp;
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 122 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 121 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.TextBlock TextBlockPeopleCount;
|
internal System.Windows.Controls.TextBlock TextBlockPeopleCount;
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ namespace Ink_Canvas {
|
|||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
#line 125 "..\..\..\..\Windows\RandWindow.xaml"
|
#line 124 "..\..\..\..\Windows\RandWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.Border BtnClose;
|
internal System.Windows.Controls.Border BtnClose;
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ namespace Ink_Canvas {
|
|||||||
case 6:
|
case 6:
|
||||||
this.BorderBtnMinus = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnMinus.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnMinus_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -251,7 +251,7 @@ namespace Ink_Canvas {
|
|||||||
case 8:
|
case 8:
|
||||||
this.BorderBtnAdd = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnAdd.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnAdd_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -269,7 +269,7 @@ namespace Ink_Canvas {
|
|||||||
case 12:
|
case 12:
|
||||||
this.BorderBtnRand = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnRand.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnRand_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -281,7 +281,7 @@ namespace Ink_Canvas {
|
|||||||
case 14:
|
case 14:
|
||||||
this.BorderBtnIslandCaller = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnIslandCaller.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnIslandCaller_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -290,7 +290,7 @@ namespace Ink_Canvas {
|
|||||||
case 15:
|
case 15:
|
||||||
this.BorderBtnHelp = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BorderBtnHelp.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BorderBtnHelp_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -302,7 +302,7 @@ namespace Ink_Canvas {
|
|||||||
case 17:
|
case 17:
|
||||||
this.BtnClose = ((System.Windows.Controls.Border)(target));
|
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);
|
this.BtnClose.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnClose_MouseUp);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
Reference in New Issue
Block a user