Beispiel #1
0
        //
        // - Constructors -
        //

        /// <summary>
        /// Default constructor.
        /// </summary>
        public HliForm()
        {
            threadStateCount[(int)ThreadState.UnStarted] = 0;
            threadStateCount[(int)ThreadState.Running]   = 0;
            threadStateCount[(int)ThreadState.Stopping]  = 0;
            threadStateCount[(int)ThreadState.Stopped]   = 0;

            this.threadStateChangeHandler = new DvtkHighLevelInterface.Thread.ThreadStateChangeHandler(this.HandleThreadStateChange);
            this.dotNetThread             = new System.Threading.Thread(new System.Threading.ThreadStart(this.ThreadEntryPoint));

            // Start the actual .Net form in a seperate thread.
            this.dotNetThread.Start();
        }
Beispiel #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="hliForm">The HLIForm instance that uses this internal form.</param>
        public HliInternalForm(HliForm hliForm)
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            this.hliForm = hliForm;

            this.threadsInThreadState[(int)ThreadState.UnStarted] = new ArrayList();
            this.threadsInThreadState[(int)ThreadState.Running]   = new ArrayList();
            this.threadsInThreadState[(int)ThreadState.Stopping]  = new ArrayList();
            this.threadsInThreadState[(int)ThreadState.Stopped]   = new ArrayList();

            this.threadStateChangeEventHandler = new Thread.ThreadStateChangeHandler(this.HandleThreadStateChangeEvent);

            // Create and start the timer.
            this.timer       = new System.Windows.Forms.Timer();
            this.timer.Tick += new EventHandler(this.PerformActions);
            Interval         = 100;
            this.timer.Start();

            this.buttonStop.Text = TEXT_STOP;
        }