public DistributionGroupTabContent(FormPropertyBag propertyBag) : base(propertyBag) { tabControl = new DistributionGroupControl(base.PropertyBag); tabControl.Dock = DockStyle.Fill; tabControl.AutoScroll = false; // ATTENTION: // the reason of loading data in page initiailzing coz that we need the UserName in propertyBag which will be // filled in with data after the controls are created. Therefore, we cannot get data we want in this ctor. this.PageInitializing += (object sender, EventArgs e) => { this.tabControl.StartLoadingData(); }; this.PageValidating += (object sender, CancelEventArgs e) => { // Putting the data here coz this method is called in UI thread base.PropertyBag.AddinData[Constants.ExtendedParam_DGs] = tabControl.GetDistributionGroupsString(); }; }
public DistributionGroupTabContent(FormPropertyBag propertyBag) : base(propertyBag) { tabControl = new DistributionGroupControl(base.PropertyBag); tabControl.Dock = DockStyle.Fill; tabControl.AutoScroll = false; // ATTENTION: // the reason of loading data in page initiailzing coz that we need the UserName in propertyBag which will be // filled in with data after the controls are created. Therefore, we cannot get data we want in this ctor. this.PageInitializing += (object sender, EventArgs e) => { this.tabControl.StartLoadingData(); }; this.PageValidating += (object sender, CancelEventArgs e) => { // Putting the data here coz this method is called in UI thread base.PropertyBag.AddinData[Constants.ExtendedParam_DGs] = tabControl.GetDistributionGroupsString(); }; }