public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); Log.buf = logs.Buffer; string[] ports = Serial.GetPorts(); foreach (string port in ports) { PortsComboBox.AppendText(port); } }
protected void rescan(object sender, EventArgs e) { /* Really? */ PortsComboBox.Clear(); CellRendererText cell = new CellRendererText(); PortsComboBox.PackStart(cell, false); PortsComboBox.AddAttribute(cell, "text", 0); PortsComboBox.Model = new ListStore(typeof(string)); string[] ports = Serial.GetPorts(); foreach (string port in ports) { PortsComboBox.AppendText(port); } }