using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorController;
namespace MercatorUi.Reporting
{
public class Customizer : MercatorUi.ICustomizers.INewPinInReportingMapForm
{
public void NewPinInReportingMapForm(_BaseClasses.Pin pin)
{
pin.Disposing += pin_Disposing;
pin.Click += pin_Click;
string s = pin.DataRow["c_nom"].ToString() + "\r\n" + pin.DataRow["c_adresse"].ToString();
if (!pin.DataRow["c_adresse2"].Equals(""))
s += "\r\n" + pin.DataRow["c_adresse2"].ToString();
s += "\r\n" + pin.DataRow["ville"].ToString();
pin.SetToolTip(s);
}
void pin_Disposing(object sender, EventArgs e)
{
var pin = (_BaseClasses.Pin)sender;
pin.Disposing -= pin_Disposing;
pin.Click -= pin_Click;
}
void pin_Click(object sender, EventArgs e)
{
var pin = (_BaseClasses.Pin)sender;
MercatorUi.Globals.Main.ShowSigInInThread(MercatorUi.Sig._SigEnum.CLI, pin.DataRow["c_id"].ToString());
}
}
}