Example #1
0
        public Form1()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls    = false;
            Thread.CurrentThread.IsBackground          = true;
            ServicePointManager.DefaultConnectionLimit = 500;
            string retMac = getLocalMac();

            if (!String.IsNullOrEmpty(retMac))
            {
                this.MACIP = retMac;
                string[] s_arr = this.MACIP.Split(new char[]
                {
                    ':'
                });
                this.MACIP = s_arr[0];
                for (int i = 1; i < s_arr.Length; i++)
                {
                    this.MACIP = this.MACIP + "-" + s_arr[i];
                }
            }
            this.List_sever_ip = ReadXML.readtext();
            this.startTime     = DateTime.MinValue;
            this.stopTime      = DateTime.MinValue;
            this.LUYOU_MAC     = GetLuYouMac.GetMac(ReadXML.readMcaMsg());
            this.YOUXIAN_IP    = GetLuYouMac.GettrueIpV4();
        }
Example #2
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            this.LUYOU_MAC  = GetLuYouMac.GetMac(ReadXML.readMcaMsg());
            this.YOUXIAN_IP = GetLuYouMac.GettrueIpV4();
            string retMac = getLocalMac();

            if (!String.IsNullOrEmpty(retMac))
            {
                this.MACIP = retMac;
                string[] s_arr = this.MACIP.Split(new char[]
                {
                    ':'
                });
                this.MACIP = s_arr[0];
                for (int i = 1; i < s_arr.Length; i++)
                {
                    this.MACIP = this.MACIP + "-" + s_arr[i];
                }
            }
        }