private void InvokeInicializa() { if (InvokeRequired) { InicializaCallback callback = InvokeInicializa; Invoke(callback); } else { this.moedaDAO = new MoedaDAO(); this.PopulaDados(); } }
public FrmFatorConversao(Principal principal) { InitializeComponent(); FormUtil.Resize(principal, this); this.principal = principal; Image image = Image.FromFile(iconSystem); Bitmap bitmap = new Bitmap(image); this.Icon = Icon.FromHandle(bitmap.GetHicon()); image = Image.FromFile(actionEdit); BtnEdit.Image = image; image = Image.FromFile(actionSave); BtnSave.Image = image; image = Image.FromFile(actionClose); BtnClose.Image = image; image = Image.FromFile(actionDelete); BtnDelete.Image = image; BtnEdit.Enabled = true; BtnNew.Enabled = false; BtnSave.Enabled = false; BtnDelete.Enabled = false; DataFator.Visible = false; fatorDAO = new FatorConversaoDAO(); categoriaDAO = new CategoriaCambioDAO(); moedaDAO = new MoedaDAO(); this.Cursor = Cursors.WaitCursor; this.principal.exibirExecucao("Carregando fatores de moedas..."); popula_dados = new Thread(new ThreadStart(Inicializa)); popula_dados.IsBackground = true; popula_dados.Start(); popula_dados.Join(); this.principal.HideExecucao(); this.principal = principal; fatoresEditados = new List <FatorConversao>(); fatoresInseridos = new List <FatorConversao>(); IsEdit = false; IsInsert = false; }
public MoedaRN() { dao = new MoedaDAO(); }