Provides the display of debug messages in a Flash application.
public static class DebugConsole: Object
ObjectDebugConsole
This class is the useful tool to debug in an GOA application by displaying any messages in the debug console window.
// This sample shows how to use the DebugConsole class to debug in flash application.
// It also demonstrates the main methods of this one.
using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
public class MyForm: Form
{
private Button button1,button2
,button3;
public MyForm()
{
InitializeComponent();
}
private void InitializeComponent()
{
button1= new Button();
button1.Location= new Point(15,50);
button1.Click += new EventHandler(click);
button2= new Button();
button2.Location= new Point(15,80);
button2.Click += new EventHandler(click);
button3= new Button();
button3.Location= new Point(15,110);
button3.Click += new EventHandler(click);
Controls.AddRange(new Control[]{button1,button2,button3});
// Enable to show the debug console window.
System.Windows.Forms.DebugConsole.Enable();
Debug.WriteLine("This is my message to dubug.");
}
private void click(object sender, EventArgs e)
{
Button btn = (Button)sender;
if (btn.Name == "show") DebugConsole.Show();
if (btn.Name == "hide") DebugConsole.Hide();
if (btn.Name == "clear") DebugConsole.Clear();
}
static void Main()
{
Application.Run( new MyForm() );
}
}
Namespace System.Windows.Forms Flash Library System.Windows.Forms.scl Flash Library Version 2.0.0.2118 Silverlight Library System.Windows.Forms.dll
| © 2003-2007 NETiKA Technologies. All rights reserved. |