Beispiel #1
0
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Build ();

        List<string> ports = LazerTagSerial.GetSerialPorts();

        foreach (string port in ports) {
            this.comboboxentryArduinoPorts.AppendText(port);
        }

        hg = new HostGun(null, null);

        foreach (string port in ports) {
            if (hg.SetDevice(port)) {
                comboboxentryArduinoPorts.Entry.Text = port;
                buttonStartHost.Sensitive = true;
                SetTranscieverStatusImage("gtk-apply");
                break;
            }
        }

        this.ShowAll();

        hw = new HostWindow(hg);
        hw.Modal = true;
        hw.Hide();

        UpdateGameType();
    }