MainFrame.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using DllEapEntity;
  2. using DllPubInfo;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows.Forms;
  12. namespace XqMainFrame
  13. {
  14. public partial class MainFrame : Form
  15. {
  16. public MainFrame()
  17. {
  18. InitializeComponent();
  19. }
  20. private void button1_Click(object sender, EventArgs e)
  21. {
  22. DllXqManager.TLcdQuery temp = new DllXqManager.TLcdQuery();
  23. temp.Show();
  24. }
  25. private void button2_Click(object sender, EventArgs e)
  26. {
  27. DllXqManager.TEntityQuery temp = new DllXqManager.TEntityQuery();
  28. temp.Show();
  29. }
  30. private void button3_Click(object sender, EventArgs e)
  31. {
  32. //Form1 temp = new Form1();
  33. string str = Convert.ToString(254, 2);
  34. MessageBox.Show(str);
  35. }
  36. private void button4_Click(object sender, EventArgs e)
  37. {
  38. DllXqManager.Form1 temp = new DllXqManager.Form1();
  39. temp.Show();
  40. }
  41. private void button5_Click(object sender, EventArgs e)
  42. {
  43. //DllXqManager.Form2 temp = new DllXqManager.Form2();
  44. //temp.Show();
  45. //string errorinfo = "";
  46. //int result = DllDataAcc.XqConsoleAcc.InsertMacStatus("0001", 1, ref errorinfo);
  47. //if(result>0)
  48. //{
  49. // MessageBox.Show("插入成功。");
  50. //}
  51. //else
  52. //{
  53. // MessageBox.Show("操作失败"+errorinfo);
  54. //}
  55. }
  56. private void button6_Click(object sender, EventArgs e)
  57. {
  58. DllXqManager.LayoutMstQuery temp = new DllXqManager.LayoutMstQuery();
  59. temp.Show();
  60. }
  61. private void button8_Click(object sender, EventArgs e)
  62. {
  63. DllXqManager.MacStatusQuery temp = new DllXqManager.MacStatusQuery();
  64. temp.Show();
  65. }
  66. private void MainFrame_FormClosing(object sender, FormClosingEventArgs e)
  67. {
  68. if (MessageBox.Show("您确定要退出吗?", "询问", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) == DialogResult.Cancel)
  69. {
  70. e.Cancel = true;
  71. return;
  72. }
  73. System.Environment.Exit(0);
  74. }
  75. private void MainFrame_Load(object sender, EventArgs e)
  76. {
  77. PubInfo.JsonConfigFolder = System.Configuration.ConfigurationManager.AppSettings["JsonConfigFolder"].ToString();
  78. PubInfo.CurrJsonConfig = PubInfo.ReadJsonConfig<XqMainFrameConfig>();
  79. PubInfo.CurrDbCode = PubInfo.GetSystemConfig<XqMainFrameConfig>().EapDbCode;
  80. PubInfo.CurrBaseUrl = PubInfo.GetSystemConfig<XqMainFrameConfig>().WebapiUrl;
  81. ////PubInfo.CurrBaseUrl = "http://localhost:18531";
  82. //PubInfo.CurrBaseUrl = System.Configuration.ConfigurationManager.AppSettings["webapiurl"].ToString();
  83. //PubInfo.ConfigPath = System.Configuration.ConfigurationManager.AppSettings["ConfigFilePath"].ToString();
  84. }
  85. private void button9_Click(object sender, EventArgs e)
  86. {
  87. DllXqManager.StatusColor temp = new DllXqManager.StatusColor();
  88. temp.Show();
  89. }
  90. }
  91. }