コード例 #1
0
ファイル: Utility.cs プロジェクト: rndpk/IVI.C.NET.Adapter
        private void UpdateDisplay()
        {
            IVIHandler.Reset();
            IviHandler = IVIHandler.Instance;
            IviHandler.IviConfigStore.Deserialize(IviHandler.IviConfigStore.MasterLocation);

            AdapterConfigList.Rows.Clear();
            foreach (IIviSoftwareModule2 SoftwareModule in IviHandler.IviConfigStore.SoftwareModules)
            {
                if (!SoftwareModule.Name.StartsWith("nis"))
                {
                    DataGridViewRow          Row                        = new DataGridViewRow();
                    DataGridViewCheckBoxCell UpdateCheckBox             = new DataGridViewCheckBoxCell();
                    DataGridViewTextBoxCell  SoftwareModuleTextBox      = new DataGridViewTextBoxCell();
                    DataGridViewTextBoxCell  CurrentAdapterClassTextBox = new DataGridViewTextBoxCell();
                    DataGridViewComboBoxCell NewAdapterClassComboBox    = new DataGridViewComboBoxCell();

                    UpdateCheckBox.Value        = false;
                    SoftwareModuleTextBox.Value = SoftwareModule.Name;
                    string className = SoftwareModule.AssemblyQualifiedClassName;

                    if (!className.Equals(string.Empty))
                    {
                        Type type = Type.GetType(SoftwareModule.AssemblyQualifiedClassName);
                        if (type != null)
                        {
                            CurrentAdapterClassTextBox.Value = type.Name;
                        }
                    }

                    NewAdapterClassComboBox.Items.Add(string.Empty);
                    NewAdapterClassComboBox.Items.AddRange(IviCAdapterList);
                    NewAdapterClassComboBox.Value = NewAdapterClassComboBox.Items[0];

                    Row.Cells.Add(UpdateCheckBox);
                    Row.Cells.Add(SoftwareModuleTextBox);
                    Row.Cells.Add(CurrentAdapterClassTextBox);
                    Row.Cells.Add(NewAdapterClassComboBox);

                    AdapterConfigList.Rows.Add(Row);
                }
            }
        }
コード例 #2
0
ファイル: IVIHandler.cs プロジェクト: rndpk/IVI.C.NET.Adapter
 public static void Reset()
 {
     instance = null;
 }