public void AddReference(object sender, Gtk.ToggledArgs e) { Gtk.TreeIter iter; store.GetIterFromString(out iter, e.Path); ReferenceType rt = (ReferenceType)store.GetValue(iter, ColType); string fullName = (string)store.GetValue(iter, ColFullName); if ((bool)store.GetValue(iter, ColSelected) == false) { store.SetValue(iter, ColSelected, true); if (rt == ReferenceType.Package) { selectDialog.AddReference(new ProjectReference((SystemAssembly)store.GetValue(iter, ColAssembly))); } else { selectDialog.AddReference(new ProjectReference(rt, fullName)); } } else { store.SetValue(iter, ColSelected, false); selectDialog.RemoveReference(rt, fullName); } }
public void AddReference(object sender, Gtk.ToggledArgs e) { Gtk.TreeIter iter; store.GetIterFromString(out iter, e.Path); ReferenceType rt = (ReferenceType)store.GetValue(iter, ColType); string fullName = (string)store.GetValue(iter, ColFullName); if ((bool)store.GetValue(iter, ColSelected) == false) { store.SetValue(iter, ColSelected, true); switch (rt) { case ReferenceType.Package: selectDialog.AddReference(ProjectReference.CreateAssemblyReference((SystemAssembly)store.GetValue(iter, ColAssembly))); break; case ReferenceType.Assembly: selectDialog.AddReference(ProjectReference.CreateAssemblyFileReference(fullName)); break; case ReferenceType.Project: selectDialog.AddReference(ProjectReference.CreateProjectReference(fullName)); break; } } else { store.SetValue(iter, ColSelected, false); selectDialog.RemoveReference(rt, fullName); } }
void SelectReferenceDialog(object sender, EventArgs e) { string[] selectedFiles = new string[chooser.Filenames.Length]; chooser.Filenames.CopyTo(selectedFiles, 0); foreach (string file in selectedFiles) { bool isAssembly = true; try { SystemAssemblyService.GetAssemblyName(System.IO.Path.GetFullPath(file)); } catch { isAssembly = false; } if (isAssembly) { selectDialog.AddReference(new ProjectReference(ReferenceType.Assembly, file)); selectDialog.RegisterFileReference(file); } else { MessageService.ShowError(GettextCatalog.GetString("File '{0}' is not a valid .Net Assembly", file)); } } }
public void AddReference(object sender, Gtk.ToggledArgs e) { Gtk.TreeIter iter; store.GetIterFromString(out iter, e.Path); if ((bool)store.GetValue(iter, 3) == false) { store.SetValue(iter, 3, true); ProjectReference pr = new ProjectReference((SystemAssembly)store.GetValue(iter, 2)); selectDialog.AddReference(pr); } else { store.SetValue(iter, 3, false); selectDialog.RemoveReference(ReferenceType.Gac, (string)store.GetValue(iter, 4)); } }
public void AddReference(object sender, Gtk.ToggledArgs e) { Gtk.TreeIter iter; store.GetIterFromString(out iter, e.Path); Project project = (Project)store.GetValue(iter, 2); if ((bool)store.GetValue(iter, ColSelected) == false) { store.SetValue(iter, ColSelected, true); selectDialog.AddReference(ProjectReference.CreateProjectReference(project)); } else { store.SetValue(iter, ColSelected, false); selectDialog.RemoveReference(ReferenceType.Project, project.Name); } }
void AddReference(FilePath path) { selectDialog.AddReference(ProjectReference.CreateAssemblyFileReference(path)); }
void AddReference(FilePath path) { selectDialog.AddReference(new ProjectReference(ReferenceType.Assembly, path)); }