public void ponistiVezu(int redBroj) { if (vezba.isDeoVeze(redBroj)) { if (vezba.raskiniVezu(redBroj)) { modified = true; view.updateVezaColumn(); view.updateGridFooter(); } } }
private void drawVezaItemColumn(Graphics g) { for (int row = 0; row < vezba.Elementi.Count; row++) { if (!vezba.isDeoVeze(row + 1)) { RectangleF rect = getItemCellRect(g, row, "VezaSaPrethodnim"); g.DrawRectangle(itemPen, rect.X, rect.Y, rect.Width, rect.Height); } } List <int> veze = vezba.getVeze(); for (int i = 0; i < veze.Count / 2; i++) { int firstElement = veze[2 * i]; int lastElement = veze[2 * i + 1]; float veza = vezba.Elementi[lastElement].VezaSaPrethodnim.Value; RectangleF firstRect = getItemCellRect(g, firstElement, "VezaSaPrethodnim"); RectangleF lastRect = getItemCellRect(g, lastElement, "VezaSaPrethodnim"); RectangleF rect = new RectangleF(firstRect.Location, new SizeF(firstRect.Width, lastRect.Bottom - firstRect.Top)); g.DrawRectangle(itemPen, rect.X, rect.Y, rect.Width, rect.Height); string text = veza.ToString(getColumnFormatString("VezaSaPrethodnim")); StringFormat sf = getItemStringFormat("VezaSaPrethodnim"); g.DrawString(text, tableItemFont, blackBrush, rect, sf); } }