Exemplo n.º 1
0
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox1.Checked == true)
     {
         ReadTextBox.AppendText(Snake.Properties.Resources.checktest);
         ReadTextBox.AppendText("Check Działa \n");
     }
     else
     {
         ReadTextBox.AppendText("A może jednak nie \n");
     }
 }
Exemplo n.º 2
0
 private void DisplayText(object s, EventArgs e)
 {
     if (ByteOfData[0] != DEL_Key)
     {
         ReadTextBox.AppendText(RxString.ToString());
         ByteCounter      = ByteCounter + Convert.ToUInt32(RxString.Length);
         labelstatus.Text = "Recived " + ByteCounter + " bytes";
     }
     else
     {
         ReadTextBox.Text = "";
         ByteCounter      = 0;
         labelstatus.Text = "Cleared !";
     }
 }
Exemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     ResultTextBox.Clear();
     ReadTextBox.Clear();
 }
Exemplo n.º 4
0
        private void DisplayText(object s, EventArgs e)
        {
            switch (RxString)
            {
            case "left":
                ReadTextBox.AppendText("W lewo \n");
                if (snake.Count < 2 || snake[0].X == snake[1].X)
                {
                    direction = 1;
                }
                break;

            case "up":
                ReadTextBox.AppendText("W gore \n");
                if (snake.Count < 2 || snake[0].Y == snake[1].Y)
                {
                    direction = 3;
                }
                break;

            case "right":
                ReadTextBox.AppendText("W prawo \n");
                if (snake.Count < 2 || snake[0].X == snake[1].X)
                {
                    direction = 2;
                }
                break;

            case "down":
                ReadTextBox.AppendText("W dol \n");
                if (snake.Count < 2 || snake[0].Y == snake[1].Y)
                {
                    direction = 0;
                }
                break;

            case "start":
                ReadTextBox.AppendText("start \n");
                StartGame();
                break;

            case "select":
                ReadTextBox.AppendText("select \n");
                PauseGame();
                break;

            case "1":
                ReadTextBox.AppendText("Kwadrat \n");
                break;

            case "2":
                ReadTextBox.AppendText("Trojkat \n");
                break;

            case "3":
                ReadTextBox.AppendText("Krzyzyk \n");
                open();
                break;

            case "4":
                ReadTextBox.AppendText("Kolo \n");
                close();
                break;

            default:
                Console.WriteLine("Default case");
                break;
            }
            //  ReadTextBox.AppendText(RxString);
        }
Exemplo n.º 5
0
 private void ReadTextBox_TextChanged(object sender, EventArgs e)
 {
     ReadTextBox.SelectionStart = ReadTextBox.Text.Length; //Set the current caret position at the end
     ReadTextBox.ScrollToCaret();                          //Now scroll it automatically
 }