void _treeViewDbs_Activated(object sender, TreeViewItemEventArgs e) { if (e.Item == null) { return; } var name = e.Item.Text; var type = (string)((e.Item as TreeItem).Tag ?? ""); if (name != "") { if (type == "root") { _dbManager.GetDbName(_shellSqlConn.conn); } else if (type == "db") { _dbManager.GetTableName(_shellSqlConn.conn, name); } else if (type == "table") { var dbname = e.Item.Parent.Text; _dbManager.GetColumnType(_shellSqlConn.conn, dbname, name); } } }
protected virtual void OnItemActivated(object sender, TreeViewItemEventArgs e) { if (SelectedApplication != null) { ApplicationActivated(this, SelectedApplication); } }
void HandleActivated (object sender, TreeViewItemEventArgs e) { var server = e.Item as Server; if (server != null) { var action = new Actions.EditServer (this, Config); action.Activate (); } }
void HandleActivated(object sender, TreeViewItemEventArgs e) { var server = e.Item as Server; if (server != null) { var action = new Actions.EditServer(this); action.Execute(); } }
void HandleActivated (object sender, TreeViewItemEventArgs e) { var item = e.Item as TreeItem; if (item != null) { var user = item.Tag as User; if (user != null) { Channel.Server.StartChat (user); } } }
private void PrepareItem(object sender, TreeViewItemEventArgs e) { RegisterItem(e.Container); foreach (var propertyItem in expandedPropertyPaths.ToList().Select(GetTreeViewItem).NotNull()) { propertyItem.IsExpanded = true; } foreach (var propertyItem in collapsedPropertyPaths.ToList().Select(GetTreeViewItem).NotNull()) { propertyItem.IsExpanded = false; } }
void HandleActivated(object sender, TreeViewItemEventArgs e) { var item = e.Item as TreeItem; if (item != null) { var user = item.Tag as User; if (user != null) { Channel.Server.StartChat(user); } } }
public override void AttachEvent(string handler) { switch (handler) { case TreeView.ExpandingEvent: tree.TestExpandRow += delegate(object o, Gtk.TestExpandRowArgs args) { var e = new TreeViewItemCancelEventArgs(GetItem(args.Path) as ITreeItem); Widget.OnExpanding(e); args.RetVal = e.Cancel; }; break; case TreeView.ExpandedEvent: tree.RowExpanded += delegate(object o, Gtk.RowExpandedArgs args) { var e = new TreeViewItemEventArgs(GetItem(args.Path) as ITreeItem); Widget.OnExpanded(e); }; break; case TreeView.CollapsingEvent: tree.TestCollapseRow += delegate(object o, Gtk.TestCollapseRowArgs args) { var e = new TreeViewItemCancelEventArgs(GetItem(args.Path) as ITreeItem); Widget.OnCollapsing(e); args.RetVal = e.Cancel; }; break; case TreeView.CollapsedEvent: tree.RowCollapsed += delegate(object o, Gtk.RowCollapsedArgs args) { var e = new TreeViewItemEventArgs(GetItem(args.Path) as ITreeItem); Widget.OnCollapsed(e); }; break; case TreeView.ActivatedEvent: tree.RowActivated += delegate(object o, Gtk.RowActivatedArgs args) { this.Widget.OnActivated(new TreeViewItemEventArgs(model.GetItemAtPath(args.Path))); }; break; default: base.AttachEvent(handler); break; } }
private void OnNodeMouseClick(object sender, TreeViewItemEventArgs treeViewItemEventArgs) => treeView.SelectedItem = treeViewItemEventArgs.Item;
private void TreeView1_SaveExpanded(object sender, TreeViewItemEventArgs e) { // This fixes a bug with Eto Froms e.Item.Expanded = e.Item.Expanded; }
void _treeViewDirs_Activated(object sender, TreeViewItemEventArgs e) { SetCurrentDirPath(_treeViewDirs.SelectedFullPath); _fileManager.GetFileTree(GetCurrentDirPath()); }
private void ClearItem(object sender, TreeViewItemEventArgs e) { UnregisterItem(e.Container); }
void _treeViewDbs_Activated(object sender, TreeViewItemEventArgs e) { if (e.Item == null) return; var name = e.Item.Text; var type = (string)((e.Item as TreeItem).Tag ?? ""); if (name != "") { if (type == "root") { _dbManager.GetDbName(_shellSqlConn.conn); } else if (type == "db") { _dbManager.GetTableName(_shellSqlConn.conn, name); } else if (type == "table") { var dbname = e.Item.Parent.Text; _dbManager.GetColumnType(_shellSqlConn.conn, dbname, name); } } }
void OnTreeItemExpanded(object sender, TreeViewItemEventArgs e) { ((TreeItem)e.Item).Image = Definitions.FolderIcon ["open"]; this.treeMain.RefreshItem((TreeItem)e.Item); }