コード例 #1
0
ファイル: Host.cs プロジェクト: mattweb28/pspplayer
        public bool AskForDebugger(string message)
        {
            AskForDebuggerDelegate del = delegate
            {
                using (AttachDebuggerDialog dialog = new AttachDebuggerDialog(message))
                {
                    System.Windows.Forms.DialogResult result = dialog.ShowDialog();
                    switch (result)
                    {
                    default:
                    case System.Windows.Forms.DialogResult.Retry:
                    {
                        // Start the debugger up
                        this.AttachDebugger();
                        return(true);
                    }

                    case System.Windows.Forms.DialogResult.Ignore:
                        return(false);

                    case System.Windows.Forms.DialogResult.Cancel:
                        Environment.Exit(-2);
                        return(false);
                    }
                }
            };

            // Invoke ?
            return(del(message));
        }
コード例 #2
0
ファイル: Host.cs プロジェクト: BradFuller/pspplayer
 public bool AskForDebugger( string message )
 {
     AskForDebuggerDelegate del = delegate
     {
         using( AttachDebuggerDialog dialog = new AttachDebuggerDialog( message ) )
         {
             System.Windows.Forms.DialogResult result = dialog.ShowDialog();
             switch( result )
             {
                 default:
                 case System.Windows.Forms.DialogResult.Retry:
                     {
                         // Start the debugger up
                         this.AttachDebugger();
                         return true;
                     }
                 case System.Windows.Forms.DialogResult.Ignore:
                     return false;
                 case System.Windows.Forms.DialogResult.Cancel:
                     Environment.Exit( -2 );
                     return false;
             }
         }
     };
     // Invoke ?
     return del( message );
 }