Example #1
0
        private void ModifyTablesForm_Load(object sender, EventArgs e)
        {
            TableExplorer.GetWholeDB(videoLib);
            List <string> tabArr = TableExplorer.GetVideoLibTableNames();

            foreach (string table in tabArr)
            {
                TabPage tab = new TabPage()
                {
                    Name = table,
                    Text = table,
                };

                tableTabControl.TabPages.Add(tab);
            }

            foreach (TabPage tab in tableTabControl.TabPages)
            {
                DataGridView dataGr = new DataGridView()
                {
                    Name       = tab.Name + "DataGridView",
                    Location   = new Point(3, 3),
                    Size       = new Size(730, 250),
                    DataSource = videoLib.Tables[tab.Name],
                };

                Button btn = new Button()
                {
                    Name     = tab.Name + "UpdateBtn",
                    Text     = "Update Table",
                    Location = new Point(20, 270),
                    Size     = new Size(110, 23),
                };
                btn.Click += updateButton_Click;

                Button btn2 = new Button()
                {
                    Name     = tab.Name + "UpdateAllhBtn",
                    Text     = "Update All Tables",
                    Location = new Point(140, 270),
                    Size     = new Size(110, 23),
                };

                btn2.Click += updateAllButton_Click;

                Button btn3 = new Button()
                {
                    Name     = tab.Name + "RefreshBtn",
                    Text     = "Refresh Tables",
                    Location = new Point(260, 270),
                    Size     = new Size(110, 23),
                };

                btn3.Click += refreshButton_Click;

                tab.Controls.AddRange(new Control[] { dataGr, btn, btn2, btn3 });
            }
        }
Example #2
0
        private void RefreshTables()
        {
            showTableBox.Items.Clear();
            var arr = TableExplorer.GetVideoLibTableNames();

            foreach (string tab in arr)
            {
                showTableBox.Items.Add(tab);
            }
        }
Example #3
0
        //----------------------------------------------------------------------------------------

        #region Fill Tables and controls

        private void DBexplorerForm_Load(object sender, EventArgs e)
        {
            TableExplorer.GetWholeDB(this.videoLib);

            var Arr = TableExplorer.GetVideoLibTableNames();

            foreach (string tab in Arr)
            {
                showTableBox.Items.Add(tab);
            }
        }