Beispiel #1
0
        private void RefreshGrid()
        {
            int    intColNo   = 1;
            int    _ColIndex  = 0;
            int    iCols      = 8;
            string strColName = "";

            Data_View.Columns.Clear();

            string[] arrTitle = new string[] { "表号", "次数" };

            foreach (string strTitle in arrTitle)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, strTitle);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            string[] str_Values = new string[] { "事件状态", "断相总次数", "事件记录发生时刻", "事件记录结束时刻" };
            for (int i = 0; i < iCols; i++)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, str_Values[i % 4]);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            Data_View.MergeColumnNames.Add("Column1");

            Data_View.AddSpanHeader(2, 4, "【断相】事件产生(前)信息");
            Data_View.AddSpanHeader(6, 4, "【断相】事件产生(后)信息");
        }
Beispiel #2
0
        private void RefreshGrid()
        {
            int    intColNo   = 1;
            int    _ColIndex  = 0;
            int    iCols      = 18;
            string strColName = "";


            Data_View.Columns.Clear();

            string[] arrTitle = new string[] { "表号", "   两套时区表切换时间   ", "   两套日时段切换时间   ", "   约定冻结数据模式字   ", "   当前正向有功电量   " };

            foreach (string strTitle in arrTitle)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, strTitle);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            string[] str_Values = new string[] { "运行时区", "运行时段", "时区表切换时间", "时段表切换时间", "时区切换正向有功", "时段切换正向有功" };
            for (int i = 0; i < iCols; i++)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, str_Values[i % 6]);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            Data_View.MergeColumnNames.Add("Column1");

            Data_View.AddSpanHeader(5, 6, "【切换前】信息");

            Data_View.AddSpanHeader(11, 6, "【切换后】信息");

            Data_View.AddSpanHeader(17, 6, "【恢复后】信息");
        }
Beispiel #3
0
        private void RefreshGrid()
        {
            int    intColNo   = 1;
            int    _ColIndex  = 0;
            int    iCols      = 0;
            string strColName = "";

            Data_View.Columns.Clear();

            string[] arrTitle = new string[] { " 表号 ", "结算次数", "第1结算日", "组合有功特征字", "组合无功1特征字", "组合无功2特征字" };

            foreach (string strTitle in arrTitle)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, strTitle);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            string[] str_Values = new string[] { "总", "尖", "峰", "平", "谷" };

            iCols = str_Values.Length;


            for (int i = 0; i < iCols; i++)
            {
                strColName = string.Format("Column{0}", intColNo++);
                _ColIndex  = Data_View.Columns.Add(strColName, str_Values[i % iCols]);
                Data_View.Columns[_ColIndex].Tag          = 0;
                Data_View.Columns[_ColIndex].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                Data_View.Columns[_ColIndex].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                Data_View.Columns[_ColIndex].SortMode = DataGridViewColumnSortMode.Automatic;
            }
            Data_View.MergeColumnNames.Add("Column1");

            Data_View.AddSpanHeader(6, 5, "电量信息");
        }