本文整理汇总了C#中Results.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Results.Start方法的具体用法?C# Results.Start怎么用?C# Results.Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results.Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: button1_Click
private void button1_Click(object sender, EventArgs e)
{
btnContinue.Image = Resources.ArrowRightClick;
User.Code = richTextBox1.Text.ToString();
if (User.UseLocalHost)
{
User.Results = Utilitys.Utils.ExecutePython(User.Code);
}
//StartConnection();
if(User.CodeOK)
{
if (!Utils.CheckOpenForm(resultsWND))// Check results window is not running
{
resultsWND = new Results();
resultsWND.Start();
}
else
{
resultsWND.Start();
}
//Set Next Level
if (UserHandler.User.CurrentLevel == 0)
{
MessageBox.Show(this,"CONGATS!\nAs you can see on your right is the first programm you have written.\nYou are now a programmer ! \nIt's not that difficult is it?\nWelcome to relm of programmers.....","Success!",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
// Set score
if (richTextBox1.Text.EndsWith("\n"))
{
//lbScoreValue.Text = richTextBox1.GetLineFromCharIndex(richTextBox1.TextLength + 1).ToString();
UserHandler.User.CurrentScore = richTextBox1.GetLineFromCharIndex(richTextBox1.TextLength + 1);
lbScoreValue.Text = UserHandler.User.CurrentScore.ToString();
}
else
richTextBox1.AppendText("\n");
// lbScoreValue.Text = richTextBox1.GetLineFromCharIndex(richTextBox1.TextLength).ToString();
UserHandler.User.CurrentScore += richTextBox1.GetLineFromCharIndex
(richTextBox1.TextLength);
lbScoreValue.Text = UserHandler.User.CurrentScore.ToString();
// Set Next Level
if (UserHandler.User.CurrentLevel == tuts.Count)
{
SetNextTutorial(tuts.ElementAt(tuts.Count - 1));
}
else if (UserHandler.User.CurrentLevel <= 4)
{
SetNextTutorial(tuts.ElementAt(UserHandler.User.CurrentLevel));
UserHandler.User.CurrentLevel += 1;
}
//Clear textbox
richTextBox1.Clear();
}
else if(!User.CodeOK)
{
// show error
MessageBox.Show("An error occured in your python code : \n\n"+ User.Results);
}
// SetNextTutorial(GetCurrentTutorial(UserHandler.User.CurrentLevel));
//lbLevelValue.Text = UserHandler.User.CurrentLevel.ToString();
EnableDoubleBuffering();
}