void onUpdate(myEventArgs arg) { if (theDelegate != null) { theDelegate(arg); } }
public void saying(object sender, myEventArgs e) { if (e.choice == 3) { this.text.Text += "cat : I'm a cat\n"; } }
public void saying(object sender, myEventArgs e) { if (e.choice == 2) { this.text.Text += "dog : I'm a dog\n"; } }
protected void dynamicButton_Click(object sender, EventArgs e) { myEventArgs myEventArgs_temp = new myEventArgs(dynamicTextBox.Text); if (myEvent != null) { myEvent(this, myEventArgs_temp); } }
protected void Button1_Click1(object sender, EventArgs e) { myEventArgs myEventArgs_temp = new myEventArgs(TextBox1.Text); if (myEvent != null) { myEvent(this, myEventArgs_temp); } }
private void btn_Send_Click(object sender, EventArgs e) { //激活事件 if(MsgAction != null) { String strMsg = this.textBox1.Text; myEventArgs ev =new myEventArgs(strMsg); MsgAction(this, ev); } }
public void saying(object sender, myEventArgs e) { if (e.choice == 3) this.text.Text += "cat : I'm a cat\n"; }
public string saying(object sender, myEventArgs e) { this.word.Text += "dog: i am a dog\n"; return(""); }
public string saying(object sender, myEventArgs e) { this.word.Text += "dog : I am a Dog\n"; return ""; }
private void myFunction(object sender, myEventArgs e) { Label1.Text = "Hello, " + e.myString + " !"; }
public string saying(object sender, myEventArgs e) { this.word.Text += "Pig: I am a pig.\n"; return(""); }
public virtual void GetMouseClick(Object source, myEventArgs args) { }
/// <summary>METHOD: handles the event getting the spacebar input</summary> /// <param name="source">the object that is listening</param> /// <param name="args">sets the keys being pressed</param> public virtual void GetSpacebar(Object source, myEventArgs args) { }
/// <summary>METHOD: handles the event when no keys are being pressed</summary> /// <param name="source">the object that is listening</param> /// <param name="args">sets the keys being pressed</param> public virtual void GetKeyUp(Object source, myEventArgs args) { }
/////////////////////////////////////// UPDATE AND DRAW ///////////////////////////////////// /// <summary>METHOD: handles the event getting input</summary> /// <param name="source">the object that is listening</param> /// <param name="args">sets the keys being pressed</param> public virtual void GetInput(Object source, myEventArgs args) { }
private void ListChanged(object sender, myEventArgs e) { Console.WriteLine("This is called when the event fires. Args = {0}", e.TypeChanged); }
public string saying(object sender, myEventArgs e) { this.word.Text += "pig : I am a Pig" + "\n"; return ""; }
public string saying(object sender, myEventArgs e) { this.word.Text += "Cat: I am a cat.\n"; return(""); }
public string saying(object sender, myEventArgs e) //定义方法 { this.word.Text += "Cat: I am a cat.\n"; //修改cat的输出文字 return(""); }
public string saying(object sender, myEventArgs e) //定义方法 { this.word.Text += "Dog: I am a dog.\n"; //修改dog的输出文字 return(""); }
public string saying(object sender, myEventArgs e) { this.word.Text += "第" + e.t + "次:" + "I am Cat......." + "\n"; return(""); }
protected void OnMsgAction(object sender, myEventArgs e) { label2.Text = e.Message; }
public string saying(object sender, myEventArgs e) { this.word.Text += "dog : " + "This is Dog speaking.\n"; return ""; }
public void saying(object sender, myEventArgs e) { if (e.choice == 1) this.text.Text += "pig : I'm a pig\n"; }
public string saying(object sender, myEventArgs e) { this.word.Text += "cat : I am a Cat" + "\n"; return ""; }
public string saying(object sender, myEventArgs e) { this.word.Text += "第" + e.t + "次:" + "and this is Dog............\n"; return(""); }
public void saying(object sender, myEventArgs e) { if (e.choice == 2) this.text.Text += "dog : I'm a dog\n"; }
public string saying(object sender, myEventArgs e) { this.word.Text += e.tmpName + " : This is " + e.tmpName + " speaking.\n"; return ""; }
public string saying(object sender, myEventArgs e) { this.word.Text += "第" + e.t + "次" + "Dog: I am a dog\n"; return(""); }