Ejemplo n.º 1
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");
                    }
                }
            };
        }
Ejemplo n.º 2
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");
                }
            };
        }
Ejemplo n.º 3
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");
                    }
                }
            };
        }
Ejemplo n.º 4
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");
                    }
                }
            };
        }
Ejemplo n.º 5
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");
                }
            };
        }
Ejemplo n.º 6
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");
                }
            };
        }
Ejemplo n.º 7
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();
        }