private void MyRowExpandedHandler(object o, RowExpandedArgs args) { string path = itemStore.GetValue(args.Iter, 1).ToString() + "/*"; int indx = 0; Microsoft.TeamFoundation.VersionControl.Client.Item[] items = ItemsForPath(path); if (items.Length == 0) { SetRowValue(args.Iter, indx, " - item list not available - ", ""); } foreach (Microsoft.TeamFoundation.VersionControl.Client.Item item in items) { string shortPath = item.ServerItem.Substring(item.ServerItem.LastIndexOf('/') + 1); if (item.ItemType == ItemType.Folder) { shortPath += "/"; } Gtk.TreeIter child = SetRowValue(args.Iter, indx, shortPath, item.ServerItem); if (item.ItemType == ItemType.Folder) { itemStore.AppendValues(child, "", ""); } indx++; } }
public void OnArvoreFixaRowExpanded(object o, RowExpandedArgs args) { TreeView arvore = (TreeView)o; TreeStore store = (TreeStore)arvore.Model; store.SetValue(args.Iter, 0, ExtensaoBO.Instancia.DirAbertoGIF); }
private void OnRowExpanded(object o, RowExpandedArgs args) { switch (CurrentVolumeType) { case VolumeType.FileSystemVolume: TreeStore store = (TreeStore)Model; // get child node of expanded node TreeIter child; store.IterChildren(out child, args.Iter); // test if the first child is the "loading" child node if ((GetItem(child) == null) && ((string)Model.GetValue(child, 1) == STR_LOADING)) { // append dir children DirectoryVolumeItem dir = (DirectoryVolumeItem)GetItem(args.Iter); AppendDirRows(store, args.Iter, dir); // remove "loading" child node store.Remove(ref child); } break; default: throw new NotImplementedException("View for this VolumeType has not been implemented yet"); } }
void OnRowExpanded(object o, RowExpandedArgs args) { string name = (string)viewsStore.GetValue(args.Iter, 1); if (name == "Servers") { return; } TreeIter child; viewsStore.IterChildren(out child, args.Iter); string childName = (string)viewsStore.GetValue(child, 1); if (childName != "") { return; } viewsStore.Remove(ref child); Log.Debug("View expanded {0}", name); Connection conn = Global.Connections [name]; AddViews(conn, args.Iter); TreePath path = viewsStore.GetPath(args.Iter); this.ExpandRow(path, false); }
private void OnRowExpanded(object o, RowExpandedArgs args) { TreeIter child; if (memberStore.IterNthChild(out child, args.Iter, 0)) { TreeCell cell = (TreeCell)memberStore.GetValue(child, 0); if (cell.Message == dummyText) { // Find parent node TreeIter piter; memberStore.IterParent(out piter, child); NodeInfo parent = ((TreeCell)memberStore.GetValue(piter, 0)).Node; // remove dummy value memberStore.Remove(ref child); // Insert children if (parent != null) { AddChildren(parent, args.Iter); // For reasons I can't fathom, if nodes are added the `args.Iter' // row isn't expanded until the 2nd click. So first-click // populates the children, 2nd-click shows them. // // This is annoying. // // Explicitly expand the row. treeView.ExpandRow(args.Path, false); } } } }
void OnRowExpanded(object o, RowExpandedArgs args) { string name = null; name = (string)schemaStore.GetValue(args.Iter, (int)TreeCols.ObjectName); if (name == "Servers") { return; } TreeIter child; schemaStore.IterChildren(out child, args.Iter); string childName = (string)schemaStore.GetValue(child, (int)TreeCols.ObjectName); if (childName != "") { return; } schemaStore.Remove(ref child); Log.Debug("Row expanded {0}", name); string serverName = FindServerName(args.Iter, schemaStore); Connection conn = Global.Connections [serverName]; try { Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource("text-x-generic.png"); string[] kids = GetChildren(name, conn); foreach (string s in kids) { schemaStore.AppendValues(args.Iter, pb, s); } TreePath path = schemaStore.GetPath(args.Iter); this.ExpandRow(path, false); } catch (Exception e) { schemaStore.AppendValues(args.Iter, null, ""); Log.Debug(e); string msg = Mono.Unix.Catalog.GetString( "Unable to read schema information from server"); HIGMessageDialog dialog = new HIGMessageDialog( parentWindow, 0, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, "Server error", msg); dialog.Run(); dialog.Destroy(); } }
private void whenRowExpanded(object o, RowExpandedArgs rea) { CategoryToolboxNode node = store.GetNode(rea.Path) as CategoryToolboxNode; if (node != null) { expandedCategories [node.Label] = true; } }
void HandleRowExpanded(object o, RowExpandedArgs args) { var jti = this.GetJisonsTreeIter(this.GetTreeIter(args.Path)); if (jti != null) { this.IsSelfExpanded = true; this.RootTreeIter.SetExpanded(jti.Data, this.GetRowExpanded(args.Path)); IsSelfExpanded = false; } }
public virtual void OnExpandRow(object sender, RowExpandedArgs args) { HTreeNode nod = getNodeFromIter(args.Iter); nod.IsExpanded = true; if (NodeExpanded != null) { NodeExpanded(this, new NodeEventArgs(nod)); } QueueDraw(); }
private void OnTreeRowExpanded(object sender, RowExpandedArgs args) { object obj = store.GetValue(args.Iter, VALUE_OBJECT); bool raw = (bool)store.GetValue(args.Iter, VALUE_RAW); Add(true, args.Iter, null, obj, true, raw); TreeIter firstChild; store.IterChildren(out firstChild, args.Iter); store.Remove(ref firstChild); }
/// <summary> /// Handles expansion of rows in the game explorer, enumerating any subfolders and /// files present under that row. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void OnGameExplorerRowExpanded(object sender, RowExpandedArgs e) { // Whenever a row is expanded, enumerate the subfolders of that row. FileReference parentReference = this.FiletreeBuilder.NodeStorage.GetItemReferenceFromPath(e.Path); foreach (FileReference childReference in parentReference.ChildReferences) { if (childReference.IsDirectory && childReference.State != ReferenceState.Enumerated) { this.FiletreeBuilder.SubmitWork(childReference); } } }
void HandleObjectsRowExpanded(object o, RowExpandedArgs args) { var container = GetContainer(args.Iter); if (container == null) { return; } var path = args.Path.Copy(); ThreadPool.QueueUserWorkItem(state => { try { var children = content_directry.GetChildren <Object> (container); Application.Invoke((s, a) => { TreeIter iter, loading_iter; store.GetIter(out iter, path); store.IterNthChild(out loading_iter, iter, 0); List <ItemRow> items = null; var position = -1; foreach (var child in children) { position++; var item = child as Item; if (item != null && item.IsReference) { if (items == null) { items = new List <ItemRow> (); } items.Add(new ItemRow(item, store.GetPath(store.InsertWithValues(iter, position, loading)))); continue; } var child_iter = store.InsertWithValues(iter, position, new ObjectRow(child)); var c = child as Container; if (c != null && c.ChildCount > 0) { store.AppendValues(child_iter, loading); } } store.Remove(ref loading_iter); if (items != null) { Load(items); } }); } catch (Exception e) { Console.WriteLine(e); } }); }
/* * public void SlotDoubleClick (QListViewItem item) { * if (item is MethodItem) { * MethodItem method = (MethodItem)item; * * ClassItem parent = method.parent; * * if (parent.sourceBrowser != null) { * parent.sourceBrowser.ShowNormal (); * parent.sourceBrowser.Raise (); * } * else { * parent.sourceBrowser = new SourceWindow (this, parent); * parent.sourceBrowser.Show (); * } * * parent.sourceBrowser.CenterOnMethod (method); * } * } */ private void OnRowExpanded(object sender, RowExpandedArgs args) { ClassItem classItem = store.GetValue(args.Iter, 4) as ClassItem; if (classItem == null) { return; } foreach (MethodCoverageItem method in classItem.Model.Methods) { if (method.filtered) { continue; } string title = method.Name; if (title.Length > 64) { title = title.Substring(0, 63) + "...)"; } new MethodItem(store, classItem, classItem, method, title); } TreeIter treeIter = classItem.iter; store.IterChildren(out treeIter, treeIter); while (store.IterIsValid(treeIter)) { if (store.GetValue(treeIter, 4) is MethodItem) { store.IterNext(ref treeIter); } else { store.Remove(ref treeIter); } } }
protected void RowExpanded(object o, RowExpandedArgs args) { TreeIter it; GtkStore.GetIter(out it, args.Path); int childCount = GtkStore.IterNChildren(it); for (int i = 0; i < childCount; i++) { TreePath childPath = args.Path.Copy(); childPath.AppendIndex(i); TreeIter childIter; GtkStore.GetIter(out childIter, childPath); string childFullName = (string)GtkStore.GetValue(childIter, LocalsStore.ColumnFullName); // This node was expanded in the past - expand it if (childFullName != null && expandedNodes.ContainsKey(childFullName)) { GtkTree.ExpandRow(childPath, false); } } }
private void MyRowExpandedHandler(object o, RowExpandedArgs args) { PopulateRowChildren(args.Iter); }
void ldapRowExpanded(object o, RowExpandedArgs args) { string name = null; name = (string)browserStore.GetValue(args.Iter, (int)TreeCols.DN); if (name == "Servers") { return; } TreeIter child; browserStore.IterChildren(out child, args.Iter); string childName = (string)browserStore.GetValue(child, (int)TreeCols.DN); if (childName != "") { return; } browserStore.Remove(ref child); Log.Debug("Row expanded {0}", name); string serverName = FindServerName(args.Iter, browserStore); if (!IsSingle) { conn = Global.Connections [serverName]; } try { if (!conn.IsConnected) { conn.Connect(); } } catch (Exception e) { browserStore.AppendValues(args.Iter, null, "", ""); HIGMessageDialog dialog = new HIGMessageDialog( parent, 0, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, "Connection error", e.Message); dialog.Run(); dialog.Destroy(); return; } if (name == serverName) { Pixbuf pb = Pixbuf.LoadFromResource("x-directory-remote-server.png"); TreeIter i = browserStore.AppendValues(args.Iter, pb, conn.DirectoryRoot, conn.DirectoryRoot); browserStore.AppendValues(i, null, "", ""); } else { AddEntry(name, conn, args.Iter); } TreePath path = browserStore.GetPath(args.Iter); this.ExpandRow(path, false); }