[Nmailserver-commits] SF.net SVN: nmailserver: [196] NMail/trunk
Brought to you by:
dframpton-oss,
tmyroadctfig
|
From: <tmy...@us...> - 2007-05-12 14:19:02
|
Revision: 196
http://svn.sourceforge.net/nmailserver/?rev=196&view=rev
Author: tmyroadctfig
Date: 2007-05-12 07:18:59 -0700 (Sat, 12 May 2007)
Log Message:
-----------
Added a winforms management interface.
Modified Paths:
--------------
NMail/trunk/NMail.Server/RemoteAdministration.cs
NMail/trunk/NMail.sln
Added Paths:
-----------
NMail/trunk/NMail.Administration.WinForms/
NMail/trunk/NMail.Administration.WinForms/ConnectForm.Designer.cs
NMail/trunk/NMail.Administration.WinForms/ConnectForm.cs
NMail/trunk/NMail.Administration.WinForms/ConnectForm.resx
NMail/trunk/NMail.Administration.WinForms/MainForm.Designer.cs
NMail/trunk/NMail.Administration.WinForms/MainForm.cs
NMail/trunk/NMail.Administration.WinForms/MainForm.resx
NMail/trunk/NMail.Administration.WinForms/ManagementTree/
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.Designer.cs
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.resx
NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
NMail/trunk/NMail.Administration.WinForms/Program.cs
NMail/trunk/NMail.Administration.WinForms/Properties/
NMail/trunk/NMail.Administration.WinForms/Properties/AssemblyInfo.cs
NMail/trunk/NMail.Administration.WinForms/Properties/Resources.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Properties/Resources.resx
NMail/trunk/NMail.Administration.WinForms/Properties/Settings.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Properties/Settings.settings
NMail/trunk/NMail.Administration.WinForms/Services/
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.cs
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.resx
NMail/trunk/NMail.Icons/
NMail/trunk/NMail.Icons/IconHelper.cs
NMail/trunk/NMail.Icons/Licence.txt
NMail/trunk/NMail.Icons/NMail.Icons.csproj
NMail/trunk/NMail.Icons/Properties/
NMail/trunk/NMail.Icons/Properties/AssemblyInfo.cs
NMail/trunk/NMail.Icons/Resources/
NMail/trunk/NMail.Icons/Resources/16x16/
NMail/trunk/NMail.Icons/Resources/16x16/actions/
NMail/trunk/NMail.Icons/Resources/16x16/actions/connect_creating.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/connect_established.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/connect_no.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/folder.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/server.png
NMail/trunk/NMail.Icons/Resources/16x16/apps/
NMail/trunk/NMail.Icons/Resources/16x16/apps/nmail.png
NMail/trunk/NMail.Icons/Resources/16x16/apps/tree.png
NMail/trunk/NMail.Icons/Resources/22x22/
NMail/trunk/NMail.Icons/Resources/22x22/actions/
NMail/trunk/NMail.Icons/Resources/32x32/
NMail/trunk/NMail.Icons/Resources/32x32/actions/
NMail/trunk/NMail.Icons/Resources/32x32/actions/connect_no.png
NMail/trunk/NMail.Icons/Resources/32x32/apps/
NMail/trunk/NMail.Icons/Resources/32x32/apps/core.png
NMail/trunk/NMail.Icons/Resources/LGPL.txt
Added: NMail/trunk/NMail.Administration.WinForms/ConnectForm.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ConnectForm.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ConnectForm.Designer.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,101 @@
+namespace NMail.Administration.WinForms {
+ partial class ConnectForm {
+ /// <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 Windows Form 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.connectBtn = new System.Windows.Forms.Button();
+ this.cancelBtn = new System.Windows.Forms.Button();
+ this.mainIcon = new System.Windows.Forms.PictureBox();
+ this.hostnameTextBox = new System.Windows.Forms.TextBox();
+ ((System.ComponentModel.ISupportInitialize) (this.mainIcon)).BeginInit();
+ this.SuspendLayout();
+ //
+ // connectBtn
+ //
+ this.connectBtn.Location = new System.Drawing.Point(90, 49);
+ this.connectBtn.Name = "connectBtn";
+ this.connectBtn.Size = new System.Drawing.Size(75, 23);
+ this.connectBtn.TabIndex = 0;
+ this.connectBtn.Text = "Connect";
+ this.connectBtn.UseVisualStyleBackColor = true;
+ this.connectBtn.Click += new System.EventHandler(this.connectBtn_Click);
+ //
+ // cancelBtn
+ //
+ this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelBtn.Location = new System.Drawing.Point(171, 49);
+ this.cancelBtn.Name = "cancelBtn";
+ this.cancelBtn.Size = new System.Drawing.Size(75, 23);
+ this.cancelBtn.TabIndex = 1;
+ this.cancelBtn.Text = "Cancel";
+ this.cancelBtn.UseVisualStyleBackColor = true;
+ this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
+ //
+ // mainIcon
+ //
+ this.mainIcon.Location = new System.Drawing.Point(12, 12);
+ this.mainIcon.Name = "mainIcon";
+ this.mainIcon.Size = new System.Drawing.Size(32, 32);
+ this.mainIcon.TabIndex = 2;
+ this.mainIcon.TabStop = false;
+ //
+ // hostnameTextBox
+ //
+ this.hostnameTextBox.Location = new System.Drawing.Point(51, 23);
+ this.hostnameTextBox.Name = "hostnameTextBox";
+ this.hostnameTextBox.Size = new System.Drawing.Size(195, 20);
+ this.hostnameTextBox.TabIndex = 3;
+ this.hostnameTextBox.Text = "localhost";
+ //
+ // ConnectForm
+ //
+ this.AcceptButton = this.connectBtn;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.cancelBtn;
+ this.ClientSize = new System.Drawing.Size(256, 82);
+ this.ControlBox = false;
+ this.Controls.Add(this.hostnameTextBox);
+ this.Controls.Add(this.mainIcon);
+ this.Controls.Add(this.cancelBtn);
+ this.Controls.Add(this.connectBtn);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "ConnectForm";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Connect to a server";
+ ((System.ComponentModel.ISupportInitialize) (this.mainIcon)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button connectBtn;
+ private System.Windows.Forms.Button cancelBtn;
+ private System.Windows.Forms.PictureBox mainIcon;
+ private System.Windows.Forms.TextBox hostnameTextBox;
+ }
+}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/ConnectForm.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ConnectForm.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ConnectForm.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms {
+ /// <summary>
+ /// A form prompting the user for connection details.
+ /// </summary>
+ public partial class ConnectForm : Form {
+ public ConnectForm() {
+ InitializeComponent();
+
+ this.mainIcon.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s32x32);
+ }
+
+ /// <summary>
+ /// The hostname the user selected.
+ /// </summary>
+ public string Hostname {
+ get { return this.hostnameTextBox.Text; }
+ set { this.hostnameTextBox.Text = value; }
+ }
+
+ private void connectBtn_Click(object sender, EventArgs e) {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void cancelBtn_Click(object sender, EventArgs e) {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+ }
+}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/ConnectForm.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ConnectForm.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ConnectForm.resx 2007-05-12 14:18:59 UTC (rev 196)
@@ -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
Added: NMail/trunk/NMail.Administration.WinForms/MainForm.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MainForm.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/MainForm.Designer.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,177 @@
+namespace NMail.Administration.WinForms {
+ partial class MainForm {
+ /// <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 Windows Form 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.menuStrip = new System.Windows.Forms.MenuStrip();
+ this.fileMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.connectMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.exitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.statusStrip = new System.Windows.Forms.StatusStrip();
+ this.serverNameLbl = new System.Windows.Forms.ToolStripStatusLabel();
+ this.connectionStatusLbl = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripContainer = new System.Windows.Forms.ToolStripContainer();
+ this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
+ this.disconnectMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.menuStrip.SuspendLayout();
+ this.statusStrip.SuspendLayout();
+ this.toolStripContainer.ContentPanel.SuspendLayout();
+ this.toolStripContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // menuStrip
+ //
+ this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileMenu});
+ this.menuStrip.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip.Name = "menuStrip";
+ this.menuStrip.Size = new System.Drawing.Size(715, 24);
+ this.menuStrip.TabIndex = 0;
+ this.menuStrip.Text = "menuStrip1";
+ //
+ // fileMenu
+ //
+ this.fileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.connectMenuItem,
+ this.disconnectMenuItem,
+ this.toolStripSeparator1,
+ this.exitMenuItem});
+ this.fileMenu.Name = "fileMenu";
+ this.fileMenu.Size = new System.Drawing.Size(35, 20);
+ this.fileMenu.Text = "File";
+ //
+ // connectMenuItem
+ //
+ this.connectMenuItem.Name = "connectMenuItem";
+ this.connectMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.connectMenuItem.Text = "Connect";
+ this.connectMenuItem.Click += new System.EventHandler(this.connectMenuItem_Click);
+ //
+ // exitMenuItem
+ //
+ this.exitMenuItem.Name = "exitMenuItem";
+ this.exitMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.exitMenuItem.Text = "Exit";
+ this.exitMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click);
+ //
+ // statusStrip
+ //
+ this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.serverNameLbl,
+ this.connectionStatusLbl});
+ this.statusStrip.Location = new System.Drawing.Point(0, 495);
+ this.statusStrip.Name = "statusStrip";
+ this.statusStrip.Size = new System.Drawing.Size(715, 22);
+ this.statusStrip.TabIndex = 1;
+ this.statusStrip.Text = "statusStrip1";
+ //
+ // serverNameLbl
+ //
+ this.serverNameLbl.Name = "serverNameLbl";
+ this.serverNameLbl.Size = new System.Drawing.Size(0, 17);
+ //
+ // connectionStatusLbl
+ //
+ this.connectionStatusLbl.Name = "connectionStatusLbl";
+ this.connectionStatusLbl.Size = new System.Drawing.Size(71, 17);
+ this.connectionStatusLbl.Text = "Disconnected";
+ //
+ // toolStripContainer
+ //
+ //
+ // toolStripContainer.ContentPanel
+ //
+ this.toolStripContainer.ContentPanel.Controls.Add(this.dockPanel);
+ this.toolStripContainer.ContentPanel.Size = new System.Drawing.Size(715, 446);
+ this.toolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.toolStripContainer.Location = new System.Drawing.Point(0, 24);
+ this.toolStripContainer.Name = "toolStripContainer";
+ this.toolStripContainer.Size = new System.Drawing.Size(715, 471);
+ this.toolStripContainer.TabIndex = 2;
+ this.toolStripContainer.Text = "toolStripContainer1";
+ //
+ // dockPanel
+ //
+ this.dockPanel.ActiveAutoHideContent = null;
+ this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dockPanel.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingWindow;
+ this.dockPanel.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
+ this.dockPanel.Location = new System.Drawing.Point(0, 0);
+ this.dockPanel.Name = "dockPanel";
+ this.dockPanel.Size = new System.Drawing.Size(715, 446);
+ this.dockPanel.TabIndex = 0;
+ //
+ // disconnectMenuItem
+ //
+ this.disconnectMenuItem.Name = "disconnectMenuItem";
+ this.disconnectMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.disconnectMenuItem.Text = "Disconnect";
+ this.disconnectMenuItem.Click += new System.EventHandler(this.disconnectMenuItem_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(715, 517);
+ this.Controls.Add(this.toolStripContainer);
+ this.Controls.Add(this.statusStrip);
+ this.Controls.Add(this.menuStrip);
+ this.IsMdiContainer = true;
+ this.MainMenuStrip = this.menuStrip;
+ this.MinimumSize = new System.Drawing.Size(200, 200);
+ this.Name = "MainForm";
+ this.Text = "NMail Administration";
+ this.menuStrip.ResumeLayout(false);
+ this.menuStrip.PerformLayout();
+ this.statusStrip.ResumeLayout(false);
+ this.statusStrip.PerformLayout();
+ this.toolStripContainer.ContentPanel.ResumeLayout(false);
+ this.toolStripContainer.ResumeLayout(false);
+ this.toolStripContainer.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.MenuStrip menuStrip;
+ private System.Windows.Forms.ToolStripMenuItem fileMenu;
+ private System.Windows.Forms.ToolStripMenuItem exitMenuItem;
+ private System.Windows.Forms.StatusStrip statusStrip;
+ private System.Windows.Forms.ToolStripContainer toolStripContainer;
+ private System.Windows.Forms.ToolStripStatusLabel serverNameLbl;
+ private System.Windows.Forms.ToolStripStatusLabel connectionStatusLbl;
+ private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
+ private System.Windows.Forms.ToolStripMenuItem connectMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem disconnectMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ }
+}
+
Added: NMail/trunk/NMail.Administration.WinForms/MainForm.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MainForm.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,148 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+using System.Runtime.Serialization.Formatters;
+using System.Text;
+using System.Threading;
+using System.Windows.Forms;
+
+using log4net;
+using WeifenLuo.WinFormsUI.Docking;
+
+using NMail.Icons;
+using NMail.Server;
+
+namespace NMail.Administration.WinForms {
+ public partial class MainForm : Form {
+ /// <summary>
+ /// Logging support for this class
+ /// </summary>
+ private static ILog log = LogManager.GetLogger(typeof(MainForm));
+
+ public MainForm() {
+ InitializeComponent();
+
+ InitialiseRemoting();
+
+ ManagementTree.ManagementTree managementTree = new ManagementTree.ManagementTree();
+ managementTree.Dock = DockStyle.Fill;
+
+ DockContent managementTreeDock = new DockContent();
+ managementTreeDock.Controls.Add(managementTree);
+ managementTreeDock.CloseButton = false;
+ managementTreeDock.Text = "Management Tree";
+ managementTreeDock.DockPanel = this.dockPanel;
+ managementTreeDock.DockState = DockState.DockLeft;
+ managementTreeDock.Icon = IconHelper.GetIcon("tree", "apps", IconSize.s16x16);
+
+ this.connectionStatusLbl.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
+ this.connectMenuItem.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
+ }
+
+ protected virtual void InitialiseRemoting() {
+ // Set up the required formatter
+ BinaryClientFormatterSinkProvider provider = new BinaryClientFormatterSinkProvider();
+
+ // Set up a client channel.
+ IDictionary props = new Hashtable();
+ props["secure"] = true;
+ TcpClientChannel clientChannel = new TcpClientChannel(props, provider);
+ ChannelServices.RegisterChannel(clientChannel, true);
+ }
+
+ private RemoteAdministration remoteAdministration;
+
+ /// <summary>
+ /// The NMail remote administration object.
+ /// </summary>
+ public RemoteAdministration RemoteAdministration {
+ get { return remoteAdministration; }
+ }
+
+ #region Connect
+
+ protected void BeginConnect(string host) {
+ this.serverNameLbl.Text = host;
+ this.connectionStatusLbl.Image = IconHelper.GetImage("connect_creating", "actions", IconSize.s16x16);
+ this.connectionStatusLbl.Text = "Connecting...";
+
+ ThreadPool.QueueUserWorkItem(new WaitCallback(Connect), host);
+ }
+
+ protected void Connect(object o) {
+ string host = o as string;
+
+ string url = string.Format("tcp://{0}:7877/RemoteAdministration.rem", host);
+ this.remoteAdministration = (RemoteAdministration) RemotingServices.Connect(typeof(RemoteAdministration), url);
+
+ // Force the connection to come up
+ log.Debug("Remote server assembly version: " + this.remoteAdministration.Version);
+
+ this.Invoke(new MethodInvoker(UpdateConnectionStatus));
+ }
+
+ private void connectMenuItem_Click(object sender, EventArgs e) {
+ // Prompt if already connected
+ if (this.remoteAdministration != null) {
+ DialogResult result = MessageBox.Show(
+ this,
+ "NMail Administration",
+ "Disconnect?",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button2);
+
+ if (result != DialogResult.Yes) {
+ return;
+ }
+ }
+
+ // Get the connection details
+ ConnectForm connectionForm = new ConnectForm();
+
+ if (connectionForm.ShowDialog(this) == DialogResult.OK) {
+ // Attempt to connect
+ BeginConnect(connectionForm.Hostname);
+ }
+ }
+ #endregion
+
+ protected void UpdateConnectionStatus() {
+ if (this.remoteAdministration == null) {
+ this.connectionStatusLbl.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
+ this.connectionStatusLbl.Text = "Disconnected";
+
+ } else {
+ this.connectionStatusLbl.Image = IconHelper.GetImage("connect_established", "actions", IconSize.s16x16);
+ this.connectionStatusLbl.Text = "Connected";
+ }
+ }
+
+ #region Disconnect
+
+ public void Disconnect() {
+ this.remoteAdministration = null;
+
+ if (InvokeRequired) {
+ Invoke(new MethodInvoker(UpdateConnectionStatus));
+ } else {
+ UpdateConnectionStatus();
+ }
+ }
+
+ private void disconnectMenuItem_Click(object sender, EventArgs e) {
+ Disconnect();
+ }
+ #endregion
+
+ private void exitMenuItem_Click(object sender, EventArgs e) {
+ this.Close();
+ }
+ }
+}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/MainForm.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MainForm.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/MainForm.resx 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,126 @@
+<?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>
+ <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>126, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.Designer.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,64 @@
+namespace NMail.Administration.WinForms.ManagementTree {
+ partial class ManagementTree {
+ /// <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.components = new System.ComponentModel.Container();
+ this.treeView = new System.Windows.Forms.TreeView();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.SuspendLayout();
+ //
+ // treeView
+ //
+ this.treeView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.treeView.HideSelection = false;
+ this.treeView.ImageIndex = 0;
+ this.treeView.ImageList = this.imageList;
+ this.treeView.Location = new System.Drawing.Point(0, 0);
+ this.treeView.Name = "treeView";
+ this.treeView.SelectedImageIndex = 0;
+ this.treeView.Size = new System.Drawing.Size(150, 150);
+ this.treeView.TabIndex = 0;
+ //
+ // imageList
+ //
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // ManagementTree
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.treeView);
+ this.Name = "ManagementTree";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TreeView treeView;
+ private System.Windows.Forms.ImageList imageList;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.ManagementTree {
+ /// <summary>
+ /// Provides a tree view of possible management options.
+ /// </summary>
+ public partial class ManagementTree : UserControl {
+ public ManagementTree() {
+ InitializeComponent();
+
+ // Setup the image list
+ this.imageList.Images.Add(IconHelper.GetImage("nmail", "apps", IconSize.s16x16));
+ this.imageList.Images.Add(IconHelper.GetImage("exec", "actions", IconSize.s16x16));
+ this.imageList.Images.Add(IconHelper.GetImage("server", "actions", IconSize.s16x16));
+ this.imageList.Images.Add(IconHelper.GetImage("edit_group", "actions", IconSize.s16x16));
+ this.imageList.Images.Add(IconHelper.GetImage("folder", "actions", IconSize.s16x16));
+ this.imageList.Images.Add(IconHelper.GetImage("queue", "actions", IconSize.s16x16));
+
+ TreeNode nmailNode = new TreeNode("NMail", 0, 0);
+ this.treeView.Nodes.Add(nmailNode);
+
+ TreeNode servicesNode = new TreeNode("Services", 1, 1);
+ nmailNode.Nodes.Add(servicesNode);
+
+ TreeNode spoolNode = new TreeNode("Smtp Spool", 5, 5);
+ nmailNode.Nodes.Add(spoolNode);
+
+ TreeNode mailDomainNode = new TreeNode("Mail Domains", 2, 2);
+ nmailNode.Nodes.Add(mailDomainNode);
+
+ TreeNode usersNode = new TreeNode("Users", 3, 3);
+ nmailNode.Nodes.Add(usersNode);
+
+ TreeNode foldersNode = new TreeNode("Folders", 4, 4);
+ nmailNode.Nodes.Add(foldersNode);
+
+ this.treeView.ExpandAll();
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.resx 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,123 @@
+<?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>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,145 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2F9186A2-CAAC-436C-99C9-F41F929261F0}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NMail.Administration.WinForms</RootNamespace>
+ <AssemblyName>NMail.Administration.WinForms</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\References\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Runtime.Remoting" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.0.2649.16786, Culture=neutral, PublicKeyToken=d481317c817cec47, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\References\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ConnectForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="ConnectForm.Designer.cs">
+ <DependentUpon>ConnectForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="ExceptionDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="ExceptionDialog.Designer.cs">
+ <DependentUpon>ExceptionDialog.cs</DependentUpon>
+ </Compile>
+ <Compile Include="MainForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="MainForm.Designer.cs">
+ <DependentUpon>MainForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="ManagementTree\ManagementTree.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="ManagementTree\ManagementTree.Designer.cs">
+ <DependentUpon>ManagementTree.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="ConnectForm.resx">
+ <DependentUpon>ConnectForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ExceptionDialog.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>ExceptionDialog.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MainForm.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>MainForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ManagementTree\ManagementTree.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>ManagementTree.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Services\ServicesViewer.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>ServicesViewer.cs</DependentUpon>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <None Include="Resources\ErrorConnecting.mht" />
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="Services\ServicesViewer.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Services\ServicesViewer.Designer.cs">
+ <DependentUpon>ServicesViewer.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\Connecting.html" />
+ <Content Include="Resources\ErrorConnecting.html" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\NMail.Icons\NMail.Icons.csproj">
+ <Project>{D7B3712B-CD3B-4D64-8D33-92A81D6921E2}</Project>
+ <Name>NMail.Icons</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\NMail.Server\NMail.Server.csproj">
+ <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project>
+ <Name>NMail.Server</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="MailDomain\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/Program.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Program.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Program.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net.Sockets;
+using System.Windows.Forms;
+
+namespace NMail.Administration.WinForms {
+ static class Program {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main() {
+
+ log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("logging.xml"));
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
+ currentMainForm = new MainForm();
+ Application.Run(currentMainForm);
+ }
+
+ static MainForm currentMainForm;
+
+ static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) {
+
+ if (e.Exception is IOException || e.Exception is SocketException) {
+ // Remoting exception, disconnect
+ currentMainForm.Disconnect();
+
+ } else {
+ // Unhandled exception, show the user
+ ExceptionDialog ed = new ExceptionDialog();
+ ed.SetException(e.Exception);
+ ed.ShowDialog();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/Properties/AssemblyInfo.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Properties/AssemblyInfo.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Properties/AssemblyInfo.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NMail.Administration.WinForms")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NMail.Administration.WinForms")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7d10e0fa-b0be-44d0-9d4f-dc23de9d6a68")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: NMail/trunk/NMail.Administration.WinForms/Properties/Resources.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Properties/Resources.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Properties/Resources.Designer.cs 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace NMail.Administration.WinForms.Properties {
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if ((resourceMan == null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NMail.Administration.WinForms.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Properties/Resources.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Properties/Resources.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Properties/Resources.resx 2007-05-12 14:18:59 UTC (rev 196)
@@ -0,0 +1,117 @@
+<?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.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...
[truncated message content] |