47 : base(handle)
48 {
49 _builder = builder;
50 builder.Autoconnect(this);
51 okBut.ButtonPressEvent += OkBut_ButtonPressEvent;
52 cancelBut.ButtonPressEvent += CancelBut_ButtonPressEvent;
53 ens = ems;
54 List<string> sts = new List<string>();
55 Array ar = Enum.GetValues(ems);
56 foreach (Enum s in ar)
57 {
58 sts.Add(s.ToString());
59 }
60 var states = new ListStore(typeof(string));
61
62 foreach (string val in sts)
63 {
64 states.AppendValues(val);
65 }
66
67 comboBox.Model = states;
68
69 var renderer2 = new CellRendererText();
70 comboBox.PackStart(renderer2, false);
71 comboBox.AddAttribute(renderer2, "text", 0);
72 comboBox.Active = 0;
73 App.ApplyStyles(this);
74 }