public SelectReferenceDialog() { Build(); refTreeStore = new ListStore(typeof(string), typeof(string), typeof(string), typeof(ProjectReference), typeof(string)); ReferencesTreeView.Model = refTreeStore; TreeViewColumn col = new TreeViewColumn(); col.Title = GettextCatalog.GetString("Reference"); CellRendererPixbuf crp = new CellRendererPixbuf(); col.PackStart(crp, false); col.AddAttribute(crp, "stock-id", IconColumn); CellRendererText text_render = new CellRendererText(); col.PackStart(text_render, true); col.AddAttribute(text_render, "text", NameColumn); ReferencesTreeView.AppendColumn(col); ReferencesTreeView.AppendColumn(GettextCatalog.GetString("Type"), new CellRendererText(), "text", TypeNameColumn); ReferencesTreeView.AppendColumn(GettextCatalog.GetString("Location"), new CellRendererText(), "text", LocationColumn); projectRefPanel = new ProjectReferencePanel(this); gacRefPanel = new GacReferencePanel(this); assemblyRefPanel = new AssemblyReferencePanel(this); mainBook.RemovePage(mainBook.CurrentPage); mainBook.AppendPage(gacRefPanel, new Label(GettextCatalog.GetString("Packages"))); mainBook.AppendPage(projectRefPanel, new Label(GettextCatalog.GetString("Projects"))); mainBook.AppendPage(assemblyRefPanel, new Label(GettextCatalog.GetString(".Net Assembly"))); mainBook.Page = 0; ReferencesTreeView.Selection.Changed += new EventHandler(OnChanged); Child.ShowAll(); OnChanged(null, null); }
public SelectReferenceDialog () { Build (); combinedBox = new CombinedBox (); combinedBox.Show (); mainBook = new Notebook (); combinedBox.Add (mainBook); alignment1.Add (combinedBox); mainBook.ShowAll (); filterEntry = combinedBox.FilterEntry; boxRefs.WidthRequest = 200; refTreeStore = new ListStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference), typeof(Xwt.Drawing.Image)); ReferencesTreeView.Model = refTreeStore; TreeViewColumn col = new TreeViewColumn (); col.Title = GettextCatalog.GetString("Reference"); CellRendererImage crp = new CellRendererImage (); crp.Yalign = 0f; col.PackStart (crp, false); col.AddAttribute (crp, "image", IconColumn); CellRendererText text_render = new CellRendererText (); col.PackStart (text_render, true); col.AddAttribute (text_render, "markup", NameColumn); text_render.Ellipsize = Pango.EllipsizeMode.End; ReferencesTreeView.AppendColumn (col); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn); projectRefPanel = new ProjectReferencePanel (this); packageRefPanel = new PackageReferencePanel (this, false); allRefPanel = new PackageReferencePanel (this, true); assemblyRefPanel = new AssemblyReferencePanel (this); panels.Add (allRefPanel); panels.Add (packageRefPanel); panels.Add (projectRefPanel); panels.Add (assemblyRefPanel); //mainBook.RemovePage (mainBook.CurrentPage); HBox tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Reference, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("_All")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (allRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Package, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("_Packages")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (packageRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Project, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("Pro_jects")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (projectRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString (".Net A_ssembly")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (assemblyRefPanel, tab); mainBook.Page = 0; var w = selectedHeader.Child; selectedHeader.Remove (w); HeaderBox header = new HeaderBox (1, 0, 1, 1); header.SetPadding (6, 6, 6, 6); header.GradientBackround = true; header.Add (w); selectedHeader.Add (header); RemoveReferenceButton.CanFocus = false; ReferencesTreeView.Selection.Changed += new EventHandler (OnChanged); Child.ShowAll (); OnChanged (null, null); InsertFilterEntry (); }
public SelectReferenceDialog() { Build(); combinedBox = new CombinedBox(); combinedBox.Show(); mainBook = new Notebook(); combinedBox.Add(mainBook); alignment1.Add(combinedBox); mainBook.ShowAll(); filterEntry = combinedBox.FilterEntry; boxRefs.WidthRequest = 200; refTreeStore = new ListStore(typeof(string), typeof(string), typeof(string), typeof(ProjectReference), typeof(Xwt.Drawing.Image)); ReferencesTreeView.Model = refTreeStore; TreeViewColumn col = new TreeViewColumn(); col.Title = GettextCatalog.GetString("Reference"); CellRendererImage crp = new CellRendererImage(); crp.Yalign = 0f; col.PackStart(crp, false); col.AddAttribute(crp, "image", IconColumn); CellRendererText text_render = new CellRendererText(); col.PackStart(text_render, true); col.AddAttribute(text_render, "markup", NameColumn); text_render.Ellipsize = Pango.EllipsizeMode.End; ReferencesTreeView.AppendColumn(col); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn); projectRefPanel = new ProjectReferencePanel(this); packageRefPanel = new PackageReferencePanel(this, false); allRefPanel = new PackageReferencePanel(this, true); assemblyRefPanel = new AssemblyReferencePanel(this); panels.Add(allRefPanel); panels.Add(packageRefPanel); panels.Add(projectRefPanel); panels.Add(assemblyRefPanel); //mainBook.RemovePage (mainBook.CurrentPage); HBox tab = new HBox(false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Reference, IconSize.Menu)), false, false, 0); tab.PackStart(new Label(GettextCatalog.GetString("_All")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); mainBook.AppendPage(allRefPanel, tab); tab = new HBox(false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Package, IconSize.Menu)), false, false, 0); tab.PackStart(new Label(GettextCatalog.GetString("_Packages")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); mainBook.AppendPage(packageRefPanel, tab); tab = new HBox(false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Project, IconSize.Menu)), false, false, 0); tab.PackStart(new Label(GettextCatalog.GetString("Pro_jects")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); mainBook.AppendPage(projectRefPanel, tab); tab = new HBox(false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu)), false, false, 0); tab.PackStart(new Label(GettextCatalog.GetString(".Net A_ssembly")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); mainBook.AppendPage(assemblyRefPanel, tab); mainBook.Page = 0; var w = selectedHeader.Child; selectedHeader.Remove(w); HeaderBox header = new HeaderBox(1, 0, 1, 1); header.SetPadding(6, 6, 6, 6); header.GradientBackground = true; header.Add(w); selectedHeader.Add(header); RemoveReferenceButton.CanFocus = false; ReferencesTreeView.Selection.Changed += new EventHandler(OnChanged); Child.ShowAll(); OnChanged(null, null); InsertFilterEntry(); }
public SelectReferenceDialog () { Build (); refTreeStore = new ListStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference), typeof(string)); ReferencesTreeView.Model = refTreeStore; TreeViewColumn col = new TreeViewColumn (); col.Title = GettextCatalog.GetString("Reference"); CellRendererPixbuf crp = new CellRendererPixbuf (); col.PackStart (crp, false); col.AddAttribute (crp, "stock-id", IconColumn); CellRendererText text_render = new CellRendererText (); col.PackStart (text_render, true); col.AddAttribute (text_render, "text", NameColumn); ReferencesTreeView.AppendColumn (col); ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn); ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn); projectRefPanel = new ProjectReferencePanel (this); gacRefPanel = new GacReferencePanel (this); assemblyRefPanel = new AssemblyReferencePanel (this); mainBook.RemovePage (mainBook.CurrentPage); mainBook.AppendPage (gacRefPanel, new Label (GettextCatalog.GetString ("Packages"))); mainBook.AppendPage (projectRefPanel, new Label (GettextCatalog.GetString ("Projects"))); mainBook.AppendPage (assemblyRefPanel, new Label (GettextCatalog.GetString (".Net Assembly"))); mainBook.Page = 0; ReferencesTreeView.Selection.Changed += new EventHandler (OnChanged); ShowAll (); OnChanged (null, null); }