using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Windows.Forms;
using MercatorApi;
using MercatorUi;
namespace Billing
{
public class Customizer : MercatorUi.ICustomizers.IBillingEngineCreated, MercatorUi.ICustomizers.IBillingEngineClosed
{
public void BillingEngineCreated(MercatorUi.Engine.Gescom.BillingEngine BillingEngine)
{
BillingEngine.BillingFormLoaded += new EventHandler(BillingEngine_BillingFormLoaded);
}
public void BillingEngineClosed(MercatorUi.Engine.Gescom.BillingEngine BillingEngine)
{
BillingEngine.BillingFormLoaded -= new EventHandler(BillingEngine_BillingFormLoaded);
}
void BillingEngine_BillingFormLoaded(object sender, EventArgs e)
{
MercatorUi.Engine.Gescom.BillingEngine billingEngine = (MercatorUi.Engine.Gescom.BillingEngine)sender;
foreach (Control c in billingEngine.BillingForm.Controls)
{
if (c.Name == "bleuPro1") //We identificeren de strip in de onderkant van het scherm
{
// on va chercher le premier bouton, çàd le dernier dans la collection Controls du bandeau
MercatorUi.BoutonsPro.ButtonXPro buttonLignes = (MercatorUi.BoutonsPro.ButtonXPro)c.Controls[c.Controls.Count - 1];
buttonLignes.SubItems[2].Enabled = false; // disable "Lijn wissen"
buttonLignes.SubItems[3].Enabled = false; // disabler "Alle lijnen wissen"
}
}
}
}
}