private void editorToolStripMenuItem_Click(object sender, EventArgs e) { try { WebClient client = new WebClient(); string access = client.DownloadString(Constants.getApiUrl() + "editor_pass_enable"); if (access.Trim() == "0") { frmEditor frm = new frmEditor(); frm.ShowDialog(); reload_database(); } else { frmEditorPassword frm = new frmEditorPassword(); frm.Show(); } } catch { MessageBox.Show("Не удалось подтвердить тип авторизации, повторите попытку.", "Order Automizer | Проверка авторизации", MessageBoxButtons.OK, MessageBoxIcon.Error); } }