private void btAdd_Click(object sender, EventArgs e)
        {
            frmPerformerImport f = new frmPerformerImport();

            if (f.ShowDialog(this) == DialogResult.OK)
            {
                Type[] types = frmPerformerImport.WizardInfo.GetSelectedTypes();
                if (types != null && types.Length > 0)
                {
                    for (int i = 0; i < types.Length; i++)
                    {
                        bool b = false;
                        for (int j = 0; j < listBox1.Items.Count; j++)
                        {
                            Type t = listBox1.Items[j] as Type;
                            if (types[i].AssemblyQualifiedName == t.AssemblyQualifiedName)
                            {
                                b = true;
                                break;
                            }
                        }
                        if (!b)
                        {
                            listBox1.Items.Add(types[i]);
                        }
                    }
                }
            }
        }
예제 #2
0
        public void Run(int supportActiveX)
        {
            DialogResult ret;

            _selectedTypes = null;
            if (supportActiveX != 0)
            {
                frmPerformerImport f = new frmPerformerImport();
                ret = f.ShowDialog();
            }
            else
            {
                dlgClassFile dlg = new dlgClassFile();
                dlg.refreshInfo();
                dlg.frmPrev = null;
                ret         = dlg.ShowDialog();
            }
            if (ret == DialogResult.OK)
            {
                Type[] types;
                if (frmPerformerImport.WizardInfo.SourceType == enumSourceType.ActiveX)
                {
                    types = ActiveXImporter.ActiveXInfo.GetSelectedTypes();
                }
                else
                {
                    types = frmPerformerImport.WizardInfo.GetSelectedTypes();
                }
                if (types != null && types.Length > 0)
                {
                    _selectedTypes = new string[types.Length];
                    for (int i = 0; i < types.Length; i++)
                    {
                        _selectedTypes[i] = string.Format(CultureInfo.InvariantCulture, "{0};{1}", types[i].Assembly.Location, types[i].AssemblyQualifiedName);
                    }
                }
            }
        }