コード例 #1
0
ファイル: Form1.cs プロジェクト: joeytall/Terminator2.5
        private void populateGridWithMessage(string fileName)
        {
            FileName = fileName.Replace("\\", "/");
            DataTable dt = SystemMessage.SelectRecord(FileName);

            dataGrid.DataSource = dt;
            dataGrid.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            if (expanded == false)
            {
                expanded        = true;
                this.ClientSize = new System.Drawing.Size(1145, 565);
                btnExpand.Text  = expanded ? "<-" : "->";
            }
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: joeytall/Terminator2.5
        public void InitMessageGrid(string fileName = "")
        {
            if (fileName != "")
            {
                FileName = fileName.Replace("\\", "/");
            }

            DataTable dt = SystemMessage.SelectRecord(FileName);

            messageGrid.DataSource = dt;
            messageGrid.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;

            dt = SystemMessage.SelectRecord(FileName, true);
            messageGridOld.DataSource = dt;
            messageGridOld.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
        }