Пример #1
0
        /// <summary>
        /// Handles the Click event of the Conditions_RespondMI control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void Conditions_RespondMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (ConditionsLV.SelectedItems.Count != 1)
                {
                    return;
                }

                DialogConditionState dialog = ConditionsLV.SelectedItems[0].Tag as DialogConditionState;

                if (dialog == null)
                {
                    return;
                }

                int selectedResponse = new DialogResponseDlg().ShowDialog(dialog);

                if (selectedResponse != -1)
                {
                    Respond(selectedResponse);
                }
            }
            catch (Exception exception)
            {
                ClientUtils.HandleException(this.Text, exception);
            }
        }
Пример #2
0
        /// <summary>
        /// Handles the Click event of the Conditions_RespondMI control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void Conditions_RespondMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (ConditionsLV.SelectedItems.Count != 1)
                {
                    return;
                }

                DialogConditionState dialog = ConditionsLV.SelectedItems[0].Tag as DialogConditionState;

                if (dialog == null)
                {
                    return;
                }

                int selectedResponse = new DialogResponseDlg().ShowDialog(dialog);

                if (selectedResponse != -1)
                {
                    Respond(selectedResponse);
                }
            }
            catch (Exception exception)
            {
                ClientUtils.HandleException(this.Text, exception);
            }
        }