private void BtnTransacao_Click(object sender, EventArgs e) { this.HideExecucao(); if (ValTransacao.Text.ToString() != "") { FrmUtil.CallTransacao(this, ValTransacao.Text.ToString()); ValTransacao.Text = ""; } else { this.exibirMessage(actionTcode, "Entrar nome de uma transação!", "E"); } ValTransacao.Focus(); }
private void ValTransacao_KeyDown(object sender, KeyEventArgs e) { this.HideExecucao(); if (e.KeyValue == 13) { if (ValTransacao.Text.ToString() != "") { FrmUtil.CallTransacao(this, ValTransacao.Text.ToString()); ValTransacao.Text = ""; } else { exibirMessage(actionTcode, "Entrar um nome de transação!", "E"); ValTransacao.Focus(); } } }
public void Principal_Load(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; MnuStrip = new MenuStrip(); FrmUtil.MenuStripDB(this, MnuStrip); this.MainMenuStrip = MnuStrip; foreach (Control ctrl in this.Controls) { if (ctrl is MdiClient) { ctrl.BackColor = Color.LightGray; } } Image image = Image.FromFile(actionTcode); btnTransacao.Image = image; Size size = ValTransacao.Size; size.Width = 120; size.Height = 20; ValTransacao.Size = size; autocomplete = new AutoCompleteStringCollection(); IList <FuncaoSubMenu> menus = FrmUtil.GetTransacoes(); for (int i = 0; i < menus.Count; i++) { autocomplete.Add(menus[i].Transacao); } ValTransacao.AutoCompleteCustomSource = autocomplete; ValTransacao.Focus(); this.Cursor = Cursors.Default; }
private void Principal_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { this.HideExecucao(); ValTransacao.Focus(); }
private void Sub_LostFocus(object sender, EventArgs e) { this.HideExecucao(); ValTransacao.Focus(); }