private async void Upload_button_Click(object sender, EventArgs e) { string Visibility = UploadVisibility_comboBox.Text; Console.WriteLine(Visibility); if (Visibility == "Public" || Visibility == "Private" || Visibility == "Unlisted") { if (ReplayList_dataGridView.SelectedRows.Count >= 1) { string FileName = (string)ReplayList_dataGridView.SelectedRows[0].Cells[3].Value; string FilePath = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\Rocket League\TAGame\Demos\" + FileName; LogAddText(Environment.NewLine + "> Uploading replay \"" + FileName + "\"..."); Upload_button.Enabled = false; UploadVisibility_comboBox.Enabled = false; await BallChasing.UploadAsync(Visibility.ToLower(), FilePath); LogAddText(Environment.NewLine + "- - - - -"); Upload_button.Enabled = true; UploadVisibility_comboBox.Enabled = true; } } }
// //BUTTONS // private async void Ping_button_Click(object sender, EventArgs e) { LogAddText(Environment.NewLine + "> Waiting for response..."); await BallChasing.PingAsync(); }