예제 #1
0
        //Method that sets the properties for a new tab and it's user controls
        private void InitializeNewTab()
        {
            string  title     = "TabPage " + (tabControl1.TabCount + 1).ToString();
            TabPage myTabPage = new TabPage(title);

            tabControl1.TabPages.Add(myTabPage);
            SearchForHouseControl shc = new SearchForHouseControl();

            shc.Dock = DockStyle.Fill;
            myTabPage.Controls.Add(shc);
        }
예제 #2
0
 private void checkAll_Click(object sender, EventArgs e)
 {
     this.checkAll.Enabled  = false;
     globalProgress.Value   = 0;
     globalProgress.Minimum = 0;
     globalProgress.Maximum = tabControl1.TabPages.Count;
     for (int i = 0; i < tabControl1.TabPages.Count; i++)
     {
         SearchForHouseControl currentContro = (SearchForHouseControl)tabControl1.Controls[i].Controls[0];
         //clears subscribers from previous iterations on previous button clicks
         currentContro.ClearSubscribers();
         //subscribe to event that anounces ready local progress bars
         currentContro.ProgressBarUpdatedEvent += UpdateGlobalProgress;
         currentContro.SearchHouseThreadedMethod();
     }
 }