예제 #1
0
    public Form1(Hardware hw)
    {
      _up = hw.GPIO_PIN_DIGITAL[0];
      _down = hw.GPIO_PIN_DIGITAL[1];

      InitializeComponent();
    }
예제 #2
0
    private void StartForm()
    {
      // Some initial setup for the WinForm UI
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      // Start the WinForm UI. Run() returns when the form is closed.
      var hardware = new Hardware(this);
      Application.Run(new Form1(hardware));

      // When the user closes the WinForm UI, stop the emulator.
      Stop();
    }