OpenCores
URL https://opencores.org/ocsvn/mips32r1/mips32r1/trunk

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Software/] [xum_bootloader/] [programmer/] [win32_source/] [XumBootloader_GUI/] [Program.cs] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ayersg
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Windows.Forms;
5
using System.IO.Ports;
6
 
7
namespace XumBootloader_GUI
8
{
9
    static class Program
10
    {
11
        /// 
12
        /// The main entry point for the application.
13
        /// 
14
 
15
        public static string[] comPorts;    // List of available serial ports.
16
        [STAThread]
17
        static void Main()
18
        {
19
            Application.EnableVisualStyles();
20
            Application.SetCompatibleTextRenderingDefault(false);
21
            try
22
            {
23
                comPorts = SerialPort.GetPortNames();
24
            }
25
            catch (System.ComponentModel.Win32Exception ex)
26
            {
27
                MessageBox.Show(ex.Message);
28
                Environment.Exit(1);
29
            }
30
            Application.Run(new Form1());
31
        }
32
 
33
        /* Helper function to retrieve serial port names */
34
        public static string[] getComPortNames()
35
        {
36
            return comPorts;
37
        }
38
    }
39
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.