C#??????????????????
?????chenssy ???????[ 2016/7/8 10:21:43 ] ??????????????????? C#
????Form1:
public partial class Form1 :Form
{
public int index = 0;
public string text = null;
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender?? EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
Form2 form2 = new Form2(text);
//??????Form2???Form2?и????????
form2.lb =this.listBox1;
form2.index = index;
form2.Show();
}
}
}
?????????м?????????????Form2?и??????????????????????Java??????????????Java???????????????ù????super???????????й??е??????????????C#??super??????base???????????ζ???????????Form2????????????????
????this.lb=base.listBox1;
????this.index=base.index;
????OK???????д??????????????index????????ListBox???????????????????????????????base.listBox1????????????й?????listBox1??????????????????listBox1???????????2???base.index?????????????????index?????????·????????????????this.index=base.index?????д???????????????????index?????Form2??й?????????????????????C#?е?????У????base.?????????????????????
??????????????????
???????C#????????????????????????????????????????棬???????????????????????????????????????????????????????????????????????????????????
????Form2??
//??????????string????????????
publicdelegate void MyDelegate(string text);
public partial class Form2 :Form1
{
//???????е????
public event MyDelegate MyEvent;
public Form2(string text)
{
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender?? EventArgs e)
{
//????????????????????????
MyEvent(this.textBox1.Text);
this.Close();
}
}
????Form1:
public partial class Form1 :Form
{
public int index = 0;
public string text = null;
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender?? EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
Form2 form2 = new Form2(text);
//???form2_MyEvent??????MyEvent???
form2.MyEvent += new MyDelegate(form2_MyEvent);
form2.Show();
}
}
//????
void form2_MyEvent(string text)
{
this.listBox1.Items.RemoveAt(index);
this.listBox1.Items.Insert(index?? text);
}
}
?????????????????????????????????????????????????????????м?й?????????????????????????????????£??????????á?
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細(xì)??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????