Exemplo n.º 1
0
        private async void createChangeRequestAsync(object sender, RoutedEventArgs e)
        {
            try
            {
                // Prevents creation of CR duplicates; Could make sense if a ChangeRequest has been rejected before to revisit it
                if (this.changeRequests.ContainsKey(createGitHash.Text))
                {
                    MessageBox.Show($"ChangeRequest already exists:  { createGitHash.Text }");
                    return;
                }
                string privateKey = createKey.Password;

                ChangeRequest changeRequest = new ChangeRequest(this.contractAddress);
                await changeRequest.createChangeRequestAsync(privateKey, createGitHash.Text, createAdditionalInformation.Text, UInt32.Parse(createEstimation.Text), UInt32.Parse(createCosts.Text));

                this.changeRequests.Add(createGitHash.Text, changeRequest);

                MessageBox.Show($"Created ChangeRequest:  { createGitHash.Text }");
            }
            catch (Exception ex)
            {
                Debug.Write(ex);
            }
        }