Esempio n. 1
0
        private async void buttonNewVersion_Click(object sender, EventArgs e)
        {
            try
            {
                Client cl = listBoxClients.SelectedItem as Client;
                if (cl == null)
                {
                    MessageBox.Show("Пожалуйста выберите пользователя");
                }
                else
                {
                    await cl.NewVersion(richTextBox1.Text);

                    if (cl.isSuccefullUpdate)
                    {
                        richTextBox1.Text = "Success";
                        this.Invalidate();
                    }
                    else
                    {
                        richTextBox1.Text = "Fail ";
                        richTextBox1.AppendText(cl.exeptionString);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }