public void setVarBoxesInPanel() { panelVariableControls.Controls.Clear(); int locationX = dataViewer.RowHeadersWidth; int colNum = 0; int j = 0; ; for (int i = 1; i < dataViewer.Columns.Count; i++) { j++; int defaultWidth = dataViewer.Columns[colNum].Width; int defaultHeight = 21; int currentYLoc = 0; //Main comboBox string comboboxName = i + "ComboMain"; ComboBox newCombo = new ComboBox(); newCombo.Name = comboboxName; newCombo.Width = defaultWidth; newCombo.Height = defaultHeight; newCombo.Location = new Point(locationX, currentYLoc); currentYLoc += defaultHeight; newCombo.Items.Add("Variable"); newCombo.Items.Add("DateTime"); newCombo.Items.Add("Date"); newCombo.Items.Add("Time"); panelVariableControls.Controls.Add(newCombo); EventInfo comboMainChanged = newCombo.GetType().GetEvent("TextChanged"); comboMainChanged.AddEventHandler(newCombo, new EventHandler(this.comboMainChanged)); comboBoxes.Add(newCombo); //Secondary comboBox (Variable Name/DateTime format) comboboxName = i + "Combo2"; ComboBox newCombo2 = new ComboBox(); newCombo2.Name = comboboxName; newCombo2.Width = defaultWidth; newCombo2.Height = defaultHeight; newCombo2.Enabled = false; newCombo2.Location = new Point(locationX, currentYLoc); currentYLoc += defaultHeight; panelVariableControls.Controls.Add(newCombo2); EventInfo combo2Changed = newCombo2.GetType().GetEvent("TextChanged"); combo2Changed.AddEventHandler(newCombo2, new EventHandler(this.combo2Changed)); newCombo2.AutoCompleteMode = AutoCompleteMode.Append; newCombo2.AutoCompleteSource = AutoCompleteSource.ListItems; //3rd comboBox (Units) comboboxName = i + "Combo3"; ComboBox newCombo3 = new ComboBox(); newCombo3.Name = comboboxName; newCombo3.Width = defaultWidth; newCombo3.Height = defaultHeight; newCombo3.Enabled = false; newCombo3.Location = new Point(locationX, currentYLoc); currentYLoc += defaultHeight; panelVariableControls.Controls.Add(newCombo3); EventInfo combo3Changed = newCombo3.GetType().GetEvent("TextChanged"); combo3Changed.AddEventHandler(newCombo3, new EventHandler(this.combo3Changed)); //4th comboBox (Sensor Location Type) comboboxName = i + "Combo4"; ComboBox newCombo4 = new ComboBox(); newCombo4.Name = comboboxName; newCombo4.Width = defaultWidth; newCombo4.Height = defaultHeight; newCombo4.Enabled = false; newCombo4.Location = new Point(locationX, currentYLoc); newCombo4.Items.Add("d - Depth below surface"); newCombo4.Items.Add("h - Height above surface"); newCombo4.Items.Add("e - Elevation from bottom"); newCombo4.Items.Add("m - Masl"); newCombo4.Items.Add("i - Integrated depth range"); newCombo4.Items.Add("v - Variable depth"); newCombo4.Items.Add("n - Position NA"); newCombo4.AutoCompleteMode = AutoCompleteMode.Append; newCombo4.AutoCompleteSource = AutoCompleteSource.ListItems; currentYLoc += defaultHeight; panelVariableControls.Controls.Add(newCombo4); EventInfo combo4Changed = newCombo4.GetType().GetEvent("TextChanged"); combo4Changed.AddEventHandler(newCombo4, new EventHandler(this.combo4Changed)); //TextBox (Sensor Displacement 1) comboboxName = i + "Text1"; TextBox newCombo5 = new TextBox(); newCombo5.Name = comboboxName; newCombo5.Width = defaultWidth; newCombo5.Height = defaultHeight; newCombo5.Enabled = false; newCombo5.Location = new Point(locationX, currentYLoc); currentYLoc += defaultHeight; panelVariableControls.Controls.Add(newCombo5); EventInfo Text1Changed = newCombo5.GetType().GetEvent("TextChanged"); Text1Changed.AddEventHandler(newCombo5, new EventHandler(this.Text1Changed)); newCombo5.KeyDown += new KeyEventHandler(Text1_KeyDown); //Button (Accept new Header) comboboxName = i + "Btn"; Button newButton = new Button(); newButton.Name = comboboxName; newButton.Width = defaultWidth; newButton.Height = defaultHeight; newButton.Enabled = false; newButton.Location = new Point(locationX, currentYLoc); currentYLoc += defaultHeight; panelVariableControls.Controls.Add(newButton); EventInfo useNewHeaderClicked = newButton.GetType().GetEvent("Click"); useNewHeaderClicked.AddEventHandler(newButton, new EventHandler(this.useNewHeaderClicked)); EventInfo hoverNewHeaderButton = newButton.GetType().GetEvent("MouseHover"); hoverNewHeaderButton.AddEventHandler(newButton, new EventHandler(this.hoverNewHeaderButton)); locationX += defaultWidth; colNum++; } }
/// <summary> /// Creates and initializes window UI. /// </summary> private void InitUI() { this.ClientSize = new Size(492,373); this.StartPosition = FormStartPosition.CenterParent; this.MinimumSize = new Size(500,400); this.MinimizeBox = false; this.Text = "Global Message Rule Add/Edit Action"; this.Icon = ResManager.GetIcon("ruleaction.ico"); #region Common UI //--- Common UI -------------------------------------------------------------------// m_pIcon = new PictureBox(); m_pIcon.Size = new Size(32,32); m_pIcon.Location = new Point(10,10); m_pIcon.Image = ResManager.GetIcon("ruleaction.ico").ToBitmap(); mt_Info = new Label(); mt_Info.Size = new Size(200,32); mt_Info.Location = new Point(50,10); mt_Info.TextAlign = ContentAlignment.MiddleLeft; mt_Info.Text = "Specify action information."; m_pSeparator1 = new GroupBox(); m_pSeparator1.Size = new Size(483,3); m_pSeparator1.Location = new Point(7,50); m_pSeparator1.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; mt_Description = new Label(); mt_Description.Size = new Size(100,20); mt_Description.Location = new Point(0,60); mt_Description.TextAlign = ContentAlignment.MiddleRight; mt_Description.Text = "Description:"; m_pDescription = new TextBox(); m_pDescription.Size = new Size(380,20); m_pDescription.Location = new Point(105,60); mt_Action = new Label(); mt_Action.Size = new Size(100,20); mt_Action.Location = new Point(0,85); mt_Action.TextAlign = ContentAlignment.MiddleRight; mt_Action.Text = "Action:"; m_pAction = new ComboBox(); m_pAction.Size = new Size(160,21); m_pAction.Location = new Point(105,85); m_pAction.DropDownStyle = ComboBoxStyle.DropDownList; try{ // FIX ME: Mono throws exception // m_pAction.DropDownHeight = 200; m_pAction.GetType().GetProperty("DropDownHeight").GetSetMethod(true).Invoke(m_pAction,new object[]{200}); } catch{ } m_pAction.SelectedIndexChanged += new EventHandler(m_pAction_SelectedIndexChanged); m_pAction.Items.Add(new WComboBoxItem("Auto Response",GlobalMessageRuleAction_enum.AutoResponse)); m_pAction.Items.Add(new WComboBoxItem("Delete Message",GlobalMessageRuleAction_enum.DeleteMessage)); m_pAction.Items.Add(new WComboBoxItem("Execute Program",GlobalMessageRuleAction_enum.ExecuteProgram)); m_pAction.Items.Add(new WComboBoxItem("Forward To Email",GlobalMessageRuleAction_enum.ForwardToEmail)); m_pAction.Items.Add(new WComboBoxItem("Forward To Host",GlobalMessageRuleAction_enum.ForwardToHost)); m_pAction.Items.Add(new WComboBoxItem("Store To Disk Folder",GlobalMessageRuleAction_enum.StoreToDiskFolder)); m_pAction.Items.Add(new WComboBoxItem("Move To IMAP Folder",GlobalMessageRuleAction_enum.MoveToIMAPFolder)); m_pAction.Items.Add(new WComboBoxItem("Add Header Field",GlobalMessageRuleAction_enum.AddHeaderField)); m_pAction.Items.Add(new WComboBoxItem("Remove Header Field",GlobalMessageRuleAction_enum.RemoveHeaderField)); m_pAction.Items.Add(new WComboBoxItem("Send Error To Client",GlobalMessageRuleAction_enum.SendErrorToClient)); m_pAction.Items.Add(new WComboBoxItem("Store To FTP Folder",GlobalMessageRuleAction_enum.StoreToFTPFolder)); m_pAction.Items.Add(new WComboBoxItem("Post To NNTP Newsgroup",GlobalMessageRuleAction_enum.PostToNNTPNewsGroup)); m_pAction.Items.Add(new WComboBoxItem("Post To HTTP",GlobalMessageRuleAction_enum.PostToHTTP)); m_pSeparator2 = new GroupBox(); m_pSeparator2.Size = new Size(483,3); m_pSeparator2.Location = new Point(7,115); m_pSeparator2.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; m_pSeparator3 = new GroupBox(); m_pSeparator3.Size = new Size(483,3); m_pSeparator3.Location = new Point(7,335); m_pSeparator3.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom; m_pHelp = new Button(); m_pHelp.Size = new Size(70,20); m_pHelp.Location = new Point(10,350); m_pHelp.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; m_pHelp.Text = "Help"; m_pHelp.Click += new EventHandler(m_pHelp_Click); m_pCancel = new Button(); m_pCancel.Size = new Size(70,20); m_pCancel.Location = new Point(340,350); m_pCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; m_pCancel.Text = "Cancel"; m_pCancel.Click += new EventHandler(m_pCancel_Click); m_Ok = new Button(); m_Ok.Size = new Size(70,20); m_Ok.Location = new Point(415,350); m_Ok.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; m_Ok.Text = "Ok"; m_Ok.Click += new EventHandler(m_Ok_Click); //--------------------------------------------------------------------------------// #endregion #region Auto Response //--- Auto Response UI -----------------------------------------------------------// mt_AutoResponse_From = new Label(); mt_AutoResponse_From.Size = new Size(100,20); mt_AutoResponse_From.Location = new Point(0,125); mt_AutoResponse_From.TextAlign = ContentAlignment.MiddleRight; mt_AutoResponse_From.Text = "From:"; mt_AutoResponse_From.Visible = false; m_pAutoResponse_From = new TextBox(); m_pAutoResponse_From.Size = new Size(380,20); m_pAutoResponse_From.Location = new Point(105,125); m_pAutoResponse_From.Visible = false; mt_AutoResponse_FullMEssage = new Label(); mt_AutoResponse_FullMEssage.Size = new Size(100,13); mt_AutoResponse_FullMEssage.Location = new Point(10,155); mt_AutoResponse_FullMEssage.TextAlign = ContentAlignment.MiddleLeft; mt_AutoResponse_FullMEssage.Text = "Full Message:"; mt_AutoResponse_FullMEssage.Visible = false; m_pAutoResponse_FullMEssage = new TextBox(); m_pAutoResponse_FullMEssage.Size = new Size(395,145); m_pAutoResponse_FullMEssage.Location = new Point(12,175); m_pAutoResponse_FullMEssage.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top; m_pAutoResponse_FullMEssage.AcceptsReturn = true; m_pAutoResponse_FullMEssage.AcceptsTab = true; m_pAutoResponse_FullMEssage.Multiline = true; m_pAutoResponse_FullMEssage.ScrollBars = ScrollBars.Both; m_pAutoResponse_FullMEssage.Visible = false; m_pAutoResponse_Compose = new Button(); m_pAutoResponse_Compose.Size = new Size(70,21); m_pAutoResponse_Compose.Location = new Point(415,175); m_pAutoResponse_Compose.Anchor = AnchorStyles.Right | AnchorStyles.Top; m_pAutoResponse_Compose.Text = "Compose"; m_pAutoResponse_Compose.Visible = false; m_pAutoResponse_Compose.Click += new EventHandler(m_pAutoResponse_Compose_Click); mt_AutoResponse_Load = new Button(); mt_AutoResponse_Load.Size = new Size(70,40); mt_AutoResponse_Load.Location = new Point(415,200); mt_AutoResponse_Load.Anchor = AnchorStyles.Right | AnchorStyles.Top; mt_AutoResponse_Load.Text = "Load Form File"; mt_AutoResponse_Load.Visible = false; mt_AutoResponse_Load.Click += new EventHandler(mt_AutoResponse_Load_Click); //-------------------------------------------------------------------------------// #endregion #region Execute Program //--- Execute Program UI --------------------------------------------------------// mt_ExecuteProgram_ProgramToExecute = new Label(); mt_ExecuteProgram_ProgramToExecute.Size = new Size(100,20); mt_ExecuteProgram_ProgramToExecute.Location = new Point(0,125); mt_ExecuteProgram_ProgramToExecute.Visible = false; mt_ExecuteProgram_ProgramToExecute.TextAlign = ContentAlignment.MiddleRight; mt_ExecuteProgram_ProgramToExecute.Text = "Program:"; m_pExecuteProgram_ProgramToExecute = new TextBox(); m_pExecuteProgram_ProgramToExecute.Size = new Size(350,20); m_pExecuteProgram_ProgramToExecute.Location = new Point(105,125); m_pExecuteProgram_ProgramToExecute.Visible = false; m_pExecuteProgram_BrowseProgramToExecute = new Button(); m_pExecuteProgram_BrowseProgramToExecute.Size = new Size(25,20); m_pExecuteProgram_BrowseProgramToExecute.Location = new Point(460,125); m_pExecuteProgram_BrowseProgramToExecute.Visible = false; m_pExecuteProgram_BrowseProgramToExecute.Click += new EventHandler(m_pExecuteProgram_BrowseProgramToExecute_Click); m_pExecuteProgram_BrowseProgramToExecute.Text = "..."; mt_ExecuteProgram_ProgramArguments = new Label(); mt_ExecuteProgram_ProgramArguments.Size = new Size(100,20); mt_ExecuteProgram_ProgramArguments.Location = new Point(0,150); mt_ExecuteProgram_ProgramArguments.Visible = false; mt_ExecuteProgram_ProgramArguments.TextAlign = ContentAlignment.MiddleRight; mt_ExecuteProgram_ProgramArguments.Text = "Arguments:"; m_pExecuteProgram_ProgramArguments = new TextBox(); m_pExecuteProgram_ProgramArguments.Size = new Size(380,20); m_pExecuteProgram_ProgramArguments.Location = new Point(105,150); m_pExecuteProgram_ProgramArguments.Visible = false; //------------------------------------------------------------------------------// #endregion #region Forward To Email //--- Forward To Email UI ------------------------------------------------------// mt_ForwardToEmail_Email = new Label(); mt_ForwardToEmail_Email.Size = new Size(100,20); mt_ForwardToEmail_Email.Location = new Point(0,125); mt_ForwardToEmail_Email.Visible = false; mt_ForwardToEmail_Email.TextAlign = ContentAlignment.MiddleRight; mt_ForwardToEmail_Email.Text = "Email:"; m_pForwardToEmail_Email = new TextBox(); m_pForwardToEmail_Email.Size = new Size(380,20); m_pForwardToEmail_Email.Location = new Point(105,125); m_pForwardToEmail_Email.Visible = false; //------------------------------------------------------------------------------// #endregion #region Forward To Host //--- Forward To Host UI -------------------------------------------------------// mt_ForwardToHost_Host = new Label(); mt_ForwardToHost_Host.Size = new Size(100,20); mt_ForwardToHost_Host.Location = new Point(0,125); mt_ForwardToHost_Host.Visible = false; mt_ForwardToHost_Host.TextAlign = ContentAlignment.MiddleRight; mt_ForwardToHost_Host.Text = "Host:"; m_pForwardToHost_Host = new TextBox(); m_pForwardToHost_Host.Size = new Size(380,20); m_pForwardToHost_Host.Location = new Point(105,125); m_pForwardToHost_Host.Visible = false; mt_ForwardToHost_HostPort = new Label(); mt_ForwardToHost_HostPort.Size = new Size(100,20); mt_ForwardToHost_HostPort.Location = new Point(0,150); mt_ForwardToHost_HostPort.Visible = false; mt_ForwardToHost_HostPort.TextAlign = ContentAlignment.MiddleRight; mt_ForwardToHost_HostPort.Text = "Port:"; m_pForwardToHost_HostPort = new NumericUpDown(); m_pForwardToHost_HostPort.Size = new Size(60,20); m_pForwardToHost_HostPort.Location = new Point(105,150); m_pForwardToHost_HostPort.Maximum = 99999; m_pForwardToHost_HostPort.Minimum = 1; m_pForwardToHost_HostPort.Value = 25; m_pForwardToHost_HostPort.Visible = false; //-----------------------------------------------------------------------------// #endregion #region Store To Disk Folder //--- Store To Disk Folder ----------------------------------------------------// mt_StoreToDiskFolder_Folder = new Label(); mt_StoreToDiskFolder_Folder.Size = new Size(100,20); mt_StoreToDiskFolder_Folder.Location = new Point(0,125); mt_StoreToDiskFolder_Folder.Visible = false; mt_StoreToDiskFolder_Folder.TextAlign = ContentAlignment.MiddleRight; mt_StoreToDiskFolder_Folder.Text = "Disk Folder:"; m_pStoreToDiskFolder_Folder = new TextBox(); m_pStoreToDiskFolder_Folder.Size = new Size(350,120); m_pStoreToDiskFolder_Folder.Location = new Point(105,125); m_pStoreToDiskFolder_Folder.Visible = false; m_pStoreToDiskFolder_BrowseFolder = new Button(); m_pStoreToDiskFolder_BrowseFolder.Size = new Size(25,20); m_pStoreToDiskFolder_BrowseFolder.Location = new Point(460,125); m_pStoreToDiskFolder_BrowseFolder.Visible = false; m_pStoreToDiskFolder_BrowseFolder.Click += new EventHandler(m_pStoreToDiskFolder_BrowseFolder_Click); m_pStoreToDiskFolder_BrowseFolder.Text = "..."; //-----------------------------------------------------------------------------// #endregion #region Store To IMAP Folder //--- Store To IMAP Folder ----------------------------------------------------// mt_MoveToIMAPFolder_Folder = new Label(); mt_MoveToIMAPFolder_Folder.Size = new Size(100,20); mt_MoveToIMAPFolder_Folder.Location = new Point(0,125); mt_MoveToIMAPFolder_Folder.Visible = false; mt_MoveToIMAPFolder_Folder.TextAlign = ContentAlignment.MiddleRight; mt_MoveToIMAPFolder_Folder.Text = "IMAP Folder:"; m_pMoveToIMAPFolder_Folder = new TextBox(); m_pMoveToIMAPFolder_Folder.Size = new Size(380,20); m_pMoveToIMAPFolder_Folder.Location = new Point(105,125); m_pMoveToIMAPFolder_Folder.Visible = false; //-----------------------------------------------------------------------------// #endregion #region Add Header Field //--- Add Header Field --------------------------------------------------------// mt_AddHeaderField_FieldName = new Label(); mt_AddHeaderField_FieldName.Size = new Size(100,20); mt_AddHeaderField_FieldName.Location = new Point(0,125); mt_AddHeaderField_FieldName.Visible = false; mt_AddHeaderField_FieldName.TextAlign = ContentAlignment.MiddleRight; mt_AddHeaderField_FieldName.Text = "Name:"; m_pAddHeaderField_FieldName = new TextBox(); m_pAddHeaderField_FieldName.Size = new Size(380,120); m_pAddHeaderField_FieldName.Location = new Point(105,125); m_pAddHeaderField_FieldName.Visible = false; mt_AddHeaderField_FieldValue = new Label(); mt_AddHeaderField_FieldValue.Size = new Size(100,20); mt_AddHeaderField_FieldValue.Location = new Point(0,150); mt_AddHeaderField_FieldValue.Visible = false; mt_AddHeaderField_FieldValue.TextAlign = ContentAlignment.MiddleRight; mt_AddHeaderField_FieldValue.Text = "Value:"; m_pAddHeaderField_FieldValue = new TextBox(); m_pAddHeaderField_FieldValue.Size = new Size(380,20); m_pAddHeaderField_FieldValue.Location = new Point(105,150); m_pAddHeaderField_FieldValue.Visible = false; //-----------------------------------------------------------------------------// #endregion #region Remove Header Field //--- Remove Header Field -----------------------------------------------------// mt_RemoveHeaderField_FieldName = new Label(); mt_RemoveHeaderField_FieldName.Size = new Size(100,20); mt_RemoveHeaderField_FieldName.Location = new Point(0,125); mt_RemoveHeaderField_FieldName.Visible = false; mt_RemoveHeaderField_FieldName.TextAlign = ContentAlignment.MiddleRight; mt_RemoveHeaderField_FieldName.Text = "Name:"; m_pRemoveHeaderField_FieldName = new TextBox(); m_pRemoveHeaderField_FieldName.Size = new Size(380,20); m_pRemoveHeaderField_FieldName.Location = new Point(105,125); m_pRemoveHeaderField_FieldName.Visible = false; //----------------------------------------------------------------------------// #endregion #region Send Error To Client //--- Send Error To Client ---------------------------------------------------// mt_SendErrorToClient_ErrorText = new Label(); mt_SendErrorToClient_ErrorText.Size = new Size(100,20); mt_SendErrorToClient_ErrorText.Location = new Point(0,125); mt_SendErrorToClient_ErrorText.Text = "Error Text:"; mt_SendErrorToClient_ErrorText.TextAlign = ContentAlignment.MiddleRight; mt_SendErrorToClient_ErrorText.Visible = false; m_pSendErrorToClient_ErrorText = new TextBox(); m_pSendErrorToClient_ErrorText.Size = new Size(380,20); m_pSendErrorToClient_ErrorText.Location = new Point(105,125); m_pSendErrorToClient_ErrorText.Visible = false; //----------------------------------------------------------------------------// #endregion #region Store To FTP Folder //--- Store To FTP Folder ----------------------------------------------------// mt_StoreToFTPFolder_Server = new Label(); mt_StoreToFTPFolder_Server.Size = new Size(100,20); mt_StoreToFTPFolder_Server.Location = new Point(0,125); mt_StoreToFTPFolder_Server.TextAlign = ContentAlignment.MiddleRight; mt_StoreToFTPFolder_Server.Text = "Host:"; mt_StoreToFTPFolder_Server.Visible = false; m_pStoreToFTPFolder_Server = new TextBox(); m_pStoreToFTPFolder_Server.Size = new Size(310,20); m_pStoreToFTPFolder_Server.Location = new Point(105,125); m_pStoreToFTPFolder_Server.Visible = false; m_pStoreToFTPFolder_Port = new NumericUpDown(); m_pStoreToFTPFolder_Port.Size = new Size(65,13); m_pStoreToFTPFolder_Port.Location = new Point(420,125); m_pStoreToFTPFolder_Port.Minimum = 1; m_pStoreToFTPFolder_Port.Maximum = 99999; m_pStoreToFTPFolder_Port.Visible = false; mt_StoreToFTPFolder_User = new Label(); mt_StoreToFTPFolder_User.Size = new Size(100,20); mt_StoreToFTPFolder_User.Location = new Point(0,150); mt_StoreToFTPFolder_User.TextAlign = ContentAlignment.MiddleRight; mt_StoreToFTPFolder_User.Text = "User:"******"Password:"******"Folder:"; mt_StoreToFTPFolder_Folder.Visible = false; m_pStoreToFTPFolder_Folder = new TextBox(); m_pStoreToFTPFolder_Folder.Size = new Size(380,20); m_pStoreToFTPFolder_Folder.Location = new Point(105,200); m_pStoreToFTPFolder_Folder.Visible = false; //----------------------------------------------------------------------------// #endregion #region Post To NNTP Newsgroup //--- Post To NNTP Newsgroup -------------------------------------------------// mt_PostToNNTPNewsgroup_Server = new Label(); mt_PostToNNTPNewsgroup_Server.Size = new Size(100,20); mt_PostToNNTPNewsgroup_Server.Location = new Point(0,125); mt_PostToNNTPNewsgroup_Server.TextAlign = ContentAlignment.MiddleRight; mt_PostToNNTPNewsgroup_Server.Text = "Host:"; mt_PostToNNTPNewsgroup_Server.Visible = false; m_pPostToNNTPNewsgroup_Server = new TextBox(); m_pPostToNNTPNewsgroup_Server.Size = new Size(310,20); m_pPostToNNTPNewsgroup_Server.Location = new Point(105,125); m_pPostToNNTPNewsgroup_Server.Visible = false; m_pPostToNNTPNewsgroup_Port = new NumericUpDown(); m_pPostToNNTPNewsgroup_Port.Size = new Size(65,20); m_pPostToNNTPNewsgroup_Port.Location = new Point(420,125); m_pPostToNNTPNewsgroup_Port.Minimum = 1; m_pPostToNNTPNewsgroup_Port.Maximum = 99999; m_pPostToNNTPNewsgroup_Port.Value = 119; m_pPostToNNTPNewsgroup_Port.Visible = false; mt_PostToNNTPNewsgroup_Newsgroup = new Label(); mt_PostToNNTPNewsgroup_Newsgroup.Size = new Size(100,20); mt_PostToNNTPNewsgroup_Newsgroup.Location = new Point(0,150); mt_PostToNNTPNewsgroup_Newsgroup.TextAlign = ContentAlignment.MiddleRight; mt_PostToNNTPNewsgroup_Newsgroup.Text = "Newsgroup:"; mt_PostToNNTPNewsgroup_Newsgroup.Visible = false; m_pPostToNNTPNewsgroup_Newsgroup = new TextBox(); m_pPostToNNTPNewsgroup_Newsgroup.Size = new Size(380,13); m_pPostToNNTPNewsgroup_Newsgroup.Location = new Point(105,150); m_pPostToNNTPNewsgroup_Newsgroup.Visible = false; //----------------------------------------------------------------------------// #endregion #region Post To HTTP //--- Post To HTTP -----------------------------------------------------------// mt_PostToHTTP_URL = new Label(); mt_PostToHTTP_URL.Size = new Size(100,20); mt_PostToHTTP_URL.Location = new Point(0,125); mt_PostToHTTP_URL.TextAlign = ContentAlignment.MiddleRight; mt_PostToHTTP_URL.Text = "URL:"; mt_PostToHTTP_URL.Visible = false; m_pPostToHTTP_URL = new TextBox(); m_pPostToHTTP_URL.Size = new Size(380,20); m_pPostToHTTP_URL.Location = new Point(105,125); m_pPostToHTTP_URL.Visible = false; //----------------------------------------------------------------------------// #endregion // Common this.Controls.Add(m_pIcon); this.Controls.Add(mt_Info); this.Controls.Add(m_pSeparator1); this.Controls.Add(mt_Description); this.Controls.Add(m_pDescription); this.Controls.Add(mt_Action); this.Controls.Add(m_pAction); this.Controls.Add(m_pSeparator2); this.Controls.Add(m_pSeparator3); this.Controls.Add(m_pHelp); this.Controls.Add(m_pCancel); this.Controls.Add(m_Ok); // Auto Response this.Controls.Add(mt_AutoResponse_From); this.Controls.Add(m_pAutoResponse_From); this.Controls.Add(mt_AutoResponse_FullMEssage); this.Controls.Add(m_pAutoResponse_FullMEssage); this.Controls.Add(m_pAutoResponse_Compose); this.Controls.Add(mt_AutoResponse_Load); // Execute Program this.Controls.Add(mt_ExecuteProgram_ProgramToExecute); this.Controls.Add(m_pExecuteProgram_ProgramToExecute); this.Controls.Add(m_pExecuteProgram_BrowseProgramToExecute); this.Controls.Add(mt_ExecuteProgram_ProgramArguments); this.Controls.Add(m_pExecuteProgram_ProgramArguments); // Forward To Email this.Controls.Add(mt_ForwardToEmail_Email); this.Controls.Add(m_pForwardToEmail_Email); // Forward To Host this.Controls.Add(mt_ForwardToHost_Host); this.Controls.Add(m_pForwardToHost_Host); this.Controls.Add(mt_ForwardToHost_HostPort); this.Controls.Add(m_pForwardToHost_HostPort); // Store To Disk Folder this.Controls.Add(m_pStoreToDiskFolder_Folder); this.Controls.Add(m_pStoreToDiskFolder_BrowseFolder); this.Controls.Add(mt_StoreToDiskFolder_Folder); // Move To IMAP Folder this.Controls.Add(mt_MoveToIMAPFolder_Folder); this.Controls.Add(m_pMoveToIMAPFolder_Folder); // Add Header Field this.Controls.Add(mt_AddHeaderField_FieldName); this.Controls.Add(m_pAddHeaderField_FieldName); this.Controls.Add(mt_AddHeaderField_FieldValue); this.Controls.Add(m_pAddHeaderField_FieldValue); // Remove Header Field this.Controls.Add(mt_RemoveHeaderField_FieldName); this.Controls.Add(m_pRemoveHeaderField_FieldName); // Send Error To Client this.Controls.Add(mt_SendErrorToClient_ErrorText); this.Controls.Add(m_pSendErrorToClient_ErrorText); // Store To FTP Folder this.Controls.Add(mt_StoreToFTPFolder_Server); this.Controls.Add(m_pStoreToFTPFolder_Server); this.Controls.Add(m_pStoreToFTPFolder_Port); this.Controls.Add(mt_StoreToFTPFolder_User); this.Controls.Add(m_pAddHeaderField_FieldValue); this.Controls.Add(m_pStoreToFTPFolder_User); this.Controls.Add(mt_StoreToFTPFolder_Password); this.Controls.Add(m_pStoreToFTPFolder_Password); this.Controls.Add(mt_StoreToFTPFolder_Folder); this.Controls.Add(m_pStoreToFTPFolder_Folder); // Post To NNTP Newsgroup this.Controls.Add(mt_PostToNNTPNewsgroup_Server); this.Controls.Add(m_pPostToNNTPNewsgroup_Server); this.Controls.Add(m_pPostToNNTPNewsgroup_Port); this.Controls.Add(mt_PostToNNTPNewsgroup_Newsgroup); this.Controls.Add(m_pPostToNNTPNewsgroup_Newsgroup); // Post To HTTP this.Controls.Add(mt_PostToHTTP_URL); this.Controls.Add(m_pPostToHTTP_URL); }
static string GetComboBoxState(ComboBox combobox) { Hashtable table = new Hashtable(); table["style"] = combobox.DropDownStyle.ToString(); table["index"] = combobox.SelectedIndex.ToString(); return combobox.GetType().ToString() + ":" + StringUtil.BuildParameterString(table); }