Example #1
0
        public SmerFilterForm()
        {
            InitializeComponent();

            dataGridView1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
            MinimumSize          = Size;
            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView1.RowHeadersVisible   = false;
            dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            dataGridView1.MultiSelect         = false;
            dataGridView1.RowHeadersVisible   = false;
            FormBorderStyle = FormBorderStyle.Sizable;

            this.VisibleChanged       += initTabela;
            textBox1.TextChanged      += initTabela;
            textBoxIme.TextChanged    += initTabela;
            DataControllercs.onAction += ActionExcuted;
            FormClosing += Form_Closing;
            KeyPreview   = true;
            KeyDown     += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    DataManger.goToHelp("smer");
                }
            };
        }
Example #2
0
        public SmerForm(Smer smer)
        {
            DataControllercs.onAction += ActionExcuted;
            this.smer = smer;
            InitializeComponent();
            Disposed += SmerForm_Disposed;

            if (smer != null)
            {
                editAction = new EditAction(smer);

                popuniPolja();
            }
            else
            {
                isCreate  = true;
                this.smer = new Smer();
            }

            KeyPreview = true;
            KeyDown   += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    if (isCreate)
                    {
                        DataManger.goToHelp("dodavanjeSmer");
                    }
                    else
                    {
                        DataManger.goToHelp("izmenaSmer");
                    }
                }
            };
        }
Example #3
0
        public SoftwareForm(Software software)
        {
            this.software = software;

            InitializeComponent();
            this.checkBox1.CheckedChanged += CheckBox_CheckedChanged;
            this.checkBox1.Checked         = true;
            this.checkBox2.CheckedChanged += CheckBox_CheckedChanged;
            textBoxCena.Text = "0";

            if (software != null)
            {
                popuniPolja();
            }
            KeyPreview = true;
            KeyDown   += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    if (software != null)
                    {
                        DataManger.goToHelp("izmenaSoftver");
                    }
                    else
                    {
                        DataManger.goToHelp("dodavanjeSoftver");
                    }
                }
            };
        }
Example #4
0
        private void buttonSacuvaj_Click(object sender, EventArgs e)
        {
            int    rb     = 1;
            string poruka = "";

            if (predmet == null)
            {
                if (DataManger.getPredmetByID(textBoxID.Text) != null)
                {
                    poruka += "#" + rb + ": Predmet sa id-em " + textBoxID.Text + " vec postoji..\n";
                    rb++;
                }
            }
            if (textBoxID.Text.Length == 0)
            {
                poruka += "#" + rb + ": Morate uneti ID predmeta.\n";
                rb++;
            }
            if (textBoxNaziv.Text.Length == 0)
            {
                labelNaziv.ForeColor = Color.Red;
                poruka += "#" + rb + ": Morate uneti naziv predmeta.\n";
                rb++;
            }

            if (poruka.Length > 0)
            {
                DialogResult = DialogResult.None;
                MessageBox.Show(poruka, "Upozorenje", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                return;
            }

            GetAction();
        }
Example #5
0
        public UcionicaForm(Ucionica ucionica)
        {
            this.ucionica = ucionica;
            InitializeComponent();
            foreach (UcionicaAssets aset in Enum.GetValues(typeof(UcionicaAssets)))
            {
                checkedListBox1.Items.Add(new ComboValue(aset), false);
            }
            checkedListBox1.ItemCheck += CheckedListBox1_ItemCheck;


            if (ucionica != null)
            {
                popuniPolja();
            }
            popuniSoftvere();
            KeyPreview = true;
            KeyDown   += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    if (ucionica != null)
                    {
                        DataManger.goToHelp("izmenaUcionica");
                    }
                    else
                    {
                        DataManger.goToHelp("dodavanjeUcionica");
                    }
                }
            };
        }
Example #6
0
 private void popunjavanjeTabele()
 {
     foreach (Software p in DataManger.getSoftware())
     {
         string[] row = { p.ID, p.Ime, p.Proizvodjac, p.URL, p.Godina, Convert.ToString(p.Cena), p.Opis };
         dataGridView1.Rows.Add(row);
     }
 }
Example #7
0
 private void popunjavanjeTabele()
 {
     foreach (Predmet p in DataManger.getPredmetiFilterr())
     {
         string[] row = { p.ID, p.Ime, p.SmerPredmeta.ID, p.Opis, Convert.ToString(p.BrLjudi), Convert.ToString(p.BrCasova), Convert.ToString(p.BrTermina), UcionicaAssetsMethods.getDisplayNames(p.Assets) };
         dataGridView1.Rows.Add(row);
     }
 }
Example #8
0
 private void popunjavanjeTabele()
 {
     foreach (Smer p in DataManger.getSmers())
     {
         string[] row = { p.ID, p.Ime, p.DatumUvodjenja.ToString(), p.Opis };
         dataGridView1.Rows.Add(row);
     }
 }
Example #9
0
 private void popunjavanjeTabele()
 {
     foreach (Ucionica p in DataManger.ucionicaFilterisanje())
     {
         string[] row = { p.ID, p.Opis, Convert.ToString(p.BrRadnihMesta), UcionicaAssetsMethods.getDisplayNames(p.Assets) };
         dataGridView1.Rows.Add(row);
     }
 }
Example #10
0
        public Form1()
        {
            undoButtons = new List <ToolStripButton>();
            redoButtons = new List <ToolStripButton>();
            DataManger.load();


            KeyDown += shortcutKeydown;
            KeyDown += Form1_KeyDown;
            tb       = generateToolStrip();



            DataControllercs.onAction += ActionExcuted;
            KeyPreview = true;

            InitializeComponent();
            BackColor = GraphicLoader.getColorLightGray();


            Controls.Add(tb);
            initRCView();

            ClientSize   = new Size(1000, 700);
            MinimumSize  = Size;
            ResizeEnd   += Form1_ResizeEnd;
            ResizeBegin += Form1_ResizeBegin;

            uff.BackColor  = GraphicLoader.getColorLightGray();
            sff.BackColor  = GraphicLoader.getColorLightGray();
            soff.BackColor = GraphicLoader.getColorLightGray();
            pff.BackColor  = GraphicLoader.getColorLightGray();


            uff.Controls.Add(generateToolStrip());
            uff.Controls.Add(generateStatusBar());
            uff.KeyDown   += shortcutKeydown;
            uff.KeyPreview = true;

            sff.Controls.Add(generateToolStrip());
            sff.Controls.Add(generateStatusBar());
            sff.KeyDown   += shortcutKeydown;
            sff.KeyPreview = true;

            soff.Controls.Add(generateToolStrip());
            soff.Controls.Add(generateStatusBar());
            soff.KeyDown   += shortcutKeydown;
            soff.KeyPreview = true;

            pff.Controls.Add(generateToolStrip());
            pff.Controls.Add(generateStatusBar());
            pff.KeyDown   += shortcutKeydown;
            pff.KeyPreview = true;
            sStrip         = generateStatusBar();
            Controls.Add(sStrip);
        }
Example #11
0
 internal virtual void excuteAction()
 {
     if (DataControllercs.onAction != null)
     {
         DataControllercs.onAction(null, this);
     }
     if (!DataControllercs.isTutorial)
     {
         DataManger.save();
     }
 }
Example #12
0
        private void TutorialEnd()
        {
            DataManger.load();

            DataControllercs.isTutorial = false;
            form.tb.Enabled             = true;
            foreach (ToolStripItem item in form.tb.Items)
            {
                item.Enabled = true;
            }
            form.initRCView();
        }
Example #13
0
        internal override void excuteAction()
        {
            DataManger.addObject(o);
            CreateAction cAction;

            foreach (Termin t in termini)
            {
                cAction = new CreateAction(t);
                cAction.excuteAction();
            }
            base.excuteAction();
        }
Example #14
0
        private void Izmeni_Click(object sender, EventArgs e)
        {
            int             index       = dataGridView1.CurrentCell.RowIndex;
            DataGridViewRow selectedRow = dataGridView1.Rows[index];
            string          id          = selectedRow.Cells[0].Value.ToString();

            System.Diagnostics.Debug.WriteLine(id);

            Predmet     predmet = DataManger.getPredmetByID(id);
            PredmetForm f       = new PredmetForm(predmet, predmet.SmerPredmeta);

            f.ShowDialog();
            f.Dispose();
        }
Example #15
0
        // desni checkBox
        private void popuniSoftvere()
        {
            checkedListBox2.Items.Clear();
            List <UcionicaAssets> listaSistema = new List <UcionicaAssets>();

            foreach (Software s in DataManger.softverOperativanSistemFiltiriranje(OS))
            {
                bool postoji = false;
                if (ucionica != null)
                {
                    postoji = ucionica.InstalledSoftware.Contains(s);
                }
                checkedListBox2.Items.Add(s, postoji);
            }
        }
Example #16
0
 private void buttonOrisi_Click(object sender, EventArgs e)
 {
     try {
         int             index       = dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow selectedRow = dataGridView1.Rows[index];
         string          id          = selectedRow.Cells[0].Value.ToString();
         System.Diagnostics.Debug.WriteLine(id);
         //brisanje ovde
         Software     software = DataManger.GetSoftverID(id);
         DeleteAction d        = new DeleteAction(software);
         DataControllercs.addAction(d);
     }
     catch {
     }
 }
Example #17
0
 private void buttonObrisi_Click(object sender, EventArgs e)
 {
     try
     {
         int             index       = dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow selectedRow = dataGridView1.Rows[index];
         string          id          = selectedRow.Cells[0].Value.ToString();
         System.Diagnostics.Debug.WriteLine(id);
         Predmet      predmet = DataManger.getPredmetByID(id);
         DeleteAction d       = new DeleteAction(predmet);
         DataControllercs.addAction(d);
     }
     catch
     {
     }
 }
Example #18
0
        private void popuniSoftvere()
        {
            checkedListBoxSoftvera.Items.Clear();

            foreach (Software s in DataManger.softverOperativanSistemFiltiriranje(OS))
            {
                bool postoji = false;
                if (predmet != null)
                {
                    postoji = predmet.InstalledSoftware.Contains(s);
                }


                checkedListBoxSoftvera.Items.Add(s, postoji);
            }
        }
Example #19
0
 private void initPocetak()
 {
     currentLevel = Level.Pocetak;
     DataControllercs.isTutorial = true;
     DataControllercs.allowedTypes.Clear();
     DataControllercs.allowedTypes.Add(typeof(EditAction));
     DataControllercs.allowedTypes.Add(typeof(RestoreAction));
     form.tb.Enabled = false;
     DataManger.loadTut();
     form.initRCView();
     createControl("Dobrodošli u interaktivni tutorijal!\n Kako biste nastavili, pritisnite na ovaj prozorčić. ", 25);
     tc.Click += new EventHandler(delegate(Object o, EventArgs a)
     {
         nextStep();
     });
 }
Example #20
0
        // desni checkBox
        private void popuniSoftvere()
        {
            checkedListBox2.Items.Clear();
            List <UcionicaAssets> listaSistema = new List <UcionicaAssets>();

            listaSistema = uAssets.Where(x => x.Equals(UcionicaAssets.windows) || x.Equals(UcionicaAssets.linux)).ToList();

            foreach (Software s in DataManger.softverOperativanSistemFiltiriranje(listaSistema))
            {
                bool postoji = false;
                if (DataManger.UcionicaFilter != null)
                {
                    postoji = DataManger.UcionicaFilter.InstalledSoftware.Contains(s);
                }
                checkedListBox2.Items.Add(s, postoji);
            }
        }
Example #21
0
 private void buttonIzmena_Click(object sender, EventArgs e)
 {
     try
     {
         int             index       = dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow selectedRow = dataGridView1.Rows[index];
         string          id          = selectedRow.Cells[0].Value.ToString();
         System.Diagnostics.Debug.WriteLine(id);
         Software     software = DataManger.GetSoftverID(id);
         SoftwareForm f        = new SoftwareForm(software);
         f.ShowDialog();
         f.Dispose();
     }
     catch
     {
     }
 }
Example #22
0
        private void buttonSacuvaj_Click(object sender, EventArgs e)
        {
            int    rb     = 1;
            string poruka = "";

            if (software == null)
            {
                foreach (Software s in DataManger.getSoftware())
                {
                    if (s.ID.Equals(textBoxID.Text))
                    {
                        poruka += "#" + rb + ": Sofver sa id-em " + textBoxID.Text + " vec postoji..\n";
                        rb++;
                        break;
                    }
                }
            }
            if (textBoxID.Text.Length == 0)
            {
                poruka += "#" + rb + ": Morate uneti ID softvera.\n";
                rb++;
            }
            if (textBoxIme.Text.Length == 0)
            {
                labelIme.ForeColor = Color.Red;
                poruka            += "#" + rb + ": Morate uneti naziv softvera.\n";
                rb++;
            }
            if (!checkBox1.Checked && !checkBox2.Checked)
            {
                labelOS.ForeColor = Color.Red;
                poruka           += "#" + rb + ": Morate odabrati bar jedan operativni sistem.";
                rb++;
            }

            if (poruka.Length > 0)
            {
                DialogResult = DialogResult.None;
                MessageBox.Show(poruka, "Upozorenje", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                return;
            }

            GetAction();
        }
Example #23
0
        public UcionicaFilterForm()
        {
            InitializeComponent();
            dataGridView1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
            MinimumSize          = Size;
            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView1.RowHeadersVisible   = false;
            dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            dataGridView1.MultiSelect         = false;
            dataGridView1.RowHeadersVisible   = false;
            FormBorderStyle = FormBorderStyle.Sizable;


            foreach (UcionicaAssets aset in Enum.GetValues(typeof(UcionicaAssets)))
            {
                checkedListBox1.Items.Add(new ComboValue(aset), false);
            }


            this.VisibleChanged += initTabela;

            checkedListBox1.ItemCheck += CheckedListBox1_ItemCheck;



            DataControllercs.onAction += ActionExcuted;
            numericUpDownBrRadnihMesta.ValueChanged += initTabela;
            textBoxID.TextChanged += initTabela;

            checkedListBox2.ItemCheck += CheckedListBox2_ItemCheck;


            FormClosing += Form_Closing;
            KeyPreview   = true;
            KeyDown     += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    DataManger.goToHelp("ucionica");
                }
            };
        }
Example #24
0
        private void buttonIzmeni_Click(object sender, EventArgs e)
        {
            try
            {
                int             index       = dataGridView1.CurrentCell.RowIndex;
                DataGridViewRow selectedRow = dataGridView1.Rows[index];
                string          id          = selectedRow.Cells[0].Value.ToString();
                System.Diagnostics.Debug.WriteLine(id);

                Ucionica     ucionica = DataManger.GetUcionicaID(id);
                UcionicaForm uf       = new UcionicaForm(ucionica);

                uf.ShowDialog();
                uf.Dispose();
            }
            catch
            {
            }

            //brisanje ovde
        }
Example #25
0
        internal override void excuteAction()
        {
            o.Delete();
            DeleteAction deleteA;

            if (o is Smer)
            {
                Smer s = o as Smer;
                termini = DataManger.getTerminsBySmer(s);
            }
            else if (o is Predmet)
            {
                Predmet p = o as Predmet;
                termini = DataManger.getTerminsByPredmet(p);
            }
            foreach (Termin t in termini)
            {
                deleteA = new DeleteAction(t);
                deleteA.excuteAction();
            }
            base.excuteAction();
        }
Example #26
0
        public TerminForm(Nedelja nedelja, Predmet predmet, DateTime dan, Termin termin)
        {
            this.termin  = termin;
            this.predmet = predmet;
            this.nedelja = nedelja;
            InitializeComponent();
            InicijalizacijaCasovaUnos();
            InicijalizacijaUnosVremena();

            DateTime ponedeljak = (nedelja == null) ? dan : nedelja.Ponedeljak;

            dateTimePicker1.MinDate = new DateTime(ponedeljak.Year, ponedeljak.Month, dan.Day, 7, 0, 0);
            dateTimePicker1.MaxDate = new DateTime(ponedeljak.Year, ponedeljak.Month, dan.Day, 22, 0, 0);
            KeyPreview = true;
            KeyDown   += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    DataManger.goToHelp("termin");
                }
            };
        }
Example #27
0
        private void buttonSacuvaj_Click(object sender, EventArgs e)
        {
            int    rb     = 1;
            string poruka = "";

            if (isCreate)
            {
                foreach (Smer s in DataManger.getSmers())
                {
                    if (s.ID.Equals(textBoxID.Text))
                    {
                        poruka += "#" + rb + ": Smer sa id-em " + textBoxID.Text + " vec postoji..\n";
                        rb++;
                        break;
                    }
                }
            }
            if (textBoxID.Text.Length == 0)
            {
                poruka += "#" + rb + ": Morate uneti ID softvera.\n";
                rb++;
            }
            if (smer == null)
            {
                poruka += "#" + rb + ": Morate odabrati smer.\n";
                rb++;
            }

            if (poruka.Length > 0)
            {
                DialogResult = DialogResult.None;
                MessageBox.Show(poruka, "Upozorenje", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                return;
            }
            GetAction();
        }
Example #28
0
 public virtual void Delete()
 {
     DataManger.removeObject(this);
     OnDelete(new EventArgs());
 }
Example #29
0
        public PredmetForm(Predmet predmet, Smer smer)
        {
            this.smer    = smer;
            this.predmet = predmet;
            InitializeComponent();
            comboBoxSmer.SelectedValueChanged += ComboBoxSmer_SelectedIndexChanged;
            checkedListBox1.ItemCheck         += CheckedListBox1_ItemCheck;

            if (predmet != null)
            {
                popuniPolja();
                textBoxID.Enabled = false;

                comboBoxSmer.Text    = predmet.SmerPredmeta.ToString();
                comboBoxSmer.Enabled = false;
                rezimRada            = Rezim.Izmena;
            }
            else
            {
                if (smer == null)
                {
                    rezimRada = Rezim.Dodavanje;
                    foreach (Smer s in DataManger.getSmers())
                    {
                        comboBoxSmer.Items.Add(s);
                    }
                    if (comboBoxSmer.Items.Count == 0)
                    {
                        comboBoxSmer.Enabled = false;
                    }
                    else
                    {
                        comboBoxSmer.SelectedIndex = 0;
                    }
                }
                else
                {
                    rezimRada = Rezim.DodavanjeNovomSmeru;
                    comboBoxSmer.Items.Add(smer);
                    comboBoxSmer.SelectedIndex = 0;
                    comboBoxSmer.Enabled       = false;
                }
            }
            popuniOpremaBox();



            KeyPreview = true;
            KeyDown   += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.F1)
                {
                    if (rezimRada == Rezim.Dodavanje || rezimRada == Rezim.DodavanjeNovomSmeru)
                    {
                        DataManger.goToHelp("dodavanjePredmet");
                    }
                    else
                    {
                        DataManger.goToHelp("izmenaPredmet");
                    }
                }
            };
            popuniSoftvere();
        }