public RegisterZIndex(int nX, int nY, String nId, RegisterInfo nR) : base(nX, nY, nId, "regZ_index", nR) { bodky = new [] { new ObjektBodka(-14, -ry - 8, Brushes.Red, this, 0, new BodkaInfo("data", 1, false, r.bitDlzka, false)), new ObjektBodka(6, -ry - 8, Brushes.Red, this, 1, Projekt.DATABAZA[op].vstupy[1]) }; ciary = new Ciara[2]; }
public IfBlok(int nX, int nY, int nX2, int nY2, String nId) : base(nX, nY, nId, "if") { x2 = nX2; y2 = nY2; rx = 15; dx = 2 * rx; ry = 15; dy = 2 * ry; ciary = new Ciara[1]; bodky = new [] { new ObjektBodka(-4, -ry - 8, Brushes.Red, this, 0, Projekt.DATABAZA[op].vstupy[0]) }; objekty = new List <Objekt>(); ciaroveBodky = new List <CiaraBodka>(); }
public void aktualizujVstupy() { int pocetVstupov = Projekt.DATABAZA[op].pocetVstupov(); int pocetVystupov = Projekt.DATABAZA[op].pocetVystupov(); rx = Math.Max(Math.Max(18, (10 + 8 * pocetVstupov)), 10 + 8 * pocetVystupov); dx = 2 * rx; ciary = new Ciara[pocetVstupov]; ObjektBodka[] noveBodky = new ObjektBodka[pocetVstupov + pocetVystupov]; for (int i = 0, j = -rx + 14; i < pocetVstupov && i < bodky.Length; i++, j += dx / (pocetVstupov + 1)) { noveBodky[i] = new ObjektBodka(j, -ry - 8, Brushes.Red, this, i, Projekt.DATABAZA[op].vstupy[i]); } for (int i = bodky.Length - pocetVystupov, j = pocetVstupov; i < bodky.Length; i++, j++) { noveBodky[j] = bodky[i]; noveBodky[j].id = j; } bodky = noveBodky; }
public Konst(int nX, int nY, String nId, String nOp, int nBitSirka, int nBitDlzka, String[] nValues) : base(nX, nY, nId, nOp) { bg = Brushes.Gray; rx = 15; ry = 15; dx = 30; dy = 30; bodky = new [] { new ObjektBodka(-4, ry, Brushes.Black, this, 0, Projekt.DATABAZA[op].vystupy[0]) }; setBitSirka(nBitSirka); setBitDlzka(nBitDlzka); values = new String[getBitSirka()]; for (int i = 0; i < getBitSirka(); i++) { values[i] = "0"; if (nValues != null && i < nValues.Length) { values[i] = nValues[i]; } } ciary = new Ciara[0]; }
public Operacia(int nX, int nY, String nId, String nOp) : base(nX, nY, nId, nOp) { int pocetVstupov = Projekt.DATABAZA[op].pocetVstupov(); int pocetVystupov = Projekt.DATABAZA[op].pocetVystupov(); int rxVstupy = Math.Max(18, (10 + 8 * pocetVstupov)); int rxVystupy = Math.Max(18, (10 + 8 * pocetVystupov)); rx = Math.Max(rxVstupy, rxVystupy); dx = 2 * rx; ry = 15; dy = 2 * ry; ciary = new Ciara[pocetVstupov]; bodky = new ObjektBodka[pocetVstupov + pocetVystupov]; for (int i = 0, j = -rxVstupy + 14; i < pocetVstupov; i++, j += dx / (pocetVstupov + 1)) { bodky[i] = new ObjektBodka(j, -ry - 8, Brushes.Red, this, i, Projekt.DATABAZA[op].vstupy[i]); } for (int i = pocetVstupov, j = -rxVystupy + 14; i < bodky.Length; i++, j += dx / (pocetVystupov + 1)) { bodky[i] = new ObjektBodka(j, ry, Brushes.Black, this, i, Projekt.DATABAZA[op].vystupy[i - pocetVstupov]); } }
public void nastavGraf() { if (poleBodiek == null) { poleBodiek = new List <CiaraBodka>(); } if (poleIndexov == null) { poleIndexov = new List <List <String> >(); } foreach (List <String> ciara in poleIndexov) { int idBodky = int.Parse(ciara[0]); String idObjektu = ciara[1]; Ciara c = new Ciara(objekty[idObjektu].bodky[idBodky], null, new List <CiaraBodka>()); objekty[idObjektu].ciary[idBodky] = c; objekty[idObjektu].bodky[idBodky].stav = Brushes.LawnGreen; for (int i = 2; i < ciara.Count - 2; i++) { c.cesta.Add(poleBodiek[int.Parse(ciara[i])]); poleBodiek[int.Parse(ciara[i])].ciary.Add(c); } idBodky = int.Parse(ciara[ciara.Count - 2]); idObjektu = ciara[ciara.Count - 1]; c.bodkaVystup = objekty[idObjektu].bodky[idBodky]; } foreach (Objekt o in objekty.Values) { priradObjektIfBloku(o); } foreach (CiaraBodka mb in poleBodiek) { priradCiarovuBodkuIfBloku(mb); } poleBodiek = null; poleIndexov = null; }
public RegisterZ(int nX, int nY, String nId, RegisterInfo nR) : base(nX, nY, nId, "regZ", nR) { bodky = new [] { new ObjektBodka(-4, -ry - 8, Brushes.Red, this, 0, new BodkaInfo("data", r.bitSirka, false, r.bitDlzka, false)) }; ciary = new Ciara[1]; }