private void ButtonCancel_Click(object sender, EventArgs e) { if (ButtonCancel.Text != "OK") { // Remove the event handler m_manager.OnControllerStateChanged -= m_controllerStateChangedHandler; // Cancel the operation m_manager.CancelControllerCommand(m_homeId); } // Close the dialog Close(); }
/// <summary> /// Handles the Click event of the ButtonCancel control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void ButtonCancel_Click(object sender, EventArgs e) { if (ButtonCancel.Text != "OK") { // Remove the event handler m_manager.NotificationReceived -= NotificationHandler; // Cancel the operation m_manager.CancelControllerCommand(m_homeId); } // Close the dialog Close(); m_dlg.DialogResult = result; }
private void ButtonCancel_Click(object sender, EventArgs e) { if (ButtonCancel.Text != "OK") { // Remove the event handler m_manager.OnControllerStateChanged -= m_controllerStateChangedHandler; // Cancel the operation if (m_manager.CancelControllerCommand(_homeid)) { // Logger.log.Info(_zwcontrollercommand.ToString() + " cancelled by user.", "OPENZWAVE"); } else { //Logger.log.Info("Failed to cancel " + _zwcontrollercommand.ToString() + ".", "OPENZWAVE"); } } // Close the dialog Close(); }
public bool CancelOperation(Controller controller) => _manager.CancelControllerCommand(controller.HomeID);