Exemplo n.º 1
0
 private void yearSelection_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (yearSelection.SelectedItem.ToString().Equals(""))
     {
         return;
     }
     selectedYear        = int.Parse((string)yearSelection.SelectedItem);
     selectedFrc         = competitions[selectedYear];
     downloadFolder.Text = Directory.GetCurrentDirectory() + @"\" + selectedYear + @"\";
 }
Exemplo n.º 2
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 + @"\";
        }
Exemplo n.º 3
0
        private void yearSelection_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (yearSelection.SelectedItem.ToString().Equals(""))
            {
                return;
            }
            KeyValuePair <int, FRCYear> selected = (KeyValuePair <int, FRCYear>)yearSelection.SelectedItem;

            selectedYear        = selected.Key;
            selectedFrc         = competitions[selectedYear];
            downloadFolder.Text = Directory.GetCurrentDirectory() + @"\" + selectedYear + @"\";
        }
Exemplo n.º 4
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 + @"\";
        }