コード例 #1
0
        private void closeButton_Click(object sender, EventArgs e)
        {
            long lResult = LKPrint.ClosePort();

            if (lResult != 0)
            {
                MessageBox.Show("Close Port Failed", "Error", MessageBoxButtons.OK);
            }
            else
            {
                int sIndex = portNameCBox.SelectedIndex;
                if (sIndex > 8)
                {
                    baudRateCBox.Enabled = false;
                }
                else
                {
                    baudRateCBox.Enabled      = true;
                    portNameCBox.Enabled      = true;
                    openButton.Enabled        = true;
                    closeButton.Enabled       = false;
                    printSampleButton.Enabled = false;
                }
            }
        }
コード例 #2
0
 private void exitButton_Click(object sender, EventArgs e)
 {
     LKPrint.ClosePort();
     this.Close();
 }