GOA - System.Windows.Forms.DebugConsole

DebugConsole Class


Provides the display of debug messages in a Flash application.

Definition

public static class DebugConsole: Object

Members Table

MethodDescription
ClearClears all current contents in the debug console window.
EnableEnables to view the debug console window in the runtime flash application.
EqualsOverloaded. Compares two objects to determine if they are equal. (Inherited from Object)
GetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object)
GetTypeGets the Type of the current instance. (Inherited from Object)
HideMakes the debug console window invisible.
ReferenceEqualsDetermines whether the specified Object instances are the same instance. (Inherited from Object)
ShowMakes the debug console window visible.
ToStringReturns a String that represents the current Object. (Inherited from Object)

Inheritance Hierarchy

Object
DebugConsole

Remarks

This class is the useful tool to debug in an GOA application by displaying any messages in the debug console window.

Examples

// 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.Name= "show";

          button1.Location= new Point(15,50);

          button1.Text= "Show";

          button1.Click += new EventHandler(click);

 

          button2= new Button();

          button2.Name= "hide";

          button2.Location= new Point(15,80);

          button2.Text= "Hide";

          button2.Click += new EventHandler(click);

 

          button3= new Button();

          button3.Name= "clear";

          button3.Location= new Point(15,110);

          button3.Text= "Clear";

          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() );

     }

}

Class Information

NamespaceSystem.Windows.Forms
Flash LibrarySystem.Windows.Forms.scl
Flash Library Version2.0.0.2118
Silverlight LibrarySystem.Windows.Forms.dll



© 2003-2007 NETiKA Technologies. All rights reserved.