예제 #1
0
 void SetDeserializedDataInUi(string PluginName, string XML, string[,] XmlNameValueArray)
 {
     if (this.BaseTabs.InvokeRequired)
     {
         SetDeserializedDataInUi_d InvokeDelegate_d = new SetDeserializedDataInUi_d(SetDeserializedDataInUi);
         this.BaseTabs.Invoke(InvokeDelegate_d, new object[] { PluginName, XML, XmlNameValueArray });
     }
     else
     {
         foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
         {
             if (Row.Cells[1].Value.ToString().Equals(PluginName))
             {
                 Row.Cells[0].Value = true;
             }
             else
             {
                 Row.Cells[0].Value = false;
             }
         }
         FormatXmlTBP.SetText(XML);
         ConvertXmlToObjectBtn.Text = string.Format("Convert this XML to {0}", PluginName);
         BodyParametersGrid.Rows.Clear();
         for (int i = 0; i < XmlNameValueArray.GetLength(0); i++)
         {
             int RowId = BodyParametersGrid.Rows.Add(new object[] { XmlNameValueArray[i, 0], XmlNameValueArray[i, 1], Properties.Resources.Glass });
             BodyParametersGrid.Rows[RowId].Cells[1].ReadOnly = this.ReadOnly;
         }
         ShowBodyFormatOptions();
     }
 }
예제 #2
0
 void SetDeserializedDataInUi(string PluginName, string XML, string[,] XmlNameValueArray)
 {
     if (this.BaseTabs.InvokeRequired)
     {
         SetDeserializedDataInUi_d InvokeDelegate_d = new SetDeserializedDataInUi_d(SetDeserializedDataInUi);
         this.BaseTabs.Invoke(InvokeDelegate_d, new object[] { PluginName, XML, XmlNameValueArray });
     }
     else
     {
         foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
         {
             if (Row.Cells[1].Value.ToString().Equals(PluginName))
                 Row.Cells[0].Value = true;
             else
                 Row.Cells[0].Value = false;
         }
         FormatXmlTBP.SetText(XML);
         ConvertXmlToObjectBtn.Text = string.Format("Convert this XML to {0}", PluginName);
         BodyFormatPluginsParametersGrid.Rows.Clear();
         for (int i = 0; i < XmlNameValueArray.GetLength(0); i++)
         {
             int RowId = BodyFormatPluginsParametersGrid.Rows.Add(new object[] { XmlNameValueArray[i, 0], XmlNameValueArray[i, 1], Properties.Resources.Glass });
             BodyFormatPluginsParametersGrid.Rows[RowId].Cells[1].ReadOnly = this.ReadOnly;
         }
     }
 }