Exemple #1
0
        /// <summary>
        /// This method is called when the debugging tab is selected
        /// </summary>
        public void OnDebuggingTabSelected(string ABranchLocation)
        {
            _branchLocation = ABranchLocation;
            dataGridViewDebug.AutoResizeColumns();

            if (_branchLocation == string.Empty)
            {
                _currentDetails                  = null;
                nudClientDebugLevel.Value        = 0;
                nudServerDebugLevel.Value        = 0;
                chkLevelSetByBuildConfig.Checked = false;
                btnApplyDebugLevels.Enabled      = false;
                linkLabelResetDebugging.Enabled  = false;
                return;
            }

            this.ParentForm.Cursor = Cursors.WaitCursor;

            _currentDetails = new DebugLevelDetails(ABranchLocation);

            nudClientDebugLevel.Value        = _currentDetails.ClientDebugLevel;
            nudServerDebugLevel.Value        = _currentDetails.ServerDebugLevel;
            chkLevelSetByBuildConfig.Checked = _currentDetails.IsSetByBuildConfig;
            btnApplyDebugLevels.Enabled      = true;
            linkLabelResetDebugging.Enabled  = true;

            this.ParentForm.Cursor = Cursors.Default;
        }
Exemple #2
0
        /// <summary>
        /// This method is called when a tab other than the debugging tab is selected.  The previously selected tab could be any tab.
        /// </summary>
        public void OnDebuggingTabDeselected()
        {
            if (_currentDetails == null)
            {
                // We were not the previously selected tab.
                return;
            }

            int clientLevel = Convert.ToInt16(nudClientDebugLevel.Value);
            int serverLevel = Convert.ToInt16(nudServerDebugLevel.Value);

            if (_currentDetails.HasChanges(clientLevel, serverLevel))
            {
                if (MessageBox.Show("You have changed the debug logging settings.  Do you want to apply the changes?",
                                    Program.APP_TITLE, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    btnApplyDebugLevels_Click(null, null);
                }
            }

            _currentDetails = null;
        }