public ADDFILELABEL(String title, Color color) { container_label = new Label(); container_label.Size = new Size(container_label_width, container_label_height); container_label.BackColor = color; //container_label.Text = title; add_file_button = new SENDMAILBUTTON("ADD_FILE", Color.LightGray); add_file_button.button.Location = new Point(add_file_button_offset_x, add_files_list_offset_y); add_file_button.button.Size = new Size(add_file_button_width, add_file_button_height); attachment_title_label = new TextFieldWithName("ATTACHMENTS:", Color.LightGray); attachment_title_label.HideTextBox(); added_files_list = new ListBox(); added_files_list.Location = new Point(add_files_list_offset_x, add_files_list_offset_y); added_files_list.Size = new Size(400, 160); added_files_list.SelectionMode = SelectionMode.MultiExtended; container_label.Controls.Add(add_file_button.button); container_label.Controls.Add(added_files_list); container_label.Controls.Add(attachment_title_label.label); //container_label.PreviewKeyDown = true; added_files_list.KeyDown += new KeyEventHandler(OnKeyboardButtonClick); add_file_button.button.Click += new EventHandler(OnAddFileButtonClick); }
public SendMailPanel() { //mail_sender = new MailSender("smtp.gmail.com"); this.Location = new Point(loc_x, loc_y); //250, 10 this.Size = new Size(width, height); this.MinimumSize = new Size(width, height); this.MaximumSize = new Size(width, height); this.BackColor = Color.Orange; text_field_to = new TextFieldWithName("MAIL_TO:", Color.LightGray); text_field_subject = new TextFieldWithName("SUBJECT:", Color.LightGray); edit_mail_text_label = new EDITMAILTEXTLABEL("CONTENT:", Color.LightGray); send_mail_button = new SENDMAILBUTTON("SEND MESSAGE", Color.LightGray); //add_file_label = new ADDFILELABEL(" ", Color.LightGray); this.Controls.Add(text_field_to.label); this.Controls.Add(text_field_subject.label); this.Controls.Add(edit_mail_text_label.label); this.Controls.Add(send_mail_button.button); //this.Controls.Add(add_file_label.label); text_field_to.SetLocation(new Point(text_field_to_offset_x, text_field_to_offset_y)); text_field_subject.SetLocation(new Point(text_field_subject_offset_x, text_field_subject_offset_y)); edit_mail_text_label.SetLocation(new Point(text_field_content_offset_x, text_field_content_offset_y)); send_mail_button.SetLocation(new Point(send_mail_button_offset_x, send_mail_button_offset_y)); send_mail_button.button.Click += new EventHandler(OnSendMailButtonClick); //text_field_to.Size = new Size(text_field_to_width, text_field_to_height); }
public EDITMAILTEXTLABEL(String title, Color color) { container_label = new Label(); container_label.Size = new Size(container_label_width, container_label_height); container_label.BackColor = color; mail_content_textbox = new TextBox(); mail_content_textbox.Size = new Size(container_label_width - mail_content_textbox_offset_x * 2, mail_content_textbox_height); mail_content_textbox.Multiline = true; mail_content_textbox.BackColor = Color.WhiteSmoke; title_bar = new TextFieldWithName(title, color); title_bar.HideTextBox(); add_file_label = new ADDFILELABEL("Title", color); add_file_label.label.Location = new Point(0, 482); container_label.Controls.Add(mail_content_textbox); container_label.Controls.Add(title_bar.label); container_label.Controls.Add(add_file_label.label); mail_content_textbox.Location = new Point(mail_content_textbox_offset_x, mail_content_textbox_offset_y); }