Beispiel #1
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            korisnici x = null;

            try { x = ctx.korisnici.First(v => v.username == usernameInput.Text); }
            catch { MessageBox.Show("Ne postoji korisnik sa tim username."); return; }

            if (passInput.Text.Length < 8)
            {
                MessageBox.Show("Polje za šifru ne sme biti prazno i mora imati makar 8 karaktera..");
                return;
            }

            if (x != null && x.password1 == passInput.Text)
            {
                username = usernameInput.Text;
                graf     = new Grafovi(this);
                graf.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Pogresna sifra!");
                passInput.Clear();
            }
        }
Beispiel #2
0
        public double[,] traversalMatrix;                       // matrica puta

        // inicijalizacija preko parametarskog konstruktora
        public Dijkstra(Grafovi mainForm)
        {
            ucCanvas       = mainForm.ucCanvas;
            nodes          = mainForm.nodes;
            animationSpeed = mainForm.speedTrckBr.Value;
            parentMainForm = mainForm;
        }
Beispiel #3
0
        private Grafovi parentForm;                             // roditeljska forma grafovi

        // pocetna inicijalizacija
        public Platno(Grafovi parentForm)
        {
            InitializeComponent();
            this.Dock       = DockStyle.Fill;
            this.BackColor  = Color.AliceBlue;
            nodeNumber      = 0;
            numberOfNodes   = 0;
            this.parentForm = parentForm;
            reset_selected();
        }
Beispiel #4
0
        public resultsMatrices(Dijkstra dijkstraObj, int numberOfNodes, int indicator, int startNode, Grafovi PF)
        {
            InitializeComponent();

            this.parentForm      = PF;
            this.numberOfNodes   = numberOfNodes;
            this.indicatorResult = indicator;
            this.dijkstraObj     = dijkstraObj;
            this.startNode       = startNode;
            sizeOfCell           = 40;

            // odgovarajuca velicina forme i minimalna velicina forme
            ClientSize  = new Size(sizeOfCell * (numberOfNodes + 1), sizeOfCell * (numberOfNodes + 4));
            MinimumSize = new Size(200, 200);
        }
Beispiel #5
0
 public tezinaForma(Grafovi parentForm)
 {
     InitializeComponent();
     this.parentForm = parentForm;
 }