private void buttonOdjava_Click(object sender, EventArgs e) { try { this.Close(); LoginForma forma = new LoginForma(); forma.Show(); } catch (Exception ex) { if (ex is SystemException || ex is OleDbException || ex is NotSupportedException || ex is UnauthorizedAccessException || ex is FormatException || ex is IndexOutOfRangeException || ex is InsufficientMemoryException || ex is EntryPointNotFoundException || ex is EntryPointNotFoundException || ex is EvaluateException || ex is InvalidCastException || ex is InvalidProgramException) { MessageBox.Show(ex.Message, "Greska"); } else { MessageBox.Show(ex.Message, "Greska"); } } }
private void odjaviSeToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); LoginForma forma = new LoginForma(); forma.Show(); }