Ejemplo n.º 1
0
        public void Load_Data(string fileName)
        {
            if (_grids == null)
            {
                return;
            }

            #region Populate From File

            var gridDataSet = new DataSet();

            gridDataSet.ReadXml(fileName);

            DataTable gridData = gridDataSet.Tables[0];

            DuctingTools.ReadGridDataFromFile(_grids, gridData);

            #endregion

            // Define colors
            _Settings.Color_ID.Clear();
            _Settings.Color_ID.Add(1, System.Drawing.Color.Green);
            _Settings.Color_ID.Add(2, System.Drawing.Color.Orange);
            _Settings.Color_ID.Add(3, System.Drawing.Color.DodgerBlue);
            _Settings.Color_ID.Add(4, System.Drawing.Color.Red);
            _Settings.Color_ID.Add(5, System.Drawing.Color.Yellow);

            RefreshGrid();
        }
        public DuctingControlForm()
        {
            InitializeComponent();
            _settings = GridControlTools.GridControl_Settings();

            var gridDataSet = new DataSet();

            gridDataSet.ReadXml(@"C:\Users\zcoertze\Desktop\Grid_Test.xml");

            DataTable gridData = gridDataSet.Tables[0];

            int[] arrCounts = DuctingTools.BlockSizes(gridData);

            textMacroRows.Text = arrCounts[0].ToString();
            textMacroCols.Text = arrCounts[1].ToString();
            textSubRows.Text   = arrCounts[2].ToString();
            textSubCols.Text   = arrCounts[3].ToString();
            textMicroRows.Text = arrCounts[4].ToString();
            textMicroCols.Text = arrCounts[5].ToString();
        }