using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorExtensions;
using MercatorUi;
using System.Windows.Forms;
namespace SigFou
{
public class Customizer : MercatorUi.ICustomizers.IFormLoadCustomizer, MercatorUi.ICustomizers.IFormClosedCustomizer
{
public void FormLoadCustomize(Form WindowsForm)
{
MercatorUi.Forms.Sig.SigForm sigForm = (MercatorUi.Forms.Sig.SigForm)WindowsForm;
foreach (Control c in sigForm.FindMovableControlsByType(typeof(MercatorUi.MovableControls.MovableSqlFileView)))
{
MercatorUi.MovableControls.MovableSqlFileView sqlFileView = (MercatorUi.MovableControls.MovableSqlFileView)c;
sqlFileView.IgnoreAutoResize = true;
sqlFileView.AfterRead += new MercatorUi.MovableControls.MovableSqlFileView.AfterReadHandler(fileView_AfterRead); //
}
}
public void FormClosedCustomize(Form WindowsForm)
{
MercatorUi.Forms.Sig.SigForm sigForm = (MercatorUi.Forms.Sig.SigForm)WindowsForm;
foreach (Control c in sigForm.FindMovableControlsByType(typeof(MercatorUi.MovableControls.MovableSqlFileView)))
{
MercatorUi.MovableControls.MovableSqlFileView sqlFileView = (MercatorUi.MovableControls.MovableSqlFileView)c;
sqlFileView.AfterRead -= new MercatorUi.MovableControls.MovableSqlFileView.AfterReadHandler(fileView_AfterRead); //
}
}
void fileView_AfterRead(object sender, EventArgs e)
{
MercatorUi.MovableControls.MovableSqlFileView sqlFileView = (MercatorUi.MovableControls.MovableSqlFileView)sender;
sqlFileView.Tree.Columns[0].Width.Absolute = 150;
}
}
}