Esempio n. 1
0
        public MainWindow() : base(Gtk.WindowType.Toplevel)
        {
            Build();

            Log.buf = logs.Buffer;

            string[] ports = Serial.GetPorts();
            foreach (string port in ports)
            {
                PortsComboBox.AppendText(port);
            }
        }
Esempio n. 2
0
        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);
            }
        }