A
antidinosaur
Guest
I have some codes in the form_load event do not run. Similar problem happen in elsewhere. Please help me to take a look:
public FrmIntelligent()
{
InitializeComponent();
}
private void FrmIntelligent_Load(object sender, EventArgs e)
{
int TotalIntel = 0;
TotalIntel = CurrentCharacter.Find(x => x.ID == CurrentParty.Leader).Intrigue;
//if (CurrentCharacter.Any(x => x.Position == "议曹史"))
if(CurrentParty.Positions[3]!=0)
{
labelAdvisor.Text = "议曹史:" + CurrentCharacter.Find(x => x.ID == CurrentParty.Positions[3]).Name;
TotalIntel += CurrentCharacter.Find(x => x.Position == "议曹史").Intrigue;
}
labelIntelligent.Text = "势力谋略:" + TotalIntel;
labelSpy.Text = "可用间谍:" + CurrentParty.UnocupiedAngency(0) + "/" + CurrentParty.IntelAgency[0];
labelAssacinate.Text = "可用杀手:" + CurrentParty.UnocupiedAngency(1);
progressBarTrainAgency.Value = IntelAgencyProgress[1];
Console.WriteLine(IntelAgencyProgress[1])//This line and below in the event do not run. WHY????
if (IntelAgencyProgress[1] == -1) { comboBoxAgencyTrain.Enabled = true; }
}
private void comboBoxAgencyTrain_SelectionChangeCommitted(object sender, EventArgs e)
{
IntelAgencyProgress[0] = comboBoxAgencyTrain.SelectedIndex;
IntelAgencyProgress[1] = 0;
progressBarTrainAgency.Value = IntelAgencyProgress[1];
comboBoxAgencyTrain.Enabled = false;
}
}
The console.write is a part of my debugging. I did not see any thing comes out. The code seems stop at that point.
Continue reading...
public FrmIntelligent()
{
InitializeComponent();
}
private void FrmIntelligent_Load(object sender, EventArgs e)
{
int TotalIntel = 0;
TotalIntel = CurrentCharacter.Find(x => x.ID == CurrentParty.Leader).Intrigue;
//if (CurrentCharacter.Any(x => x.Position == "议曹史"))
if(CurrentParty.Positions[3]!=0)
{
labelAdvisor.Text = "议曹史:" + CurrentCharacter.Find(x => x.ID == CurrentParty.Positions[3]).Name;
TotalIntel += CurrentCharacter.Find(x => x.Position == "议曹史").Intrigue;
}
labelIntelligent.Text = "势力谋略:" + TotalIntel;
labelSpy.Text = "可用间谍:" + CurrentParty.UnocupiedAngency(0) + "/" + CurrentParty.IntelAgency[0];
labelAssacinate.Text = "可用杀手:" + CurrentParty.UnocupiedAngency(1);
progressBarTrainAgency.Value = IntelAgencyProgress[1];
Console.WriteLine(IntelAgencyProgress[1])//This line and below in the event do not run. WHY????
if (IntelAgencyProgress[1] == -1) { comboBoxAgencyTrain.Enabled = true; }
}
private void comboBoxAgencyTrain_SelectionChangeCommitted(object sender, EventArgs e)
{
IntelAgencyProgress[0] = comboBoxAgencyTrain.SelectedIndex;
IntelAgencyProgress[1] = 0;
progressBarTrainAgency.Value = IntelAgencyProgress[1];
comboBoxAgencyTrain.Enabled = false;
}
}
The console.write is a part of my debugging. I did not see any thing comes out. The code seems stop at that point.
Continue reading...