a953cbf7fd
git-svn-id: https://keyhammer.ath.cx/svn/XPS/trunk@83 43c8e981-f90d-406c-a89a-24a2c4268d51
159 lines
3.6 KiB
C#
159 lines
3.6 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// link alla pagina precedente...
|
|
/// </summary>
|
|
public string linkText
|
|
{
|
|
get
|
|
{
|
|
return txtTesto.Text;
|
|
}
|
|
set
|
|
{
|
|
txtTesto.Text = value;
|
|
}
|
|
}
|
|
public string linkURL
|
|
{
|
|
get
|
|
{
|
|
return txtLink.Text;
|
|
}
|
|
set
|
|
{
|
|
txtLink.Text = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// fornisce il valore scelto o "*" se nulla selezionato
|
|
/// </summary>
|
|
public string valore
|
|
{
|
|
get
|
|
{
|
|
return txtVal.Text;
|
|
}
|
|
set
|
|
{
|
|
txtVal.Text = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// fornisce il valore scelto o "0" se nulla selezionato o non valido
|
|
/// </summary>
|
|
public int valoreInt
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
try
|
|
{
|
|
answ = Convert.ToInt32(txtVal.Text);
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// fornisce il separatore scelto o "*" se nulla selezionato
|
|
/// </summary>
|
|
public string separatore
|
|
{
|
|
get
|
|
{
|
|
return txtSeparatore.Text;
|
|
}
|
|
set
|
|
{
|
|
txtSeparatore.Text = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// fornisce il tooltip scelto o "*" se nulla selezionato
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// primo valore di una chiave multicampo
|
|
/// </summary>
|
|
public string val_1
|
|
{
|
|
get
|
|
{
|
|
string answ = "*";
|
|
string[] _dataKey = valore.Split('#');
|
|
answ = _dataKey[0];
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// secondo valore di una chiave multicampo
|
|
/// </summary>
|
|
public string val_2
|
|
{
|
|
get
|
|
{
|
|
string answ = "*";
|
|
string[] _dataKey = valore.Split('#');
|
|
answ = _dataKey[1];
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// restituisce l'n-esimo valore di una chiave multicampo
|
|
/// </summary>
|
|
public string val(int n)
|
|
{
|
|
string answ = "*";
|
|
try
|
|
{
|
|
string[] _dataKey = valore.Split('#');
|
|
answ = _dataKey[n];
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|