7d289a3b64
pulizia codice...
70 lines
1.8 KiB
C#
70 lines
1.8 KiB
C#
using SteamWare;
|
|
using System;
|
|
|
|
public partial class mod_main_help : ApplicationUserControl
|
|
{
|
|
|
|
#region inizializzazione generica & utility
|
|
|
|
protected override void OnInit(EventArgs e)
|
|
{
|
|
base.OnInit(e);
|
|
hlMagRic.DataBind();
|
|
hlConsRic.DataBind();
|
|
}
|
|
|
|
protected string defaultApp;
|
|
protected string defaultTitle;
|
|
protected string defaultBody;
|
|
|
|
protected override void traduciObj()
|
|
{
|
|
defaultApp = SteamWare.memLayer.ML.confReadString("defaultApp");
|
|
defaultTitle = SteamWare.memLayer.ML.confReadString("defaultTitle");
|
|
defaultBody = SteamWare.memLayer.ML.confReadString("defaultBody");
|
|
lblTitle.Text = user_std.UtSn.Traduci(defaultTitle);
|
|
lblMess.Text = user_std.UtSn.Traduci(defaultBody);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region public
|
|
|
|
/// <summary>
|
|
/// imposta app, title e body del generico messaggio mostrato dal modulo
|
|
/// NB: vanno passate le stringhe da tradurre!!!
|
|
/// </summary>
|
|
/// <param name="app"></param>
|
|
/// <param name="titolo"></param>
|
|
/// <param name="body"></param>
|
|
public void setupMessaggio(string app2transl, string titolo2transl, string body2transl)
|
|
{
|
|
defaultApp = app2transl;
|
|
defaultTitle = titolo2transl;
|
|
defaultBody = body2transl;
|
|
}
|
|
|
|
/// <summary>
|
|
/// verifica visibilità in base ai permessi utente
|
|
/// </summary>
|
|
/// <param name="refRight"></param>
|
|
/// <returns></returns>
|
|
public string checkShow(object refRight)
|
|
{
|
|
bool doShow = false;
|
|
try
|
|
{
|
|
doShow = user_std.UtSn.userHasRight(refRight.ToString());
|
|
}
|
|
catch
|
|
{ }
|
|
|
|
string answ = "";
|
|
if (!doShow) answ = "hidden ";
|
|
return answ;
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|