读一把钥匙并自动继续

时间:2017-04-09 07:46:42

标签: c# .net console

我有这段代码:

var read = Convert.ToInt32(Console.ReadLine()); // Reading Integer from console
if (read == 1) // If read equals some value
{
    // Do Something
}

我希望如果我按下某个键,它会进一步移动,而无需按Enter键在控制台中确认它。感谢

1 个答案:

答案 0 :(得分:1)

您应该使用from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.relativelayout import RelativeLayout from kivy.properties import NumericProperty class TestWidget(RelativeLayout): def __init__(self, testStructTable, **kwargs): super(TestWidget, self).__init__(**kwargs) print(testStructTable) self.testStructTable = testStructTable print(self.testStructTable) class TestApp(App): def build(self): testStructTable = {'randomVal1': 1, 'testVal': 2, 'randomVal2': 3} # Issue here parsing the table like this? return TestWidget(testStructTable) if __name__ == '__main__': TestApp().run()

Console.ReadKey