Ejemplo n.º 1
0
        private void DisplayError(Canlib.canStatus status, String routineName, Boolean exitApp)
        {
            String errText = "";
             if (status != Canlib.canStatus.canOK)
             {
            Canlib.canGetErrorText(status, out errText);
            errText += ".\nError code = " + status.ToString() + ".";
            MessageBox.Show(errText, routineName, MessageBoxButtons.OK);

            // Only exit when signaled
            if (exitApp)
            {
               Environment.Exit(0);
            }
             }
        }