UICompany.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. using Mysqlx.Crud;
  2. using MySqlX.Serialization;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Data.SqlClient;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Reflection;
  11. using System.Runtime.InteropServices.ComTypes;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. using System.Windows.Forms;
  15. using System.Text.Json;
  16. using System.IO;
  17. using System.Diagnostics;
  18. namespace DataManager
  19. {
  20. public partial class UICompany : Form
  21. {
  22. private string companyId;
  23. private int userId;
  24. private DataTable companyInfo;
  25. private DataTable fundList;
  26. private DataTable contactList;
  27. private List<DataRowView> old_selected_contactor = new List<DataRowView>();
  28. private List<DataRowView> old_selected_collector = new List<DataRowView>();
  29. private string saveFilePath;
  30. public UICompany(string companyId, int userId)
  31. {
  32. this.companyId = companyId.Trim().ToUpper();
  33. this.userId = userId;
  34. this.saveFilePath = ".\\Contracts\\" + companyId + "\\";
  35. InitializeComponent();
  36. InitializedData();
  37. }
  38. public string CompanyId { get { return companyId; } }
  39. public int UserId { get { return userId; } }
  40. private void InitializedData()
  41. {
  42. #region Basic Info Tab
  43. companyInfo = DataAccess.Get_dm_company_information(CompanyId);
  44. if(companyInfo == null || companyInfo.Rows.Count == 0 ) { return; }
  45. txtCompanyName.Text = companyInfo.Rows[0]["company_name"].ToString();
  46. txtRegisterCode.Text = companyInfo.Rows[0]["register_number"].ToString();
  47. txtCompanyId.Text = companyInfo.Rows[0]["company_id"].ToString();
  48. txtIncoporationDate.Text = DateTime.Parse(companyInfo.Rows[0]["establish_date"].ToString()).ToShortDateString();
  49. txtRegisterAddress.Text = companyInfo.Rows[0]["register_number_address"].ToString();
  50. txtOrgCode.Text = companyInfo.Rows[0]["credit_code"].ToString();
  51. txtBusinessAddress.Text = companyInfo.Rows[0]["company_address"].ToString();
  52. if (companyInfo.Rows[0]["nature_business_type"].ToString() != "")
  53. txtOrgType.Text = UIConstants.CompanyOwnerType[int.Parse(companyInfo.Rows[0]["nature_business_type"].ToString())];
  54. else
  55. txtOrgType.Text = "未知";
  56. if (companyInfo.Rows[0]["company_type"].ToString() != "")
  57. txtCompanyType.Text = UIConstants.CompanyType[int.Parse(companyInfo.Rows[0]["company_type"].ToString())];
  58. else
  59. txtCompanyType.Text = "未知";
  60. txtBusinessType.Text = companyInfo.Rows[0]["business_type"].ToString();
  61. if (companyInfo.Rows[0]["company_asset_size"].ToString() != "")
  62. txtAssetSize.Text = UIConstants.CompanyAssetSize[int.Parse(companyInfo.Rows[0]["company_asset_size"].ToString())];
  63. else
  64. txtAssetSize.Text = "未知";
  65. txtIsQualifiedAdvisor.Text = companyInfo.Rows[0]["has_consulting_qualification"].ToString() == "1" ? "是" : "否";
  66. //txtOwner.Text = companyInfo.Rows[0]["establish_date"].ToString();
  67. //txtAmacUpdateDate.Text = companyInfo.Rows[0]["zjx_last_info_update_time"].ToString();
  68. //lklAmacURL.Links.Add(Link )companyInfo.Rows[0]["amac_link"].ToString();
  69. txtCompanyShortName.Text = companyInfo.Rows[0]["company_short_name"].ToString();
  70. #endregion
  71. LoadContactsGrid();
  72. #region Fund List Tab
  73. Dictionary<int, string> d = new Dictionary<int, string>(UIConstants.HedgeFundStrategy);
  74. d.Add(DataAccess.DM_NULL, "全部");
  75. BindingSource bs = new BindingSource();
  76. bs.DataSource = d;
  77. cmbStrategy.DataSource = bs;
  78. cmbStrategy.DisplayMember = "Value";
  79. cmbStrategy.ValueMember = "Key";
  80. cmbStrategy.SelectedValue = (int)DataAccess.DM_NULL;
  81. LoadFundGrid();
  82. #endregion
  83. #region Contracts Tab
  84. sbyte jobType = Convert.ToSByte(UIConstants.JobType.Contact);
  85. DataTable dt_dm_user_1 = DataAccess.Get_dm_user(null, jobType);
  86. clbContactor.DataSource = dt_dm_user_1;
  87. clbContactor.DisplayMember = "username";
  88. clbContactor.ValueMember = "userid";
  89. // 给覆盖此公司的user打上勾
  90. DataTable dt_company_cover_1 = DataAccess.Get_dm_company_cover(CompanyId, jobType, null);
  91. for(int i = 0; i < clbContactor.Items.Count; i++)
  92. {
  93. string itemUserId = ((DataRowView)clbContactor.Items[i]).Row["userid"].ToString();
  94. if (dt_company_cover_1.Select("userid = " + itemUserId).Length > 0)
  95. clbContactor.SetItemChecked(i, true);
  96. }
  97. // 记录一下初始的勾选
  98. foreach(DataRowView item in clbContactor.CheckedItems)
  99. {
  100. old_selected_contactor.Add(item);
  101. }
  102. jobType = Convert.ToSByte(UIConstants.JobType.Collection);
  103. DataTable dt_dm_user_2 = DataAccess.Get_dm_user(null, jobType);
  104. clbCollector.DataSource = dt_dm_user_2;
  105. clbCollector.DisplayMember = "username";
  106. clbCollector.ValueMember = "userid";
  107. // 给覆盖此公司的user打上勾
  108. DataTable dt_company_cover_2 = DataAccess.Get_dm_company_cover(CompanyId, jobType, null);
  109. for (int i = 0; i < clbCollector.Items.Count; i++)
  110. {
  111. string itemUserId = ((DataRowView)clbCollector.Items[i]).Row["userid"].ToString();
  112. if (dt_company_cover_2.Select("userid = " + itemUserId).Length > 0)
  113. clbCollector.SetItemChecked(i, true);
  114. }
  115. // 记录一下初始的勾选
  116. foreach(DataRowView item in clbCollector.CheckedItems)
  117. {
  118. old_selected_collector.Add(item);
  119. }
  120. LoadContractFiles();
  121. #endregion
  122. }
  123. #region Basic Info
  124. private void btnSaveBasicInfo_Click(object sender, EventArgs e)
  125. {
  126. MessageBox.Show("暂时不支持存数据");
  127. }
  128. #endregion
  129. #region Contact List
  130. private void LoadContactsGrid()
  131. {
  132. contactList = DataAccess.Get_dm_contacts(CompanyId);
  133. grdContacts.DataSource = contactList;
  134. grdContacts.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
  135. grdContacts.Columns["id"].Visible = false;
  136. grdContacts.Columns["company_id"].Visible = false;
  137. grdContacts.Columns["name"].HeaderText = "姓名";
  138. grdContacts.Columns["role"].HeaderText = "职务";
  139. grdContacts.Columns["phone"].HeaderText = "电话";
  140. grdContacts.Columns["wechat"].HeaderText = "微信";
  141. grdContacts.Columns["email"].HeaderText = "邮箱";
  142. grdContacts.Columns["isvalid"].Visible = false;
  143. grdContacts.Columns["creatorid"].Visible = false;
  144. grdContacts.Columns["createtime"].Visible = false;
  145. grdContacts.Columns["updaterid"].Visible = false;
  146. grdContacts.Columns["updatetime"].Visible = false;
  147. lblContactsCount.Text = contactList.Rows.Count.ToString();
  148. }
  149. private void btnSaveContact_Click(object sender, EventArgs e)
  150. {
  151. if(contactList == null ) return;
  152. int updatedCnt = DataAccess.Set_dm_contacts(contactList, CompanyId, UserId);
  153. contactList.AcceptChanges();
  154. MessageBox.Show("成功更新了" + updatedCnt.ToString() + "个联系人", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
  155. }
  156. #endregion
  157. #region Fund List
  158. private void LoadFundGrid()
  159. {
  160. fundList = DataAccess.Get_dm_fund_information(null, CompanyId);
  161. BindingSource bs = new BindingSource();
  162. bs.DataSource = fundList;
  163. grdFund.DataSource = bs;
  164. grdFund.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
  165. grdFund.Columns["fund_id"].Visible = false;
  166. grdFund.Columns["raise_type"].Visible = false;
  167. grdFund.Columns["fund_name"].Visible = false;
  168. grdFund.Columns["fund_short_name"].HeaderText = "基金简称";
  169. grdFund.Columns["fund_structure"].Visible = false;
  170. grdFund.Columns["fund_type"].Visible = false;
  171. grdFund.Columns["strategy"].Visible = false;
  172. grdFund.Columns["substrategy"].Visible = false;
  173. grdFund.Columns["fund_status"].Visible = false;
  174. grdFund.Columns["base_currency"].Visible = false;
  175. grdFund.Columns["inception_date"].HeaderText = "成立日";
  176. grdFund.Columns["initial_unit_value"].Visible = false;
  177. grdFund.Columns["p_fund_id"].Visible = false;
  178. grdFund.Columns["p_fund_name"].Visible = false;
  179. grdFund.Columns["advisor_id"].Visible = false;
  180. grdFund.Columns["company_name"].Visible = false;
  181. grdFund.Columns["custodian_id"].Visible = false;
  182. grdFund.Columns["custodian_name"].HeaderText = "托管";
  183. grdFund.Columns["trust_id"].Visible = false;
  184. grdFund.Columns["nav_frequency"].HeaderText = "净值频率";
  185. grdFund.Columns["manager_type"].Visible = false;
  186. grdFund.Columns["zjx_last_info_update_time"].Visible = false;
  187. grdFund.Columns["amac_url"].Visible = false;
  188. grdFund.Columns["register_number"].HeaderText = "备案编码";
  189. grdFund.Columns["register_date"].Visible = false;
  190. grdFund.Columns["main_code"].Visible = false;
  191. grdFund.Columns["isVisible"].Visible = false;
  192. grdFund.Columns["is_ranking"].HeaderText = "是否排名";
  193. grdFund.Columns["is_rating"].HeaderText = "是否评级";
  194. grdFund.Columns["is_authorized"].HeaderText = "是否授权";
  195. grdFund.Columns["trust_register_number"].Visible = false;
  196. grdFund.Columns["isvalid"].Visible = false;
  197. grdFund.Columns["creatorid"].Visible = false;
  198. grdFund.Columns["createtime"].Visible = false;
  199. grdFund.Columns["updaterid"].Visible = false;
  200. grdFund.Columns["updatetime"].Visible = false;
  201. grdFund.Columns["max_price_date"].HeaderText = "最新净值日";
  202. grdFund.Columns["fund_short_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
  203. SetStatusStrip(fundList.Rows.Count);
  204. }
  205. private void grdFund_CellContentClick(object sender, DataGridViewCellEventArgs e)
  206. {
  207. int rowIndex = e.RowIndex;
  208. int columnIndex = e.ColumnIndex;
  209. if (columnIndex < 0 || rowIndex < 0) return;
  210. DataGridViewRow row = grdFund.Rows[rowIndex];
  211. string fundId = row.Cells["fund_id"].Value.ToString();
  212. UIFund frm = new UIFund(fundId, UserId);
  213. frm.ShowDialog();
  214. }
  215. private void cmbStrategy_SelectedIndexChanged(object sender, EventArgs e)
  216. {
  217. FilterFund();
  218. }
  219. private void dtpInceptionDate_ValueChanged(object sender, EventArgs e)
  220. {
  221. FilterFund();
  222. }
  223. private void FilterFund()
  224. {
  225. string strategy = cmbStrategy.SelectedValue.ToString();
  226. string inception = dtpInceptionDate.Value.ToString();
  227. string filter = null;
  228. int cnt = 0;
  229. if (strategy == DataAccess.DM_NULL.ToString())
  230. filter = string.Format("inception_date <= #{0}#", inception);
  231. else
  232. filter = string.Format("strategy = {0} and inception_date <= #{1}#", strategy, inception);
  233. if (fundList != null && fundList.Rows.Count > 0)
  234. {
  235. BindingSource bs = (BindingSource)grdFund.DataSource;
  236. bs.Filter = filter;
  237. cnt = bs.Count;
  238. }
  239. SetStatusStrip(cnt);
  240. }
  241. private void SetStatusStrip(int cnt)
  242. {
  243. ToolStripStatusLabel label = new ToolStripStatusLabel();
  244. label.Text = "记录条数:" + cnt.ToString();
  245. sstCompany.Items.Clear();
  246. sstCompany.Items.Add(label);
  247. }
  248. #endregion
  249. #region Contract
  250. private void btnSaveContactor_Click(object sender, EventArgs e)
  251. {
  252. List<CompanyCoverUser> coverage = new List<CompanyCoverUser>();
  253. List<DataRowView> new_selected_contactor = new List<DataRowView>();
  254. foreach(DataRowView item in clbContactor.CheckedItems)
  255. new_selected_contactor.Add(item);
  256. CompanyCoverUser cov1 = CompareCoverage(CompanyId, 1, old_selected_contactor, new_selected_contactor);
  257. if(cov1 != null )
  258. coverage.Add(cov1);
  259. List<DataRowView> new_selected_collector = new List<DataRowView>();
  260. foreach (DataRowView item in clbCollector.CheckedItems)
  261. new_selected_collector.Add(item);
  262. CompanyCoverUser cov2 = CompareCoverage(CompanyId, 2, old_selected_collector, new_selected_collector);
  263. if(cov2 != null )
  264. coverage.Add(cov2);
  265. string query = JsonSerializer.Serialize(coverage);
  266. int ret = DataAccess.Set_dm_company_cover(query, UserId);
  267. string message = ret < 0 ? "Oops... 变更存数据库时出了错" : "人员覆盖变更已经成功存盘~";
  268. MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
  269. }
  270. /// <summary>
  271. /// 前后人员覆盖对比
  272. /// </summary>
  273. /// <param name="companyId"></param>
  274. /// <param name="coverType"></param>
  275. /// <param name="oldList"></param>
  276. /// <param name="newList"></param>
  277. /// <returns></returns>
  278. private CompanyCoverUser CompareCoverage(string companyId, sbyte coverType, List<DataRowView> oldList, List<DataRowView> newList)
  279. {
  280. CompanyCoverUser companyCoverUser = new CompanyCoverUser();
  281. companyCoverUser.CompanyId = companyId;
  282. companyCoverUser.CoverType = coverType;
  283. if (oldList == null || newList == null) return companyCoverUser;
  284. // 在旧名单里,但不在新名单里的要删掉
  285. List<DataRowView> itemDeleted = oldList.Except(newList).ToList();
  286. // 在新名单里,但不在旧名单里的要增加
  287. List<DataRowView> itemAdded = newList.Except(oldList).ToList();
  288. int i = 0;
  289. CompanyCoverUser.Coverage[] covers = null;
  290. if (itemDeleted.Count > 0 || itemAdded.Count > 0)
  291. covers = new CompanyCoverUser.Coverage[itemDeleted.Count+itemAdded.Count];
  292. foreach (DataRowView item in itemDeleted)
  293. {
  294. CompanyCoverUser.Coverage cov = new CompanyCoverUser.Coverage();
  295. cov.IsValid = 0;
  296. cov.UserId = int.Parse(item.Row["userid"].ToString());
  297. covers[i] = cov;
  298. i++;
  299. }
  300. foreach (DataRowView item in itemAdded)
  301. {
  302. CompanyCoverUser.Coverage cov = new CompanyCoverUser.Coverage();
  303. cov.IsValid = 1;
  304. cov.UserId = int.Parse(item.Row["userid"].ToString());
  305. covers[i] = cov;
  306. i++;
  307. }
  308. companyCoverUser.Coverages = covers;
  309. //ret = JsonSerializer.Serialize(companyCoverUser);
  310. return companyCoverUser;
  311. }
  312. /// <summary>
  313. /// 上传文件 TODO: 文件先写到本地
  314. /// </summary>
  315. /// <param name="sender"></param>
  316. /// <param name="e"></param>
  317. private void btnUploadFile_Click(object sender, EventArgs e)
  318. {
  319. ofdUploadFile.Title = "文件上传 ... 还没做完呢";
  320. //ofdUploadFile.DefaultExt = "doc";
  321. //ofdUploadFile.Filter = "所有Word文件(*.doc)|所有pdf文件(*.pdf)|所有文件(*.*)|*.*";
  322. if(ofdUploadFile.ShowDialog() == DialogResult.OK)
  323. {
  324. // TODO: upload files to server. let's fake it for now
  325. string filePath = ofdUploadFile.FileName;
  326. string fileName = Path.GetFileName(filePath);
  327. string saveFileName = this.saveFilePath + fileName;
  328. try
  329. {
  330. if (!Directory.Exists(saveFilePath)) { Directory.CreateDirectory(saveFilePath); }
  331. File.Copy(filePath, saveFileName, true);
  332. CreateFileButton(Path.GetFileName(saveFileName));
  333. }
  334. catch (Exception ex)
  335. {
  336. MessageBox.Show("文件上传失败:" + ex.Message, "错误信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
  337. }
  338. }
  339. }
  340. /// <summary>
  341. /// 显示已上传文件,每个文件一个按钮
  342. /// </summary>
  343. private void LoadContractFiles()
  344. {
  345. if (Directory.Exists(this.saveFilePath))
  346. {
  347. string[] fileNames = Directory.GetFiles(saveFilePath);
  348. if(fileNames.Length > 0)
  349. {
  350. foreach (string fileName in fileNames)
  351. {
  352. CreateFileButton(Path.GetFileName(fileName));
  353. }
  354. }
  355. }
  356. }
  357. /// <summary>
  358. /// 为每个上传的文件产生一个按钮来显示
  359. /// </summary>
  360. /// <param name="fileName"></param>
  361. private void CreateFileButton(string fileName)
  362. {
  363. Panel panFile = new Panel();
  364. panFile.BorderStyle = BorderStyle.FixedSingle;
  365. panFile.Size = btnUploadFile.Size;
  366. panFile.Text = fileName;
  367. panFile.Font = new Font("微软雅黑", 10F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134)));
  368. panFile.Click += PanFile_Click;
  369. panFile.MouseEnter += PanFile_Enter;
  370. panFile.MouseLeave += PanFile_MouseLeave;
  371. Label lblFileName = new Label();
  372. lblFileName.Text = fileName;
  373. lblFileName.ForeColor = Color.DodgerBlue;
  374. lblFileName.Size = new Size(panFile.Width, panFile.Height/2);
  375. lblFileName.Location = new Point(panFile.Location.X, panFile.Location.Y + panFile.Size.Height/2);
  376. lblFileName.TextAlign = ContentAlignment.MiddleCenter;
  377. lblFileName.Click += LblFileName_Click;
  378. panFile.Controls.Add(lblFileName);
  379. CircleDeleteControl delIcon = new CircleDeleteControl();
  380. delIcon.Size = new Size(panFile.Width/8, panFile.Height/8);
  381. delIcon.Location = new Point(panFile.Width * 3/4, panFile.Width * 1/8);
  382. delIcon.Visible = true;
  383. delIcon.Click += DelIcon_Click;
  384. panFile.Controls.Add(delIcon);
  385. flowLayoutPanel1.Controls.Add(panFile);
  386. }
  387. private void LblFileName_Click(object sender, EventArgs e)
  388. {
  389. Control pan = ((Control)sender).Parent;
  390. PanFile_Click(pan, e);
  391. }
  392. private void PanFile_Click(object sender, EventArgs e)
  393. {
  394. OpenFile(saveFilePath + ((Panel)sender).Text);
  395. }
  396. private void PanFile_Enter(object sender, EventArgs e)
  397. {
  398. ((Control)sender).BackColor = Color.LightGray;
  399. }
  400. private void PanFile_MouseLeave(object sender, EventArgs e)
  401. {
  402. ((Control)sender).BackColor = Color.White;
  403. }
  404. private void DelIcon_Click(object sender, EventArgs e)
  405. {
  406. DialogResult result = MessageBox.Show("确认要删除此文件么?", "删除文件确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
  407. if (result == DialogResult.Yes)
  408. {
  409. Panel pan = (Panel)((Control)sender).Parent;
  410. File.Delete(saveFilePath + pan.Text);
  411. pan.Parent.Controls.Remove(pan);
  412. }
  413. }
  414. private void OpenFile(string fileName)
  415. {
  416. ProcessStartInfo startInfo = new ProcessStartInfo
  417. {
  418. FileName = fileName,
  419. UseShellExecute = true
  420. };
  421. Process.Start(startInfo);
  422. }
  423. #endregion
  424. }
  425. public class CompanyCoverUser
  426. {
  427. public string CompanyId { get; set; }
  428. public sbyte CoverType { get; set; }
  429. public Coverage[] Coverages { get; set; }
  430. public class Coverage
  431. {
  432. public sbyte IsValid { get; set; }
  433. public int UserId { get; set; }
  434. }
  435. }
  436. public class CircleDeleteControl : Control
  437. {
  438. protected override void OnPaint(PaintEventArgs e)
  439. {
  440. //this.BackColor = Color.White;
  441. base.OnPaint(e);
  442. Graphics g = e.Graphics;
  443. g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
  444. Point center = new Point(this.Width/2, this.Height/2);
  445. // 圆形删除符号的直径可以是控件的最小边长
  446. int diameter = Math.Min(this.Width, this.Height);
  447. // 圆形删除符号的内半径
  448. int innerRadius = diameter / 2;
  449. using (Pen deletePen = new Pen(Color.Red, 1))
  450. {
  451. // 绘制圆形删除符号的背景
  452. g.DrawEllipse(deletePen, center.X - innerRadius, center.Y - innerRadius, diameter, diameter);
  453. // 绘制两条相交的对角线
  454. int offset = (int)Math.Floor(innerRadius / 1.4);
  455. g.DrawLine(deletePen, center.X - innerRadius - offset, center.Y + innerRadius + offset, center.X + innerRadius + offset, center.Y - innerRadius - offset);
  456. g.DrawLine(deletePen, center.X - innerRadius - offset, center.Y - innerRadius - offset, center.X + innerRadius + offset, center.Y + innerRadius + offset);
  457. }
  458. }
  459. protected override void OnMouseEnter(EventArgs e)
  460. {
  461. base.OnMouseEnter(e);
  462. this.Cursor = Cursors.Hand;
  463. }
  464. protected override void OnMouseLeave(EventArgs e)
  465. {
  466. base.OnMouseLeave(e);
  467. this.Cursor = Cursors.Arrow;
  468. }
  469. }
  470. }