Esempio n. 1
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            for (int i = 0; i < this.profile_count_; ++i)
            {
                // Make a new test profile.
                TestProfile test = new TestProfile();
                this.Controls.Add(test);

                test.Command += new CommandEventHandler(handle_profile_command);
            }
        }
Esempio n. 2
0
        public override void DataBind()
        {
            // Clear the existing child controls.
            this.Controls.Clear();
            this.profile_count_ = 0;

            // Make sure the required controls are created.
            this.EnsureChildControls();

            if (this.archive_ == null)
            {
                return;
            }

            CUTS.TestArchiveBrowser browser = this.archive_.create_broswer(20);
            CUTS.TestProfile[]      profiles;

            while (!browser.done)
            {
                // Get the next set of profiles.
                browser.get_next(out profiles);

                foreach (CUTS.TestProfile profile in profiles)
                {
                    // Determine if this profile is open.
                    bool is_open = CUTS.Data.UUID.IsEqual(profile.uuid, this.active_test_);

                    // Create a new control for the profile.
                    TestProfile test = new TestProfile(profile, is_open);
                    this.Controls.Add(test);

                    // Initialize the control's properties.
                    test.Command += new CommandEventHandler(handle_profile_command);
                }

                // Update the number of profiles.
                this.profile_count_ += profiles.Length;
            }
        }