private void buttonLoad_Click(object sender, EventArgs e) { if (CategoryTheory.BinaryLoader.Object == null || Diagram.UI.BinaryChooser.Object == null) { return; } Diagram.UI.BinaryChooser.Object.Show(this, "dll"); if (Diagram.UI.BinaryChooser.Object.Name == null) { return; } textBoxDB.Text = Diagram.UI.BinaryChooser.Object.Name + ""; id = Diagram.UI.BinaryChooser.Object.Id; string[] names = LibraryObjectWrapper.GetNames(id); if (names == null) { return; } comboBoxName.Items.Clear(); foreach (string it in names) { comboBoxName.Items.Add(it); } buttonBrowse.Enabled = false; }
private void buttonBrowse_Click(object sender, EventArgs e) { if (openFileDialogDLL.ShowDialog(this) != DialogResult.OK) { return; } string fn = openFileDialogDLL.FileName + ""; string[] names = LibraryObjectWrapper.GetNames(fn); if (names == null) { return; } textBoxFileName.Text = fn; comboBoxName.Items.Clear(); foreach (string it in names) { comboBoxName.Items.Add(it); } buttonLoad.Enabled = false; }
void fill() { if (wrapper.FileName == null) { return; } textBoxFileName.Text = wrapper.FileName; string[] items = LibraryObjectWrapper.GetNames(wrapper.FileName); int n = 0; int sel = 0; foreach (string it in items) { comboBoxName.Items.Add(it); if (it.Equals(wrapper.Name)) { sel = n; } ++n; } comboBoxName.SelectedIndex = sel; }