예제 #1
0
        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;
        }
예제 #3
0
        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();
        }
예제 #4
0
 public bool CancelOperation(Controller controller) =>
 _manager.CancelControllerCommand(controller.HomeID);