/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(450, 300); m_pClearAllEvents = new Button(); m_pClearAllEvents.Size = new Size(100, 20); m_pClearAllEvents.Location = new Point(9, 15); m_pClearAllEvents.Text = "Clear all Events"; m_pClearAllEvents.Click += new EventHandler(m_pClearAllEvents_Click); m_pEventsImages = new ImageList(); m_pEventsImages.Images.Add(ResManager.GetIcon("error.ico")); m_pEvents = new WListView(); m_pEvents.Size = new Size(425, 210); m_pEvents.Location = new Point(9, 47); m_pEvents.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pEvents.View = View.Details; m_pEvents.FullRowSelect = true; m_pEvents.HideSelection = false; m_pEvents.SmallImageList = m_pEventsImages; m_pEvents.DoubleClick += new EventHandler(m_pEvents_DoubleClick); m_pEvents.Columns.Add("", 20, HorizontalAlignment.Left); m_pEvents.Columns.Add("Virtual Server", 120, HorizontalAlignment.Left); m_pEvents.Columns.Add("Date", 130, HorizontalAlignment.Left); m_pEvents.Columns.Add("Text", 200, HorizontalAlignment.Left); this.Controls.Add(m_pClearAllEvents); this.Controls.Add(m_pEvents); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(450,300); m_pClearAllEvents = new Button(); m_pClearAllEvents.Size = new Size(100,20); m_pClearAllEvents.Location = new Point(9,15); m_pClearAllEvents.Text = "Clear all Events"; m_pClearAllEvents.Click += new EventHandler(m_pClearAllEvents_Click); m_pEventsImages = new ImageList(); m_pEventsImages.Images.Add(ResManager.GetIcon("error.ico")); m_pEvents = new WListView(); m_pEvents.Size = new Size(425,210); m_pEvents.Location = new Point(9,47); m_pEvents.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pEvents.View = View.Details; m_pEvents.FullRowSelect = true; m_pEvents.HideSelection = false; m_pEvents.SmallImageList = m_pEventsImages; m_pEvents.DoubleClick += new EventHandler(m_pEvents_DoubleClick); m_pEvents.Columns.Add("",20,HorizontalAlignment.Left); m_pEvents.Columns.Add("Virtual Server",120,HorizontalAlignment.Left); m_pEvents.Columns.Add("Date",130,HorizontalAlignment.Left); m_pEvents.Columns.Add("Text",200,HorizontalAlignment.Left); this.Controls.Add(m_pClearAllEvents); this.Controls.Add(m_pEvents); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472, 357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); // View button ToolStripButton button_View = new ToolStripButton(); button_View.Enabled = false; button_View.Image = ResManager.GetIcon("viewmessages.ico").ToBitmap(); button_View.Tag = "view"; button_View.ToolTipText = "View Contacts"; m_pToolbar.Items.Add(button_View); m_pRegistrations = new WListView(); m_pRegistrations.Size = new Size(445, 265); m_pRegistrations.Location = new Point(9, 47); m_pRegistrations.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pRegistrations.View = View.Details; m_pRegistrations.FullRowSelect = true; m_pRegistrations.HideSelection = false; m_pRegistrations.Columns.Add("User", 120, HorizontalAlignment.Left); m_pRegistrations.Columns.Add("Address of Record", 360, HorizontalAlignment.Left); m_pRegistrations.SelectedIndexChanged += new EventHandler(m_pRegistrations_SelectedIndexChanged); m_pRegistrations.DoubleClick += new EventHandler(m_pRegistrations_DoubleClick); this.Controls.Add(m_pRegistrations); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472,357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); // View button ToolStripButton button_View = new ToolStripButton(); button_View.Enabled = false; button_View.Image = ResManager.GetIcon("viewmessages.ico").ToBitmap(); button_View.Tag = "view"; button_View.ToolTipText = "View Contacts"; m_pToolbar.Items.Add(button_View); m_pRegistrations = new WListView(); m_pRegistrations.Size = new Size(445,265); m_pRegistrations.Location = new Point(9,47); m_pRegistrations.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pRegistrations.View = View.Details; m_pRegistrations.FullRowSelect = true; m_pRegistrations.HideSelection = false; m_pRegistrations.Columns.Add("User",120,HorizontalAlignment.Left); m_pRegistrations.Columns.Add("Address of Record",360,HorizontalAlignment.Left); m_pRegistrations.SelectedIndexChanged += new EventHandler(m_pRegistrations_SelectedIndexChanged); m_pRegistrations.DoubleClick += new EventHandler(m_pRegistrations_DoubleClick); this.Controls.Add(m_pRegistrations); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(450, 300); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // Add button ToolStripButton button_Add = new ToolStripButton(); button_Add.Image = ResManager.GetIcon("add.ico").ToBitmap(); button_Add.Tag = "add"; m_pToolbar.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"; m_pToolbar.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"; m_pToolbar.Items.Add(button_Delete); ImageList imgListServers = new ImageList(); imgListServers.Images.Add(ResManager.GetIcon("server_running.ico")); imgListServers.Images.Add(ResManager.GetIcon("server_stopped.ico")); m_pServers = new WListView(); m_pServers.Size = new Size(425, 210); m_pServers.Location = new Point(9, 47); m_pServers.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pServers.View = View.Details; m_pServers.FullRowSelect = true; m_pServers.HideSelection = false; m_pServers.SmallImageList = imgListServers; m_pServers.SelectedIndexChanged += new EventHandler(m_pServers_SelectedIndexChanged); m_pServers.DoubleClick += new EventHandler(m_pServers_DoubleClick); m_pServers.Columns.Add("Name", 400, HorizontalAlignment.Left); this.Controls.Add(m_pServers); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(450,300); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // Add button ToolStripButton button_Add = new ToolStripButton(); button_Add.Image = ResManager.GetIcon("add.ico").ToBitmap(); button_Add.Tag = "add"; m_pToolbar.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"; m_pToolbar.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"; m_pToolbar.Items.Add(button_Delete); ImageList imgListServers = new ImageList(); imgListServers.Images.Add(ResManager.GetIcon("server_running.ico")); imgListServers.Images.Add(ResManager.GetIcon("server_stopped.ico")); m_pServers = new WListView(); m_pServers.Size = new Size(425,210); m_pServers.Location = new Point(9,47); m_pServers.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pServers.View = View.Details; m_pServers.FullRowSelect = true; m_pServers.HideSelection = false; m_pServers.SmallImageList = imgListServers; m_pServers.SelectedIndexChanged += new EventHandler(m_pServers_SelectedIndexChanged); m_pServers.DoubleClick += new EventHandler(m_pServers_DoubleClick); m_pServers.Columns.Add("Name",400,HorizontalAlignment.Left); this.Controls.Add(m_pServers); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472, 357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // 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_pToolbar.Items.Add(button_Delete); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); m_pCalls = new WListView(); m_pCalls.Size = new Size(445, 265); m_pCalls.Location = new Point(9, 47); m_pCalls.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pCalls.View = View.Details; m_pCalls.FullRowSelect = true; m_pCalls.HideSelection = false; m_pCalls.Columns.Add("Caller", 180, HorizontalAlignment.Left); m_pCalls.Columns.Add("Callee", 180, HorizontalAlignment.Left); m_pCalls.Columns.Add("Start Time", 80, HorizontalAlignment.Left); m_pCalls.SelectedIndexChanged += new EventHandler(m_pCalls_SelectedIndexChanged); this.Controls.Add(m_pCalls); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472,357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // 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_pToolbar.Items.Add(button_Delete); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); m_pCalls = new WListView(); m_pCalls.Size = new Size(445,265); m_pCalls.Location = new Point(9,47); m_pCalls.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pCalls.View = View.Details; m_pCalls.FullRowSelect = true; m_pCalls.HideSelection = false; m_pCalls.Columns.Add("Caller",180,HorizontalAlignment.Left); m_pCalls.Columns.Add("Callee",180,HorizontalAlignment.Left); m_pCalls.Columns.Add("Start Time",80,HorizontalAlignment.Left); m_pCalls.SelectedIndexChanged += new EventHandler(m_pCalls_SelectedIndexChanged); this.Controls.Add(m_pCalls); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.ClientSize = new Size(692,473); this.MinimumSize = new Size(700,500); this.StartPosition = FormStartPosition.CenterScreen; this.Text = "User '" + m_pUser.UserName + "' Recyclebin messages"; this.Icon = ResManager.GetIcon("recyclebin16.ico"); m_pIcon = new PictureBox(); m_pIcon.Size = new Size(32,32); m_pIcon.Location = new Point(10,10); m_pIcon.Image = ResManager.GetIcon("recyclebin.ico").ToBitmap(); mt_Info = new Label(); mt_Info.Size = new Size(400,32); mt_Info.Location = new Point(50,10); mt_Info.TextAlign = ContentAlignment.MiddleLeft; mt_Info.Text = "User '" + m_pUser.UserName + "' Recyclebin messages"; m_pSeparator1 = new GroupBox(); m_pSeparator1.Size = new Size(682,3); m_pSeparator1.Location = new Point(7,50); m_pSeparator1.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; mt_Between = new Label(); mt_Between.Size = new Size(100,20); mt_Between.Location = new Point(295,57); mt_Between.Anchor = AnchorStyles.Right | AnchorStyles.Top; mt_Between.TextAlign = ContentAlignment.MiddleRight; mt_Between.Text = "Between:"; m_pStartDate = new DateTimePicker(); m_pStartDate.Size = new Size(100,20); m_pStartDate.Location = new Point(400,57); m_pStartDate.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pStartDate.Format = DateTimePickerFormat.Short; m_pStartDate.Value = DateTime.Today.AddDays(-1); m_pEndDate = new DateTimePicker(); m_pEndDate.Size = new Size(100,20); m_pEndDate.Location = new Point(505,57); m_pEndDate.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pEndDate.Format = DateTimePickerFormat.Short; m_pToolbar = new ToolStrip(); m_pToolbar.AutoSize = false; m_pToolbar.Size = new Size(100,25); m_pToolbar.Location = new Point(617,55); m_pToolbar.Dock = DockStyle.None; m_pToolbar.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // Refresh button ToolStripButton button_refresh = new ToolStripButton(); button_refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_refresh.Tag = "refresh"; button_refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_refresh); // Restore button ToolStripButton button_Restore = new ToolStripButton(); button_Restore.Image = ResManager.GetIcon("restore.ico").ToBitmap(); button_Restore.Tag = "restore"; button_Restore.Enabled = false; button_Restore.ToolTipText = "Restore Message"; m_pToolbar.Items.Add(button_Restore); // Save button ToolStripButton button_Save = new ToolStripButton(); button_Save.Image = ResManager.GetIcon("save.ico").ToBitmap(); button_Save.Tag = "save"; button_Save.Enabled = false; button_Save.ToolTipText = "Save Message"; m_pToolbar.Items.Add(button_Save); ImageList messagesImgList = new ImageList(); messagesImgList.Images.Add(ResManager.GetIcon("message16.ico")); m_pMessages = new WListView(); m_pMessages.Size = new Size(682,390); m_pMessages.Location = new Point(5,80); m_pMessages.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pMessages.View = View.Details; m_pMessages.FullRowSelect = true; m_pMessages.HideSelection = false; m_pMessages.SmallImageList = messagesImgList; m_pMessages.Columns.Add("Folder",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Subject",250,HorizontalAlignment.Left); m_pMessages.Columns.Add("Sender",170,HorizontalAlignment.Left); m_pMessages.Columns.Add("Date",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Date Deleted",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Size KB",60,HorizontalAlignment.Right); m_pMessages.SelectedIndexChanged += new EventHandler(m_pMessages_SelectedIndexChanged); this.Controls.Add(m_pIcon); this.Controls.Add(mt_Info); this.Controls.Add(m_pSeparator1); this.Controls.Add(mt_Between); this.Controls.Add(m_pStartDate); this.Controls.Add(m_pEndDate); this.Controls.Add(m_pToolbar); this.Controls.Add(m_pMessages); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472,357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); m_pDomainsImages = new ImageList(); m_pDomainsImages.Images.Add(ResManager.GetIcon("domain.ico")); m_pDomains = new WListView(); m_pDomains.Size = new Size(445,265); m_pDomains.Location = new Point(9,47); m_pDomains.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pDomains.View = View.Details; m_pDomains.FullRowSelect = true; m_pDomains.HideSelection = false; m_pDomains.SmallImageList = m_pDomainsImages; m_pDomains.SelectedIndexChanged += new EventHandler(m_pDomains_SelectedIndexChanged); m_pDomains.DoubleClick += new EventHandler(m_pDomains_DoubleClick); m_pDomains.MouseUp += new MouseEventHandler(m_pDomains_MouseUp); m_pDomains.Columns.Add("Name",190,HorizontalAlignment.Left); m_pDomains.Columns.Add("Description",290,HorizontalAlignment.Left); this.Controls.Add(m_pToolbar); this.Controls.Add(m_pDomains); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.ClientSize = new Size(492,373); m_pDeleteToRecycleBin = new CheckBox(); m_pDeleteToRecycleBin.Size = new Size(300,20); m_pDeleteToRecycleBin.Location = new Point(10,15); m_pDeleteToRecycleBin.Text = "Delete all messages to recycle bin"; m_pDeleteToRecycleBin.CheckedChanged += new EventHandler(m_pDeleteToRecycleBin_CheckedChanged); m_pDeleteAfterDays = new NumericUpDown(); m_pDeleteAfterDays.Size = new Size(50,20); m_pDeleteAfterDays.Location = new Point(65,45); m_pDeleteAfterDays.Minimum = 1; m_pDeleteAfterDays.Maximum = 365; m_pDeleteAfterDays.Value = 1; mt_DeleteAfterDays = new Label(); mt_DeleteAfterDays.Size = new Size(300,20); mt_DeleteAfterDays.Location = new Point(125,45); mt_DeleteAfterDays.TextAlign = ContentAlignment.MiddleLeft; mt_DeleteAfterDays.Text = "Delete messages permanently after specified days"; m_pApply = new Button(); m_pApply.Size = new Size(70,20); m_pApply.Location = new Point(415,45); m_pApply.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pApply.Text = "Apply"; m_pApply.Click += new EventHandler(m_pApply_Click); m_pGroupBox1 = new GroupBox(); m_pGroupBox1.Size = new Size(480,3); m_pGroupBox1.Location = new Point(5,75); m_pGroupBox1.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; mt_User = new Label(); mt_User.Size = new Size(50,20); mt_User.Location = new Point(10,95); mt_User.TextAlign = ContentAlignment.MiddleRight; mt_User.Text = "User:"******"..."; m_pGetUser.Click += new EventHandler(m_pGetUser_Click); mt_Between = new Label(); mt_Between.Size = new Size(60,20); mt_Between.Location = new Point(0,120); mt_Between.TextAlign = ContentAlignment.MiddleRight; mt_Between.Text = "Between:"; m_pSince = new DateTimePicker(); m_pSince.Size = new Size(80,20); m_pSince.Location = new Point(65,120); m_pSince.Format = DateTimePickerFormat.Short; m_pTo = new DateTimePicker(); m_pTo.Size = new Size(80,20); m_pTo.Location = new Point(150,120); m_pTo.Format = DateTimePickerFormat.Short; m_pGet = new Button(); m_pGet.Size = new Size(50,20); m_pGet.Location = new Point(355,120); m_pGet.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pGet.Text = "Get"; m_pGet.Click += new EventHandler(m_pGet_Click); m_pRestore = new Button(); m_pRestore.Size = new Size(70,20); m_pRestore.Location = new Point(415,120); m_pRestore.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pRestore.Text = "Restore"; m_pRestore.Click += new EventHandler(m_pRestore_Click); m_pMessages = new WListView(); m_pMessages.Size = new Size(475,215); m_pMessages.Location = new Point(10,150); m_pMessages.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pMessages.View = View.Details; m_pMessages.HideSelection = false; m_pMessages.FullRowSelect = true; m_pMessages.Columns.Add("User",100,HorizontalAlignment.Left); m_pMessages.Columns.Add("Folder",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Subject",250,HorizontalAlignment.Left); m_pMessages.Columns.Add("Sender",170,HorizontalAlignment.Left); m_pMessages.Columns.Add("Date",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Date Deleted",120,HorizontalAlignment.Left); m_pMessages.Columns.Add("Size KB",60,HorizontalAlignment.Right); m_pMessages.SelectedIndexChanged += new EventHandler(m_pMessages_SelectedIndexChanged); this.Controls.Add(m_pDeleteToRecycleBin); this.Controls.Add(m_pDeleteAfterDays); this.Controls.Add(mt_DeleteAfterDays); this.Controls.Add(m_pApply); this.Controls.Add(m_pGroupBox1); this.Controls.Add(mt_User); this.Controls.Add(m_pUser); this.Controls.Add(m_pGetUser); this.Controls.Add(mt_Between); this.Controls.Add(m_pSince); this.Controls.Add(m_pTo); this.Controls.Add(m_pGet); this.Controls.Add(m_pRestore); this.Controls.Add(m_pMessages); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(300,300); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); mt_Filter = new Label(); mt_Filter.Size = new Size(100,20); mt_Filter.Location = new Point(9,20); mt_Filter.Text = "Filter:"; mt_Filter.TextAlign = ContentAlignment.MiddleRight; m_pFilter = new TextBox(); m_pFilter.Size = new Size(150,13); m_pFilter.Location = new Point(115,20); m_pFilter.Text = "*"; m_pGetMailingLists = new Button(); m_pGetMailingLists.Size = new Size(70,20); m_pGetMailingLists.Location = new Point(280,20); m_pGetMailingLists.Text = "Get"; m_pGetMailingLists.Click += new EventHandler(m_pGetMailingLists_Click); m_pMailingListsImages = new ImageList(); m_pMailingListsImages.Images.Add(ResManager.GetIcon("mailinglist.ico")); m_pMailingListsImages.Images.Add(ResManager.GetIcon("mailinglist_disabled.ico")); m_pMailingLists = new WListView(); m_pMailingLists.Size = new Size(270,200); m_pMailingLists.Location = new Point(10,50); m_pMailingLists.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pMailingLists.View = View.Details; m_pMailingLists.FullRowSelect = true; m_pMailingLists.HideSelection = false; m_pMailingLists.SmallImageList = m_pMailingListsImages; m_pMailingLists.SelectedIndexChanged += new EventHandler(m_pMailingLists_SelectedIndexChanged); m_pMailingLists.DoubleClick += new EventHandler(m_pMailingLists_DoubleClick); m_pMailingLists.MouseUp += new MouseEventHandler(m_pMailingLists_MouseUp); m_pMailingLists.Columns.Add("Name",190,HorizontalAlignment.Left); m_pMailingLists.Columns.Add("Description",290,HorizontalAlignment.Left); this.Controls.Add(m_pToolbar); this.Controls.Add(mt_Filter); this.Controls.Add(m_pFilter); this.Controls.Add(m_pGetMailingLists); this.Controls.Add(m_pMailingLists); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472, 357); m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); m_pDomainsImages = new ImageList(); m_pDomainsImages.Images.Add(ResManager.GetIcon("domain.ico")); m_pDomains = new WListView(); m_pDomains.Size = new Size(445, 265); m_pDomains.Location = new Point(9, 47); m_pDomains.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pDomains.View = View.Details; m_pDomains.FullRowSelect = true; m_pDomains.HideSelection = false; m_pDomains.SmallImageList = m_pDomainsImages; m_pDomains.SelectedIndexChanged += new EventHandler(m_pDomains_SelectedIndexChanged); m_pDomains.DoubleClick += new EventHandler(m_pDomains_DoubleClick); m_pDomains.MouseUp += new MouseEventHandler(m_pDomains_MouseUp); m_pDomains.Columns.Add("Name", 190, HorizontalAlignment.Left); m_pDomains.Columns.Add("Description", 290, HorizontalAlignment.Left); this.Controls.Add(m_pToolbar); this.Controls.Add(m_pDomains); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { m_pToolbar = new ToolStrip(); m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_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_pToolbar.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_pToolbar.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_pToolbar.Items.Add(button_Delete); // Separator m_pToolbar.Items.Add(new ToolStripSeparator()); // Refresh button ToolStripButton button_Refresh = new ToolStripButton(); button_Refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_Refresh.Tag = "refresh"; button_Refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_Refresh); mt_Filter = new Label(); mt_Filter.Size = new Size(100, 20); mt_Filter.Location = new Point(9, 20); mt_Filter.Text = "Filter:"; mt_Filter.TextAlign = ContentAlignment.MiddleRight; m_pFilter = new TextBox(); m_pFilter.Size = new Size(150, 13); m_pFilter.Location = new Point(115, 20); m_pFilter.Text = "*"; m_pGetUsers = new Button(); m_pGetUsers.Size = new Size(70, 20); m_pGetUsers.Location = new Point(280, 20); m_pGetUsers.Text = "Get"; m_pGetUsers.Click += new EventHandler(m_pGetUsers_Click); m_pUsersImages = new ImageList(); m_pUsersImages.Images.Add(ResManager.GetIcon("user.ico")); m_pUsersImages.Images.Add(ResManager.GetIcon("user_disabled.ico")); m_pUsers = new WListView(); m_pUsers.Size = new Size(270, 200); m_pUsers.Location = new Point(10, 50); m_pUsers.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pUsers.View = View.Details; m_pUsers.FullRowSelect = true; m_pUsers.HideSelection = false; m_pUsers.SmallImageList = m_pUsersImages; m_pUsers.SelectedIndexChanged += new EventHandler(m_pUsers_SelectedIndexChanged); m_pUsers.DoubleClick += new EventHandler(m_pUsers_DoubleClick); m_pUsers.MouseUp += new MouseEventHandler(m_pUsers_MouseUp); m_pUsers.Columns.Add("Name", 190, HorizontalAlignment.Left); m_pUsers.Columns.Add("Description", 290, HorizontalAlignment.Left); this.Controls.Add(mt_Filter); this.Controls.Add(m_pFilter); this.Controls.Add(m_pGetUsers); this.Controls.Add(m_pUsers); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.ClientSize = new Size(492, 373); m_pDeleteToRecycleBin = new CheckBox(); m_pDeleteToRecycleBin.Size = new Size(300, 20); m_pDeleteToRecycleBin.Location = new Point(10, 15); m_pDeleteToRecycleBin.Text = "Delete all messages to recycle bin"; m_pDeleteToRecycleBin.CheckedChanged += new EventHandler(m_pDeleteToRecycleBin_CheckedChanged); m_pDeleteAfterDays = new NumericUpDown(); m_pDeleteAfterDays.Size = new Size(50, 20); m_pDeleteAfterDays.Location = new Point(65, 45); m_pDeleteAfterDays.Minimum = 1; m_pDeleteAfterDays.Maximum = 365; m_pDeleteAfterDays.Value = 1; mt_DeleteAfterDays = new Label(); mt_DeleteAfterDays.Size = new Size(300, 20); mt_DeleteAfterDays.Location = new Point(125, 45); mt_DeleteAfterDays.TextAlign = ContentAlignment.MiddleLeft; mt_DeleteAfterDays.Text = "Delete messages permanently after specified days"; m_pApply = new Button(); m_pApply.Size = new Size(70, 20); m_pApply.Location = new Point(415, 45); m_pApply.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pApply.Text = "Apply"; m_pApply.Click += new EventHandler(m_pApply_Click); m_pGroupBox1 = new GroupBox(); m_pGroupBox1.Size = new Size(480, 3); m_pGroupBox1.Location = new Point(5, 75); m_pGroupBox1.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; mt_User = new Label(); mt_User.Size = new Size(50, 20); mt_User.Location = new Point(10, 95); mt_User.TextAlign = ContentAlignment.MiddleRight; mt_User.Text = "User:"******"..."; m_pGetUser.Click += new EventHandler(m_pGetUser_Click); mt_Between = new Label(); mt_Between.Size = new Size(60, 20); mt_Between.Location = new Point(0, 120); mt_Between.TextAlign = ContentAlignment.MiddleRight; mt_Between.Text = "Between:"; m_pSince = new DateTimePicker(); m_pSince.Size = new Size(80, 20); m_pSince.Location = new Point(65, 120); m_pSince.Format = DateTimePickerFormat.Short; m_pTo = new DateTimePicker(); m_pTo.Size = new Size(80, 20); m_pTo.Location = new Point(150, 120); m_pTo.Format = DateTimePickerFormat.Short; m_pGet = new Button(); m_pGet.Size = new Size(50, 20); m_pGet.Location = new Point(355, 120); m_pGet.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pGet.Text = "Get"; m_pGet.Click += new EventHandler(m_pGet_Click); m_pRestore = new Button(); m_pRestore.Size = new Size(70, 20); m_pRestore.Location = new Point(415, 120); m_pRestore.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pRestore.Text = "Restore"; m_pRestore.Click += new EventHandler(m_pRestore_Click); m_pMessages = new WListView(); m_pMessages.Size = new Size(475, 215); m_pMessages.Location = new Point(10, 150); m_pMessages.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pMessages.View = View.Details; m_pMessages.HideSelection = false; m_pMessages.FullRowSelect = true; m_pMessages.Columns.Add("User", 100, HorizontalAlignment.Left); m_pMessages.Columns.Add("Folder", 120, HorizontalAlignment.Left); m_pMessages.Columns.Add("Subject", 250, HorizontalAlignment.Left); m_pMessages.Columns.Add("Sender", 170, HorizontalAlignment.Left); m_pMessages.Columns.Add("Date", 120, HorizontalAlignment.Left); m_pMessages.Columns.Add("Date Deleted", 120, HorizontalAlignment.Left); m_pMessages.Columns.Add("Size KB", 60, HorizontalAlignment.Right); m_pMessages.SelectedIndexChanged += new EventHandler(m_pMessages_SelectedIndexChanged); this.Controls.Add(m_pDeleteToRecycleBin); this.Controls.Add(m_pDeleteAfterDays); this.Controls.Add(mt_DeleteAfterDays); this.Controls.Add(m_pApply); this.Controls.Add(m_pGroupBox1); this.Controls.Add(mt_User); this.Controls.Add(m_pUser); this.Controls.Add(m_pGetUser); this.Controls.Add(mt_Between); this.Controls.Add(m_pSince); this.Controls.Add(m_pTo); this.Controls.Add(m_pGet); this.Controls.Add(m_pRestore); this.Controls.Add(m_pMessages); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.ClientSize = new Size(692, 473); this.MinimumSize = new Size(700, 500); this.StartPosition = FormStartPosition.CenterScreen; this.Text = "User '" + m_pFolder.User.UserName + "' Folder '" + m_pFolder.FolderFullPath + "' Messages"; this.Icon = ResManager.GetIcon("message.ico"); m_pIcon = new PictureBox(); m_pIcon.Size = new Size(32, 32); m_pIcon.Location = new Point(10, 10); m_pIcon.Image = ResManager.GetIcon("message.ico").ToBitmap(); mt_Info = new Label(); mt_Info.Size = new Size(400, 32); mt_Info.Location = new Point(50, 10); mt_Info.TextAlign = ContentAlignment.MiddleLeft; mt_Info.Text = "User '" + m_pFolder.User.UserName + "' Folder '" + m_pFolder.FolderFullPath + "' Messages"; m_pSeparator1 = new GroupBox(); m_pSeparator1.Size = new Size(682, 3); m_pSeparator1.Location = new Point(7, 50); m_pSeparator1.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pToolbar = new ToolStrip(); m_pToolbar.AutoSize = false; m_pToolbar.Size = new Size(100, 25); m_pToolbar.Location = new Point(595, 55); m_pToolbar.Dock = DockStyle.None; m_pToolbar.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pToolbar.GripStyle = ToolStripGripStyle.Hidden; m_pToolbar.BackColor = this.BackColor; m_pToolbar.Renderer = new ToolBarRendererEx(); m_pToolbar.ItemClicked += new ToolStripItemClickedEventHandler(m_pToolbar_ItemClicked); // Refresh button ToolStripButton button_refresh = new ToolStripButton(); button_refresh.Image = ResManager.GetIcon("refresh.ico").ToBitmap(); button_refresh.Tag = "refresh"; button_refresh.ToolTipText = "Refresh"; m_pToolbar.Items.Add(button_refresh); // Write ToolStripButton button_Write = new ToolStripButton(); button_Write.Image = ResManager.GetIcon("write.ico").ToBitmap(); button_Write.Tag = "write"; button_Write.ToolTipText = "Write Message"; m_pToolbar.Items.Add(button_Write); // Save button ToolStripButton button_Save = new ToolStripButton(); button_Save.Image = ResManager.GetIcon("save.ico").ToBitmap(); button_Save.Tag = "save"; button_Save.Enabled = false; button_Save.ToolTipText = "Save Message"; m_pToolbar.Items.Add(button_Save); // Delete button ToolStripButton button_Delete = new ToolStripButton(); button_Delete.Image = ResManager.GetIcon("delete.ico").ToBitmap(); button_Delete.Tag = "delete"; button_Delete.Enabled = false; button_Delete.ToolTipText = "Delete Message"; m_pToolbar.Items.Add(button_Delete); ImageList messagesImgList = new ImageList(); messagesImgList.Images.Add(ResManager.GetIcon("message16.ico")); m_pMessages = new WListView(); m_pMessages.Size = new Size(682, 390); m_pMessages.Location = new Point(5, 80); m_pMessages.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pMessages.View = View.Details; m_pMessages.FullRowSelect = true; m_pMessages.HideSelection = false; m_pMessages.SmallImageList = messagesImgList; m_pMessages.Columns.Add("Subject", 250, HorizontalAlignment.Left); m_pMessages.Columns.Add("Sender", 170, HorizontalAlignment.Left); m_pMessages.Columns.Add("Date", 120, HorizontalAlignment.Left); m_pMessages.Columns.Add("Size KB", 60, HorizontalAlignment.Right); m_pMessages.SelectedIndexChanged += new EventHandler(m_pMessages_SelectedIndexChanged); this.Controls.Add(m_pIcon); this.Controls.Add(mt_Info); this.Controls.Add(m_pSeparator1); this.Controls.Add(m_pToolbar); this.Controls.Add(m_pMessages); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472,357); mt_Show = new Label(); mt_Show.Size = new Size(70,20); mt_Show.Location = new Point(10,20); mt_Show.TextAlign = ContentAlignment.MiddleRight; mt_Show.Text = "Show:"; m_pShow = new ComboBox(); m_pShow.Size = new Size(100,20); m_pShow.Location = new Point(85,20); m_pShow.DropDownStyle = ComboBoxStyle.DropDownList; m_pShow.SelectedIndexChanged += new EventHandler(m_pShow_SelectedIndexChanged); m_pShow.Items.Add("ALL"); m_pShow.Items.Add("SMTP"); m_pShow.Items.Add("POP3"); m_pShow.Items.Add("IMAP"); m_pShow.Items.Add("RELAY"); m_pShow.Items.Add("ADMIN"); m_pKill = new Button(); m_pKill.Size = new Size(70,20); m_pKill.Location = new Point(307,20); m_pKill.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pKill.Text = "Kill"; m_pKill.Enabled = false; m_pKill.Click += new EventHandler(m_pKill_Click); m_pViewSession = new Button(); m_pViewSession.Size = new Size(70,20); m_pViewSession.Location = new Point(382,20); m_pViewSession.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pViewSession.Text = "View"; m_pViewSession.Enabled = false; m_pViewSession.Click += new EventHandler(m_pViewSession_Click); m_pSessionsImages = new ImageList(); m_pSessionsImages.Images.Add(ResManager.GetIcon("user.ico")); m_pSessions = new WListView(); m_pSessions.Size = new Size(445,265); m_pSessions.Location = new Point(9,47); m_pSessions.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pSessions.View = View.Details; m_pSessions.FullRowSelect = true; m_pSessions.HideSelection = false; m_pSessions.SmallImageList = m_pSessionsImages; m_pSessions.SelectedIndexChanged += new EventHandler(m_pSessions_SelectedIndexChanged); m_pSessions.MouseClick += new MouseEventHandler(m_pSessions_MouseClick); m_pSessions.Columns.Add("Type",60,HorizontalAlignment.Left); m_pSessions.Columns.Add("UserName",80,HorizontalAlignment.Left); m_pSessions.Columns.Add("LocalEndPoint",100,HorizontalAlignment.Left); m_pSessions.Columns.Add("RemoteEndPoint",100,HorizontalAlignment.Left); m_pSessions.Columns.Add("R KB/S",55,HorizontalAlignment.Left); m_pSessions.Columns.Add("W KB/S",55,HorizontalAlignment.Left); m_pSessions.Columns.Add("Session Start",100,HorizontalAlignment.Left); m_pSessions.Columns.Add("Timeout after sec.",100,HorizontalAlignment.Left); this.Controls.Add(mt_Show); this.Controls.Add(m_pShow); this.Controls.Add(m_pKill); this.Controls.Add(m_pViewSession); this.Controls.Add(m_pSessions); }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.Size = new Size(472, 357); mt_Show = new Label(); mt_Show.Size = new Size(70, 20); mt_Show.Location = new Point(10, 20); mt_Show.TextAlign = ContentAlignment.MiddleRight; mt_Show.Text = "Show:"; m_pShow = new ComboBox(); m_pShow.Size = new Size(100, 20); m_pShow.Location = new Point(85, 20); m_pShow.DropDownStyle = ComboBoxStyle.DropDownList; m_pShow.SelectedIndexChanged += new EventHandler(m_pShow_SelectedIndexChanged); m_pShow.Items.Add("ALL"); m_pShow.Items.Add("SMTP"); m_pShow.Items.Add("POP3"); m_pShow.Items.Add("IMAP"); m_pShow.Items.Add("RELAY"); m_pShow.Items.Add("ADMIN"); m_pKill = new Button(); m_pKill.Size = new Size(70, 20); m_pKill.Location = new Point(307, 20); m_pKill.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pKill.Text = "Kill"; m_pKill.Enabled = false; m_pKill.Click += new EventHandler(m_pKill_Click); m_pViewSession = new Button(); m_pViewSession.Size = new Size(70, 20); m_pViewSession.Location = new Point(382, 20); m_pViewSession.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pViewSession.Text = "View"; m_pViewSession.Enabled = false; m_pViewSession.Click += new EventHandler(m_pViewSession_Click); m_pSessionsImages = new ImageList(); m_pSessionsImages.Images.Add(ResManager.GetIcon("user.ico")); m_pSessions = new WListView(); m_pSessions.Size = new Size(445, 265); m_pSessions.Location = new Point(9, 47); m_pSessions.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pSessions.View = View.Details; m_pSessions.FullRowSelect = true; m_pSessions.HideSelection = false; m_pSessions.SmallImageList = m_pSessionsImages; m_pSessions.SelectedIndexChanged += new EventHandler(m_pSessions_SelectedIndexChanged); m_pSessions.MouseClick += new MouseEventHandler(m_pSessions_MouseClick); m_pSessions.Columns.Add("Type", 60, HorizontalAlignment.Left); m_pSessions.Columns.Add("UserName", 80, HorizontalAlignment.Left); m_pSessions.Columns.Add("LocalEndPoint", 100, HorizontalAlignment.Left); m_pSessions.Columns.Add("RemoteEndPoint", 100, HorizontalAlignment.Left); m_pSessions.Columns.Add("R KB/S", 55, HorizontalAlignment.Left); m_pSessions.Columns.Add("W KB/S", 55, HorizontalAlignment.Left); m_pSessions.Columns.Add("Session Start", 100, HorizontalAlignment.Left); m_pSessions.Columns.Add("Timeout after sec.", 100, HorizontalAlignment.Left); this.Controls.Add(mt_Show); this.Controls.Add(m_pShow); this.Controls.Add(m_pKill); this.Controls.Add(m_pViewSession); this.Controls.Add(m_pSessions); }