Beispiel #1
0
 private void GRBLMachinePlugin_Responding(GRBLMachinePlugin.Response response, int code)
 {
     if ((response == GRBLMachinePlugin.Response.error || response == GRBLMachinePlugin.Response.alarm) && _writeThread != null)
     {
         _writeThread.Interrupt();
     }
 }
        private void GRBLMachinePlugin_Responding(GRBLMachinePlugin.Response response, int code)
        {
            switch (response)
            {
            case GRBLMachinePlugin.Response.alarm:
                SystemSounds.Hand.Play();
                if (code > 0)
                {
                    AlarmTip.Show(ConnectionExpander.AlarmDict[code], this, 0, 0, 10000);
                }
                break;

            case GRBLMachinePlugin.Response.error:
                SystemSounds.Beep.Play();
                if (code > 0)
                {
                    ErrorTip.Show(ConnectionExpander.ErrorDict[code], this, 0, Height, 10000);
                }
                break;
            }
        }