private void reportThisErrorToolStripMenuItem_Click( object sender, EventArgs e ) { if ( MessageBox.Show( this, "Do you want to send the error message to zeta software now?\r\n\r\nPlease note: You must be connected to the internet.", "zeta HelpDesk UpdateCopier", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2 ) == DialogResult.Yes ) { using ( new ZetaLib.Windows.Common.WaitCursor( this ) ) { ZetaUploader.Communication ws = new ZetaUploader.Communication(); ZetaUploader.SendFileInformation sendInfo = new ZetaUploader.SendFileInformation(); sendInfo.EMailSubject = "[zeta HelpDesk UpdateCopier] Error occured"; sendInfo.FileName = "ZetaHelpDeskUpdateCopierError.zip"; sendInfo.ReceiverEMailAddresses = new string[] { "*****@*****.**" }; CompressionHelper.CompressStringsInfo compressInfo = new CompressionHelper.CompressStringsInfo(); compressInfo.AddString( LogCentral.MakeTraceMessage( exception ), "ZetaHelpDeskUpdateCopierError.txt" ); compressInfo.AddString( LoggingInformation.All, "EnvironmentInfo.txt" ); sendInfo.FileContent = CompressionHelper.CompressStrings( compressInfo ); ws.SendFileEx( sendInfo ); reportThisErrorToolStripMenuItem.Enabled = false; MessageBox.Show( this, "The error message was successfully sent to zeta software. Thank you!", "zeta HelpDesk UpdateCopier", MessageBoxButtons.OK, MessageBoxIcon.Information ); } } }
/// <remarks/> public void SendFileExAsync(SendFileInformation sendInfo) { this.SendFileExAsync(sendInfo, null); }
/// <remarks/> public void SendFileExAsync(SendFileInformation sendInfo, object userState) { if ((this.SendFileExOperationCompleted == null)) { this.SendFileExOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendFileExOperationCompleted); } this.InvokeAsync("SendFileEx", new object[] { sendInfo}, this.SendFileExOperationCompleted, userState); }
public void SendFileEx(SendFileInformation sendInfo) { this.Invoke("SendFileEx", new object[] { sendInfo}); }