public FrmCatCambio(Principal principal) { this.principal = principal; InitializeComponent(); this.Cursor = Cursors.WaitCursor; catCambioDAO = new CategoriaCambioDAO(); SplitCatCambio.Panel1Collapsed = true; SplitCatCambio.Panel2Collapsed = false; SplitCatCambio.Refresh(); this.IsEdit = false; this.IsInsert = false; Image image = Image.FromFile(iconSystem); Bitmap bitmap = new Bitmap(image); this.Icon = Icon.FromHandle(bitmap.GetHicon()); FormUtil.Resize(principal, this); 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; image = Image.FromFile(actionUp); BtnFrmFiltro.Image = image; image = Image.FromFile(actionFilter); BtnFiltro.Image = image; BtnEdit.Enabled = true; BtnNew.Enabled = false; BtnSave.Enabled = false; BtnDelete.Enabled = false; this.principal = principal; FrmUtil = new FormUtil(principal); PopulaDados(); this.Cursor = Cursors.Default; }
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; }