[Nmailserver-commits] SF.net SVN: nmailserver: [220] NMail/trunk/NMail
Brought to you by:
dframpton-oss,
tmyroadctfig
|
From: <tmy...@us...> - 2007-06-11 05:34:02
|
Revision: 220
http://svn.sourceforge.net/nmailserver/?rev=220&view=rev
Author: tmyroadctfig
Date: 2007-06-10 22:34:02 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Work on spool manager.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Message/Envelope.cs
NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
Added Paths:
-----------
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx
Removed Paths:
-------------
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
Modified: NMail/trunk/NMail/DataTypes/Message/Envelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Text;
using NMail.Helper;
@@ -94,6 +95,8 @@
/// <summary>
/// Extracted from the Message-Id header.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("Message Id")]
public string MessageId {
get {
return this.messageId;
@@ -108,6 +111,7 @@
/// <summary>
/// The value extracted from the From header field.
/// </summary>
+ [Category("Envelope")]
public string From {
get {
return this.from;
@@ -122,6 +126,7 @@
/// <summary>
/// The value extracted from the Sender header field.
/// </summary>
+ [Category("Envelope")]
public string Sender {
get {
return this.sender;
@@ -136,6 +141,7 @@
/// <summary>
/// The value extracted from the To header field.
/// </summary>
+ [Category("Envelope")]
public string To {
get {
return this.to;
@@ -151,6 +157,8 @@
/// <summary>
/// The value extracted from the In-Reply-To header field.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("In Reply To")]
public string InReplyTo {
get {
return this.inReplyTo;
@@ -166,6 +174,8 @@
/// <summary>
/// The value extracted from the Reply-To header field.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("Reply To")]
public string ReplyTo {
get {
return this.replyTo;
@@ -181,6 +191,7 @@
/// <summary>
/// The value extracted from the Bcc header field.
/// </summary>
+ [Category("Envelope")]
public string Bcc {
get {
return this.bcc;
@@ -196,6 +207,7 @@
/// <summary>
/// The value extracted from the Cc header field.
/// </summary>
+ [Category("Envelope")]
public string Cc {
get {
return this.cc;
@@ -211,6 +223,7 @@
/// <summary>
/// The value extracted from the Subject header field.
/// </summary>
+ [Category("Envelope")]
public string Subject {
get {
return this.subject;
@@ -226,6 +239,7 @@
/// <summary>
/// The value extracted from the Date header field.
/// </summary>
+ [Category("Envelope")]
public string Date {
get {
return this.date;
Modified: NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Net;
using System.Text;
@@ -55,6 +56,8 @@
/// The Id of this message in the spool.
/// </summary>
/// <remarks>This is different to the Id stored in the message headers.</remarks>
+ [Category("Spool Details")]
+ [DisplayName("Spool Message Id")]
public Guid SpoolMessageId {
get {
return this.messageId;
@@ -69,6 +72,7 @@
/// <summary>
/// True if the message has been filtered.
/// </summary>
+ [Category("Spool Details")]
public bool Filtered {
get {
return this.filtered;
@@ -83,6 +87,8 @@
/// <summary>
/// True if the message is in the progress of being delivered or filtered.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Filtering In Progress")]
public bool InProgress {
get { return inProgress; }
set { inProgress = value; }
@@ -93,6 +99,8 @@
/// <summary>
/// The address that sent this message.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Source Address")]
public IPAddress SourceAddress {
get { return sourceAddress; }
set { sourceAddress = value; }
@@ -103,6 +111,8 @@
/// <summary>
/// The reported host.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Reported Host")]
public Host ReportedHost {
get { return reportedHost; }
set { reportedHost = value; }
@@ -113,6 +123,8 @@
/// <summary>
/// The email address given as the sender during SMTP negotiations.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("SMTP Sender")]
public EmailAddress SmtpSender {
get { return smtpSender; }
set { smtpSender = value; }
@@ -123,6 +135,7 @@
/// <summary>
/// The recipients of this message still awaiting delivery.
/// </summary>
+ [Browsable(false)]
public IList<SmtpMessageRecipient> Recipients {
get {
return this.recipients;
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -25,6 +25,8 @@
using WeifenLuo.WinFormsUI.Docking;
+using NMail.Icons;
+
namespace NMail.Administration.WinForms.MailDomain {
/// <summary>
/// A simple editor for mail domains.
@@ -34,6 +36,8 @@
InitializeComponent();
this.MailDomain = new NMail.DataTypes.LocalStore.MailDomain();
+
+ this.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
}
/// <summary>
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -52,6 +52,7 @@
this.mailDomainsListView.GridLines = true;
this.mailDomainsListView.HideSelection = false;
this.mailDomainsListView.Location = new System.Drawing.Point(0, 0);
+ this.mailDomainsListView.MultiSelect = false;
this.mailDomainsListView.Name = "mailDomainsListView";
this.mailDomainsListView.Size = new System.Drawing.Size(620, 369);
this.mailDomainsListView.SmallImageList = this.imageList;
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -93,7 +93,6 @@
MailDomainEditor editor = new MailDomainEditor();
editor.TabText = "Add Mail Domain";
editor.OkButtonText = "Add";
- editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
this.mainForm.DockFloat(editor, new Size(320, 440));
// Add a handler for the editor's closing event
@@ -118,10 +117,8 @@
if (this.clickedItem != null) {
// Create a new editor and display it
MailDomainEditor editor = new MailDomainEditor();
- editor.Dock = DockStyle.Fill;
editor.TabText = "Edit Mail Domain";
editor.OkButtonText = "Update";
- editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
editor.MailDomain = this.clickedItem.MailDomain;
this.mainForm.DockFloat(editor, new Size(320, 440));
Modified: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -85,8 +85,8 @@
} else if (e.Node == servicesNode) {
this.mainForm.ShowServicesControl();
- } else if (e.Node == servicesNode) {
- this.mainForm.ShowServicesControl();
+ } else if (e.Node == spoolNode) {
+ this.mainForm.ShowSpoolControl();
} else if (e.Node == mailDomainNode) {
this.mainForm.ShowMailDomainControl();
Modified: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-11 05:34:02 UTC (rev 220)
@@ -134,6 +134,10 @@
<SubType>Designer</SubType>
<DependentUpon>SmtpSpoolManager.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Spool\SpoolMessageViewer.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>SpoolMessageViewer.cs</DependentUpon>
+ </EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
@@ -153,11 +157,11 @@
<Compile Include="Services\ServicesViewer.Designer.cs">
<DependentUpon>ServicesViewer.cs</DependentUpon>
</Compile>
- <Compile Include="Spool\SmtpMessageRecipientViewer.cs">
+ <Compile Include="Spool\SpoolMessageViewer.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="Spool\SmtpMessageRecipientViewer.Designer.cs">
- <DependentUpon>SmtpMessageRecipientViewer.cs</DependentUpon>
+ <Compile Include="Spool\SpoolMessageViewer.Designer.cs">
+ <DependentUpon>SpoolMessageViewer.cs</DependentUpon>
</Compile>
<Compile Include="Spool\SmtpSpoolManager.cs">
<SubType>UserControl</SubType>
Modified: NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -53,6 +53,7 @@
this.servicesListView.FullRowSelect = true;
this.servicesListView.GridLines = true;
this.servicesListView.Location = new System.Drawing.Point(0, 0);
+ this.servicesListView.MultiSelect = false;
this.servicesListView.Name = "servicesListView";
this.servicesListView.Size = new System.Drawing.Size(570, 384);
this.servicesListView.SmallImageList = this.imageList;
@@ -94,38 +95,38 @@
this.toolStripSeparator1,
this.refreshMenuItem});
this.servicesContextMenu.Name = "servicesContextMenu";
- this.servicesContextMenu.Size = new System.Drawing.Size(153, 120);
+ this.servicesContextMenu.Size = new System.Drawing.Size(124, 98);
//
// startMenuItem
//
this.startMenuItem.Name = "startMenuItem";
- this.startMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.startMenuItem.Size = new System.Drawing.Size(123, 22);
this.startMenuItem.Text = "Start";
this.startMenuItem.Click += new System.EventHandler(this.startMenuItem_Click);
//
// stopMenuItem
//
this.stopMenuItem.Name = "stopMenuItem";
- this.stopMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.stopMenuItem.Size = new System.Drawing.Size(123, 22);
this.stopMenuItem.Text = "Stop";
this.stopMenuItem.Click += new System.EventHandler(this.stopMenuItem_Click);
//
// restartMenuItem
//
this.restartMenuItem.Name = "restartMenuItem";
- this.restartMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.restartMenuItem.Size = new System.Drawing.Size(123, 22);
this.restartMenuItem.Text = "Restart";
this.restartMenuItem.Click += new System.EventHandler(this.restartMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6);
//
// refreshMenuItem
//
this.refreshMenuItem.Name = "refreshMenuItem";
- this.refreshMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.refreshMenuItem.Size = new System.Drawing.Size(123, 22);
this.refreshMenuItem.Text = "Refresh";
this.refreshMenuItem.Click += new System.EventHandler(this.refreshButton_Click);
//
Deleted: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -1,32 +0,0 @@
-namespace NMail.Administration.WinForms.Spool {
- partial class SmtpMessageRecipientViewer {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing) {
- if (disposing && (components != null)) {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent() {
- components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- }
-
- #endregion
- }
-}
Deleted: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace NMail.Administration.WinForms.Spool {
- public partial class SmtpMessageRecipientViewer : DockContent {
- public SmtpMessageRecipientViewer() {
- InitializeComponent();
- }
- }
-}
Modified: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -115,31 +115,10 @@
}
private void ViewEnvelopeRecipients(SpoolEnvelope envelope) {
- //// Create a new editor and display it
- //MailDomainEditor editor = new MailDomainEditor();
- //editor.Dock = DockStyle.Fill;
- //editor.TabText = "Edit Mail Domain";
- //editor.OkButtonText = "Update";
- //editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
- //editor.MailDomain = this.clickedItem.MailDomain;
- //this.mainForm.DockFloat(editor, new Size(320, 440));
-
- //// Add a handler for the editor's closing event
- //editor.FormClosing += delegate(object s, FormClosingEventArgs fea) {
-
- // if (editor.DialogResult == DialogResult.OK) {
- // // Attempt to add the mail domain
- // try {
- // NMail.Authentication.IAuthenticationToken authToken = this.mainForm.AuthenticationToken;
- // this.mainForm.RemoteAdministration.NMailServer.LocalStore.UpdateMailDomain(authToken, editor.MailDomain);
- // } catch (Exception ex) {
- // Program.ShowExceptionDialog(ex);
- // }
-
- // // Update the list of mail domains
- // refreshButton_Click(this, new EventArgs());
- // }
- //};
+ // Create a new editor and display it
+ SpoolMessageViewer viewer = new SpoolMessageViewer();
+ viewer.Envelope = envelope;
+ this.mainForm.DockFloat(viewer, new Size(600, 400));
}
private void deleteMenuItem_Click(object sender, EventArgs e) {
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -0,0 +1,176 @@
+namespace NMail.Administration.WinForms.Spool {
+ partial class SpoolMessageViewer {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent() {
+ this.bottomPanel = new System.Windows.Forms.Panel();
+ this.okButton = new System.Windows.Forms.Button();
+ this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.messageProperties = new System.Windows.Forms.PropertyGrid();
+ this.recipientsListView = new System.Windows.Forms.ListView();
+ this.recipientIdColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.addressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.mailBoxColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.hostColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.deliveryAttemptsColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.inProgressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.nextAttemptColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.bottomPanel.SuspendLayout();
+ this.mainSplitContainer.Panel1.SuspendLayout();
+ this.mainSplitContainer.Panel2.SuspendLayout();
+ this.mainSplitContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.okButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 348);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(733, 41);
+ this.bottomPanel.TabIndex = 0;
+ //
+ // okButton
+ //
+ this.okButton.Location = new System.Drawing.Point(13, 7);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(75, 23);
+ this.okButton.TabIndex = 0;
+ this.okButton.Text = "Ok";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // mainSplitContainer
+ //
+ this.mainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.mainSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.mainSplitContainer.Name = "mainSplitContainer";
+ //
+ // mainSplitContainer.Panel1
+ //
+ this.mainSplitContainer.Panel1.Controls.Add(this.messageProperties);
+ //
+ // mainSplitContainer.Panel2
+ //
+ this.mainSplitContainer.Panel2.Controls.Add(this.recipientsListView);
+ this.mainSplitContainer.Size = new System.Drawing.Size(733, 348);
+ this.mainSplitContainer.SplitterDistance = 213;
+ this.mainSplitContainer.TabIndex = 1;
+ //
+ // messageProperties
+ //
+ this.messageProperties.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.messageProperties.HelpVisible = false;
+ this.messageProperties.Location = new System.Drawing.Point(0, 0);
+ this.messageProperties.Name = "messageProperties";
+ this.messageProperties.Size = new System.Drawing.Size(213, 348);
+ this.messageProperties.TabIndex = 0;
+ //
+ // recipientsListView
+ //
+ this.recipientsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.recipientIdColumnHeader,
+ this.addressColumnHeader,
+ this.mailBoxColumnHeader,
+ this.hostColumnHeader,
+ this.deliveryAttemptsColumnHeader,
+ this.inProgressColumnHeader,
+ this.nextAttemptColumnHeader});
+ this.recipientsListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.recipientsListView.FullRowSelect = true;
+ this.recipientsListView.GridLines = true;
+ this.recipientsListView.HideSelection = false;
+ this.recipientsListView.Location = new System.Drawing.Point(0, 0);
+ this.recipientsListView.MultiSelect = false;
+ this.recipientsListView.Name = "recipientsListView";
+ this.recipientsListView.Size = new System.Drawing.Size(516, 348);
+ this.recipientsListView.TabIndex = 0;
+ this.recipientsListView.UseCompatibleStateImageBehavior = false;
+ this.recipientsListView.View = System.Windows.Forms.View.Details;
+ //
+ // recipientIdColumnHeader
+ //
+ this.recipientIdColumnHeader.Text = "Recipient Id";
+ this.recipientIdColumnHeader.Width = 37;
+ //
+ // addressColumnHeader
+ //
+ this.addressColumnHeader.Text = "Address";
+ this.addressColumnHeader.Width = 111;
+ //
+ // mailBoxColumnHeader
+ //
+ this.mailBoxColumnHeader.Text = "Mailbox";
+ this.mailBoxColumnHeader.Width = 88;
+ //
+ // hostColumnHeader
+ //
+ this.hostColumnHeader.Text = "Host";
+ this.hostColumnHeader.Width = 89;
+ //
+ // deliveryAttemptsColumnHeader
+ //
+ this.deliveryAttemptsColumnHeader.Text = "Delivery Attempts";
+ this.deliveryAttemptsColumnHeader.Width = 43;
+ //
+ // inProgressColumnHeader
+ //
+ this.inProgressColumnHeader.Text = "In Progress";
+ //
+ // nextAttemptColumnHeader
+ //
+ this.nextAttemptColumnHeader.Text = "Next Attempt";
+ this.nextAttemptColumnHeader.Width = 123;
+ //
+ // SpoolMessageViewer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(733, 389);
+ this.Controls.Add(this.mainSplitContainer);
+ this.Controls.Add(this.bottomPanel);
+ this.Name = "SpoolMessageViewer";
+ this.bottomPanel.ResumeLayout(false);
+ this.mainSplitContainer.Panel1.ResumeLayout(false);
+ this.mainSplitContainer.Panel2.ResumeLayout(false);
+ this.mainSplitContainer.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.SplitContainer mainSplitContainer;
+ private System.Windows.Forms.ListView recipientsListView;
+ private System.Windows.Forms.PropertyGrid messageProperties;
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.ColumnHeader recipientIdColumnHeader;
+ private System.Windows.Forms.ColumnHeader addressColumnHeader;
+ private System.Windows.Forms.ColumnHeader mailBoxColumnHeader;
+ private System.Windows.Forms.ColumnHeader hostColumnHeader;
+ private System.Windows.Forms.ColumnHeader deliveryAttemptsColumnHeader;
+ private System.Windows.Forms.ColumnHeader inProgressColumnHeader;
+ private System.Windows.Forms.ColumnHeader nextAttemptColumnHeader;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using WeifenLuo.WinFormsUI.Docking;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.Spool {
+ public partial class SpoolMessageViewer : DockContent {
+
+ public SpoolMessageViewer() {
+ InitializeComponent();
+
+ this.Icon = IconHelper.GetIcon("mail_generic", "actions", IconSize.s16x16);
+ }
+
+ private void envelopeUpdated() {
+ this.messageProperties.SelectedObject = this.envelope;
+
+ this.recipientsListView.Items.Clear();
+
+ foreach (SmtpMessageRecipient recipient in this.envelope.Recipients) {
+ ListViewItem item = new SmtpMessageRecipientListViewItem(recipient);
+ this.recipientsListView.Items.Add(item);
+ }
+
+ this.TabText = string.Format("Spooled Message: {0}", this.envelope.Subject);
+ }
+
+ private SpoolEnvelope envelope;
+
+ /// <summary>
+ /// The envelope for this viewer.
+ /// </summary>
+ public SpoolEnvelope Envelope {
+ get { return envelope; }
+ set {
+ envelope = value;
+ envelopeUpdated();
+ }
+ }
+
+ private void okButton_Click(object sender, EventArgs e) {
+ this.Close();
+ }
+ }
+
+ public class SmtpMessageRecipientListViewItem : ListViewItem {
+
+ public SmtpMessageRecipientListViewItem(SmtpMessageRecipient recipient) {
+ this.recipient = recipient;
+
+ this.SubItems[0] = new ListViewSubItem(this, recipient.RecipientId.ToString());
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Address.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Mailbox.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Host.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.DeliveryAttempts.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.InProgress.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.NextDeliveryAttempt.ToString()));
+ }
+
+ private SmtpMessageRecipient recipient;
+
+ public SmtpMessageRecipient Recipient {
+ get { return recipient; }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx 2007-06-11 05:34:02 UTC (rev 220)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|