Ejemplo n.º 1
0
        void Target_ErrorMessage(Target sender, ErrorMessageEventArgs args)
        {
            Manager.ShowMessages("Debug");
            Manager.AddMessage("Debug", "\r\n" + args.Message + "\r\n");
            Manager.FlashMainWindow();

            if (mTargetStatus != TargetState.Error)
            {
                MessageBox.Show(Manager.MainWindow, args.Message, "Lua Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                string result = Tilde.Framework.Controls.MessageBoxEx.Show(Manager.MainWindow, args.Message, "Lua Error", new string[] { "Break", "Continue", "Ignore" }, MessageBoxIcon.Error, "Break");
                if (result == "Continue")
                {
                    mConnectedTarget.Run(ExecutionMode.Continue);
                }
                else if (result == "Ignore")
                {
                    // Skip over any C functions on the stack to get to the top-most lua function
                    foreach (LuaStackFrame frame in mCurrentStack)
                    {
                        if (!frame.File.StartsWith("=[C]"))
                        {
                            mConnectedTarget.IgnoreError(frame.File, frame.Line);
                            break;
                        }
                    }
                    mConnectedTarget.Run(ExecutionMode.Continue);
                }
            }
        }
Ejemplo n.º 2
0
 private void realHost_ErrorMessage(ITarget sender, ErrorMessageEventArgs args)
 {
     if (mForm != null && mForm.IsHandleCreated)
     {
         mForm.BeginInvoke(new MethodInvoker(delegate()
         {
             if (this.ErrorMessage != null)
             {
                 this.ErrorMessage(this, args);
             }
         }));
     }
 }
Ejemplo n.º 3
0
        // This message is synchronous, blocking the communications thread until the user has confirmed it.
        private void OnErrorMessage(String title, String message)
        {
            ErrorMessageEventArgs args = new ErrorMessageEventArgs(title, message);

            if (mForm != null && mForm.IsHandleCreated)
            {
                mForm.Invoke(new MethodInvoker(delegate()
                {
                    if (this.ErrorMessage != null)
                    {
                        this.ErrorMessage(this, args);
                    }
                }));
            }
        }
Ejemplo n.º 4
0
		void Target_ErrorMessage(Target sender, ErrorMessageEventArgs args)
		{
			Manager.ShowMessages("Debug");
			Manager.AddMessage("Debug", "\r\n" + args.Message + "\r\n");
			Manager.FlashMainWindow();

			if (mTargetStatus != TargetState.Error)
				MessageBox.Show(Manager.MainWindow, args.Message, "Lua Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
			else
			{
				string result = Tilde.Framework.Controls.MessageBoxEx.Show(Manager.MainWindow, args.Message, "Lua Error", new string[] { "Break", "Continue", "Ignore" }, MessageBoxIcon.Error, "Break");
				if (result == "Continue")
					mConnectedTarget.Run(ExecutionMode.Continue);
				else if (result == "Ignore")
				{
					// Skip over any C functions on the stack to get to the top-most lua function
					foreach(LuaStackFrame frame in mCurrentStack)
					{
						if (!frame.File.StartsWith("=[C]"))
						{
							mConnectedTarget.IgnoreError(frame.File, frame.Line);
							break;
						}
					}
					mConnectedTarget.Run(ExecutionMode.Continue);
				}
			}
		}
Ejemplo n.º 5
0
		private void realHost_ErrorMessage(ITarget sender, ErrorMessageEventArgs args)
		{
			if (mForm != null && mForm.IsHandleCreated)
				mForm.BeginInvoke(new MethodInvoker(delegate()
				{
					if (this.ErrorMessage != null)
						this.ErrorMessage(this, args);
				}));
		}
Ejemplo n.º 6
0
		// This message is synchronous, blocking the communications thread until the user has confirmed it.
		private void OnErrorMessage(String title, String message)
		{
			ErrorMessageEventArgs args = new ErrorMessageEventArgs(title, message);
			if (mForm != null && mForm.IsHandleCreated)
				mForm.Invoke(new MethodInvoker(delegate()
				{
					if (this.ErrorMessage != null)
						this.ErrorMessage(this, args);
				}));
		}