using Api.Framework; using Api.Framework.Model; using System; using System.Collections.Generic; using System.Windows.Forms; using UI.Framework.Forms; namespace FLSystem.Forms { public partial class LeavingMessageForm : BaseForm { public static List MessageMd5 = new List(); public LeavingMessageForm() { InitializeComponent(); } private void simpleButton1_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(this.textBox1.Text) || this.textBox1.Text.Length < 10) throw new Exception("陛下,您的圣旨内容太短~"); string msg = $@"用户账号:{Grant.Framework.GrantClient.Get().accounts.username} ⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇ {this.textBox1.Text}"; var md5 = CsharpHttpHelper.HttpHelper.ToMD5(msg); if (!MessageMd5.Contains(md5)) { //ApiClient.SendNewDingdingMessage(msg, "https://oapi.dingtalk.com/robot/send?access_token=12c07d749de435a3ee3ba7b9fdfcb1ca3db4dad18a9ab6201510d7d665656401"); ApiClient.SendNoticeMessage(new fl_noticeapi_info() { api_location = "https://open.feishu.cn/open-apis/bot/hook/e8cb9f6034e947cf9f2d560af1331785", notice_apitype = NoticeApiType.飞书机器人API, name = "飞书_反-馈." }, msg); MessageMd5.Add(md5); } ShowSuccess("已下达旨意!", "友情提示"); this.Close(); } catch (Exception ex) { ShowError(ex); } } private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { try { Clipboard.SetDataObject(linkLabel1.Text); ShowSuccessAutoClose("复制成功"); } catch (Exception) { } } } }