forked from shaba/openuds
* Added support for long configuration fields
* Increased multiple rows default height a bit
This commit is contained in:
parent
159d85fb7a
commit
9f3d269cec
@ -33,6 +33,6 @@ using System.Resources;
|
||||
// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
|
||||
// mediante el asterisco ('*'), como se muestra a continuación:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.7.0")]
|
||||
[assembly: AssemblyVersion("1.0.8.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
@ -88,6 +88,18 @@ namespace UdsAdmin.forms
|
||||
txt.Text = cfg.value;
|
||||
txt.Width = 180;
|
||||
txt.UseSystemPasswordChar = cfg.crypt;
|
||||
if (cfg.longText)
|
||||
{
|
||||
txt.Multiline = true;
|
||||
txt.Height = 80;
|
||||
txt.ScrollBars = ScrollBars.Both;
|
||||
txt.AcceptsReturn = true;
|
||||
txt.WordWrap = false;
|
||||
StringBuilder bldr = new StringBuilder();
|
||||
foreach (string v in cfg.value.Split('\n'))
|
||||
bldr.AppendLine(v);
|
||||
txt.Text = bldr.ToString();
|
||||
}
|
||||
txt.Dock = DockStyle.Fill;
|
||||
pan.Controls.Add(txt, 1, row);
|
||||
row++;
|
||||
@ -128,7 +140,7 @@ namespace UdsAdmin.forms
|
||||
TextBox txt = (TextBox)ctrl;
|
||||
xmlrpc.Configuration cfg = (xmlrpc.Configuration)ctrl.Tag;
|
||||
if( cfg.value != txt.Text )
|
||||
changed.Add( new xmlrpc.Configuration(cfg.section, cfg.key, txt.Text, cfg.crypt ) );
|
||||
changed.Add( new xmlrpc.Configuration(cfg.section, cfg.key, txt.Text, cfg.crypt, cfg.longText) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace UdsAdmin.gui
|
||||
{
|
||||
public class DinamycFieldsManager
|
||||
{
|
||||
const int DEF_FLD_HEIGHT = 22;
|
||||
const int DEF_FLD_HEIGHT = 24;
|
||||
const int DEF_FLD_WIDTH = 12;
|
||||
|
||||
public class ValidationError : Exception
|
||||
|
@ -385,16 +385,17 @@ namespace UdsAdmin.xmlrpc
|
||||
public string key;
|
||||
public string value;
|
||||
public bool crypt;
|
||||
public bool longText;
|
||||
|
||||
public Configuration()
|
||||
{
|
||||
section = key = value = "";
|
||||
crypt = false;
|
||||
crypt = longText = false;
|
||||
}
|
||||
|
||||
public Configuration(string section, string key, string value, bool crypt)
|
||||
public Configuration(string section, string key, string value, bool crypt, bool longText)
|
||||
{
|
||||
this.section = section; this.key = key; this.value = value; this.crypt = crypt;
|
||||
this.section = section; this.key = key; this.value = value; this.crypt = crypt; this.longText = longText;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user