Beispiel #1
0
        public LoggerForm(FlashSocket socket)
        {
            InitializeComponent();

            //
            // Component initialization.
            //

            cbClasses.SelectedIndex = 0;
            cbNamespaces.SelectedIndex = 0;
            cbLogLevel.SelectedIndex = 0;

            //
            // Create necessary variables
            //
            m_logger = new FlashLogger();
            m_entries = new FlashLogEntryCollection();

            //
            // Create child windows
            //
            frmProperties = new EntryPropertiesForm();

            //
            // Set up delegation
            //
            socket.DataRecieved +=
                new FlashSocket.DataRecievedHandler(m_logger.FlashSocket_DataRecieved);
            m_logger.LogEntries.ClassAdded += new FlashLogEntryCollection.CriteriaAddedHandler(
                Log_ClassAdded);
            m_logger.LogEntries.NamespaceAdded += new FlashLogEntryCollection.CriteriaAddedHandler(
                Log_NamespaceAdded);
            m_logger.LogEntries.EntryAdded += new FlashLogEntryCollection.EntryAddedHandler(
                Log_EntryAdded);

            //
            // Set up the grid
            //
            SetupGrid();
            gridLog.Selection.FocusRowEntered +=
                new SourceGrid2.RowEventHandler(gridLog_FocusRowEntered);

            //
            // Layout variables
            //
            m_grid_delta_x = this.Width - gridLog.Width;
            m_grid_delta_y = this.Height - gridLog.Height;
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new instance of ObjectManager.
        /// </summary>
        /// <param name="socket">The socket used to communicate with Flash.</param>
        public ObjectManager(FlashSocket socket, System.Windows.Forms.Control controlForThread)
        {
            m_requests = new Hashtable();
            m_flatcache = new FlashObjectCollection();

            m_rootnode = new FlashObject("_root", FlashObject.ObjectType.MovieClip);
            m_globalnode = new FlashObject("_global", FlashObject.ObjectType.Object);

            m_flatcache.Add(m_rootnode);
            m_flatcache.Add(m_globalnode);

            m_threadcontrol = controlForThread;

            m_socket = socket;
            m_socket.DataRecieved += new FlashSocket.DataRecievedHandler(socket_DataRecieved);
        }
        public PropertyInspectorForm(FlashSocket socket)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            m_objmanager = new ObjectManager(socket, this);

            m_selectedObject = null;

            //
            // Add root tree nodes
            //
            treeObjects.Nodes.Add(m_objmanager.Root.TreeNode);
            treeObjects.Nodes.Add(m_objmanager.Global.TreeNode);

            //
            // Layout stuff
            //
            m_grid_delta_x = this.Width - gridProperties.Width;
            m_grid_delta_y = this.Height - gridProperties.Height;
            m_list_delta_y = this.Height - treeObjects.Height;

            SetupGrid();
        }
Beispiel #4
0
        public FlashDebuggerForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // Set defaults
            //
            txtPortNo.Text = DEFAULT_SOCKETPORT.ToString();

            //
            // Create necessary variables
            //
            m_flashsocket = new FlashSocket();
            m_flashsocket.ClientConnect += new FlashSocket.ClientConnectHandler(flashSocket_ClientConnect);
            m_flashsocket.ClientDisconnect += new EventHandler(flashSocket_ClientDisconnect);

            //
            // Layout variables
            //
            m_tab_delta_x = this.Width - tabSections.Width;
            m_tab_delta_y = this.Height - tabSections.Height;

            //
            // Create tabs
            //
            m_loggerform = new LoggerForm(m_flashsocket);
            tabSections.TabPages[0].Controls.Add(m_loggerform);

            m_propinspectform = new PropertyInspectorForm(m_flashsocket);
            tabSections.TabPages[1].Controls.Add(m_propinspectform);

            //
            // Set initial LED
            //
            SetLEDColour(LEDImageIndex.Red);

            //
            // User prefs
            //
            UserPreferences.Load();

            if (UserPreferences.Current.Port != 0)
                txtPortNo.Text = UserPreferences.Current.Port.ToString();

            if (UserPreferences.Current.WindowSize != System.Drawing.Rectangle.Empty)
                this.Bounds = UserPreferences.Current.WindowSize;

            //
            // Turn the socket on.
            //
            ToggleSocket();
        }