public void setLabelAndCategoryID(string name) { try { if (!(flowLayoutPanel2.VerticalScroll.Value == 0 && scrollPos != 0)) { scrollPos = flowLayoutPanel2.VerticalScroll.Value; } HomePage2.home2.Close(); HomePage2.home2 = new HomePage2(name); HomePage2.home2.Show(); if (0 == flowLayoutPanel2.VerticalScroll.Value) { HomePage2.home2.flowLayoutPanel2.VerticalScroll.Value = 0; } else { HomePage2.home2.flowLayoutPanel2.VerticalScroll.Value = scrollPos; } } catch (Exception ep) { MessageBox.Show(ep.Message); } //panel4.BringToFront(); }
public HomePage2(string catName) { home2 = this; InitializeComponent(); CategoryName = catName; //data = new DataAccess(); //us = new UserSer(); }
public HomePage2(int catID) { home2 = this; category_ID = catID; InitializeComponent(); //data = new DataAccess(); //us = new UserSer(); }
public HomePage2() { home2 = this; InitializeComponent(); //data = new DataAccess(); //us = new UserSer(); UserControlForOnlyTestPurpose.uC = userControlForOnlyTestPurpose2; }