Hi, I has the followinng code to make update of more control refers to the same variable on windows form. I make it to update more than one control by asingle operation on update datatable. This working very well on Window, calling UpdateControlValue by BeginInvoke.Action from main form. When I execute this code by mono on linux on raspian, it does't work. Thank's for help What I have tried: <pre> DataSet ds = new DataSet(); DataTable tabella1 = new DataTable(TABLE_NAME); private const string TABLE_NAME = "CostantTable"; private const string COLUMN_NAME = "CtrlName"; private const string COLUMN_VALUE = "CtrlValue"; public HmiMappingManager() { tabella1.Columns.Add(COLUMN_NAME, typeof(string)); tabella1.Columns.Add(COLUMN_VALUE, typeof(string)); var values = Enum.GetValues(typeof(ControlMapEnum)); foreach (var val in values) { string defaultValue = DecorationHelper.GetDescription((ControlMapEnum)Enum.Parse(typeof(ControlMapEnum), val.ToString())); tabella1.Rows.Add(new object[2] { val.ToString(), defaultValue }); } ds.Tables.Add(tabella1); ds.AcceptChanges(); } public void AssignConstantToControl(List<System.Windows.Forms.Control> controlToAssociate, ControlMapEnum controlId) { BindingSource bs1 = new BindingSource(); bs1.DataSource = ds; bs1.DataMember = TABLE_NAME; bs1.Filter = COLUMN_NAME + " = '" + controlId.ToString() + "'"; foreach (System.Windows.Forms.Control control in controlToAssociate) control.DataBindings.Add("Text", bs1, COLUMN_VALUE); } public void UpdateControlValue(ControlMapEnum controlId, string newValue) { DataRow dr = tabella1.Select(COLUMN_NAME + " = '" + controlId.ToString() + "'").FirstOrDefault(); if (dr == null) return; int index = tabella1.Rows.IndexOf(dr); tabella1.Rows[index].BeginEdit(); tabella1.Rows[index][COLUMN_VALUE] = newValue; tabella1.Rows[index].EndEdit(); LoggerManagerUtility.Instance.Log(LogLevel.Info, this, "END UPDATE CONTROL" + controlId + " TEXT TO VISUALIZE: " + newValue); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)