Пример #1
0
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Build ();

        ComboBoxHelper comboBoxHelper = new ComboBoxHelper ();
        comboBoxHelper
            .ComboBox (comboBox)
            .Id ((ulong)7)
            .SelectSql ("select id, nombre from categoria")
            .Init ();
        /*
        propertiesAction.Activated += delegate {
            Console.WriteLine("id={0}", comboBox.GetId());
        };
        */
    }
Пример #2
0
	public MainWindow (): base (Gtk.WindowType.Toplevel)
	{
		Build ();

		//new ComboBoxHelper (comboBox, (ulong)7, "select id, nombre from categoria");
		//comboBox.Fill(ulong)7,"select id, nombre from categoria";//Combobox Extensions
		ComboBoxHelper comboBoxHelper = new ComboBoxHelper();//Sintaxis fluida
		comboBoxHelper
			.ComboBox (comboBox)
			//.Id ((ulong)3)
			.SelectSql ("select id, nombre from categoria")
			.Init ();

		propertiesAction.Activated += delegate {
			Console.WriteLine("id={0}", comboBox.GetId());
		};

	}