コード例 #1
0
        private void DoCapture(IScreenDefn screenDefn, ScreenContent content,
                               string CaptureFolderPath)
        {
            var itemReport = screenDefn.Capture(content);

            // accum capture data if post aid key is pagedown.
            if ((content.PostAidKey != null) &&
                (this.CaptureReport != null) &&
                (content.PostAidKey.Value == AidKey.RollUp))
            {
                var r2 = DataTableExt.CombineVertically(this.CaptureReport, itemReport);
                this.CaptureReport = r2;
            }
            else
            {
                this.CaptureReport = itemReport;
            }

            var htmlText = this.CaptureReport.ToHtmlTableText();

            var fileName        = screenDefn.ScreenName + "." + "html";
            var captureFilePath = System.IO.Path.Combine(CaptureFolderPath, fileName);

            System.IO.File.WriteAllText(captureFilePath, htmlText);
        }
コード例 #2
0
 //Format "Tarih" Column, set visible to true, color the odd and even lines, and allign some of the rows
 private void DataGridViewFormat(DataTable dt)
 {
     if (dt == null)
     {
         return;
     }                               //we probably got an exception from query. Do nothing.
     DataTableExt.ConvertColumnType(dt, "Tarih");
     dataGridView1.DataSource = new BindingSource(dt, null);
     dataGridView1.Visible    = true;
     DataGridLineColoring();
     DataGridLineAlignment();
 }
コード例 #3
0
ファイル: EkstreForm.cs プロジェクト: Day366/LogoExt
        //Format "Tarih" Column, set visible to true, color the odd and even lines, and allign some of the rows
        private void DataGridViewFormat(DataTable dt, int latestVadeRow, int vade)
        {
            DataTableExt.ConvertColumnType(dt, "Tarih");
            dataGridView1.DataSource = new BindingSource(dt, null);

            dataGridView1.EvenRowColoring(Color.WhiteSmoke);

            if (vade > 0)
            {
                foreach (DataGridViewRow row in dataGridView1.Rows)
                {
                    DateTime vadeDateTime = (DateTime)row.Cells[0].Value;
                    double   difference   = (DateTime.Today - vadeDateTime).TotalDays;

                    if (vadeStartRow != -1 && vadeFinishRow != -1 && row.Index <= vadeFinishRow && row.Index >= vadeStartRow)
                    {
                        if (row.Index % 2 == 0)
                        {
                            row.DefaultCellStyle.BackColor = Color.FromArgb(255, 140, 140);
                        }
                        else
                        {
                            row.DefaultCellStyle.BackColor = Color.FromArgb(255, 115, 115);
                        }
                        continue;
                    }

                    if (row.Index >= latestVadeRow)
                    {
                        if (row.Index % 2 == 0)
                        {
                            row.DefaultCellStyle.BackColor = Color.FromArgb(230, 229, 238);
                        }
                        else
                        {
                            row.DefaultCellStyle.BackColor = Color.FromArgb(216, 229, 228);
                        }
                    }
                }
                vadeStartRow  = -1;
                vadeFinishRow = -1;
            }
            DataGridLineAlignment();
            dataGridView1.SetColumnSortMode(DataGridViewColumnSortMode.NotSortable);
        }