Example #1
0
        private void saveBtn_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow Row in AdapterConfigList.Rows)
            {
                if (Row.Cells[0].Value != null && (bool)Row.Cells[0].Value)
                {
                    IIviSoftwareModule2 SoftwareModule = (IIviSoftwareModule2)IviHandler.GetSoftwareModule((string)Row.Cells[1].Value);
                    if (SoftwareModule != null)
                    {
                        if (Row.Cells[3].Value == null || Row.Cells[3].Value.Equals(string.Empty))
                        {
                            SoftwareModule.AssemblyQualifiedClassName = string.Empty;
                        }
                        else
                        {
                            SoftwareModule.AssemblyQualifiedClassName = string.Format(AssemblyQualifiedClassNameTemplateToUse, Row.Cells[3].Value);
                        }
                    }
                }
            }

            IviHandler.IviConfigStore.Serialize(IviHandler.IviConfigStore.MasterLocation);

            UpdateDisplay();
        }
Example #2
0
 private void autoSetupBtn_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow Row in AdapterConfigList.Rows)
     {
         string SoftwareModuleName          = (string)Row.Cells[1].Value;
         IIviSoftwareModule2 SoftwareModule = (IIviSoftwareModule2)IviHandler.GetSoftwareModule(SoftwareModuleName);
         string AdapterClass = GetSuitableAdapter(SoftwareModule.PublishedAPIs);
         if (AdapterClass != null && !AdapterClass.Equals(Row.Cells[2].Value))
         {
             Row.Cells[0].Value = true;
             Row.Cells[3].Value = AdapterClass;
         }
         else
         {
             Row.Cells[0].Value = false;
             Row.Cells[3].Value = string.Empty;
         }
     }
 }