www.pudn.com > Remote_Mail_client.zip > AddressBook.cs
// Created by WiB June 2003
// shy_dream@yahoo.com
// You may include the source code, modified source code, assembly
// within your own projects for either personal or commercial use
// with the only one restriction:
// don't change the name of project, library, namespace, assembly.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace Mailer
{
///
/// Summary description for AddressBook.
///
public class AddressBook : System.Windows.Forms.Form
{
private WiB.Pinkie.Controls.ButtonXP buttonXP3;
private WiB.Pinkie.Controls.ButtonXP buttonXP2;
private WiB.Pinkie.Controls.ButtonXP buttonXP1;
private WiB.Pinkie.Controls.ButtonXP buttonTo;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.ListBox listBox2;
public System.Windows.Forms.ListBox listBox1;
public System.Windows.Forms.ListBox listBox;
private System.Windows.Forms.GroupBox groupBox1;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public AddressBook()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.buttonXP3 = new WiB.Pinkie.Controls.ButtonXP();
this.buttonXP2 = new WiB.Pinkie.Controls.ButtonXP();
this.buttonXP1 = new WiB.Pinkie.Controls.ButtonXP();
this.buttonTo = new WiB.Pinkie.Controls.ButtonXP();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.listBox2 = new System.Windows.Forms.ListBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.listBox = new System.Windows.Forms.ListBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.SuspendLayout();
//
// buttonXP3
//
this.buttonXP3._Image = null;
this.buttonXP3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
this.buttonXP3.DefaultScheme = false;
this.buttonXP3.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonXP3.Image = null;
this.buttonXP3.Location = new System.Drawing.Point(304, 200);
this.buttonXP3.Name = "buttonXP3";
this.buttonXP3.Scheme = WiB.Pinkie.Controls.ButtonXP.Schemes.Silver;
this.buttonXP3.Size = new System.Drawing.Size(64, 21);
this.buttonXP3.TabIndex = 33;
this.buttonXP3.Text = "Cancel";
//
// buttonXP2
//
this.buttonXP2._Image = null;
this.buttonXP2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
this.buttonXP2.DefaultScheme = false;
this.buttonXP2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonXP2.Image = null;
this.buttonXP2.Location = new System.Drawing.Point(232, 200);
this.buttonXP2.Name = "buttonXP2";
this.buttonXP2.Scheme = WiB.Pinkie.Controls.ButtonXP.Schemes.Silver;
this.buttonXP2.Size = new System.Drawing.Size(64, 21);
this.buttonXP2.TabIndex = 32;
this.buttonXP2.Text = "O&K";
//
// buttonXP1
//
this.buttonXP1._Image = null;
this.buttonXP1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
this.buttonXP1.DefaultScheme = false;
this.buttonXP1.DialogResult = System.Windows.Forms.DialogResult.None;
this.buttonXP1.Image = null;
this.buttonXP1.Location = new System.Drawing.Point(152, 128);
this.buttonXP1.Name = "buttonXP1";
this.buttonXP1.Scheme = WiB.Pinkie.Controls.ButtonXP.Schemes.Silver;
this.buttonXP1.Size = new System.Drawing.Size(56, 20);
this.buttonXP1.TabIndex = 31;
this.buttonXP1.Text = "-->";
this.buttonXP1.Click += new System.EventHandler(this.buttonXP1_Click);
//
// buttonTo
//
this.buttonTo._Image = null;
this.buttonTo.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
this.buttonTo.DefaultScheme = false;
this.buttonTo.DialogResult = System.Windows.Forms.DialogResult.None;
this.buttonTo.Image = null;
this.buttonTo.Location = new System.Drawing.Point(152, 64);
this.buttonTo.Name = "buttonTo";
this.buttonTo.Scheme = WiB.Pinkie.Controls.ButtonXP.Schemes.Silver;
this.buttonTo.Size = new System.Drawing.Size(56, 20);
this.buttonTo.TabIndex = 30;
this.buttonTo.Text = "-->";
this.buttonTo.Click += new System.EventHandler(this.buttonTo_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(8, 32);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(138, 20);
this.textBox1.TabIndex = 25;
this.textBox1.Text = "";
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label1.Location = new System.Drawing.Point(0, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(168, 18);
this.label1.TabIndex = 29;
this.label1.Text = " Type Name or Select from List:";
//
// listBox2
//
this.listBox2.Location = new System.Drawing.Point(216, 128);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(150, 43);
this.listBox2.TabIndex = 28;
//
// listBox1
//
this.listBox1.Location = new System.Drawing.Point(216, 64);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(150, 43);
this.listBox1.TabIndex = 27;
//
// listBox
//
this.listBox.Location = new System.Drawing.Point(8, 64);
this.listBox.Name = "listBox";
this.listBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listBox.Size = new System.Drawing.Size(138, 108);
this.listBox.TabIndex = 26;
//
// groupBox1
//
this.groupBox1.Location = new System.Drawing.Point(14, 184);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(346, 3);
this.groupBox1.TabIndex = 34;
this.groupBox1.TabStop = false;
//
// AddressBook
//
this.AcceptButton = this.buttonXP2;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(376, 237);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.groupBox1,
this.buttonXP3,
this.buttonXP2,
this.buttonXP1,
this.buttonTo,
this.textBox1,
this.label1,
this.listBox2,
this.listBox1,
this.listBox});
this.Name = "AddressBook";
this.Text = "AddressBook";
this.ResumeLayout(false);
}
#endregion
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
for (int i=0; i=0) this.listBox.SetSelected(index, true);
}
private void buttonTo_Click(object sender, System.EventArgs e)
{
for (int i=0; i