private void DrawAndCheckEmpty(Graphics g, int count, int x, int y) { // проходим непечатаемые листы while (counter < count && !(bool)dataGridViewListOfDetails["Print", counter].Value) // если отжат чекбокс печати { counter++; } if (counter < count) { Technology tech = Globals.dictQwewe[(int)dataGridViewListOfDetails[0, counter].Value]; tech.Draw(g, x, y, textBoxFam.Text, textBoxBoss.Text); if (!printDocument.PrintController.IsPreview) { techListToPrint.Add(tech); } counter++; } // проходим непечатаемые листы while (counter < count && !(bool)dataGridViewListOfDetails["Print", counter].Value) // если отжат чекбокс печати { counter++; } }
private void panelDraw_Paint(object sender, PaintEventArgs e) { g.Clear(Color.White); tech.Draw(g, 0, 0, fam, boss); }