private void btSetDefault_Click(object sender, EventArgs e) { wclWeDoHub Hub = GetHub(); wclWeDoRgbLight Rgb = FRobot.GetRgbDevice(Hub); if (Rgb != null) { Int32 Res = Rgb.SwitchToDefaultColor(); if (Res != wclErrors.WCL_E_SUCCESS) { MessageBox.Show("Unable to set default color: 0x" + Res.ToString("X8")); } } }
private void BtSetDefault_Click(Object Sender, EventArgs e) { if (FRgb == null) { MessageBox.Show("Device is not attached"); } else { Int32 Res = FRgb.SwitchToDefaultColor(); if (Res != wclErrors.WCL_E_SUCCESS) { MessageBox.Show("Unable to set default color: 0x" + Res.ToString("X8")); } } }