2using System.Collections.Generic;
8using System.Threading.Tasks;
10using System.Windows.Forms.Design;
14#pragma warning disable 1591
16 public partial class DictionaryParameterEditorControl : UserControl
18 IWindowsFormsEditorService m_svc;
21 public DictionaryParameterEditorControl(
string strVal, IWindowsFormsEditorService svc)
25 InitializeComponent();
34 foreach (DataGridViewRow row
in dgvItems.Rows)
36 if (row.Cells[0].Value !=
null)
38 string strItem = row.Cells[0].Value.ToString() +
"=";
39 if (row.Cells[1].Value !=
null)
40 strItem += row.Cells[1].Value.ToString();
42 m_strVal += strItem +
";";
46 return m_strVal.TrimEnd(
';');
50 private void SolverParameterEditorControl_Load(
object sender, EventArgs e)
52 string[] rgstrItem = m_strVal.Split(
';');
54 for (
int i = 0; i < rgstrItem.Length; i++)
56 string[] rgstrVal = rgstrItem[i].Split(
'=');
58 if (rgstrVal.Count() == 2)
59 dgvItems.Rows.Add(rgstrVal[0], rgstrVal[1]);
64#pragma warning restore 1591