Пример #1
0
        private void menuItem4_Click(object sender, System.EventArgs e)
        {
            int ret, node;

            node = 22;
            ret  = API2.AB_GW_Close(node);
            if (ret < 0)
            {
                MessageBox.Show("AB_GW_Close() err");
                return;
            }
            else
            {
                MessageBox.Show("AB_GW_Close() ok, node=" + Convert.ToString(node));
            }
        }
Пример #2
0
        /// <summary>
        /// 清除任何使用中的資源。
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            int ret;

            System.Windows.Forms.MessageBox.Show("Close Form");

            timer1.Enabled = false;
            ret            = API2.AB_GW_Close(0);
            ret            = API2.AB_API_Close();
            if (ret < 0)
            {
                MessageBox.Show("AB_API_Close= err");                   // + AB_ErrMsg(ret)) ;
            }

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }