Example #1
0
        private void _view_TransferButtonClicked(object sender, TransferButtonClickedEventArgs e)
        {
            string message = string.Empty;

            _view.TransferSuccessful = _model.TransferFiles(out message);
            e.Message = message;
        }
        private void transferButton_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            TransferButtonClickedEventArgs args = new TransferButtonClickedEventArgs();

            if (TransferButtonClicked != null)
            {
                TransferButtonClicked(sender, args);
            }

            Cursor.Current = Cursors.Default;

            if (_transferSuccessful)
            {
                System.Media.SystemSounds.Exclamation.Play();
                MessageBox.Show(args.Message);
            }
            else
            {
                System.Media.SystemSounds.Exclamation.Play();
                MessageBox.Show(args.Message);
            }
        }