Пример #1
0
        /// <summary>
        /// Event handler for the 'Change Value' context menu option <c>Click</c> event. If applicable, shows the form which allows the user to change the value of the
        /// enumerator watch variable.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Parameter passed from the object that raised the event.</param>
        private void m_MenuItemChangeValue_Click(object sender, EventArgs e)
        {
            // Skip, if the Dispose() method has been called.
            if (IsDisposed)
            {
                return;
            }

            FormPTU clientAsFormPTU = ClientForm as FormPTU;

            if (clientAsFormPTU != null)
            {
                try
                {
                    FormChangeBitmask formChangeBitmask = new FormChangeBitmask(this);
                    formChangeBitmask.CalledFrom = m_ClientForm;
                    formChangeBitmask.ShowDialog();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message, Resources.MBCaptionInformation, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Event handler for the 'Change Value' context menu option <c>Click</c> event. If applicable, shows the form which allows the user to change the value of the 
        /// enumerator watch variable.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Parameter passed from the object that raised the event.</param>
        private void m_MenuItemChangeValue_Click(object sender, EventArgs e)
        {
            // Skip, if the Dispose() method has been called.
            if (IsDisposed)
            {
                return;
            }

            FormPTU clientAsFormPTU = ClientForm as FormPTU;
            if (clientAsFormPTU != null)
            {
                try
                {
                    FormChangeBitmask formChangeBitmask = new FormChangeBitmask(this);
                    formChangeBitmask.CalledFrom = m_ClientForm;
                    formChangeBitmask.ShowDialog();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message, Resources.MBCaptionInformation, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }