Beispiel #1
0
        /// <summary>
        /// Creates and initializes UI.
        /// </summary>
        private void InitUI()
        {
            m_pTab = new TabControl();
            m_pTab.Size = new Size(515,490);
            m_pTab.Location = new Point(5,0);

            m_pApply = new Button();
            m_pApply.Size = new Size(70,20);
            m_pApply.Location = new Point(450,500);
            m_pApply.Text = "Apply";
            m_pApply.Click += new EventHandler(m_pApply_Click);

            #region Tabpage General

            m_pTab.TabPages.Add("General");
                        
            mt_TabGeneral_DnsServers = new Label();
            mt_TabGeneral_DnsServers.Size = new Size(80,20);
            mt_TabGeneral_DnsServers.Location = new Point(0,10);
            mt_TabGeneral_DnsServers.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_DnsServers.Text = "DNS servers:";

            m_pTabGeneral_DnsServer = new TextBox();
            m_pTabGeneral_DnsServer.Size = new Size(180,20);
            m_pTabGeneral_DnsServer.Location = new Point(85,10);

            m_pTabGeneral_DnsServerToolbar = new ToolStrip();
            m_pTabGeneral_DnsServerToolbar.Size = new Size(60,25);
            m_pTabGeneral_DnsServerToolbar.Location = new Point(270,8);
            m_pTabGeneral_DnsServerToolbar.Dock = DockStyle.None;
            m_pTabGeneral_DnsServerToolbar.GripStyle = ToolStripGripStyle.Hidden;
            m_pTabGeneral_DnsServerToolbar.BackColor = this.BackColor;
            m_pTabGeneral_DnsServerToolbar.Renderer = new ToolBarRendererEx();
            m_pTabGeneral_DnsServerToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabGeneral_DnsServerToolbar_ItemClicked);
            // Add button
            ToolStripButton button_Add = new ToolStripButton();
            button_Add.Image = ResManager.GetIcon("add.ico").ToBitmap();
            button_Add.Tag = "add";
            button_Add.ToolTipText = "Add";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Add);
            // Delete button
            ToolStripButton button_Delete = new ToolStripButton();
            button_Delete.Enabled = false;
            button_Delete.Image = ResManager.GetIcon("delete.ico").ToBitmap();
            button_Delete.Tag = "delete";
            button_Delete.ToolTipText = "Delete";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Delete);
            // Separator
            m_pTabGeneral_DnsServerToolbar.Items.Add(new ToolStripSeparator());
            // Up button
            ToolStripButton button_Up = new ToolStripButton();
            button_Up.Enabled = false;
            button_Up.Image = ResManager.GetIcon("up.ico").ToBitmap();
            button_Up.Tag = "up";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Up);
            // Down button
            ToolStripButton button_down = new ToolStripButton();
            button_down.Enabled = false;
            button_down.Image = ResManager.GetIcon("down.ico").ToBitmap();
            button_down.Tag = "down";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_down);

            m_pTabGeneral_DnsServers = new ListView();
            m_pTabGeneral_DnsServers.Size = new Size(355,100);
            m_pTabGeneral_DnsServers.Location = new Point(10,35);
            m_pTabGeneral_DnsServers.View = View.Details;
            m_pTabGeneral_DnsServers.FullRowSelect = true;
            m_pTabGeneral_DnsServers.HideSelection = false;
            m_pTabGeneral_DnsServers.SelectedIndexChanged += new EventHandler(m_pTabGeneral_DnsServers_SelectedIndexChanged);
            m_pTabGeneral_DnsServers.Columns.Add("IP",325);

            m_pTabGeneral_Notification = new wctrl_Notification();
            m_pTabGeneral_Notification.Size = new Size(485,38);
            m_pTabGeneral_Notification.Location = new Point(10,421);
            m_pTabGeneral_Notification.Icon = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabGeneral_Notification.Visible = false;
            
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_DnsServers);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServer);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServerToolbar);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServers);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_Notification);

            #endregion

            this.Controls.Add(m_pTab);
            this.Controls.Add(m_pApply);
        }
        /// <summary>
        /// Creates and initializes window UI.
        /// </summary>
        private void InitUI()
        {
            //--- Common UI -------------------------------------//
            m_pTab          = new TabControl();
            m_pTab.Size     = new Size(515, 490);
            m_pTab.Location = new Point(5, 0);
            m_pTab.TabPages.Add(new TabPage("General"));
            m_pTab.TabPages.Add(new TabPage("IP Bindings"));

            m_pApply          = new Button();
            m_pApply.Size     = new Size(70, 20);
            m_pApply.Location = new Point(450, 500);
            m_pApply.Text     = "Apply";
            m_pApply.Click   += new EventHandler(m_pApply_Click);
            //---------------------------------------------------//

            #region Tabpage General

            //--- Tabpage General UI ----------------------------//
            m_pTabGeneral_SendSmartHost                 = new RadioButton();
            m_pTabGeneral_SendSmartHost.Size            = new Size(250, 20);
            m_pTabGeneral_SendSmartHost.Location        = new Point(10, 15);
            m_pTabGeneral_SendSmartHost.Text            = "Send mails through SmartHost";
            m_pTabGeneral_SendSmartHost.CheckedChanged += new EventHandler(m_pTabGeneral_SendSmartHost_CheckedChanged);

            mt_TabGeneral_SmartHostsBalanceMode           = new Label();
            mt_TabGeneral_SmartHostsBalanceMode.Size      = new Size(160, 20);
            mt_TabGeneral_SmartHostsBalanceMode.Location  = new Point(10, 40);
            mt_TabGeneral_SmartHostsBalanceMode.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SmartHostsBalanceMode.Text      = "Smart hosts balance mode:";

            m_pTabGeneral_SmartHostsBalanceMode               = new ComboBox();
            m_pTabGeneral_SmartHostsBalanceMode.Size          = new Size(100, 20);
            m_pTabGeneral_SmartHostsBalanceMode.Location      = new Point(180, 40);
            m_pTabGeneral_SmartHostsBalanceMode.DropDownStyle = ComboBoxStyle.DropDownList;
            m_pTabGeneral_SmartHostsBalanceMode.Items.Add("Load-balance");
            m_pTabGeneral_SmartHostsBalanceMode.Items.Add("Fail-over");
            m_pTabGeneral_SmartHostsBalanceMode.SelectedIndex = 0;

            m_pTabGeneral_SmartHosts_Toolbar              = new ToolStrip();
            m_pTabGeneral_SmartHosts_Toolbar.Size         = new Size(95, 25);
            m_pTabGeneral_SmartHosts_Toolbar.Location     = new Point(373, 40);
            m_pTabGeneral_SmartHosts_Toolbar.Dock         = DockStyle.None;
            m_pTabGeneral_SmartHosts_Toolbar.GripStyle    = ToolStripGripStyle.Hidden;
            m_pTabGeneral_SmartHosts_Toolbar.BackColor    = this.BackColor;
            m_pTabGeneral_SmartHosts_Toolbar.Renderer     = new ToolBarRendererEx();
            m_pTabGeneral_SmartHosts_Toolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabGeneral_SmartHosts_Toolbar_ItemClicked);
            // Add button
            ToolStripButton button_Add = new ToolStripButton();
            button_Add.Image       = ResManager.GetIcon("add.ico").ToBitmap();
            button_Add.Tag         = "add";
            button_Add.ToolTipText = "Add";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Add);
            // Edit button
            ToolStripButton button_Edit = new ToolStripButton();
            button_Edit.Enabled     = false;
            button_Edit.Image       = ResManager.GetIcon("edit.ico").ToBitmap();
            button_Edit.Tag         = "edit";
            button_Edit.ToolTipText = "edit";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Edit);
            // Delete button
            ToolStripButton button_Delete = new ToolStripButton();
            button_Delete.Enabled     = false;
            button_Delete.Image       = ResManager.GetIcon("delete.ico").ToBitmap();
            button_Delete.Tag         = "delete";
            button_Delete.ToolTipText = "Delete";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Delete);
            // Separator
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(new ToolStripSeparator());
            // Up button
            ToolStripButton rulesToolbar_button_Up = new ToolStripButton();
            rulesToolbar_button_Up.Enabled = false;
            rulesToolbar_button_Up.Image   = ResManager.GetIcon("up.ico").ToBitmap();
            rulesToolbar_button_Up.Tag     = "up";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(rulesToolbar_button_Up);
            // Down button
            ToolStripButton rulesToolbar_button_down = new ToolStripButton();
            rulesToolbar_button_down.Enabled = false;
            rulesToolbar_button_down.Image   = ResManager.GetIcon("down.ico").ToBitmap();
            rulesToolbar_button_down.Tag     = "down";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(rulesToolbar_button_down);

            m_pTabGeneral_SmartHosts                       = new ListView();
            m_pTabGeneral_SmartHosts.Size                  = new Size(465, 100);
            m_pTabGeneral_SmartHosts.Location              = new Point(30, 65);
            m_pTabGeneral_SmartHosts.View                  = View.Details;
            m_pTabGeneral_SmartHosts.FullRowSelect         = true;
            m_pTabGeneral_SmartHosts.HideSelection         = false;
            m_pTabGeneral_SmartHosts.SelectedIndexChanged += new EventHandler(m_pTabGeneral_SmartHosts_SelectedIndexChanged);
            m_pTabGeneral_SmartHosts.Columns.Add("Host", 200);
            m_pTabGeneral_SmartHosts.Columns.Add("Port", 60);
            m_pTabGeneral_SmartHosts.Columns.Add("SSL Mode", 80);
            m_pTabGeneral_SmartHosts.Columns.Add("User Name", 100);

            m_pTabGeneral_SendDns                 = new RadioButton();
            m_pTabGeneral_SendDns.Size            = new Size(250, 20);
            m_pTabGeneral_SendDns.Location        = new Point(10, 180);
            m_pTabGeneral_SendDns.Text            = "Send mails directly using DNS";
            m_pTabGeneral_SendDns.CheckedChanged += new EventHandler(m_pTabGeneral_SendSmartHost_CheckedChanged);

            mt_TabGeneral_SessionTimeout           = new Label();
            mt_TabGeneral_SessionTimeout.Size      = new Size(200, 20);
            mt_TabGeneral_SessionTimeout.Location  = new Point(10, 210);
            mt_TabGeneral_SessionTimeout.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SessionTimeout.Text      = "Session Idle Timeout:";

            m_pTabGeneral_SessionTimeout          = new NumericUpDown();
            m_pTabGeneral_SessionTimeout.Size     = new Size(70, 20);
            m_pTabGeneral_SessionTimeout.Location = new Point(215, 210);
            m_pTabGeneral_SessionTimeout.Minimum  = 10;
            m_pTabGeneral_SessionTimeout.Maximum  = 99999;

            mt_TabGeneral_SessTimeoutSec           = new Label();
            mt_TabGeneral_SessTimeoutSec.Size      = new Size(70, 20);
            mt_TabGeneral_SessTimeoutSec.Location  = new Point(290, 210);
            mt_TabGeneral_SessTimeoutSec.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SessTimeoutSec.Text      = "seconds";

            mt_TabGeneral_MaxConnections           = new Label();
            mt_TabGeneral_MaxConnections.Size      = new Size(200, 20);
            mt_TabGeneral_MaxConnections.Location  = new Point(10, 240);
            mt_TabGeneral_MaxConnections.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_MaxConnections.Text      = "Maximum Connections:";

            m_pTabGeneral_MaxConnections          = new NumericUpDown();
            m_pTabGeneral_MaxConnections.Size     = new Size(70, 20);
            m_pTabGeneral_MaxConnections.Location = new Point(215, 240);
            m_pTabGeneral_MaxConnections.Minimum  = 1;
            m_pTabGeneral_MaxConnections.Maximum  = 99999;

            mt_TabGeneral_MaxConnsPerIP           = new Label();
            mt_TabGeneral_MaxConnsPerIP.Size      = new Size(200, 20);
            mt_TabGeneral_MaxConnsPerIP.Location  = new Point(1, 265);
            mt_TabGeneral_MaxConnsPerIP.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_MaxConnsPerIP.Text      = "Maximum Connections per IP:";

            m_pTabGeneral_MaxConnsPerIP          = new NumericUpDown();
            m_pTabGeneral_MaxConnsPerIP.Size     = new Size(70, 20);
            m_pTabGeneral_MaxConnsPerIP.Location = new Point(215, 265);
            m_pTabGeneral_MaxConnsPerIP.Minimum  = 0;
            m_pTabGeneral_MaxConnsPerIP.Maximum  = 99999;

            mt_TabGeneral_MaxConnsPerIP0           = new Label();
            mt_TabGeneral_MaxConnsPerIP0.Size      = new Size(164, 20);
            mt_TabGeneral_MaxConnsPerIP0.Location  = new Point(290, 265);
            mt_TabGeneral_MaxConnsPerIP0.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_MaxConnsPerIP0.Text      = "(0 for unlimited)";

            mt_TabGeneral_RelayInterval           = new Label();
            mt_TabGeneral_RelayInterval.Size      = new Size(200, 20);
            mt_TabGeneral_RelayInterval.Location  = new Point(10, 290);
            mt_TabGeneral_RelayInterval.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_RelayInterval.Text      = "Relay Interval:";

            m_pTabGeneral_RelayInterval          = new NumericUpDown();
            m_pTabGeneral_RelayInterval.Size     = new Size(70, 20);
            m_pTabGeneral_RelayInterval.Location = new Point(215, 290);
            m_pTabGeneral_RelayInterval.Minimum  = 1;
            m_pTabGeneral_RelayInterval.Maximum  = 9999;

            mt_TabGeneral_RelayIntervalSeconds           = new Label();
            mt_TabGeneral_RelayIntervalSeconds.Size      = new Size(50, 20);
            mt_TabGeneral_RelayIntervalSeconds.Location  = new Point(290, 290);
            mt_TabGeneral_RelayIntervalSeconds.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_RelayIntervalSeconds.Text      = "seconds";

            mt_TabGeneral_RelayRetryInterval           = new Label();
            mt_TabGeneral_RelayRetryInterval.Size      = new Size(200, 20);
            mt_TabGeneral_RelayRetryInterval.Location  = new Point(10, 315);
            mt_TabGeneral_RelayRetryInterval.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_RelayRetryInterval.Text      = "Relay Retry Interval:";

            m_pTabGeneral_RelayRetryInterval          = new NumericUpDown();
            m_pTabGeneral_RelayRetryInterval.Size     = new Size(70, 20);
            m_pTabGeneral_RelayRetryInterval.Location = new Point(215, 315);
            m_pTabGeneral_RelayRetryInterval.Minimum  = 1;
            m_pTabGeneral_RelayRetryInterval.Maximum  = 9999;

            mt_TabGeneral_RelayRetryIntervSec           = new Label();
            mt_TabGeneral_RelayRetryIntervSec.Size      = new Size(50, 20);
            mt_TabGeneral_RelayRetryIntervSec.Location  = new Point(290, 315);
            mt_TabGeneral_RelayRetryIntervSec.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_RelayRetryIntervSec.Text      = "seconds";

            mt_TabGeneral_SendUndelWarning           = new Label();
            mt_TabGeneral_SendUndelWarning.Size      = new Size(200, 20);
            mt_TabGeneral_SendUndelWarning.Location  = new Point(10, 345);
            mt_TabGeneral_SendUndelWarning.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SendUndelWarning.Text      = "Send undelivered warning after:";

            m_pTabGeneral_SendUndelWarning          = new NumericUpDown();
            m_pTabGeneral_SendUndelWarning.Size     = new Size(70, 20);
            m_pTabGeneral_SendUndelWarning.Location = new Point(215, 345);
            m_pTabGeneral_SendUndelWarning.Minimum  = 1;
            m_pTabGeneral_SendUndelWarning.Maximum  = 9999;

            mt_TabGeneral_SendUndelWarnMinutes           = new Label();
            mt_TabGeneral_SendUndelWarnMinutes.Size      = new Size(50, 20);
            mt_TabGeneral_SendUndelWarnMinutes.Location  = new Point(290, 345);
            mt_TabGeneral_SendUndelWarnMinutes.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SendUndelWarnMinutes.Text      = "minutes";

            mt_TabGeneral_SendUndelivered           = new Label();
            mt_TabGeneral_SendUndelivered.Size      = new Size(200, 20);
            mt_TabGeneral_SendUndelivered.Location  = new Point(10, 370);
            mt_TabGeneral_SendUndelivered.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SendUndelivered.Text      = "Send undelivered after:";

            m_pTabGeneral_SendUndelivered          = new NumericUpDown();
            m_pTabGeneral_SendUndelivered.Size     = new Size(70, 20);
            m_pTabGeneral_SendUndelivered.Location = new Point(215, 370);
            m_pTabGeneral_SendUndelivered.Minimum  = 1;
            m_pTabGeneral_SendUndelivered.Maximum  = 999;

            mt_TabGeneral_SendUndeliveredHours           = new Label();
            mt_TabGeneral_SendUndeliveredHours.Size      = new Size(50, 20);
            mt_TabGeneral_SendUndeliveredHours.Location  = new Point(290, 370);
            mt_TabGeneral_SendUndeliveredHours.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SendUndeliveredHours.Text      = "hours";

            m_pTabGeneral_StoreUndeliveredMsgs          = new CheckBox();
            m_pTabGeneral_StoreUndeliveredMsgs.Size     = new Size(250, 20);
            m_pTabGeneral_StoreUndeliveredMsgs.Location = new Point(215, 395);
            m_pTabGeneral_StoreUndeliveredMsgs.Text     = "Store undelivered messages";

            m_pTabGeneral_Notification          = new wctrl_Notification();
            m_pTabGeneral_Notification.Size     = new Size(485, 38);
            m_pTabGeneral_Notification.Location = new Point(10, 421);
            m_pTabGeneral_Notification.Icon     = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabGeneral_Notification.Visible  = false;

            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendSmartHost);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SmartHostsBalanceMode);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHostsBalanceMode);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHosts_Toolbar);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHosts);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendDns);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SessionTimeout);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SessionTimeout);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SessTimeoutSec);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnections);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_MaxConnections);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnsPerIP);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_MaxConnsPerIP);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnsPerIP0);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayInterval);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_RelayInterval);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayIntervalSeconds);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayRetryInterval);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_RelayRetryInterval);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayRetryIntervSec);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelWarning);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendUndelWarning);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelWarnMinutes);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelivered);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendUndelivered);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndeliveredHours);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_StoreUndeliveredMsgs);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_Notification);
            //-------------------------------------------------//

            #endregion

            #region Tabpage IP Bindings

            m_pTabBindings_BindingsToolbar              = new ToolStrip();
            m_pTabBindings_BindingsToolbar.Size         = new Size(95, 25);
            m_pTabBindings_BindingsToolbar.Location     = new Point(425, 13);
            m_pTabBindings_BindingsToolbar.Dock         = DockStyle.None;
            m_pTabBindings_BindingsToolbar.GripStyle    = ToolStripGripStyle.Hidden;
            m_pTabBindings_BindingsToolbar.BackColor    = this.BackColor;
            m_pTabBindings_BindingsToolbar.Renderer     = new ToolBarRendererEx();
            m_pTabBindings_BindingsToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabBindings_BindingsToolbar_ItemClicked);
            // Add button
            ToolStripButton bindings_button_Add = new ToolStripButton();
            bindings_button_Add.Image       = ResManager.GetIcon("add.ico").ToBitmap();
            bindings_button_Add.Tag         = "add";
            bindings_button_Add.ToolTipText = "Add";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Add);
            // Edit button
            ToolStripButton bindings_button_Edit = new ToolStripButton();
            bindings_button_Edit.Enabled     = false;
            bindings_button_Edit.Image       = ResManager.GetIcon("edit.ico").ToBitmap();
            bindings_button_Edit.Tag         = "edit";
            bindings_button_Edit.ToolTipText = "edit";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Edit);
            // Delete button
            ToolStripButton bindings_button_Delete = new ToolStripButton();
            bindings_button_Delete.Enabled     = false;
            bindings_button_Delete.Image       = ResManager.GetIcon("delete.ico").ToBitmap();
            bindings_button_Delete.Tag         = "delete";
            bindings_button_Delete.ToolTipText = "Delete";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Delete);

            m_pTabBindings_Bindings                       = new ListView();
            m_pTabBindings_Bindings.Size                  = new Size(485, 375);
            m_pTabBindings_Bindings.Location              = new Point(10, 40);
            m_pTabBindings_Bindings.View                  = View.Details;
            m_pTabBindings_Bindings.HeaderStyle           = ColumnHeaderStyle.Nonclickable;
            m_pTabBindings_Bindings.HideSelection         = false;
            m_pTabBindings_Bindings.FullRowSelect         = true;
            m_pTabBindings_Bindings.MultiSelect           = false;
            m_pTabBindings_Bindings.SelectedIndexChanged += new EventHandler(m_pTabBindings_Bindings_SelectedIndexChanged);
            m_pTabBindings_Bindings.Columns.Add("Host Name", 250, HorizontalAlignment.Left);
            m_pTabBindings_Bindings.Columns.Add("IP", 190, HorizontalAlignment.Left);

            m_pTabBindings_Notification          = new wctrl_Notification();
            m_pTabBindings_Notification.Size     = new Size(485, 38);
            m_pTabBindings_Notification.Location = new Point(10, 421);
            m_pTabBindings_Notification.Icon     = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabBindings_Notification.Visible  = false;

            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_BindingsToolbar);
            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_Bindings);
            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_Notification);

            #endregion

            // Common UI
            this.Controls.Add(m_pTab);
            this.Controls.Add(m_pApply);
        }
Beispiel #3
0
        /// <summary>
        /// Creates and initializes UI.
        /// </summary>
        private void InitUI()
        {
            m_pTab          = new TabControl();
            m_pTab.Size     = new Size(515, 490);
            m_pTab.Location = new Point(5, 0);

            m_pApply          = new Button();
            m_pApply.Size     = new Size(70, 20);
            m_pApply.Location = new Point(450, 500);
            m_pApply.Text     = "Apply";
            m_pApply.Click   += new EventHandler(m_pApply_Click);

            #region Tabpage General

            m_pTab.TabPages.Add("General");

            mt_TabGeneral_DnsServers           = new Label();
            mt_TabGeneral_DnsServers.Size      = new Size(80, 20);
            mt_TabGeneral_DnsServers.Location  = new Point(0, 10);
            mt_TabGeneral_DnsServers.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_DnsServers.Text      = "DNS servers:";

            m_pTabGeneral_DnsServer          = new TextBox();
            m_pTabGeneral_DnsServer.Size     = new Size(180, 20);
            m_pTabGeneral_DnsServer.Location = new Point(85, 10);

            m_pTabGeneral_DnsServerToolbar              = new ToolStrip();
            m_pTabGeneral_DnsServerToolbar.Size         = new Size(60, 25);
            m_pTabGeneral_DnsServerToolbar.Location     = new Point(270, 8);
            m_pTabGeneral_DnsServerToolbar.Dock         = DockStyle.None;
            m_pTabGeneral_DnsServerToolbar.GripStyle    = ToolStripGripStyle.Hidden;
            m_pTabGeneral_DnsServerToolbar.BackColor    = this.BackColor;
            m_pTabGeneral_DnsServerToolbar.Renderer     = new ToolBarRendererEx();
            m_pTabGeneral_DnsServerToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabGeneral_DnsServerToolbar_ItemClicked);
            // Add button
            ToolStripButton button_Add = new ToolStripButton();
            button_Add.Image       = ResManager.GetIcon("add.ico").ToBitmap();
            button_Add.Tag         = "add";
            button_Add.ToolTipText = "Add";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Add);
            // Delete button
            ToolStripButton button_Delete = new ToolStripButton();
            button_Delete.Enabled     = false;
            button_Delete.Image       = ResManager.GetIcon("delete.ico").ToBitmap();
            button_Delete.Tag         = "delete";
            button_Delete.ToolTipText = "Delete";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Delete);
            // Separator
            m_pTabGeneral_DnsServerToolbar.Items.Add(new ToolStripSeparator());
            // Up button
            ToolStripButton button_Up = new ToolStripButton();
            button_Up.Enabled = false;
            button_Up.Image   = ResManager.GetIcon("up.ico").ToBitmap();
            button_Up.Tag     = "up";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_Up);
            // Down button
            ToolStripButton button_down = new ToolStripButton();
            button_down.Enabled = false;
            button_down.Image   = ResManager.GetIcon("down.ico").ToBitmap();
            button_down.Tag     = "down";
            m_pTabGeneral_DnsServerToolbar.Items.Add(button_down);

            m_pTabGeneral_DnsServers                       = new ListView();
            m_pTabGeneral_DnsServers.Size                  = new Size(355, 100);
            m_pTabGeneral_DnsServers.Location              = new Point(10, 35);
            m_pTabGeneral_DnsServers.View                  = View.Details;
            m_pTabGeneral_DnsServers.FullRowSelect         = true;
            m_pTabGeneral_DnsServers.HideSelection         = false;
            m_pTabGeneral_DnsServers.SelectedIndexChanged += new EventHandler(m_pTabGeneral_DnsServers_SelectedIndexChanged);
            m_pTabGeneral_DnsServers.Columns.Add("IP", 325);

            m_pTabGeneral_Notification          = new wctrl_Notification();
            m_pTabGeneral_Notification.Size     = new Size(485, 38);
            m_pTabGeneral_Notification.Location = new Point(10, 421);
            m_pTabGeneral_Notification.Icon     = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabGeneral_Notification.Visible  = false;

            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_DnsServers);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServer);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServerToolbar);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_DnsServers);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_Notification);

            #endregion

            this.Controls.Add(m_pTab);
            this.Controls.Add(m_pApply);
        }
        /// <summary>
        /// Creates and initializes window UI.
        /// </summary>
        private void InitUI()
        {
            //--- Common UI -------------------------------------//
            m_pTab = new TabControl();
            m_pTab.Size = new Size(515,490);
            m_pTab.Location = new Point(5,0);
            m_pTab.TabPages.Add(new TabPage("General"));
            m_pTab.TabPages.Add(new TabPage("IP Bindings"));

            m_pApply = new Button();
            m_pApply.Size = new Size(70,20);
            m_pApply.Location = new Point(450,500);
            m_pApply.Text = "Apply";
            m_pApply.Click += new EventHandler(m_pApply_Click);
            //---------------------------------------------------//

            #region Tabpage General

            //--- Tabpage General UI ----------------------------//
            m_pTabGeneral_SendSmartHost = new RadioButton();
            m_pTabGeneral_SendSmartHost.Size = new Size(250,20);
            m_pTabGeneral_SendSmartHost.Location = new Point(10,15);
            m_pTabGeneral_SendSmartHost.Text = "Send mails through SmartHost";
            m_pTabGeneral_SendSmartHost.CheckedChanged += new EventHandler(m_pTabGeneral_SendSmartHost_CheckedChanged);

            mt_TabGeneral_SmartHostsBalanceMode = new Label();
            mt_TabGeneral_SmartHostsBalanceMode.Size = new Size(160,20);
            mt_TabGeneral_SmartHostsBalanceMode.Location = new Point(10,40);
            mt_TabGeneral_SmartHostsBalanceMode.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SmartHostsBalanceMode.Text = "Smart hosts balance mode:";

            m_pTabGeneral_SmartHostsBalanceMode = new ComboBox();
            m_pTabGeneral_SmartHostsBalanceMode.Size = new Size(100,20);
            m_pTabGeneral_SmartHostsBalanceMode.Location = new Point(180,40);
            m_pTabGeneral_SmartHostsBalanceMode.DropDownStyle = ComboBoxStyle.DropDownList;
            m_pTabGeneral_SmartHostsBalanceMode.Items.Add("Load-balance");
            m_pTabGeneral_SmartHostsBalanceMode.Items.Add("Fail-over");
            m_pTabGeneral_SmartHostsBalanceMode.SelectedIndex = 0;

            m_pTabGeneral_SmartHosts_Toolbar = new ToolStrip();
            m_pTabGeneral_SmartHosts_Toolbar.Size = new Size(95,25);
            m_pTabGeneral_SmartHosts_Toolbar.Location = new Point(373,40);
            m_pTabGeneral_SmartHosts_Toolbar.Dock = DockStyle.None;
            m_pTabGeneral_SmartHosts_Toolbar.GripStyle = ToolStripGripStyle.Hidden;
            m_pTabGeneral_SmartHosts_Toolbar.BackColor = this.BackColor;
            m_pTabGeneral_SmartHosts_Toolbar.Renderer = new ToolBarRendererEx();
            m_pTabGeneral_SmartHosts_Toolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabGeneral_SmartHosts_Toolbar_ItemClicked);
            // Add button
            ToolStripButton button_Add = new ToolStripButton();
            button_Add.Image = ResManager.GetIcon("add.ico").ToBitmap();
            button_Add.Tag = "add";
            button_Add.ToolTipText = "Add";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Add);
            // Edit button
            ToolStripButton button_Edit = new ToolStripButton();
            button_Edit.Enabled = false;
            button_Edit.Image = ResManager.GetIcon("edit.ico").ToBitmap();
            button_Edit.Tag = "edit";
            button_Edit.ToolTipText = "edit";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Edit);
            // Delete button
            ToolStripButton button_Delete = new ToolStripButton();
            button_Delete.Enabled = false;
            button_Delete.Image = ResManager.GetIcon("delete.ico").ToBitmap();
            button_Delete.Tag = "delete";
            button_Delete.ToolTipText = "Delete";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(button_Delete);
            // Separator
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(new ToolStripSeparator());
            // Up button
            ToolStripButton rulesToolbar_button_Up = new ToolStripButton();
            rulesToolbar_button_Up.Enabled = false;
            rulesToolbar_button_Up.Image = ResManager.GetIcon("up.ico").ToBitmap();
            rulesToolbar_button_Up.Tag = "up";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(rulesToolbar_button_Up);
            // Down button
            ToolStripButton rulesToolbar_button_down = new ToolStripButton();
            rulesToolbar_button_down.Enabled = false;
            rulesToolbar_button_down.Image = ResManager.GetIcon("down.ico").ToBitmap();
            rulesToolbar_button_down.Tag = "down";
            m_pTabGeneral_SmartHosts_Toolbar.Items.Add(rulesToolbar_button_down);

            m_pTabGeneral_SmartHosts = new ListView();
            m_pTabGeneral_SmartHosts.Size = new Size(465,100);
            m_pTabGeneral_SmartHosts.Location = new Point(30,65);
            m_pTabGeneral_SmartHosts.View = View.Details;
            m_pTabGeneral_SmartHosts.FullRowSelect = true;
            m_pTabGeneral_SmartHosts.HideSelection = false;
            m_pTabGeneral_SmartHosts.SelectedIndexChanged += new EventHandler(m_pTabGeneral_SmartHosts_SelectedIndexChanged);
            m_pTabGeneral_SmartHosts.Columns.Add("Host",200);
            m_pTabGeneral_SmartHosts.Columns.Add("Port",60);
            m_pTabGeneral_SmartHosts.Columns.Add("SSL Mode",80);
            m_pTabGeneral_SmartHosts.Columns.Add("User Name",100);

            m_pTabGeneral_SendDns = new RadioButton();
            m_pTabGeneral_SendDns.Size = new Size(250,20);
            m_pTabGeneral_SendDns.Location = new Point(10,180);
            m_pTabGeneral_SendDns.Text = "Send mails directly using DNS";
            m_pTabGeneral_SendDns.CheckedChanged += new EventHandler(m_pTabGeneral_SendSmartHost_CheckedChanged);
            
            mt_TabGeneral_SessionTimeout = new Label();
            mt_TabGeneral_SessionTimeout.Size = new Size(200,20);
            mt_TabGeneral_SessionTimeout.Location = new Point(10,210);
            mt_TabGeneral_SessionTimeout.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SessionTimeout.Text = "Session Idle Timeout:";

            m_pTabGeneral_SessionTimeout = new NumericUpDown();
            m_pTabGeneral_SessionTimeout.Size = new Size(70,20);
            m_pTabGeneral_SessionTimeout.Location = new Point(215,210);
            m_pTabGeneral_SessionTimeout.Minimum = 10;
            m_pTabGeneral_SessionTimeout.Maximum = 99999;

            mt_TabGeneral_SessTimeoutSec = new Label();
            mt_TabGeneral_SessTimeoutSec.Size = new Size(70,20);
            mt_TabGeneral_SessTimeoutSec.Location = new Point(290,210);
            mt_TabGeneral_SessTimeoutSec.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SessTimeoutSec.Text = "seconds";

            mt_TabGeneral_MaxConnections = new Label();
            mt_TabGeneral_MaxConnections.Size = new Size(200,20);
            mt_TabGeneral_MaxConnections.Location = new Point(10,240);
            mt_TabGeneral_MaxConnections.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_MaxConnections.Text = "Maximum Connections:";
                        
            m_pTabGeneral_MaxConnections = new NumericUpDown();
            m_pTabGeneral_MaxConnections.Size = new Size(70,20);
            m_pTabGeneral_MaxConnections.Location = new Point(215,240);
            m_pTabGeneral_MaxConnections.Minimum = 1;
            m_pTabGeneral_MaxConnections.Maximum = 99999;

            mt_TabGeneral_MaxConnsPerIP = new Label();
            mt_TabGeneral_MaxConnsPerIP.Size = new Size(200,20);
            mt_TabGeneral_MaxConnsPerIP.Location = new Point(1,265);
            mt_TabGeneral_MaxConnsPerIP.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_MaxConnsPerIP.Text = "Maximum Connections per IP:";

            m_pTabGeneral_MaxConnsPerIP = new NumericUpDown();
            m_pTabGeneral_MaxConnsPerIP.Size = new Size(70,20);
            m_pTabGeneral_MaxConnsPerIP.Location = new Point(215,265);
            m_pTabGeneral_MaxConnsPerIP.Minimum = 0;
            m_pTabGeneral_MaxConnsPerIP.Maximum = 99999;

            mt_TabGeneral_MaxConnsPerIP0 = new Label();
            mt_TabGeneral_MaxConnsPerIP0.Size = new Size(164,20);
            mt_TabGeneral_MaxConnsPerIP0.Location = new Point(290,265);
            mt_TabGeneral_MaxConnsPerIP0.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_MaxConnsPerIP0.Text = "(0 for unlimited)";

            mt_TabGeneral_RelayInterval = new Label();
            mt_TabGeneral_RelayInterval.Size = new Size(200,20);
            mt_TabGeneral_RelayInterval.Location = new Point(10,290);
            mt_TabGeneral_RelayInterval.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_RelayInterval.Text = "Relay Interval:";

            m_pTabGeneral_RelayInterval = new NumericUpDown();
            m_pTabGeneral_RelayInterval.Size = new Size(70,20);
            m_pTabGeneral_RelayInterval.Location = new Point(215,290);
            m_pTabGeneral_RelayInterval.Minimum = 1;
            m_pTabGeneral_RelayInterval.Maximum = 9999;

            mt_TabGeneral_RelayIntervalSeconds = new Label();
            mt_TabGeneral_RelayIntervalSeconds.Size = new Size(50,20);
            mt_TabGeneral_RelayIntervalSeconds.Location = new Point(290,290);
            mt_TabGeneral_RelayIntervalSeconds.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_RelayIntervalSeconds.Text = "seconds";

            mt_TabGeneral_RelayRetryInterval = new Label();
            mt_TabGeneral_RelayRetryInterval.Size = new Size(200,20);
            mt_TabGeneral_RelayRetryInterval.Location = new Point(10,315);
            mt_TabGeneral_RelayRetryInterval.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_RelayRetryInterval.Text = "Relay Retry Interval:";

            m_pTabGeneral_RelayRetryInterval = new NumericUpDown();
            m_pTabGeneral_RelayRetryInterval.Size = new Size(70,20);
            m_pTabGeneral_RelayRetryInterval.Location = new Point(215,315);
            m_pTabGeneral_RelayRetryInterval.Minimum = 1;
            m_pTabGeneral_RelayRetryInterval.Maximum = 9999;

            mt_TabGeneral_RelayRetryIntervSec = new Label();
            mt_TabGeneral_RelayRetryIntervSec.Size = new Size(50,20);
            mt_TabGeneral_RelayRetryIntervSec.Location = new Point(290,315);
            mt_TabGeneral_RelayRetryIntervSec.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_RelayRetryIntervSec.Text = "seconds";

            mt_TabGeneral_SendUndelWarning = new Label();
            mt_TabGeneral_SendUndelWarning.Size = new Size(200,20);
            mt_TabGeneral_SendUndelWarning.Location = new Point(10,345);
            mt_TabGeneral_SendUndelWarning.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SendUndelWarning.Text = "Send undelivered warning after:";

            m_pTabGeneral_SendUndelWarning = new NumericUpDown();
            m_pTabGeneral_SendUndelWarning.Size = new Size(70,20);
            m_pTabGeneral_SendUndelWarning.Location = new Point(215,345);
            m_pTabGeneral_SendUndelWarning.Minimum = 1;
            m_pTabGeneral_SendUndelWarning.Maximum = 9999;

            mt_TabGeneral_SendUndelWarnMinutes = new Label();
            mt_TabGeneral_SendUndelWarnMinutes.Size = new Size(50,20);
            mt_TabGeneral_SendUndelWarnMinutes.Location = new Point(290,345);
            mt_TabGeneral_SendUndelWarnMinutes.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SendUndelWarnMinutes.Text = "minutes";

            mt_TabGeneral_SendUndelivered = new Label();
            mt_TabGeneral_SendUndelivered.Size = new Size(200,20);
            mt_TabGeneral_SendUndelivered.Location = new Point(10,370);
            mt_TabGeneral_SendUndelivered.TextAlign = ContentAlignment.MiddleRight;
            mt_TabGeneral_SendUndelivered.Text = "Send undelivered after:";

            m_pTabGeneral_SendUndelivered = new NumericUpDown();
            m_pTabGeneral_SendUndelivered.Size = new Size(70,20);
            m_pTabGeneral_SendUndelivered.Location = new Point(215,370);
            m_pTabGeneral_SendUndelivered.Minimum = 1;
            m_pTabGeneral_SendUndelivered.Maximum = 999;

            mt_TabGeneral_SendUndeliveredHours = new Label();
            mt_TabGeneral_SendUndeliveredHours.Size = new Size(50,20);
            mt_TabGeneral_SendUndeliveredHours.Location = new Point(290,370);
            mt_TabGeneral_SendUndeliveredHours.TextAlign = ContentAlignment.MiddleLeft;
            mt_TabGeneral_SendUndeliveredHours.Text = "hours";

            m_pTabGeneral_StoreUndeliveredMsgs = new CheckBox();
            m_pTabGeneral_StoreUndeliveredMsgs.Size = new Size(250,20);
            m_pTabGeneral_StoreUndeliveredMsgs.Location = new Point(215,395);
            m_pTabGeneral_StoreUndeliveredMsgs.Text = "Store undelivered messages";

            m_pTabGeneral_Notification = new wctrl_Notification();
            m_pTabGeneral_Notification.Size = new Size(485,38);
            m_pTabGeneral_Notification.Location = new Point(10,421);
            m_pTabGeneral_Notification.Icon = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabGeneral_Notification.Visible = false;
                                    
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendSmartHost);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SmartHostsBalanceMode);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHostsBalanceMode);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHosts_Toolbar);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SmartHosts);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendDns);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SessionTimeout);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SessionTimeout);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SessTimeoutSec);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnections);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_MaxConnections);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnsPerIP);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_MaxConnsPerIP);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_MaxConnsPerIP0);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayInterval);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_RelayInterval);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayIntervalSeconds);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayRetryInterval);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_RelayRetryInterval);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_RelayRetryIntervSec);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelWarning);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendUndelWarning);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelWarnMinutes);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndelivered);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_SendUndelivered);
            m_pTab.TabPages[0].Controls.Add(mt_TabGeneral_SendUndeliveredHours);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_StoreUndeliveredMsgs);
            m_pTab.TabPages[0].Controls.Add(m_pTabGeneral_Notification);
            //-------------------------------------------------//

            #endregion

            #region Tabpage IP Bindings
                        
            m_pTabBindings_BindingsToolbar = new ToolStrip();
            m_pTabBindings_BindingsToolbar.Size = new Size(95,25);
            m_pTabBindings_BindingsToolbar.Location = new Point(425,13);
            m_pTabBindings_BindingsToolbar.Dock = DockStyle.None;
            m_pTabBindings_BindingsToolbar.GripStyle = ToolStripGripStyle.Hidden;
            m_pTabBindings_BindingsToolbar.BackColor = this.BackColor;
            m_pTabBindings_BindingsToolbar.Renderer = new ToolBarRendererEx();
            m_pTabBindings_BindingsToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pTabBindings_BindingsToolbar_ItemClicked);
            // Add button
            ToolStripButton bindings_button_Add = new ToolStripButton();
            bindings_button_Add.Image = ResManager.GetIcon("add.ico").ToBitmap();
            bindings_button_Add.Tag = "add";
            bindings_button_Add.ToolTipText = "Add";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Add);
            // Edit button
            ToolStripButton bindings_button_Edit = new ToolStripButton();
            bindings_button_Edit.Enabled = false;
            bindings_button_Edit.Image = ResManager.GetIcon("edit.ico").ToBitmap();
            bindings_button_Edit.Tag = "edit";
            bindings_button_Edit.ToolTipText = "edit";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Edit);
            // Delete button
            ToolStripButton bindings_button_Delete = new ToolStripButton();
            bindings_button_Delete.Enabled = false;
            bindings_button_Delete.Image = ResManager.GetIcon("delete.ico").ToBitmap();
            bindings_button_Delete.Tag = "delete";
            bindings_button_Delete.ToolTipText = "Delete";
            m_pTabBindings_BindingsToolbar.Items.Add(bindings_button_Delete);

            m_pTabBindings_Bindings = new ListView();
            m_pTabBindings_Bindings.Size = new Size(485,375);
            m_pTabBindings_Bindings.Location = new Point(10,40);
            m_pTabBindings_Bindings.View = View.Details;
            m_pTabBindings_Bindings.HeaderStyle = ColumnHeaderStyle.Nonclickable;
            m_pTabBindings_Bindings.HideSelection = false;
            m_pTabBindings_Bindings.FullRowSelect = true;
            m_pTabBindings_Bindings.MultiSelect = false;
            m_pTabBindings_Bindings.SelectedIndexChanged += new EventHandler(m_pTabBindings_Bindings_SelectedIndexChanged);
            m_pTabBindings_Bindings.Columns.Add("Host Name",250,HorizontalAlignment.Left);
            m_pTabBindings_Bindings.Columns.Add("IP",190,HorizontalAlignment.Left);
                        
            m_pTabBindings_Notification = new wctrl_Notification();
            m_pTabBindings_Notification.Size = new Size(485,38);
            m_pTabBindings_Notification.Location = new Point(10,421);
            m_pTabBindings_Notification.Icon = ResManager.GetIcon("warning.ico").ToBitmap();
            m_pTabBindings_Notification.Visible = false;

            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_BindingsToolbar);
            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_Bindings);
            m_pTab.TabPages[1].Controls.Add(m_pTabBindings_Notification);

            #endregion

            // Common UI
            this.Controls.Add(m_pTab);
            this.Controls.Add(m_pApply);
        }