コード例 #1
0
        private void fileUpload_Completed(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                Cursor = Cursors.Default;
                buttonSubmit.Enabled = true;
                MessageBox.Show(e.Error.Message);
            }
            else
            {
                var uploader = (sender as FileTransferUpload);
                if (uploader == null)
                {
                    return;
                }

                bugServiceWse.AddAttachmentToBugAsync(submitedBugID, Path.GetFileName(uploader.LocalFilePath), string.Empty,
                                                      Guid.NewGuid());
            }
        }