using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
public partial class mod_navPath : SteamWare.ApplicationUserControl
{
///
/// link alla pagina precedente...
///
public string linkText
{
get
{
return txtTesto.Text;
}
set
{
txtTesto.Text = value;
}
}
public string linkURL
{
get
{
return txtLink.Text;
}
set
{
txtLink.Text = value;
}
}
///
/// fornisce il valore scelto o "*" se nulla selezionato
///
public string valore
{
get
{
return txtVal.Text;
}
set
{
txtVal.Text = value;
}
}
///
/// fornisce il valore scelto o "0" se nulla selezionato o non valido
///
public int valoreInt
{
get
{
int answ = 0;
try
{
answ = Convert.ToInt32(txtVal.Text);
}
catch
{ }
return answ;
}
}
///
/// fornisce il separatore scelto o "*" se nulla selezionato
///
public string separatore
{
get
{
return txtSeparatore.Text;
}
set
{
txtSeparatore.Text = value;
}
}
///
/// fornisce il tooltip scelto o "*" se nulla selezionato
///
public string tooltip
{
get
{
return txtTooltip.Text;
}
set
{
txtTooltip.Text = value;
}
}
protected override void bindControlli()
{
hlNaviga.NavigateUrl = txtLink.Text;
//mostro solo una substring: il minore tra la lungh e xx char
int maxDispl = SteamWare.memLayer.ML.confReadint("_navMaxChar");
if (txtTesto.Text.Length <= maxDispl)
{
hlNaviga.Text = txtTesto.Text;
}
else
{
hlNaviga.Text = string.Format("{0}...", txtTesto.Text.Substring(0, maxDispl));
}
hlNaviga.ToolTip = string.Format("{0} ({1})", txtTesto.Text, txtTooltip.Text);
lblSeparatore.Text = string.Format(" {0} ", txtSeparatore.Text);
}
///
/// primo valore di una chiave multicampo
///
public string val_1
{
get
{
string answ = "*";
string[] _dataKey = valore.Split('#');
answ = _dataKey[0];
return answ;
}
}
///
/// secondo valore di una chiave multicampo
///
public string val_2
{
get
{
string answ = "*";
string[] _dataKey = valore.Split('#');
answ = _dataKey[1];
return answ;
}
}
///
/// restituisce l'n-esimo valore di una chiave multicampo
///
public string val(int n)
{
string answ = "*";
try
{
string[] _dataKey = valore.Split('#');
answ = _dataKey[n];
}
catch
{ }
return answ;
}
}