示例#1
0
 public ViewComponentSearch(SearchComponent parent, StoreKeeperComponent component, MySqlConnection dataBase)
 {
     InitializeComponent();
     this.Dock = DockStyle.Fill;
     DataBase  = dataBase;
     Component = component;
     Parent    = parent;
     LoadData();
 }
示例#2
0
        public void AddItems(List <object> components)
        {
            foreach (Dictionary <String, Object> item in components)
            {
                StoreKeeperComponent newComponent = new StoreKeeperComponent(item);
                ViewComponentSearch  newView      = new ViewComponentSearch(this, newComponent, DataBase);

                ComponentViewDictionary.Add(newComponent, newView);

                splitContainer1.Panel2.Controls.Add(newView);
                newView.Hide();

                Console.WriteLine(newComponent);
            }

            ReloadTreeView();
        }