|
@@ -15,6 +15,7 @@ using Comal.Classes;
|
|
|
using PRSClasses;
|
|
|
using Newtonsoft.Json;
|
|
|
using Java.Security.Cert;
|
|
|
+using Xamarin.Essentials;
|
|
|
|
|
|
namespace comal.timesheets.QAForms
|
|
|
{
|
|
@@ -488,7 +489,7 @@ namespace comal.timesheets.QAForms
|
|
|
|
|
|
if (loadData.TryGetValue(dfLayoutStringField.Name, out value))
|
|
|
{
|
|
|
- item.Text = value;
|
|
|
+ item.Text = value;
|
|
|
button.Text = value.Length > 25 ? value.Substring(0, 25) + "..." : value;
|
|
|
}
|
|
|
if (loadRetainedForm)
|
|
@@ -1867,10 +1868,10 @@ namespace comal.timesheets.QAForms
|
|
|
{
|
|
|
(view as DataButtonControl).Data = value.ToString();
|
|
|
(view as DataButtonControl).Text = value.ToString();
|
|
|
- }
|
|
|
+ }
|
|
|
else
|
|
|
(view as Editor).Text = value.ToString();
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
else if (field is DFLayoutDateField)
|
|
|
(view as DatePicker).Date = (DateTime)(value as DateTime?);
|
|
@@ -1945,7 +1946,7 @@ namespace comal.timesheets.QAForms
|
|
|
else
|
|
|
return (view as Editor).Text;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
else if (field is DFLayoutIntegerField)
|
|
|
return int.Parse((view as Editor).Text);
|
|
|
|
|
@@ -2112,7 +2113,19 @@ namespace comal.timesheets.QAForms
|
|
|
|
|
|
public void SetFieldColour(string field, System.Drawing.Color? colour = null)
|
|
|
{
|
|
|
- //find the view, set the background colour
|
|
|
+ if (colour != null)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ System.Drawing.Color color = (System.Drawing.Color)colour;
|
|
|
+ FindView(field).Item2.BackgroundColor = Color.FromRgba(
|
|
|
+ Convert.ToDouble(color.R),
|
|
|
+ Convert.ToDouble(color.G),
|
|
|
+ Convert.ToDouble(color.B),
|
|
|
+ Convert.ToDouble(color.A));
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
+ }
|
|
|
}
|
|
|
#endregion
|
|
|
|