private void textBox1_TextChanged(object sender, EventArgs e) { //this.textBox.Text = this.textBox1.Text; if (text != null) { text.Invoke(this.textBox1.Text); } }
void PrintIncomingMessage(PacketHeader header, Connection connection, string message) { string newMessage = string.Format("{1} Count:{0} ", count, message); if (OnReceiveMessage != null) { Sigal sigal = new Sigal(newMessage); OnReceiveMessage.Invoke(sigal); } count++; }
public static void ExampleSimpleDelegate() { Console.WriteLine("-------------------------------------------------------------"); Console.WriteLine("example simple delegate"); ShowText showText = PrintDateTime; showText += PrintTimeSpan; showText += PrintEnviroment; showText += PrintEnviromentCpu; Console.WriteLine($"{showText.GetInvocationList().Length}"); showText -= PrintEnviromentCpu; Console.WriteLine($"{showText.GetInvocationList().Length}"); Console.WriteLine(showText.Method); Console.WriteLine(showText.Target); showText.Invoke(); Show show = (string text) => Console.WriteLine(text); show.Invoke("Show...."); Console.WriteLine("-------------------------------------------------------------"); }
public void Invoke(PdfContentStreamProcessor processor, PdfLiteral oper, List <PdfObject> operands) { textMoveNextLine.Invoke(processor, null, new List <PdfObject>(0)); showText.Invoke(processor, null, operands); }