public TimPrikazForma(object o) { InitializeComponent(); ButtonEdit = btnEdit; KontrolerKI.PrikaziDetaljeTima(o); PocetnaForma.ApplyDisabledStyle(btnEdit); this.Cursor = Cursors.WaitCursor; }
internal void PopunuFormu(string id, string naziv) { txtId.Text = id; txtNaziv.Text = naziv; PocetnaForma.ApplyEnabledStyle(btnBack); PocetnaForma.ApplyEnabledStyle(btnEdit); this.Cursor = Cursors.Arrow; }
public void PrikaziRezultatePretrage(int count) { if (count > 0) { PocetnaForma.ApplyEnabledStyle(btnDetails); isBtnDetailsEnabled = true; } else { PocetnaForma.ApplyDisabledStyle(btnDetails); isBtnDetailsEnabled = false; } }
private void btnSearch_Click(object sender, EventArgs e) { string kriterijum = txtSearch.Text.Trim(); if (String.IsNullOrWhiteSpace(kriterijum)) { MessageBox.Show("Molimo unesite kriterijum pretrage!", "Neispravno polje"); listSearchResults.DataSource = null; PocetnaForma.ApplyDisabledStyle(btnDetails); isBtnDetailsEnabled = false; return; } KontrolerKI.PretraziOsoblje(kriterijum); this.Cursor = Cursors.WaitCursor; }
public void SetEnableControls(bool state) { stateEnabled = state; cbSale.Enabled = state; datePickerTerminOdDatum.Enabled = state; datePickerTerminDoDatum.Enabled = state; datePickerTerminOdVreme.Enabled = state; datePickerTerminDoVreme.Enabled = state; dgvTimovi.Enabled = state; if (state) { PocetnaForma.ApplyEnabledStyle(btnSave); this.Cursor = Cursors.Arrow; } else { PocetnaForma.ApplyDisabledStyle(btnSave); this.Cursor = Cursors.WaitCursor; } }
internal static void HandleServerEndSession() { if (Application.OpenForms.Count > 1) { for (int i = Application.OpenForms.Count - 1; i >= 0; i--) { if (Application.OpenForms[i].Name != "PocetnaForma") { Application.OpenForms[i]?.Invoke(new Action( () => { Application.OpenForms[i].Enabled = false; } )); } } } MessageBox.Show("Doslo je do prekida komunikacije sa serverom. Molimo pokusajte ponovo kasnije."); CloseOpenForms(); PocetnaForma?.Invoke(new Action(PocetnaForma.EndSession)); }
public void SetControlEnable(bool state) { isEnabled = state; txtNazivTima.Enabled = state; checkListHirurzi.Enabled = state; checkListStazisti.Enabled = state; checkListSestre.Enabled = state; checkListAnesteziolozi.Enabled = state; cbOdgovornoLice.Enabled = state; if (state) { PocetnaForma.ApplyEnabledStyle(btnSave); PocetnaForma.ApplyEnabledStyle(btnBack); this.Cursor = Cursors.Arrow; } else { PocetnaForma.ApplyDisabledStyle(btnSave); PocetnaForma.ApplyDisabledStyle(btnBack); this.Cursor = Cursors.WaitCursor; } }
public OsobljeForma() { InitializeComponent(); PocetnaForma.ApplyDisabledStyle(btnDetails); isBtnDetailsEnabled = false; }
internal void PrikaziRezultatPretrage() { PostaviDGView(); isDetailsEnabled = true; PocetnaForma.ApplyEnabledStyle(btnDetails); }
internal void NoResultDgv() { isDetailsEnabled = false; PocetnaForma.ApplyDisabledStyle(btnDetails); }
private void PocetnaOperacijaForma_Load(object sender, EventArgs e) { PocetnaForma.ApplyDisabledStyle(btnDetails); }
public KontrolerKI(PocetnaForma forma) { PocetnaForma = forma; }