Advertisement
ViktorSkomorokhov

Untitled

Jun 25th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. if ((ComboBox1->ItemIndex== -1) || (ComboBox2->ItemIndex== -1) || (ComboBox3->ItemIndex== -1))
  2. {
  3. MessageDlg("Выберите все три условия", mtInformation, TMsgDlgButtons() << mbOK, 0);
  4. condition=false;
  5. }
  6. else {
  7. if ((ComboBox1->ItemIndex==0) && (ComboBox2->ItemIndex==0) && (ComboBox3->ItemIndex==0) && (condition=true))
  8. {
  9. Edit1->Text=FloatToStr(speed);
  10. if (speed>74){
  11. up=speed-74;
  12. MessageDlg("Снизьте скорость на " + AnsiString(up) +" ,переключите передачу на 4" ,mtInformation, TMsgDlgButtons() << mbOK, 0);
  13.  
  14. }
  15. else if (speed<74){
  16. up=74-speed;
  17. MessageDlg("Повысьте скорость на " + AnsiString(up) + " ,переключите передачу на 4",mtInformation, TMsgDlgButtons() << mbOK, 0);
  18. }
  19. else if(speed=74)
  20. MessageDlg("Придерживайтесь данного скоростного режима",mtInformation, TMsgDlgButtons() << mbOK, 0);
  21. }
  22. if ((ComboBox1->ItemIndex==1) && (ComboBox2->ItemIndex==0) && (ComboBox3->ItemIndex==0) && (condition=true))
  23. {
  24. Edit1->Text=FloatToStr(speed);
  25. if (speed>66)
  26. MessageDlg("Снизьте скорость, переключите передачу на 4",mtInformation, TMsgDlgButtons() << mbOK, 0);
  27. else if(speed<66)
  28. MessageDlg("Повысьте скорость , переключите передачу на 4",mtInformation, TMsgDlgButtons() << mbOK, 0);
  29. else if(speed=66)
  30. MessageDlg("Придерживайтесь данного скоростного режима",mtInformation, TMsgDlgButtons() << mbOK, 0);
  31.  
  32. }
  33. if ((ComboBox1->ItemIndex==1) && (ComboBox2->ItemIndex==1) && (ComboBox3->ItemIndex==0) && (condition=true))
  34. {
  35. Edit1->Text=FloatToStr(speed);
  36. if (speed>64)
  37. MessageDlg("Снизьте скорость, переключите передачу на 4",mtInformation, TMsgDlgButtons() << mbOK, 0);
  38. else if(speed<64)
  39. MessageDlg("Повысьте скорость, переключите передачу на 4",mtInformation, TMsgDlgButtons() << mbOK, 0);
  40. else if(speed=64)
  41. MessageDlg("Придерживайтесь данного скоростного режима",mtInformation, TMsgDlgButtons() << mbOK, 0);
  42.  
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement