예제 #1
0
        private async void goButton_Click(object sender, EventArgs e)
        {
            try
            {
                var text = decklistTextBox.Text;
                Cards              = ProxyService.ParseImport(text);
                messageLabel.Text  = "Running";
                loadingBox.Visible = true;
                await ProxyService.RunAsync(Cards, SavePath);

                loadingBox.Visible     = false;
                messageLabel.Text      = "Finished";
                messageLabel.ForeColor = Color.Green;
            }
            catch (Exception ex)
            {
                messageLabel.Text      = $"Error";
                messageLabel.ForeColor = Color.Red;
                loadingBox.Visible     = false;
                MessageBox.Show($"Error: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Cards = null;
            }
        }