private void setMostrar(string persona, string estado, string Hora) { MyDelegado MD = new MyDelegado(MostraMensajeEstado); this.Invoke(MD, new object[] { estado }); MyDelegado MD2 = new MyDelegado(MostraMensajeNombre); this.Invoke(MD2, new object[] { persona }); MyDelegado MD3 = new MyDelegado(MostraMensajeHora); this.Invoke(MD3, new object[] { Hora }); MyDelegado MD4 = new MyDelegado(MostraMensajeFoto); this.Invoke(MD4, new object[] { "" }); MyDelegado MD5 = new MyDelegado(iniciarTimerBorrado); this.Invoke(MD5, new object[] { "" }); MyDelegado MD6 = new MyDelegado(MostrarUltimosEventos); this.Invoke(MD6, new object[] { "" }); }
public string GetLastName() { Field = this.CualquierCosa; MyDelegado field2 = this.CualquierCosa; MyDelegado2 field3 = this.CualquierCosa2; this.EventField += this.CualquierCosa; this.EventField += this.CualquierCosa; this.EventField(1); field3(1)(2); field2(1); return("LastNAme"); }
private void Tool_ProgressChanged(int progress) { if (progressBarDir.InvokeRequired) { MyDelegado MD = new MyDelegado(Mostrar); //progressBarDir.Invoke(MD, new object[] { progress }); try { BeginInvoke((Action) delegate { if (progress <= progressBarDir.Maximum) { progressBarDir.Value = progress; } LblContador.Text = "Registros Leidos = " + progressBarDir.Value.ToString(); LblTotal.Text = "Registros Total = " + progressBarDir.Maximum.ToString(); //Application.DoEvents(); });// progressBarDir.Value++; //this.Invoke((Action)delegate { Mostrar(progress); }); } catch (Exception ex) { throw; } // progressBarDir.BeginInvoke(new Action<StatusEventArgs>(OnChangeStatus), new[] { e }); } else { if (progress <= progressBarDir.Maximum) { progressBarDir.Value = progress; } LblContador.Text = "Registros Leidos = " + progressBarDir.Value.ToString(); LblTotal.Text = "Registros Total = " + progressBarDir.Maximum.ToString(); } }