Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18.  
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. listBox1.Items.Add("Luni");
  22. listBox1.Items.Add("Marti");
  23. listBox1.Items.Add("Miercuri");
  24. listBox1.Items.Add("Joi");
  25. listBox1.Items.Add("Vineri");
  26. listBox1.Items.Add("Sambata");
  27. listBox1.Items.Add("Duminica");
  28. }
  29.  
  30. private void button2_Click(object sender, EventArgs e)
  31. {
  32. comboBox1.Items.Add("Ianuarie");
  33. comboBox1.Items.Add("Februarie");
  34. comboBox1.Items.Add("Martie");
  35. comboBox1.Items.Add("Aprilie");
  36. comboBox1.Items.Add("Mai");
  37. comboBox1.Items.Add("Iunie");
  38. comboBox1.Items.Add("Iulie");
  39. comboBox1.Items.Add("August");
  40. comboBox1.Items.Add("Septembrie");
  41. comboBox1.Items.Add("Octombrie");
  42. comboBox1.Items.Add("Noiembrie");
  43. comboBox1.Items.Add("Decembrie");
  44. }
  45.  
  46. private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  47. {
  48.  
  49. }
  50.  
  51. private void button3_Click(object sender, EventArgs e)
  52. {
  53. string s = "Am selectat:";
  54.  
  55. listBox2.Items.Clear();
  56. foreach (object x in checkedListBox1.CheckedItems)
  57. {
  58. listBox2.Items.Add(x);
  59. s = s + x.ToString()+" ";
  60. }
  61. label1.Text = s;
  62. }
  63.  
  64. private void label1_Click(object sender, EventArgs e)
  65. {
  66.  
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement