Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

LumiSoft MailServer

, 17 Nov 2006
Full featured SMTP/POP3/IMAP server
mailserver_0_92.zip
mailserver_part_i.zip
RFC
AUTH
DNSx
FTPx
HTTP
ICMP
IMAPx
MIME
NNTPx
POP3x
SASL
SIP
SMTPx
STUN
Net
docs
dns
dns_records.jpg
dns_records.vsd
Net
AUTH
bin
Debug
LumiSoft.Net.dll
LumiSoft.Net.pdb
vs2E3.tmp
Release
LumiSoft.Net.dll
Data
Dns
Client
FTP
Client
Server
HTTP
Server
ICMP
IMAP
Client
Server
IO
Log
LumiSoft.Net
Mime
vCard
Net.csproj.user
Net.suo
NNTP
Client
obj
Debug
TempPE
POP3
Client
Server
SDP
ServersCore
SIP
Client
Message
Proxy
Stack
SMTP
Client
Server
STUN
Client
Message
_junk
_Obsolete
_Stuff
mailserver_part_ii.zip
MailServer
Application
Debug
BackUp
Filters
lsDNSBL_Filter.exe
lsInvalidMessageScanner.exe
lsSpamFilter.exe
lsVirusFilter.exe
LumiSoft.UI.dll
Help
ICSharpCode.SharpZipLib.dll
InstallUtil.InstallLog
lsMailServer.exe
lsMailServer.pdb
lsMailServer.vshost.exe
LumiSoft.MailServerAPI.dll
LumiSoft.MailServerAPI.pdb
LumiSoft.Net.dll
LumiSoft.Net.pdb
Mail Server Configuration.exe
Mail Server Configuration.pdb
Mail Server Configuration.vshost.exe
MailServerManager.exe
MailServerManager.pdb
MailServerManager.vshost.exe
MailServerService.exe
MailServerService.InstallLog
MailServerService.pdb
MailServerService.vshost.exe
Mono.Security.dll
mssql_API.dll
mssql_API.pdb
Npgsql.dll
pgsql_API.dll
pgsql_API.pdb
Settings
local_xml
UserAPI.dll
UserAPI.pdb
xml_API.dll
xml_API.pdb
Release
BackUp
Filters
lsDNSBL_Filter.exe
lsInvalidMessageScanner.exe
lsSpamFilter.exe
lsVirusFilter.exe
LumiSoft.UI.dll
Help
ICSharpCode.SharpZipLib.dll
lsMailServer.exe
lsMailServer.vshost.exe
LumiSoft.MailServerAPI.dll
LumiSoft.Net.dll
Mail Server Configuration.exe
MailServerManager.exe
MailServerManager.vshost.exe
MailServerService.exe
Mono.Security.dll
mssql_API.dll
Npgsql.dll
pgsql_API.dll
Settings
local_xml
MailStore
UserAPI.dll
xml_API.dll
docs
address_mapping.jpg
address_mapping.vsd
incoming_message_processing.jpg
incoming_message_processing.vsd
Filters
lsDNSBL
App.ico
lsDNSBL_Filter.csproj.user
lsDNSBL_Filter.suo
lsInvalidMessageScanner
App.ico
bin
Debug
Release
lsInvalidMessageScanner.vshost.exe
lsInvalidMessageScanner.csproj.user
lsInvalidMessageScanner.suo
lsSenderFilter
App.ico
bin
Db
lsSenderFilter.csproj.user
lsSenderFilter.suo
lsSpamFilter
bin
Db
lsSpamFilter.csproj.user
lsSpamFilter.suo
lsVirusFilter
App.ico
bin
lsVirusFilter.csproj.user
lsVirusFilter.suo
Resources
eicar_message.eml.base64
Help
NewHelp
User
ENG
Admin
Install
Intro
mailserver.hhp
MailServer_ENG.chm
Problems
Started
Table of Contents.hhc
Windows
_Images
alias.jpg
aliases.jpg
domain.jpg
domains.jpg
filter.jpg
filters.jpg
logo.jpg
main.jpg
route.jpg
routing.jpg
securit1.jpg
securit2.jpg
security.jpg
server.jpg
sys_delivery.jpg
sys_general.jpg
sys_imap.jpg
sys_pop3.jpg
sys_smtp.jpg
user1.jpg
user2.jpg
users.jpg
UserApi
UserApi.shfb
Install
lsMailserver_Install
bin
Debug
lsMailserver_Install.exe
lsMailserver_Install.pdb
lsMailserver_Install.vshost.exe
Release
lsMailserver_Install.exe
lsMailserver_Install.pdb
Files
Backup
default_data.bcp
Filters
lsDNSBL_Filter.exe
lsInvalidMessageScanner.exe
lsSpamFilter.exe
lsVirusFilter.exe
lumisoft.ui.dll
Help
MailServer_ENG.chm
lsMailServer.exe
LumiSoft.MailServerAPI.dll
LumiSoft.Net.dll
LumiSoft.UI.dll
mssql_API.dll
Settings
WebServices_API.dll
xml_API.dll
lsMailserver_Install.suo
Properties
Settings.settings
MailServer
Fetch
GlobalMessageRules
licenses.licx
lsMailServer.csproj.user
lsMailServer.suo
ManagementServer
Relay
Resources
exit.ico
trayicon.ico
UI
_Junk
MailServerConfiguration
Mail Server Configuration.suo
MailServerConfiguration.suo
Properties
Settings.settings
MailServerManager
App.ico
Controls
Forms
MailServerManager.csproj.user
MailServerManager.suo
res
aliases.ico
authentication.ico
doc_delete.ico
doc_edit.ico
doc_new.ico
domains.ico
logging.ico
routing.ico
save.ico
security.ico
server.ico
servers.ico
services.ico
system.ico
users.ico
Resources
about.ico
acl.ico
add.ico
addressing.ico
authentication.ico
backup.ico
bold.ico
checksyntax.ico
connect.ico
connect32.ico
delete.ico
domain.ico
domain32.ico
down.ico
edit.ico
error.ico
error.jpg
exit.ico
filter.ico
filter32.ico
filter_disabled.ico
folder.ico
folder32.ico
folders.ico
fontbackcolor.ico
fontcolor.ico
forum.ico
group.ico
group_disabled.ico
help.ico
italic.ico
logging.ico
mailinglist.ico
mailinglist_disabled.ico
message.ico
message16.ico
messagerule.ico
messagerule_disabled.ico
properties.ico
queue.ico
recyclebin.ico
recyclebin16.ico
refresh.ico
remoteserver32.ico
restore.ico
rootfolder.ico
rootfolder_disabled.ico
rule.ico
ruleaction.ico
save.ico
security.ico
security32.ico
security_disabled.ico
server.ico
servers.ico
server_running.ico
server_stopped.ico
services.ico
share32.ico
system.ico
underline.ico
up.ico
user.ico
userinfo.ico
user_disabled.ico
viewmessages.ico
write.ico
Tmp
_Junk
MailServerService
MailServerService.suo
Properties
Settings.settings
ServerAPI
API
Filters
ServerAPI.suo
UI
API_mssql
mssql_API.csproj.user
mssql_API.suo
Resources
API_pgsql
dep
Mono.Security.dll
Npgsql.dll
pgsql_API.csproj.user
pgsql_API.suo
Resources
API_xml
Junk
xml_API.csproj.user
xml_API.suo
TestUserAPI
TestUserAPI
bin
Debug
LumiSoft.Net.dll
LumiSoft.Net.pdb
TestUserAPI.exe
TestUserAPI.pdb
TestUserAPI.vshost.exe
UserAPI.dll
UserAPI.pdb
Properties
Settings.settings
TestUserAPI.suo
UserAPI
UserAPI
bin
Debug
Properties
ve-60.tmp
UserAPI.suo
SQL_Database
MSSQL
Upgrade
PGSQL
Stuff
Upgrade
WebAdmin
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace LumiSoft.UI.Controls
{
	/// <summary>
	/// Frame control.
	/// </summary>
	public class WFrame : System.Windows.Forms.UserControl
	{
		private System.Windows.Forms.Panel m_pFormPanel;
		private System.Windows.Forms.Splitter splitter1;
		private System.Windows.Forms.Panel ControlPane;
		private System.Windows.Forms.Panel TopPane;
		private System.Windows.Forms.Panel ToolBarPanel;
		private System.Windows.Forms.Button button1;
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private Form    m_Form      = null;
		private Control m_TooBar    = null;
		private Control m_BarCotrol = null;

		private Color m_SplitterColor    = Color.FromKnownColor(KnownColor.Control);
		private int   m_SplitterWidth    = 5;
		private int   m_SplitterMinSize  = 0;
		private int   m_SplitterMinExtra = 0;
		private int   m_TopPaneHeight    = 25;
		private Color m_TopPaneBkColor   = Color.FromKnownColor(KnownColor.Control);
		private bool  m_IsSplitterLocked = false;		
		private int   m_ControlPaneWidth = 120;
		private int   m_BarWidthCache    = 0;
		private bool  m_HideBar          = false;

		/// <summary>
		/// 
		/// </summary>
		public WFrame()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call
			
		}

		#region function Dispose

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#endregion

		#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.m_pFormPanel = new System.Windows.Forms.Panel();
			this.splitter1 = new System.Windows.Forms.Splitter();
			this.ControlPane = new System.Windows.Forms.Panel();
			this.TopPane = new System.Windows.Forms.Panel();
			this.ToolBarPanel = new System.Windows.Forms.Panel();
			this.button1 = new System.Windows.Forms.Button();
			this.TopPane.SuspendLayout();
			this.SuspendLayout();
			// 
			// m_pFormPanel
			// 
			this.m_pFormPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.m_pFormPanel.Dock = System.Windows.Forms.DockStyle.Fill;
			this.m_pFormPanel.Location = new System.Drawing.Point(103, 25);
			this.m_pFormPanel.Name = "m_pFormPanel";
			this.m_pFormPanel.Size = new System.Drawing.Size(193, 191);
			this.m_pFormPanel.TabIndex = 9;
			// 
			// splitter1
			// 
			this.splitter1.Location = new System.Drawing.Point(100, 25);
			this.splitter1.Name = "splitter1";
			this.splitter1.Size = new System.Drawing.Size(3, 191);
			this.splitter1.TabIndex = 8;
			this.splitter1.TabStop = false;
			this.splitter1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitter1_SplitterMoved);
			// 
			// ControlPane
			// 
			this.ControlPane.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.ControlPane.Dock = System.Windows.Forms.DockStyle.Left;
			this.ControlPane.Location = new System.Drawing.Point(0, 25);
			this.ControlPane.Name = "ControlPane";
			this.ControlPane.Size = new System.Drawing.Size(100, 191);
			this.ControlPane.TabIndex = 6;
			// 
			// TopPane
			// 
			this.TopPane.Controls.AddRange(new System.Windows.Forms.Control[] {
																				  this.ToolBarPanel,
																				  this.button1});
			this.TopPane.Dock = System.Windows.Forms.DockStyle.Top;
			this.TopPane.Name = "TopPane";
			this.TopPane.Size = new System.Drawing.Size(296, 25);
			this.TopPane.TabIndex = 7;
			// 
			// ToolBarPanel
			// 
			this.ToolBarPanel.Location = new System.Drawing.Point(112, 0);
			this.ToolBarPanel.Name = "ToolBarPanel";
			this.ToolBarPanel.Size = new System.Drawing.Size(184, 24);
			this.ToolBarPanel.TabIndex = 1;
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.button1.Location = new System.Drawing.Point(72, 2);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(32, 16);
			this.button1.TabIndex = 0;
			this.button1.Text = "<<";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// WFrame
			// 
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.m_pFormPanel,
																		  this.splitter1,
																		  this.ControlPane,
																		  this.TopPane});
			this.Name = "WFrame";
			this.Size = new System.Drawing.Size(296, 216);
			this.TopPane.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion


		#region function splitter1_SplitterMoved

		/// <summary>
		/// Called after Splitter move, Set new ControlPane
		/// </summary>
		/// <param name="sender"> </param>
		/// <param name="e"> </param>
		protected void splitter1_SplitterMoved(object sender, System.Windows.Forms.SplitterEventArgs e)
		{
			m_ControlPaneWidth = ControlPane.Width;
			
			this.OnResize(new EventArgs());

			// Redraw splitter
			splitter1.Invalidate();			
		}

		#endregion

		#region function button1_Click

		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected void button1_Click(object sender, System.EventArgs e)
		{
			if(ControlPane.Width > 0){
				HideControlBar();	
			}
			else{
				ShowControlBar();
							
				if(m_BarCotrol != null){
					m_BarCotrol.Focus();
				}
			}			
		}

		#endregion



		#region function ShowBar

		/// <summary>
		/// Expands control bar.
		/// </summary>
		public void ShowControlBar()
		{
			this.ControlPaneWidth = m_BarWidthCache;
			splitter1.Visible     = true;				

			button1.Text = "<<";

			this.OnResize(new EventArgs());
		}

		#endregion

		#region function HideBar

		/// <summary>
		/// Collapses control bar.
		/// </summary>
		public void HideControlBar()
		{
			m_BarWidthCache       = this.ControlPaneWidth;
			this.ControlPaneWidth = 0;
			splitter1.Width       = 0;
			splitter1.Visible     = false;
				                
			button1.Text = ">>";
	
			this.OnResize(new EventArgs());
		}

		#endregion

		
		#region override OnResize

		/// <summary>
		/// Resize panel control
		/// </summary>
		/// <param name="e"> </param>
		protected override void OnResize(EventArgs e)
		{
			base.OnResize(e);

			if(this.ControlPaneWidth > 0){
				ToolBarPanel.Left = this.ControlPaneWidth + this.SplitterWidth + 4;
				button1.Left      = this.ControlPaneWidth - button1.Width;
			}
			else{
				ToolBarPanel.Left = button1.Width + 5;
				button1.Left      = 1;
			}

			// Resize toolbar area
			ToolBarPanel.Width = this.Width - ToolBarPanel.Left - 4;
		
		//	if(m_BarCotrol != null){
		//		m_BarCotrol.Size = ControlPane.ClientSize;
		//	}
			
			// Resize form
			if(m_Form != null){
				m_Form.Size = m_pFormPanel.ClientSize;
			}
		}

		#endregion

		
		#region Properties Implementation

		/// <summary>
		/// 
		/// </summary>
		[
		Browsable(false),
		DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
		]
		public Form Frame_Form
		{
			get{ return m_Form; }

			set{
				if(value != null){
					// If there is old Form, Dispose it.
					if(m_Form != null){
						m_Form.Dispose();
					}

					m_Form = value;
					
					m_Form.Location        = new Point(0,0);
					m_Form.TopLevel        = false;
					m_Form.TopMost         = false;
					m_Form.ControlBox      = false;
					m_Form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
					m_Form.StartPosition   = System.Windows.Forms.FormStartPosition.Manual;
					m_Form.Size            = m_pFormPanel.ClientSize;
					m_Form.Parent          = m_pFormPanel;
					m_Form.Visible         = true;
					m_Form.Focus();
				}
			}
		}

        /// <summary>
		/// 
		/// </summary>
		[
		Browsable(false),
		DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
		]
		public ToolStrip Frame_ToolStrip
		{
			get{ return (ToolStrip)m_TooBar; }

			set{
				// If there is old ToolBar, Dispose it.
				if(m_TooBar != null){
					m_TooBar.Dispose();
				}

				if(value != null){					
					m_TooBar         = value;
					ToolBarPanel.Controls.Add(m_TooBar);
					m_TooBar.Visible = true;
				}
			}
		}

		/// <summary>
		/// 
		/// </summary>
		[
		Browsable(false),
		DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
		]
		public Control Frame_BarControl
		{
			get{ return m_BarCotrol; }

			set{
				if(value != null && value.Handle.ToInt32() != 0){
					// If there is old bar Control, Dispose it.
					if(m_BarCotrol != null){
						m_BarCotrol.Dispose();
					}
				
					m_BarCotrol        = value;	
					ControlPane.Controls.Add(m_BarCotrol);
			
					// Set Control Location and Size 
					m_BarCotrol.Location = new Point(0,0);
					m_BarCotrol.Dock     = DockStyle.Fill;
				
					m_BarCotrol.Visible = true;

		//			m_BarCotrol.LostFocus += new System.EventHandler(this.OnBarControl_LostFocus);
				}
			}
		}

		/// <summary>
		/// Gets or sets Form part panle border style.
		/// </summary>
		public BorderStyle FormFrameBorder
		{
			get{ return m_pFormPanel.BorderStyle; }

			set{ m_pFormPanel.BorderStyle = value; }
		}

        
		//--- Splitter Window properties ---------------------------------
		/// <summary>
		/// 
		/// </summary>
		[
		Category("SplitterWnd"),
		Description("Splitter window color"),
		DefaultValue(System.Drawing.KnownColor.Control),
		]
		public Color SplitterColor 
		{
			get{ return m_SplitterColor; }

			set {
				m_SplitterColor = value;
				splitter1.BackColor = m_SplitterColor;
				Invalidate();							
			}
		}


		/// <summary>
		/// 
		/// </summary>
		[
		Category("SplitterWnd"),
		Description("Splitter window Width"),
		DefaultValue(5),
		]
		public int SplitterWidth 
		{
			get{ return m_SplitterWidth; }

			set{
				m_SplitterWidth = value;
				splitter1.Width = m_SplitterWidth;
				Invalidate();							
			}
		}


		/// <summary>
		/// 
		/// </summary>
		[
		Category("SplitterWnd"),
		Description("Splitter window MinSize"),
		DefaultValue(25),
		]
		public int SplitterMinSize 
		{
			get{ return m_SplitterMinSize; }

			set{
				m_SplitterMinSize = value;
				splitter1.MinSize = m_SplitterMinSize;
				Invalidate();							
			}
		}


		/// <summary>
		/// 
		/// </summary>
		[
		Category("SplitterWnd"),
		Description("Splitter window MinExtra"),
		DefaultValue(25),
		]
		public int SplitterMinExtra
		{
			get{ return m_SplitterMinExtra; }

			set{
				m_SplitterMinExtra = value;
				splitter1.MinExtra = m_SplitterMinExtra;
				Invalidate();							
			}
		}


		/// <summary>
		/// 
		/// </summary>
		[
		Category("SplitterWnd"),
		Description("Locks Splitter window"),
		DefaultValue(false),
		]
		public bool LockSplitter
		{
			get{ return m_IsSplitterLocked; }

			set{ 
				m_IsSplitterLocked = value;
				splitter1.Enabled = !m_IsSplitterLocked;
				Invalidate();							
			}
		}
        
		//--- End of SplitterWnd Porperties --------------------------------



		//--- Top Pane properties ------------------------------------------
		/// <summary>
		/// 
		/// </summary>
		[
		Category("TopPane"),
		Description("Top pane window Height"),
		DefaultValue(20),
		]
		public int TopPaneHeight
		{
			get{ return m_TopPaneHeight; }

			set{
				m_TopPaneHeight = value;
				TopPane.Height = m_TopPaneHeight;
				button1.Top = m_TopPaneHeight - button1.Height - 3;
				Invalidate();							
			}
		}


		/// <summary>
		/// 
		/// </summary>
		[
		Category("TopPane"),
		Description("Top Pane BackRound color"),		
		]
		public Color TopPaneBkColor 
		{
			get{ return m_TopPaneBkColor; }

			set 
			{
				m_TopPaneBkColor = value;
				TopPane.BackColor = m_TopPaneBkColor;
				Invalidate();							
			}
		}		
		//--- Top Pane properties --------------------------------



		//--- Control Pane properties ------------------------------------------

		/// <summary>
		/// 
		/// </summary>
		[Obsolete("Use ControlPaneWidth instead",true)]
		public int ControlPaneWitdh
		{
			get{ return ControlPaneWidth; }

			set{ ControlPaneWidth = value; }
		}

		/// <summary>
		/// 
		/// </summary>
		[
		Category("ControlPane"),
		Description("Control pane Width"),		
		]
		public int ControlPaneWidth
		{
			get{ return m_ControlPaneWidth; }

			set{
				m_ControlPaneWidth = value;
				ControlPane.Width  = m_ControlPaneWidth;
				ToolBarPanel.Left  = m_ControlPaneWidth + this.SplitterWidth + 4;
				button1.Left       = m_ControlPaneWidth - button1.Width;
						
				if(m_BarCotrol != null){
					m_BarCotrol.Width = m_ControlPaneWidth - 5;
				}
						
				Invalidate();
										
			}
		}

		/// <summary>
		/// 
		/// </summary>
		[
		Category("ControlPane"),
		DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
		]
		public bool HideBar
		{
			get{ return m_HideBar; }

			set{ 
				m_HideBar = value; 

				if(!this.DesignMode){
					if(value){
						HideControlBar();
					}
					else{
						ShowControlBar();
					}
				}
			}
		}

		//--- Control Pane properties --------------------------------

		#endregion		

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Ivar Lumi

Estonia Estonia
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 17 Nov 2006
Article Copyright 2006 by Ivar Lumi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid