예제 #1
0
        public CSAUSBTool()
        {
            InitializeComponent();

            competitions[2017]          = new FRCYear(2017, FRCYear.GetWebList(2017));
            competitions[2018]          = new FRCYear(2018, FRCYear.GetWebList(2018));
            buildISOButton.Enabled      = false;
            yearSelection.SelectedIndex = 0;
            selectedFrc         = competitions[selectedYear];
            downloadFolder.Text = Directory.GetCurrentDirectory() + @"\" + selectedYear + @"\";
        }
예제 #2
0
        public CSAUSBTool(string[] args)
        {
            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
            InitializeComponent();

            if (args.Length >= 1)
            {
                Console.Out.WriteLine(args[0]);
                competitions[9999] = new FRCYear(9999, FRCYear.GetWebList(args[0]));
            }

            competitions[2019] = new FRCYear(2019, FRCYear.GetWebList(2019));
            competitions[2018] = new FRCYear(2018, FRCYear.GetWebList(2018));
            competitions[2017] = new FRCYear(2017, FRCYear.GetWebList(2017));

            buildISOButton.Enabled      = false;
            yearSelection.DataSource    = new BindingSource(competitions, null);
            yearSelection.DisplayMember = "Key";
            yearSelection.ValueMember   = "Value";
            selectedFrc = competitions[selectedYear];

            downloadFolder.Text = Directory.GetCurrentDirectory() + @"\" + selectedYear + @"\";
        }