Voici un customizer à placer dans la séquence :
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorUi;
using System.Windows.Forms;
namespace Billing
{
public class Customizer : MercatorUi.ICustomizers.IFormLoadCustomizer, MercatorUi.ICustomizers.IFormClosedCustomizer
{
public void FormLoadCustomize(System.Windows.Forms.Form WindowsForm)
{
MercatorUi.Forms.Billing.BillingForm billingForm = (MercatorUi.Forms.Billing.BillingForm)WindowsForm;
billingForm.KeyDown += new System.Windows.Forms.KeyEventHandler(billingForm_KeyDown);
}
public void FormClosedCustomize(System.Windows.Forms.Form WindowsForm)
{
MercatorUi.Forms.Billing.BillingForm billingForm = (MercatorUi.Forms.Billing.BillingForm)WindowsForm;
billingForm.KeyDown -= new System.Windows.Forms.KeyEventHandler(billingForm_KeyDown);
}
void billingForm_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
MercatorUi.Forms.Billing.BillingForm billingForm = (MercatorUi.Forms.Billing.BillingForm)sender;
if (e.Alt && (e.KeyCode == Keys.T) && billingForm.transformer.SubItems[0].Enabled)
{
billingForm.transformer.Focus();
billingForm.BillingEngine.TransformUp();
}
}
}
}
Depuis la version 7.1 (nouvelle interface), dans une vente, il n'est plus possible de transformer le document vers un stade ultérieur (ex; livraison -> facture) via ALT-T + Enter.