예제 #1
0
            public override DataTable Clone()
            {
                MainDataTable cln = ((MainDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
예제 #2
0
        /// <summary>
        /// Metoda načte všechny tabulky typu <see cref="GuiGrid"/> z dodaného <see cref="GuiPanel"/> a vloží je jako nové Taby do dodaného vizuálního objektu <see cref="TabContainer"/>.
        /// Současně je ukládá do <see cref="_DataTableList"/>.
        /// </summary>
        /// <param name="guiPanel"></param>
        /// <param name="tabs"></param>
        /// <returns></returns>
        private bool _LoadDataToTabs(GuiPanel guiPanel, TabContainer tabs)
        {
            if (guiPanel == null || guiPanel.Grids.Count == 0)
            {
                return(false);
            }

            foreach (GuiGrid guiGrid in guiPanel.Grids)
            {
                GGrid gGrid = new GGrid();
                gGrid.SynchronizedTime = this.SynchronizedTime;
                gGrid.Name             = guiGrid.FullName;           // Fullname gridu slouží jako ID do konfigurace pro data o layoutu sloupců v gridu

                MainDataTable mainDataTable = this._LoadDataToMainTable(gGrid, guiGrid);
                if (mainDataTable == null)
                {
                    continue;
                }

                tabs.AddTabItem(gGrid, guiGrid.Title, guiGrid.ToolTip);

                this._GGridList.Add(gGrid);                          // Toto je seznam GRIDŮ. A v této metodě se pracuje více gridy - jedna smyčka = jeden grid
            }
            return(true);
        }
예제 #3
0
        /// <summary>
        /// Metoda načte všechny tabulky typu <see cref="GuiGrid"/> z dodaného <see cref="GuiPanel"/> a vloží je do dodaného vizuálního objektu <see cref="GGrid"/>.
        /// Současně je ukládá do <see cref="_DataTableList"/>.
        /// </summary>
        /// <param name="guiPanel"></param>
        /// <param name="gGrid"></param>
        /// <returns></returns>
        private bool _LoadDataToGrid(GuiPanel guiPanel, GGrid gGrid)
        {
            if (guiPanel == null || guiPanel.Grids.Count == 0)
            {
                return(false);
            }

            if (gGrid.SynchronizedTime == null)
            {
                gGrid.SynchronizedTime = this.SynchronizedTime;
            }

            gGrid.Name = guiPanel.FullName + "\\" + _GRID_MAIN_NAME; // Fullname gridu slouží jako ID do konfigurace pro data o layoutu sloupců v gridu
            this._GGridList.Add(gGrid);                              // Toto je seznam GRIDŮ. A v této metodě se pracuje jen s jedním gridem.

            foreach (GuiGrid guiGrid in guiPanel.Grids)
            {
                MainDataTable mainDataTable = this._LoadDataToMainTable(gGrid, guiGrid);
                if (mainDataTable == null)
                {
                    continue;
                }
            }
            return(true);
        }
예제 #4
0
 internal void InitVars()
 {
     this.tableMain = ((MainDataTable)(this.Tables["Main"]));
     if ((this.tableMain != null))
     {
         this.tableMain.InitVars();
     }
 }
예제 #5
0
 private void InitClass()
 {
     this.DataSetName        = "Settings";
     this.Prefix             = "";
     this.Namespace          = "http://tempuri.org/Settings.xsd";
     this.Locale             = new System.Globalization.CultureInfo("en-US");
     this.CaseSensitive      = false;
     this.EnforceConstraints = true;
     this.tableMain          = new MainDataTable();
     this.Tables.Add(this.tableMain);
 }
예제 #6
0
        /// <summary>
        /// Metoda vytvoří novou tabulku <see cref="MainDataTable"/> s daty dodanými v <see cref="GuiGrid"/>.
        /// Pokud data neobsahují tabulku s řádky, vrací null.
        /// Vytvořenou tabulku <see cref="MainDataTable"/> uloží do <see cref="_DataTableList"/>,
        /// do vizuálního gridu <see cref="GGrid"/> přidá tabulku s řádky z dodaného <see cref="GuiGrid"/>.
        /// Vytvořenou tabulku <see cref="MainDataTable"/> vrací.
        /// </summary>
        /// <param name="gGrid"></param>
        /// <param name="guiGrid"></param>
        /// <returns></returns>
        private MainDataTable _LoadDataToMainTable(GGrid gGrid, GuiGrid guiGrid)
        {
            MainDataTable mainDataTable = null;

            using (App.Trace.Scope(TracePriority.Priority2_Lowest, "SchedulerPanel", "LoadDataToMainTable", "", guiGrid.FullName))
                mainDataTable = new MainDataTable(this, gGrid, guiGrid);

            if (mainDataTable.TableRow == null)
            {
                return(null);
            }

            this._DataTableList.Add(mainDataTable);
            mainDataTable.AddTableToGrid(gGrid);

            return(mainDataTable);
        }
예제 #7
0
 internal MainRow(DataRowBuilder rb) :
     base(rb)
 {
     this.tableMain = ((MainDataTable)(this.Table));
 }