Ejemplo n.º 1
0
        public async void Action()
        {
            try
            {
                ApplyButton.Enabled = false;
                Model.Update();
                File.Copy(FromPath, ToPath, true);
                File.Copy(FromPath.Replace(".dll", ".pdb"), ToPath.Replace(".dll", ".pdb"), true);
                await Task.Delay(100);

                ApplyButton.BackColor = Color.LightGreen;
                Model.Update();
                await Task.Delay(200);
            }
            finally
            {
                ApplyButton.ResetBackColor();
                ApplyButton.Enabled = true;
                Model.Update();
            }
        }