Ejemplo n.º 1
0
        /// <summary>
        /// This object has zero or more attached User Interfaces.
        /// Attach the supplied thread to all the User Interfaces that also implement the IThreadUserInterface.
        /// </summary>
        /// <param name="thread">HLI Thread</param>
        private void AttachThreadToThreadUserInterfaces(DvtkHighLevelInterface.Common.Threads.Thread thread)
        {
            foreach (Dvtk.IheActors.UserInterfaces.IActorUserInterface actorUserInterface in this._attachedUserInterfaces)
            {
                if (actorUserInterface is DvtkHighLevelInterface.Common.UserInterfaces.IThreadUserInterface)
                {
                    DvtkHighLevelInterface.Common.UserInterfaces.IThreadUserInterface threadUserInterface = actorUserInterface as DvtkHighLevelInterface.Common.UserInterfaces.IThreadUserInterface;

                    threadUserInterface.Attach(thread);
                }
            }
        }
Ejemplo n.º 2
0
        //
        // - Methods -
        //

        /// <summary>
        /// Attach to a Thread.
        /// <br></br><br></br>
        /// By doing so, this object may react to information, warning and error output events
        /// from the Thread.
        /// <br></br><br></br>
        /// Threads may not be already started when attaching.
        /// </summary>
        /// <param name="thread">The Thread to attach to.</param>
        public void Attach(Thread thread)
        {
            thread.AttachedUserInterfaces.Add(this);

            // Wait until the internal Form used has been created in a seperate thread and
            // attach the Thread to it.
            WaitForHliInternalFormConstructed();


            // When the call to WaitForHliInternalFormConstructed() is completed, the field
            // this.hliInternalForm will not change anymore, so no lock required anymore.
            this.hliInternalForm.Attach(thread);
        }
Ejemplo n.º 3
0
        //
        // - Methods -
        //
        /// <summary>
        /// Attach to a Thread.
        /// <br></br><br></br>
        /// By doing so, this object may react to information, warning and error output events
        /// from the Thread.
        /// <br></br><br></br>
        /// Threads may not be already started when attaching.
        /// </summary>
        /// <param name="thread">The Thread to attach to.</param>
        public void Attach(Thread thread)
        {
            thread.AttachedUserInterfaces.Add(this);

            // Wait until the internal Form used has been created in a seperate thread and
            // attach the Thread to it.
            WaitForHliInternalFormConstructed();

            // When the call to WaitForHliInternalFormConstructed() is completed, the field
            // this.hliInternalForm will not change anymore, so no lock required anymore.
            this.hliInternalForm.Attach(thread);
        }