diff --git a/Form1.cs b/Form1.cs index 9dc0adf..cbd0598 100644 --- a/Form1.cs +++ b/Form1.cs @@ -1,10 +1,14 @@ using System.Net; using System.Net.Http.Json; +using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using AntdUI; +using MailKit.Net.Smtp; +using MailKit.Security; +using MimeKit; using WinLabel = System.Windows.Forms.Label; using WinPanel = System.Windows.Forms.Panel; using WinTextBox = System.Windows.Forms.TextBox; @@ -13,6 +17,15 @@ namespace Vmianqian { public partial class Form1 : BorderlessForm { + private const int WmNclButtonDown = 0x00A1; + private const int HtCaption = 0x0002; + + [DllImport("user32.dll")] + private static extern bool ReleaseCapture(); + + [DllImport("user32.dll")] + private static extern nint SendMessage(nint hWnd, int msg, nint wParam, nint lParam); + private readonly string _configFilePath = Path.Combine(AppContext.BaseDirectory, "appsettings.client.json"); private readonly JsonSerializerOptions _jsonOptions = new() { WriteIndented = true, PropertyNameCaseInsensitive = true }; private readonly HttpClient _httpClient = new(); @@ -48,11 +61,18 @@ namespace Vmianqian private AntdUI.Input txtServerUrl = null!; private AntdUI.Input txtApiKey = null!; + private AntdUI.Input txtSenderEmail = null!; + private AntdUI.Input txtSmtpHost = null!; + private AntdUI.Input txtSmtpPort = null!; private AntdUI.Input txtNotifyEmail = null!; + private AntdUI.Input txtEmailAuthCode = null!; private AntdUI.Label lblServerUrlTitle = null!; private AntdUI.Label lblApiKeyTitle = null!; + private AntdUI.Label lblSenderEmailTitle = null!; + private AntdUI.Label lblSmtpHostTitle = null!; + private AntdUI.Label lblSmtpPortTitle = null!; private AntdUI.Label lblNotifyEmailTitle = null!; - private AntdUI.Label lblHeartbeatTitle = null!; + private AntdUI.Label lblEmailAuthCodeTitle = null!; private AntdUI.Label lblHeartbeatDesc = null!; private AntdUI.Label lblMemberPlaceholder = null!; private AntdUI.Switch chkHeartbeatEnabled = null!; @@ -77,8 +97,9 @@ namespace Vmianqian private DataGridView gridAlipayLogs = null!; private AntdUI.Button btnSaveConfig = null!; - private AntdUI.Button btnStartService = null!; - private AntdUI.Button btnStopService = null!; + private AntdUI.Button btnToggleService = null!; + private AntdUI.Button btnEmailSave = null!; + private AntdUI.Button btnEmailTest = null!; public Form1() { @@ -93,11 +114,11 @@ namespace Vmianqian BackColor = Color.White; Font = new Font("Microsoft YaHei UI", 9F); Text = "V免签 Demo"; - MinimumSize = new Size(1180, 860); - if (Width < 1280 || Height < 900) - { - Size = new Size(1280, 900); - } + var fixedWindowSize = new Size(1200, 1000); + MinimumSize = fixedWindowSize; + MaximumSize = fixedWindowSize; + Size = fixedWindowSize; + MaximizeBox = false; BuildTitlebar(); BuildBottomBar(); @@ -119,14 +140,22 @@ namespace Vmianqian DividerShow = true, ShowButton = true, ShowIcon = true, - Text = "AntdUI", - SubText = "Demo" + Text = "V免签PC客户端", + SubText = "V0.0.1" + }; + + lblTopNotice = new AntdUI.Label + { + Dock = DockStyle.Fill, + Text = "监听未启动", + TextAlign = ContentAlignment.MiddleRight, + ForeColor = Color.DimGray }; lblAlipayStatusValue = new AntdUI.Label { Dock = DockStyle.Right, - Width = 88, + Width = 120, Text = "支付宝: 离线", TextAlign = ContentAlignment.MiddleRight, ForeColor = Color.Red @@ -135,7 +164,7 @@ namespace Vmianqian lblWechatStatusValue = new AntdUI.Label { Dock = DockStyle.Right, - Width = 76, + Width = 120, Text = "微信: 离线", TextAlign = ContentAlignment.MiddleRight, ForeColor = Color.Red @@ -144,6 +173,11 @@ namespace Vmianqian titlebar.Controls.Add(lblTopNotice); titlebar.Controls.Add(lblAlipayStatusValue); titlebar.Controls.Add(lblWechatStatusValue); + + EnableWindowDrag(titlebar); + EnableWindowDrag(lblTopNotice); + EnableWindowDrag(lblWechatStatusValue); + EnableWindowDrag(lblAlipayStatusValue); } private void BuildBottomBar() @@ -261,7 +295,7 @@ namespace Vmianqian { const int margin = 20; const int gap = 16; - const int cardHeight = 360; + const int cardHeight = 420; var pageAvailableWidth = Math.Max(0, pageHome.ClientSize.Width - margin * 2); pageHome.SuspendLayout(); @@ -272,10 +306,19 @@ namespace Vmianqian if (summaryCard != null) { summaryCard.SuspendLayout(); - summaryCard.Bounds = new Rectangle(margin, 20, pageAvailableWidth, 120); - lblSummaryTitle.Location = new Point(28, 24); - lblSummaryDesc.Location = new Point(30, 64); - lblSummaryDesc.Size = new Size(Math.Max(220, pageAvailableWidth - 60), 28); + lblSummaryTitle.Location = new Point(28, 20); + var summaryDescTop = lblSummaryTitle.Bottom + 8; + var summaryDescWidth = Math.Max(220, pageAvailableWidth - 56); + var summaryDescPreferred = TextRenderer.MeasureText( + lblSummaryDesc.Text, + lblSummaryDesc.Font, + new Size(summaryDescWidth, 0), + TextFormatFlags.WordBreak); + var summaryDescHeight = Math.Max(24, summaryDescPreferred.Height); + lblSummaryDesc.Location = new Point(28, summaryDescTop); + lblSummaryDesc.Size = new Size(summaryDescWidth, summaryDescHeight); + var summaryHeight = Math.Max(120, summaryDescTop + summaryDescHeight + 20); + summaryCard.Bounds = new Rectangle(margin, 20, pageAvailableWidth, summaryHeight); top = summaryCard.Bottom + margin; summaryCard.ResumeLayout(false); } @@ -306,25 +349,19 @@ namespace Vmianqian lblApiKeyTitle.Location = new Point(contentLeft, 94); txtApiKey.Location = new Point(contentLeft, 122); txtApiKey.Width = inputWidth; - lblNotifyEmailTitle.Location = new Point(contentLeft, 168); - txtNotifyEmail.Location = new Point(contentLeft, 196); - txtNotifyEmail.Width = inputWidth; const int actionTop = 252; const int buttonGap = 12; - var actionButtonWidth = Math.Max(72, (contentWidth - buttonGap * 3) / 4); + var actionButtonWidth = Math.Max(72, (contentWidth - buttonGap * 2) / 3); btnSaveConfig.Location = new Point(24, actionTop); btnSaveConfig.Size = new Size(actionButtonWidth, 36); - btnStartService.Location = new Point(btnSaveConfig.Right + buttonGap, actionTop); - btnStartService.Size = new Size(actionButtonWidth, 36); - btnStopService.Location = new Point(btnStartService.Right + buttonGap, actionTop); - btnStopService.Size = new Size(actionButtonWidth, 36); - btnHeartbeatCheck.Location = new Point(btnStopService.Right + buttonGap, actionTop); + btnToggleService.Location = new Point(btnSaveConfig.Right + buttonGap, actionTop); + btnToggleService.Size = new Size(actionButtonWidth, 36); + btnHeartbeatCheck.Location = new Point(btnToggleService.Right + buttonGap, actionTop); btnHeartbeatCheck.Size = new Size(actionButtonWidth, 34); const int heartbeatTop = 300; - lblHeartbeatTitle.Location = new Point(contentLeft, heartbeatTop); - chkHeartbeatEnabled.Location = new Point(98, heartbeatTop - 4); + chkHeartbeatEnabled.Location = new Point(contentLeft, heartbeatTop - 4); lblHeartbeatDesc.Location = new Point(chkHeartbeatEnabled.Right + 4, heartbeatTop + 1); lblMemberPlaceholder.Size = new Size(Math.Max(220, memberCard.ClientSize.Width - 48), 52); @@ -403,6 +440,33 @@ namespace Vmianqian private void LayoutSettingsPage() { LayoutPageCards(pageSettings, 20); + + var listenCard = FindCard(pageSettings, "settings-listen"); + var emailCard = FindCard(pageSettings, "settings-email"); + if (listenCard == null || emailCard == null) + { + return; + } + + listenCard.Top = 20; + emailCard.Top = listenCard.Bottom + 16; + + var listenInputWidth = Math.Max(220, listenCard.ClientSize.Width - 48); + txtServicePort.Width = Math.Min(220, listenInputWidth); + txtListenPath.Width = Math.Min(360, listenInputWidth); + + var emailInputWidth = Math.Max(220, Math.Min(520, emailCard.ClientSize.Width - 48)); + txtSenderEmail.Width = emailInputWidth; + txtSmtpHost.Width = emailInputWidth; + txtNotifyEmail.Width = emailInputWidth; + txtSmtpPort.Width = Math.Min(220, emailInputWidth); + var authCodeWidth = Math.Max(260, Math.Min(360, emailCard.ClientSize.Width - 584 - 24)); + var authCodeLeft = Math.Max(24, emailCard.ClientSize.Width - authCodeWidth - 24); + lblEmailAuthCodeTitle.Location = new Point(authCodeLeft, 278); + txtEmailAuthCode.Location = new Point(authCodeLeft, 306); + txtEmailAuthCode.Width = authCodeWidth; + btnEmailSave.Location = new Point(24, 350); + btnEmailTest.Location = new Point(btnEmailSave.Right + 12, 350); } private static void LayoutPageCards(WinPanel page, int margin) @@ -446,8 +510,7 @@ namespace Vmianqian { Text = "当前阶段先打通“PC端本地监听 -> V免签服务端回调 -> 心跳检测”链路,整体布局按 AntdUI Demo 风格复刻。", AutoSize = false, - Location = new Point(30, 64), - Size = new Size(980, 28), + Location = new Point(70, 64), ForeColor = Color.DimGray }; @@ -467,11 +530,6 @@ namespace Vmianqian txtApiKey = CreateInput(24, 122, 500, "请输入与服务端密钥"); configCard.Controls.Add(txtApiKey); - lblNotifyEmailTitle = CreateTitleLabel("通知邮箱", 24, 168); - configCard.Controls.Add(lblNotifyEmailTitle); - txtNotifyEmail = CreateInput(24, 196, 500, "可选"); - configCard.Controls.Add(txtNotifyEmail); - btnSaveConfig = new AntdUI.Button { Text = "保存配置", @@ -481,33 +539,21 @@ namespace Vmianqian }; btnSaveConfig.Click += btnSaveConfig_Click; - btnStartService = new AntdUI.Button + btnToggleService = new AntdUI.Button { Text = "启动监听", Type = TTypeMini.Primary, - Location = new Point(146, 252), + Location = new Point(146, 292), Size = new Size(110, 36), }; - btnStartService.Click += btnStart_Click; - - btnStopService = new AntdUI.Button - { - Text = "停止监听", - Type = TTypeMini.Primary, - Location = new Point(268, 252), - Size = new Size(110, 36), - }; - btnStopService.Click += btnStop_Click; + btnToggleService.Click += btnToggleService_Click; configCard.Controls.Add(btnSaveConfig); - configCard.Controls.Add(btnStartService); - configCard.Controls.Add(btnStopService); + configCard.Controls.Add(btnToggleService); - lblHeartbeatTitle = CreateTitleLabel("心跳检测", 24, 300); - configCard.Controls.Add(lblHeartbeatTitle); chkHeartbeatEnabled = new AntdUI.Switch { - Location = new Point(98, 296), + Location = new Point(24, 296), Size = new Size(62, 28), AutoSize = false }; @@ -517,15 +563,15 @@ namespace Vmianqian { Text = "自动心跳", AutoSize = true, - Location = new Point(164, 301), + Location = new Point(90, 301), ForeColor = Color.DimGray }; btnHeartbeatCheck = new AntdUI.Button { - Text = "立即检测", + Text = "心跳检测", Type = TTypeMini.Primary, - Location = new Point(390, 292), + Location = new Point(268, 292), Size = new Size(110, 34) }; btnHeartbeatCheck.Click += btnHeartbeatCheck_Click; @@ -697,29 +743,81 @@ namespace Vmianqian private void BuildSettingsPage() { - var card = CreateCardPanel(new Rectangle(20, 20, 1080, 260)); - card.Tag = "settings-main"; - card.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + var listenCard = CreateCardPanel(new Rectangle(20, 20, 1080, 200)); + listenCard.Tag = "settings-listen"; + listenCard.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; - card.Controls.Add(CreateTitleLabel("本地监听端口", 24, 20)); + listenCard.Controls.Add(CreateTitleLabel("本地监听端口", 24, 20)); txtServicePort = CreateInput(24, 48, 180, "8989"); - card.Controls.Add(txtServicePort); + listenCard.Controls.Add(txtServicePort); - card.Controls.Add(CreateTitleLabel("本地监听路径", 240, 20)); + listenCard.Controls.Add(CreateTitleLabel("本地监听路径", 240, 20)); txtListenPath = CreateInput(240, 48, 240, "/notify/"); - card.Controls.Add(txtListenPath); + listenCard.Controls.Add(txtListenPath); var info = new AntdUI.Label { - Text = "这个页面用于维护本地监听设置与项目说明。\r\n\r\n目标顺序:\r\n1. 先让本地监听和服务端回调稳定运行\r\n2. 再接入微信 PC 端监听\r\n3. 再接入支付宝 PC 端监听", + Text = "这个页面用于维护本地监听、邮箱通知与项目说明。", AutoSize = false, - Location = new Point(24, 105), - Size = new Size(920, 120), + Location = new Point(24, 108), + Size = new Size(920, 60), ForeColor = Color.DimGray }; - card.Controls.Add(info); + listenCard.Controls.Add(info); - pageSettings.Controls.Add(card); + var emailCard = CreateCardPanel(new Rectangle(20, 236, 1080, 420)); + emailCard.Tag = "settings-email"; + emailCard.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + + emailCard.Controls.Add(CreateTitleLabel("邮箱通知配置", 24, 20)); + lblSenderEmailTitle = CreateTitleLabel("发送邮箱", 24, 56); + emailCard.Controls.Add(lblSenderEmailTitle); + txtSenderEmail = CreateInput(24, 84, 500, "例如:yunzer_cn@163.com"); + emailCard.Controls.Add(txtSenderEmail); + + lblSmtpHostTitle = CreateTitleLabel("SMTP 主机", 24, 130); + emailCard.Controls.Add(lblSmtpHostTitle); + txtSmtpHost = CreateInput(24, 158, 500, "例如:smtp.163.com"); + emailCard.Controls.Add(txtSmtpHost); + + lblSmtpPortTitle = CreateTitleLabel("SMTP 端口", 24, 204); + emailCard.Controls.Add(lblSmtpPortTitle); + txtSmtpPort = CreateInput(24, 232, 220, "例如:465"); + emailCard.Controls.Add(txtSmtpPort); + + lblNotifyEmailTitle = CreateTitleLabel("通知邮箱", 24, 278); + emailCard.Controls.Add(lblNotifyEmailTitle); + txtNotifyEmail = CreateInput(24, 306, 500, "用于接收测试邮件"); + emailCard.Controls.Add(txtNotifyEmail); + + lblEmailAuthCodeTitle = CreateTitleLabel("授权码", 560, 278); + emailCard.Controls.Add(lblEmailAuthCodeTitle); + txtEmailAuthCode = CreateInput(560, 306, 320, "用于发送测试邮件"); + emailCard.Controls.Add(txtEmailAuthCode); + + btnEmailSave = new AntdUI.Button + { + Text = "保存配置", + Type = TTypeMini.Primary, + Location = new Point(24, 350), + Size = new Size(110, 36) + }; + btnEmailSave.Click += btnEmailSave_Click; + emailCard.Controls.Add(btnEmailSave); + + btnEmailTest = new AntdUI.Button + { + Text = "邮箱测试", + Type = TTypeMini.Primary, + Ghost = true, + Location = new Point(146, 350), + Size = new Size(110, 36) + }; + btnEmailTest.Click += btnEmailTest_Click; + emailCard.Controls.Add(btnEmailTest); + + pageSettings.Controls.Add(listenCard); + pageSettings.Controls.Add(emailCard); } private WinPanel CreateCardPanel(Rectangle bounds) @@ -928,7 +1026,11 @@ namespace Vmianqian { txtServerUrl.Text = _config.ServerUrl; txtApiKey.Text = _config.ApiKey; + txtSenderEmail.Text = _config.SenderEmail; + txtSmtpHost.Text = _config.SmtpHost; + txtSmtpPort.Text = _config.SmtpPort.ToString(); txtNotifyEmail.Text = _config.NotifyEmail; + txtEmailAuthCode.Text = _config.EmailAuthCode; txtWechatPath.Text = _config.WechatPath; txtWechatId.Text = _config.WechatSid; txtAliPath.Text = _config.AlipayPath; @@ -946,7 +1048,11 @@ namespace Vmianqian { _config.ServerUrl = NormalizeServerUrl(txtServerUrl.Text); _config.ApiKey = txtApiKey.Text.Trim(); + _config.SenderEmail = txtSenderEmail.Text.Trim(); + _config.SmtpHost = txtSmtpHost.Text.Trim(); + _config.SmtpPort = ParseSmtpPort(txtSmtpPort.Text); _config.NotifyEmail = txtNotifyEmail.Text.Trim(); + _config.EmailAuthCode = txtEmailAuthCode.Text.Trim(); _config.WechatPath = txtWechatPath.Text.Trim(); _config.WechatSid = txtWechatId.Text.Trim(); _config.AlipayPath = txtAliPath.Text.Trim(); @@ -970,6 +1076,16 @@ namespace Vmianqian return port; } + private static int ParseSmtpPort(string text) + { + if (!int.TryParse(text, out var port) || port < 1 || port > 65535) + { + return 465; + } + + return port; + } + private void btnSaveConfig_Click(object? sender, EventArgs e) { try @@ -986,8 +1102,16 @@ namespace Vmianqian } } - private async void btnStart_Click(object? sender, EventArgs e) + private async void btnToggleService_Click(object? sender, EventArgs e) { + if (IsListenerRunning()) + { + StopListener(); + UpdateServiceStatus(false); + Log("监听已停止。"); + return; + } + try { SaveUiToConfig(); @@ -1005,11 +1129,66 @@ namespace Vmianqian } } - private void btnStop_Click(object? sender, EventArgs e) + private async void btnEmailTest_Click(object? sender, EventArgs e) { - StopListener(); - UpdateServiceStatus(false); - Log("监听已停止。"); + try + { + SaveUiToConfig(); + if (string.IsNullOrWhiteSpace(_config.NotifyEmail)) + { + throw new InvalidOperationException("请先填写通知邮箱。"); + } + + if (string.IsNullOrWhiteSpace(_config.SenderEmail)) + { + throw new InvalidOperationException("请先填写发送邮箱。"); + } + + if (string.IsNullOrWhiteSpace(_config.SmtpHost)) + { + throw new InvalidOperationException("请先填写 SMTP 主机。"); + } + + if (_config.SmtpPort <= 0) + { + throw new InvalidOperationException("请先填写有效的 SMTP 端口。"); + } + + if (string.IsNullOrWhiteSpace(_config.EmailAuthCode)) + { + throw new InvalidOperationException("请先填写邮箱授权码。"); + } + + await SendTestEmailAsync( + _config.SenderEmail.Trim(), + _config.NotifyEmail.Trim(), + _config.SmtpHost.Trim(), + _config.SmtpPort, + _config.EmailAuthCode.Trim()); + Log($"测试邮件已发送:{_config.NotifyEmail}"); + MessageBox.Show("测试邮件发送成功。", "邮箱测试", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + Log($"测试邮件发送失败:{ex.Message}"); + MessageBox.Show(ex.Message, "邮箱测试失败", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void btnEmailSave_Click(object? sender, EventArgs e) + { + try + { + SaveUiToConfig(); + SaveConfig(); + Log("邮箱配置已保存到本地缓存文件。"); + MessageBox.Show("邮箱配置已保存。", "保存成功", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + Log($"保存邮箱配置失败:{ex.Message}"); + MessageBox.Show(ex.Message, "保存失败", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private async Task StartListenerAsync() @@ -1027,6 +1206,11 @@ namespace Vmianqian await Task.CompletedTask; } + private bool IsListenerRunning() + { + return _httpListener is { IsListening: true }; + } + private void StopListener() { try @@ -1061,6 +1245,84 @@ namespace Vmianqian _listenerCancellationTokenSource = null; } + private async Task SendTestEmailAsync(string senderEmail, string notifyEmail, string smtpHost, int smtpPort, string authCode) + { + var errors = new List(); + var attempts = new List<(int Port, SecureSocketOptions SocketOptions)> + { + (smtpPort, smtpPort == 465 ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.StartTls), + (smtpPort, SecureSocketOptions.StartTlsWhenAvailable), + (smtpPort, SecureSocketOptions.Auto) + }; + + if (smtpPort == 465) + { + attempts.Add((587, SecureSocketOptions.StartTls)); + attempts.Add((587, SecureSocketOptions.StartTlsWhenAvailable)); + } + else if (smtpPort == 587) + { + attempts.Add((465, SecureSocketOptions.SslOnConnect)); + attempts.Add((465, SecureSocketOptions.Auto)); + } + + foreach (var (port, socketOptions) in attempts.Distinct()) + { + if (await TrySendTestEmailAsync(senderEmail, notifyEmail, smtpHost, port, socketOptions, authCode, errors)) + { + return; + } + } + + throw new InvalidOperationException("测试邮件发送失败:" + Environment.NewLine + string.Join(Environment.NewLine, errors)); + } + + private static async Task TrySendTestEmailAsync(string senderEmail, string notifyEmail, string smtpHost, int smtpPort, SecureSocketOptions socketOptions, string authCode, List errors) + { + try + { + var message = new MimeMessage(); + message.From.Add(MailboxAddress.Parse(senderEmail)); + message.To.Add(MailboxAddress.Parse(notifyEmail)); + message.Subject = "V免签客户端测试邮件"; + message.Body = new TextPart("plain") + { + Text = $"这是一封测试邮件,发送时间:{DateTime.Now:yyyy-MM-dd HH:mm:ss}" + }; + + using var smtp = new SmtpClient + { + Timeout = 15000 + }; + await smtp.ConnectAsync(smtpHost, smtpPort, socketOptions); + await smtp.AuthenticateAsync(senderEmail, authCode); + await smtp.SendAsync(message); + await smtp.DisconnectAsync(true); + return true; + } + catch (Exception ex) + { + errors.Add($"SMTP {smtpHost}:{smtpPort} Socket={socketOptions} -> {GetDetailedExceptionMessage(ex)}"); + return false; + } + } + + private static string GetDetailedExceptionMessage(Exception ex) + { + var parts = new List(); + Exception? current = ex; + while (current != null) + { + if (!string.IsNullOrWhiteSpace(current.Message)) + { + parts.Add(current.Message.Trim()); + } + current = current.InnerException; + } + + return parts.Count == 0 ? ex.GetType().Name : string.Join(" | ", parts.Distinct()); + } + private async Task ListenLoopAsync(CancellationToken cancellationToken) { if (_httpListener == null) @@ -1412,9 +1674,34 @@ namespace Vmianqian private void UpdateServiceStatus(bool isRunning) { + if (lblTopNotice is null) + { + return; + } + lblTopNotice.Text = isRunning ? $"监听中:{BuildLocalListenUrl(_config)}" : "监听未启动"; + + if (btnToggleService != null) + { + btnToggleService.Text = isRunning ? "停止监听" : "启动监听"; + btnToggleService.Type = isRunning ? TTypeMini.Error : TTypeMini.Primary; + } + } + + private void EnableWindowDrag(Control control) + { + control.MouseDown += (_, e) => + { + if (e.Button != MouseButtons.Left) + { + return; + } + + ReleaseCapture(); + SendMessage(Handle, WmNclButtonDown, HtCaption, 0); + }; } private static void ValidateConfig(ClientConfig config) @@ -1551,7 +1838,11 @@ namespace Vmianqian { public string ServerUrl { get; set; } = string.Empty; public string ApiKey { get; set; } = string.Empty; + public string SenderEmail { get; set; } = string.Empty; + public string SmtpHost { get; set; } = string.Empty; + public int SmtpPort { get; set; } = 465; public string NotifyEmail { get; set; } = string.Empty; + public string EmailAuthCode { get; set; } = string.Empty; public string WechatPath { get; set; } = string.Empty; public string WechatSid { get; set; } = string.Empty; public string AlipayPath { get; set; } = string.Empty; diff --git a/Vmianqian.csproj b/Vmianqian.csproj index 218258a..0bb12e1 100644 --- a/Vmianqian.csproj +++ b/Vmianqian.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -6,10 +6,12 @@ enable true enable + local + diff --git a/Vmianqian.csproj.user b/Vmianqian.csproj.user index b7d3840..3a34caa 100644 --- a/Vmianqian.csproj.user +++ b/Vmianqian.csproj.user @@ -1,207 +1,6 @@  - - Form - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - - - UserControl - Form diff --git a/bin/Debug/net10.0-windows/BouncyCastle.Cryptography.dll b/bin/Debug/net10.0-windows/BouncyCastle.Cryptography.dll new file mode 100644 index 0000000..e8d3222 Binary files /dev/null and b/bin/Debug/net10.0-windows/BouncyCastle.Cryptography.dll differ diff --git a/bin/Debug/net10.0-windows/MailKit.dll b/bin/Debug/net10.0-windows/MailKit.dll new file mode 100644 index 0000000..02212c3 Binary files /dev/null and b/bin/Debug/net10.0-windows/MailKit.dll differ diff --git a/bin/Debug/net10.0-windows/MimeKit.dll b/bin/Debug/net10.0-windows/MimeKit.dll new file mode 100644 index 0000000..da00220 Binary files /dev/null and b/bin/Debug/net10.0-windows/MimeKit.dll differ diff --git a/bin/Debug/net10.0-windows/Vmianqian.deps.json b/bin/Debug/net10.0-windows/Vmianqian.deps.json index 4b67351..5ac0255 100644 --- a/bin/Debug/net10.0-windows/Vmianqian.deps.json +++ b/bin/Debug/net10.0-windows/Vmianqian.deps.json @@ -8,7 +8,8 @@ ".NETCoreApp,Version=v10.0": { "Vmianqian/1.0.0": { "dependencies": { - "AntdUI": "2.3.10" + "AntdUI": "2.3.10", + "MailKit": "4.16.0" }, "runtime": { "Vmianqian.dll": {} @@ -21,6 +22,36 @@ "fileVersion": "2.3.10.0" } } + }, + "BouncyCastle.Cryptography/2.6.2": { + "runtime": { + "lib/net6.0/BouncyCastle.Cryptography.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.6.2.46322" + } + } + }, + "MailKit/4.16.0": { + "dependencies": { + "MimeKit": "4.16.0" + }, + "runtime": { + "lib/net10.0/MailKit.dll": { + "assemblyVersion": "4.16.0.0", + "fileVersion": "4.16.0.0" + } + } + }, + "MimeKit/4.16.0": { + "dependencies": { + "BouncyCastle.Cryptography": "2.6.2" + }, + "runtime": { + "lib/net10.0/MimeKit.dll": { + "assemblyVersion": "4.16.0.0", + "fileVersion": "4.16.0.0" + } + } } } }, @@ -36,6 +67,27 @@ "sha512": "sha512-twjNYhVIw08ydcQsBC5c7/59WBXVqba4kulN48ejxUz2i37xJU6ukYqUtxEFhiQtVzmu8cmGYAjZ4HM6BOKZwg==", "path": "antdui/2.3.10", "hashPath": "antdui.2.3.10.nupkg.sha512" + }, + "BouncyCastle.Cryptography/2.6.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-7oWOcvnntmMKNzDLsdxAYqApt+AjpRpP2CShjMfIa3umZ42UQMvH0tl1qAliYPNYO6vTdcGMqnRrCPmsfzTI1w==", + "path": "bouncycastle.cryptography/2.6.2", + "hashPath": "bouncycastle.cryptography.2.6.2.nupkg.sha512" + }, + "MailKit/4.16.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-trJ82DOpAmo8i1jO1vNE+dGn4mPRyeYfy4swRcAGgMJhPoI1Kohf4OFJJf0+YIj4iUxgxPn8W+ht7e7KiYzSjg==", + "path": "mailkit/4.16.0", + "hashPath": "mailkit.4.16.0.nupkg.sha512" + }, + "MimeKit/4.16.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-X0LFxeM4gPRIhODyY/HYS9b+zRZ7y//v59rFzgS6wLxcPuZThnMtNZHtrr0fjLyRRkg3gqJBtvW36XfUzZ7Djw==", + "path": "mimekit/4.16.0", + "hashPath": "mimekit.4.16.0.nupkg.sha512" } } } \ No newline at end of file diff --git a/bin/Debug/net10.0-windows/Vmianqian.dll b/bin/Debug/net10.0-windows/Vmianqian.dll index 1b359b3..e9e00fd 100644 Binary files a/bin/Debug/net10.0-windows/Vmianqian.dll and b/bin/Debug/net10.0-windows/Vmianqian.dll differ diff --git a/bin/Debug/net10.0-windows/Vmianqian.exe b/bin/Debug/net10.0-windows/Vmianqian.exe index 35c8bfd..24cdd3c 100644 Binary files a/bin/Debug/net10.0-windows/Vmianqian.exe and b/bin/Debug/net10.0-windows/Vmianqian.exe differ diff --git a/bin/Debug/net10.0-windows/Vmianqian.pdb b/bin/Debug/net10.0-windows/Vmianqian.pdb index d51ee40..fa8c3a0 100644 Binary files a/bin/Debug/net10.0-windows/Vmianqian.pdb and b/bin/Debug/net10.0-windows/Vmianqian.pdb differ diff --git a/bin/Debug/net10.0-windows/appsettings.client.json b/bin/Debug/net10.0-windows/appsettings.client.json index d0f1fd1..3bfebdf 100644 --- a/bin/Debug/net10.0-windows/appsettings.client.json +++ b/bin/Debug/net10.0-windows/appsettings.client.json @@ -1,7 +1,11 @@ { "ServerUrl": "https://zf.yunzer.cn", "ApiKey": "7eed756ca37ca057370ea9bb208d25fa", + "SenderEmail": "yunzer_cn@163.com", + "SmtpHost": "smtp.163.com", + "SmtpPort": 465, "NotifyEmail": "1066960883@qq.com", + "EmailAuthCode": "TPPMKSMvCadyzu3m", "WechatPath": "", "WechatSid": "", "AlipayPath": "", diff --git a/bin_temp/AntdUI.dll b/bin_temp/AntdUI.dll new file mode 100644 index 0000000..af9fbb7 Binary files /dev/null and b/bin_temp/AntdUI.dll differ diff --git a/bin_temp/BouncyCastle.Cryptography.dll b/bin_temp/BouncyCastle.Cryptography.dll new file mode 100644 index 0000000..e8d3222 Binary files /dev/null and b/bin_temp/BouncyCastle.Cryptography.dll differ diff --git a/bin_temp/MailKit.dll b/bin_temp/MailKit.dll new file mode 100644 index 0000000..02212c3 Binary files /dev/null and b/bin_temp/MailKit.dll differ diff --git a/bin_temp/MimeKit.dll b/bin_temp/MimeKit.dll new file mode 100644 index 0000000..da00220 Binary files /dev/null and b/bin_temp/MimeKit.dll differ diff --git a/bin_temp/Vmianqian.deps.json b/bin_temp/Vmianqian.deps.json new file mode 100644 index 0000000..5ac0255 --- /dev/null +++ b/bin_temp/Vmianqian.deps.json @@ -0,0 +1,93 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v10.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v10.0": { + "Vmianqian/1.0.0": { + "dependencies": { + "AntdUI": "2.3.10", + "MailKit": "4.16.0" + }, + "runtime": { + "Vmianqian.dll": {} + } + }, + "AntdUI/2.3.10": { + "runtime": { + "lib/net10.0-windows7.0/AntdUI.dll": { + "assemblyVersion": "2.3.10.0", + "fileVersion": "2.3.10.0" + } + } + }, + "BouncyCastle.Cryptography/2.6.2": { + "runtime": { + "lib/net6.0/BouncyCastle.Cryptography.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.6.2.46322" + } + } + }, + "MailKit/4.16.0": { + "dependencies": { + "MimeKit": "4.16.0" + }, + "runtime": { + "lib/net10.0/MailKit.dll": { + "assemblyVersion": "4.16.0.0", + "fileVersion": "4.16.0.0" + } + } + }, + "MimeKit/4.16.0": { + "dependencies": { + "BouncyCastle.Cryptography": "2.6.2" + }, + "runtime": { + "lib/net10.0/MimeKit.dll": { + "assemblyVersion": "4.16.0.0", + "fileVersion": "4.16.0.0" + } + } + } + } + }, + "libraries": { + "Vmianqian/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "AntdUI/2.3.10": { + "type": "package", + "serviceable": true, + "sha512": "sha512-twjNYhVIw08ydcQsBC5c7/59WBXVqba4kulN48ejxUz2i37xJU6ukYqUtxEFhiQtVzmu8cmGYAjZ4HM6BOKZwg==", + "path": "antdui/2.3.10", + "hashPath": "antdui.2.3.10.nupkg.sha512" + }, + "BouncyCastle.Cryptography/2.6.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-7oWOcvnntmMKNzDLsdxAYqApt+AjpRpP2CShjMfIa3umZ42UQMvH0tl1qAliYPNYO6vTdcGMqnRrCPmsfzTI1w==", + "path": "bouncycastle.cryptography/2.6.2", + "hashPath": "bouncycastle.cryptography.2.6.2.nupkg.sha512" + }, + "MailKit/4.16.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-trJ82DOpAmo8i1jO1vNE+dGn4mPRyeYfy4swRcAGgMJhPoI1Kohf4OFJJf0+YIj4iUxgxPn8W+ht7e7KiYzSjg==", + "path": "mailkit/4.16.0", + "hashPath": "mailkit.4.16.0.nupkg.sha512" + }, + "MimeKit/4.16.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-X0LFxeM4gPRIhODyY/HYS9b+zRZ7y//v59rFzgS6wLxcPuZThnMtNZHtrr0fjLyRRkg3gqJBtvW36XfUzZ7Djw==", + "path": "mimekit/4.16.0", + "hashPath": "mimekit.4.16.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/bin_temp/Vmianqian.dll b/bin_temp/Vmianqian.dll new file mode 100644 index 0000000..e9e00fd Binary files /dev/null and b/bin_temp/Vmianqian.dll differ diff --git a/bin_temp/Vmianqian.exe b/bin_temp/Vmianqian.exe new file mode 100644 index 0000000..24cdd3c Binary files /dev/null and b/bin_temp/Vmianqian.exe differ diff --git a/bin_temp/Vmianqian.pdb b/bin_temp/Vmianqian.pdb new file mode 100644 index 0000000..fa8c3a0 Binary files /dev/null and b/bin_temp/Vmianqian.pdb differ diff --git a/bin_temp/Vmianqian.runtimeconfig.json b/bin_temp/Vmianqian.runtimeconfig.json new file mode 100644 index 0000000..3c285dd --- /dev/null +++ b/bin_temp/Vmianqian.runtimeconfig.json @@ -0,0 +1,19 @@ +{ + "runtimeOptions": { + "tfm": "net10.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "10.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "10.0.0" + } + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false + } + } +} \ No newline at end of file diff --git a/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfo.cs b/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfo.cs index d2ca940..7c6fce0 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfo.cs +++ b/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfo.cs @@ -14,12 +14,12 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Vmianqian")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1b6455593a6213b2e6fa56d99e52d99b3ceab81b")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0de0dc29e29fb873a83396b40d1d356b96fd403f")] [assembly: System.Reflection.AssemblyProductAttribute("Vmianqian")] [assembly: System.Reflection.AssemblyTitleAttribute("Vmianqian")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")] [assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")] -// Generated by the MSBuild WriteCodeFragment class. +// 由 MSBuild WriteCodeFragment 类生成。 diff --git a/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfoInputs.cache b/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfoInputs.cache index 30b50ae..5d730bd 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfoInputs.cache +++ b/obj/Debug/net10.0-windows/Vmianqian.AssemblyInfoInputs.cache @@ -1 +1 @@ -947e2bf078e14f00a06d6a610ce423bc783b4ea6779f9a00be7651fb9ae1d425 +2470aa52bf7c9d2f34f885ab74c7c3690d381bd0289dbaafe7d1e260701d7524 diff --git a/obj/Debug/net10.0-windows/Vmianqian.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net10.0-windows/Vmianqian.GeneratedMSBuildEditorConfig.editorconfig index bedfe9f..10e526a 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.GeneratedMSBuildEditorConfig.editorconfig +++ b/obj/Debug/net10.0-windows/Vmianqian.GeneratedMSBuildEditorConfig.editorconfig @@ -16,7 +16,7 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Vmianqian -build_property.ProjectDir = E:\Demo\C\Vmianqian\ +build_property.ProjectDir = E:\Demos\DemoOwns\C\VmianqianC\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = build_property.CsWinRTUseWindowsUIXamlProjections = false diff --git a/obj/Debug/net10.0-windows/Vmianqian.assets.cache b/obj/Debug/net10.0-windows/Vmianqian.assets.cache index 6146dbd..5513526 100644 Binary files a/obj/Debug/net10.0-windows/Vmianqian.assets.cache and b/obj/Debug/net10.0-windows/Vmianqian.assets.cache differ diff --git a/obj/Debug/net10.0-windows/Vmianqian.csproj.AssemblyReference.cache b/obj/Debug/net10.0-windows/Vmianqian.csproj.AssemblyReference.cache index 8fee1d4..35108ef 100644 Binary files a/obj/Debug/net10.0-windows/Vmianqian.csproj.AssemblyReference.cache and b/obj/Debug/net10.0-windows/Vmianqian.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/net10.0-windows/Vmianqian.csproj.CoreCompileInputs.cache b/obj/Debug/net10.0-windows/Vmianqian.csproj.CoreCompileInputs.cache index 4479b50..176a9bf 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.csproj.CoreCompileInputs.cache +++ b/obj/Debug/net10.0-windows/Vmianqian.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -d16415670cf935c5792f13225a100e298ac07b7e6e8b89ede2c6253cce6cee33 +1444586d3f97cf78236527678a31115203cb3c8ebe795b8d0d33e2075e906f3f diff --git a/obj/Debug/net10.0-windows/Vmianqian.csproj.FileListAbsolute.txt b/obj/Debug/net10.0-windows/Vmianqian.csproj.FileListAbsolute.txt index 00513a1..89c6a41 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.csproj.FileListAbsolute.txt +++ b/obj/Debug/net10.0-windows/Vmianqian.csproj.FileListAbsolute.txt @@ -22,3 +22,34 @@ E:\Demo\C\Vmianqian\build_verify\Vmianqian.runtimeconfig.json E:\Demo\C\Vmianqian\build_verify\Vmianqian.dll E:\Demo\C\Vmianqian\build_verify\Vmianqian.pdb E:\Demo\C\Vmianqian\build_verify\AntdUI.dll +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.csproj.AssemblyReference.cache +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.Form1.resources +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.csproj.GenerateResource.cache +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.GeneratedMSBuildEditorConfig.editorconfig +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.AssemblyInfoInputs.cache +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.AssemblyInfo.cs +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.csproj.CoreCompileInputs.cache +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.dll +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\refint\Vmianqian.dll +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.pdb +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\Vmianqian.exe +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\Vmianqian.deps.json +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\Vmianqian.runtimeconfig.json +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\Vmianqian.dll +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\Vmianqian.pdb +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\AntdUI.dll +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.csproj.Up2Date +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\Vmianqian.genruntimeconfig.cache +E:\Demos\DemoOwns\C\VmianqianC\obj\Debug\net10.0-windows\ref\Vmianqian.dll +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\Vmianqian.exe +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\Vmianqian.deps.json +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\Vmianqian.runtimeconfig.json +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\Vmianqian.dll +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\Vmianqian.pdb +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\AntdUI.dll +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\BouncyCastle.Cryptography.dll +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\MailKit.dll +E:\Demos\DemoOwns\C\VmianqianC\bin_temp\MimeKit.dll +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\BouncyCastle.Cryptography.dll +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\MailKit.dll +E:\Demos\DemoOwns\C\VmianqianC\bin\Debug\net10.0-windows\MimeKit.dll diff --git a/obj/Debug/net10.0-windows/Vmianqian.csproj.GenerateResource.cache b/obj/Debug/net10.0-windows/Vmianqian.csproj.GenerateResource.cache index e42b674..02de75e 100644 Binary files a/obj/Debug/net10.0-windows/Vmianqian.csproj.GenerateResource.cache and b/obj/Debug/net10.0-windows/Vmianqian.csproj.GenerateResource.cache differ diff --git a/obj/Debug/net10.0-windows/Vmianqian.dll b/obj/Debug/net10.0-windows/Vmianqian.dll index 1b359b3..e9e00fd 100644 Binary files a/obj/Debug/net10.0-windows/Vmianqian.dll and b/obj/Debug/net10.0-windows/Vmianqian.dll differ diff --git a/obj/Debug/net10.0-windows/Vmianqian.genruntimeconfig.cache b/obj/Debug/net10.0-windows/Vmianqian.genruntimeconfig.cache index c420b59..fd46e7d 100644 --- a/obj/Debug/net10.0-windows/Vmianqian.genruntimeconfig.cache +++ b/obj/Debug/net10.0-windows/Vmianqian.genruntimeconfig.cache @@ -1 +1 @@ -06af8958efc8199d17b3e5352714ede4c860a98abdd43801bf6807d2659e5f95 +bfd4fda30425a127e04d84d69f89302f1a5d0a22c65f909e0dc14e06f1be3226 diff --git a/obj/Debug/net10.0-windows/Vmianqian.pdb b/obj/Debug/net10.0-windows/Vmianqian.pdb index d51ee40..fa8c3a0 100644 Binary files a/obj/Debug/net10.0-windows/Vmianqian.pdb and b/obj/Debug/net10.0-windows/Vmianqian.pdb differ diff --git a/obj/Debug/net10.0-windows/apphost.exe b/obj/Debug/net10.0-windows/apphost.exe index 35c8bfd..24cdd3c 100644 Binary files a/obj/Debug/net10.0-windows/apphost.exe and b/obj/Debug/net10.0-windows/apphost.exe differ diff --git a/obj/Debug/net10.0-windows/ref/Vmianqian.dll b/obj/Debug/net10.0-windows/ref/Vmianqian.dll index d60059c..eafc4b5 100644 Binary files a/obj/Debug/net10.0-windows/ref/Vmianqian.dll and b/obj/Debug/net10.0-windows/ref/Vmianqian.dll differ diff --git a/obj/Debug/net10.0-windows/refint/Vmianqian.dll b/obj/Debug/net10.0-windows/refint/Vmianqian.dll index d60059c..eafc4b5 100644 Binary files a/obj/Debug/net10.0-windows/refint/Vmianqian.dll and b/obj/Debug/net10.0-windows/refint/Vmianqian.dll differ diff --git a/obj/Vmianqian.csproj.nuget.dgspec.json b/obj/Vmianqian.csproj.nuget.dgspec.json index b29a631..37c4904 100644 --- a/obj/Vmianqian.csproj.nuget.dgspec.json +++ b/obj/Vmianqian.csproj.nuget.dgspec.json @@ -1,23 +1,23 @@ { "format": 1, "restore": { - "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj": {} + "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj": {} }, "projects": { - "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj": { + "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj", + "projectUniqueName": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj", "projectName": "Vmianqian", - "projectPath": "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj", - "packagesPath": "C:\\Users\\Administrator\\.nuget\\packages\\", - "outputPath": "E:\\Demo\\C\\Vmianqian\\obj\\", + "projectPath": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj", + "packagesPath": "C:\\Users\\heros\\.nuget\\packages\\", + "outputPath": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ - "C:\\Softwares\\Microsoft Visual Studio\\Shared\\NuGetPackages" + "D:\\Softwares\\Microsoft\\VisualStudio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Administrator\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\heros\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -26,12 +26,10 @@ ], "sources": { "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, - "C:\\Program Files\\dotnet\\library-packs": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { - "net10.0-windows": { - "framework": "net10.0-windows7.0", + "net10.0-windows7.0": { "targetAlias": "net10.0-windows", "projectReferences": {} } @@ -49,13 +47,16 @@ "SdkAnalysisLevel": "10.0.200" }, "frameworks": { - "net10.0-windows": { - "framework": "net10.0-windows7.0", + "net10.0-windows7.0": { "targetAlias": "net10.0-windows", "dependencies": { "AntdUI": { "target": "Package", "version": "[2.3.10, )" + }, + "MailKit": { + "target": "Package", + "version": "[4.16.0, )" } }, "imports": [ @@ -77,7 +78,7 @@ "privateAssets": "none" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.202/PortableRuntimeIdentifierGraph.json", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.201/PortableRuntimeIdentifierGraph.json", "packagesToPrune": { "Microsoft.CSharp": "(,4.7.32767]", "Microsoft.VisualBasic": "(,10.4.32767]", diff --git a/obj/Vmianqian.csproj.nuget.g.props b/obj/Vmianqian.csproj.nuget.g.props index 4969686..d11ee35 100644 --- a/obj/Vmianqian.csproj.nuget.g.props +++ b/obj/Vmianqian.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Administrator\.nuget\packages\;C:\Softwares\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\heros\.nuget\packages\;D:\Softwares\Microsoft\VisualStudio\Shared\NuGetPackages PackageReference 7.0.0 - - + + \ No newline at end of file diff --git a/obj/project.assets.json b/obj/project.assets.json index 8b8d206..ff79bf7 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -17,6 +17,51 @@ "frameworkReferences": [ "Microsoft.WindowsDesktop.App.WindowsForms" ] + }, + "BouncyCastle.Cryptography/2.6.2": { + "type": "package", + "compile": { + "lib/net6.0/BouncyCastle.Cryptography.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/BouncyCastle.Cryptography.dll": { + "related": ".xml" + } + } + }, + "MailKit/4.16.0": { + "type": "package", + "dependencies": { + "MimeKit": "4.16.0" + }, + "compile": { + "lib/net10.0/MailKit.dll": { + "related": ".dll.config;.pdb;.xml" + } + }, + "runtime": { + "lib/net10.0/MailKit.dll": { + "related": ".dll.config;.pdb;.xml" + } + } + }, + "MimeKit/4.16.0": { + "type": "package", + "dependencies": { + "BouncyCastle.Cryptography": "2.6.2" + }, + "compile": { + "lib/net10.0/MimeKit.dll": { + "related": ".dll.config;.pdb;.xml" + } + }, + "runtime": { + "lib/net10.0/MimeKit.dll": { + "related": ".dll.config;.pdb;.xml" + } + } } } }, @@ -47,31 +92,135 @@ "lib/net9.0-windows7.0/AntdUI.xml", "logo.png" ] + }, + "BouncyCastle.Cryptography/2.6.2": { + "sha512": "7oWOcvnntmMKNzDLsdxAYqApt+AjpRpP2CShjMfIa3umZ42UQMvH0tl1qAliYPNYO6vTdcGMqnRrCPmsfzTI1w==", + "type": "package", + "path": "bouncycastle.cryptography/2.6.2", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "README.md", + "bouncycastle.cryptography.2.6.2.nupkg.sha512", + "bouncycastle.cryptography.nuspec", + "lib/net461/BouncyCastle.Cryptography.dll", + "lib/net461/BouncyCastle.Cryptography.xml", + "lib/net6.0/BouncyCastle.Cryptography.dll", + "lib/net6.0/BouncyCastle.Cryptography.xml", + "lib/netstandard2.0/BouncyCastle.Cryptography.dll", + "lib/netstandard2.0/BouncyCastle.Cryptography.xml", + "packageIcon.png" + ] + }, + "MailKit/4.16.0": { + "sha512": "trJ82DOpAmo8i1jO1vNE+dGn4mPRyeYfy4swRcAGgMJhPoI1Kohf4OFJJf0+YIj4iUxgxPn8W+ht7e7KiYzSjg==", + "type": "package", + "path": "mailkit/4.16.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "docs/ExchangeOAuth2.md", + "docs/FAQ.md", + "docs/GMailOAuth2.md", + "docs/README.md", + "icons/mailkit-50.png", + "lib/net10.0/MailKit.dll", + "lib/net10.0/MailKit.dll.config", + "lib/net10.0/MailKit.pdb", + "lib/net10.0/MailKit.xml", + "lib/net462/MailKit.dll", + "lib/net462/MailKit.dll.config", + "lib/net462/MailKit.pdb", + "lib/net462/MailKit.xml", + "lib/net47/MailKit.dll", + "lib/net47/MailKit.dll.config", + "lib/net47/MailKit.pdb", + "lib/net47/MailKit.xml", + "lib/net48/MailKit.dll", + "lib/net48/MailKit.dll.config", + "lib/net48/MailKit.pdb", + "lib/net48/MailKit.xml", + "lib/net8.0/MailKit.dll", + "lib/net8.0/MailKit.dll.config", + "lib/net8.0/MailKit.pdb", + "lib/net8.0/MailKit.xml", + "lib/netstandard2.0/MailKit.dll", + "lib/netstandard2.0/MailKit.dll.config", + "lib/netstandard2.0/MailKit.pdb", + "lib/netstandard2.0/MailKit.xml", + "lib/netstandard2.1/MailKit.dll", + "lib/netstandard2.1/MailKit.dll.config", + "lib/netstandard2.1/MailKit.pdb", + "lib/netstandard2.1/MailKit.xml", + "mailkit.4.16.0.nupkg.sha512", + "mailkit.nuspec" + ] + }, + "MimeKit/4.16.0": { + "sha512": "X0LFxeM4gPRIhODyY/HYS9b+zRZ7y//v59rFzgS6wLxcPuZThnMtNZHtrr0fjLyRRkg3gqJBtvW36XfUzZ7Djw==", + "type": "package", + "path": "mimekit/4.16.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "docs/FAQ.md", + "docs/README.md", + "icons/mimekit-50.png", + "lib/net10.0/MimeKit.dll", + "lib/net10.0/MimeKit.dll.config", + "lib/net10.0/MimeKit.pdb", + "lib/net10.0/MimeKit.xml", + "lib/net462/MimeKit.dll", + "lib/net462/MimeKit.pdb", + "lib/net462/MimeKit.xml", + "lib/net47/MimeKit.dll", + "lib/net47/MimeKit.pdb", + "lib/net47/MimeKit.xml", + "lib/net48/MimeKit.dll", + "lib/net48/MimeKit.pdb", + "lib/net48/MimeKit.xml", + "lib/net8.0/MimeKit.dll", + "lib/net8.0/MimeKit.dll.config", + "lib/net8.0/MimeKit.pdb", + "lib/net8.0/MimeKit.xml", + "lib/netstandard2.0/MimeKit.dll", + "lib/netstandard2.0/MimeKit.dll.config", + "lib/netstandard2.0/MimeKit.pdb", + "lib/netstandard2.0/MimeKit.xml", + "lib/netstandard2.1/MimeKit.dll", + "lib/netstandard2.1/MimeKit.dll.config", + "lib/netstandard2.1/MimeKit.pdb", + "lib/netstandard2.1/MimeKit.xml", + "mimekit.4.16.0.nupkg.sha512", + "mimekit.nuspec" + ] } }, "projectFileDependencyGroups": { "net10.0-windows7.0": [ - "AntdUI >= 2.3.10" + "AntdUI >= 2.3.10", + "MailKit >= 4.16.0" ] }, "packageFolders": { - "C:\\Users\\Administrator\\.nuget\\packages\\": {}, - "C:\\Softwares\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + "C:\\Users\\heros\\.nuget\\packages\\": {}, + "D:\\Softwares\\Microsoft\\VisualStudio\\Shared\\NuGetPackages": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj", + "projectUniqueName": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj", "projectName": "Vmianqian", - "projectPath": "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj", - "packagesPath": "C:\\Users\\Administrator\\.nuget\\packages\\", - "outputPath": "E:\\Demo\\C\\Vmianqian\\obj\\", + "projectPath": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj", + "packagesPath": "C:\\Users\\heros\\.nuget\\packages\\", + "outputPath": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ - "C:\\Softwares\\Microsoft Visual Studio\\Shared\\NuGetPackages" + "D:\\Softwares\\Microsoft\\VisualStudio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Administrator\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\heros\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -80,7 +229,6 @@ ], "sources": { "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, - "C:\\Program Files\\dotnet\\library-packs": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { @@ -108,6 +256,10 @@ "AntdUI": { "target": "Package", "version": "[2.3.10, )" + }, + "MailKit": { + "target": "Package", + "version": "[4.16.0, )" } }, "imports": [ @@ -129,7 +281,7 @@ "privateAssets": "none" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.202/PortableRuntimeIdentifierGraph.json", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.201/PortableRuntimeIdentifierGraph.json", "packagesToPrune": { "Microsoft.CSharp": "(,4.7.32767]", "Microsoft.VisualBasic": "(,10.4.32767]", diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index 1059d1c..b58b11f 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,10 +1,13 @@ { "version": 2, - "dgSpecHash": "qbBH41KABjc=", + "dgSpecHash": "JL2C2PQV5/Y=", "success": true, - "projectFilePath": "E:\\Demo\\C\\Vmianqian\\Vmianqian.csproj", + "projectFilePath": "E:\\Demos\\DemoOwns\\C\\VmianqianC\\Vmianqian.csproj", "expectedPackageFiles": [ - "C:\\Users\\Administrator\\.nuget\\packages\\antdui\\2.3.10\\antdui.2.3.10.nupkg.sha512" + "C:\\Users\\heros\\.nuget\\packages\\antdui\\2.3.10\\antdui.2.3.10.nupkg.sha512", + "C:\\Users\\heros\\.nuget\\packages\\bouncycastle.cryptography\\2.6.2\\bouncycastle.cryptography.2.6.2.nupkg.sha512", + "C:\\Users\\heros\\.nuget\\packages\\mailkit\\4.16.0\\mailkit.4.16.0.nupkg.sha512", + "C:\\Users\\heros\\.nuget\\packages\\mimekit\\4.16.0\\mimekit.4.16.0.nupkg.sha512" ], "logs": [] } \ No newline at end of file