Canguro.Commands.Model.AnalysisCmd.AllowCancel C# (CSharp) Метод

AllowCancel() публичный Метод

public AllowCancel ( ) : bool
Результат bool
        public override bool AllowCancel()
        {
            if (!gettingResults || !Canguro.Model.Model.Instance.IsLocked)
                return true;

            System.Windows.Forms.DialogResult r =
                System.Windows.Forms.MessageBox.Show(
                Culture.Get("looseAnalysisQuestionStr"),
                Culture.Get("analysisResultsQuestionTitle"),
                System.Windows.Forms.MessageBoxButtons.YesNo,
                System.Windows.Forms.MessageBoxIcon.Warning,
                System.Windows.Forms.MessageBoxDefaultButton.Button2);

            if (r == System.Windows.Forms.DialogResult.Yes)
                Canguro.Model.Model.Instance.IsLocked = false;

            return (r == System.Windows.Forms.DialogResult.Yes);
        }