Example #1
0
        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);
                }
            }
        }
Example #2
0
 protected virtual void OnItemActivated(object sender, TreeViewItemEventArgs e)
 {
     if (SelectedApplication != null)
     {
         ApplicationActivated(this, SelectedApplication);
     }
 }
Example #3
0
		void HandleActivated (object sender, TreeViewItemEventArgs e)
		{
			var server = e.Item as Server;
			if (server != null) {
				var action = new Actions.EditServer (this, Config);
				action.Activate ();
			}
		}
Example #4
0
        void HandleActivated(object sender, TreeViewItemEventArgs e)
        {
            var server = e.Item as Server;

            if (server != null)
            {
                var action = new Actions.EditServer(this);
                action.Execute();
            }
        }
Example #5
0
		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;
     }
 }
Example #7
0
        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);
                }
            }
        }
Example #8
0
        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;
            }
        }
Example #9
0
 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;
 }
Example #11
0
 void _treeViewDirs_Activated(object sender, TreeViewItemEventArgs e)
 {
     SetCurrentDirPath(_treeViewDirs.SelectedFullPath);
     _fileManager.GetFileTree(GetCurrentDirPath());
 }
 private void ClearItem(object sender, TreeViewItemEventArgs e)
 {
     UnregisterItem(e.Container);
 }
Example #13
0
 void _treeViewDirs_Activated(object sender, TreeViewItemEventArgs e)
 {
     SetCurrentDirPath(_treeViewDirs.SelectedFullPath);
     _fileManager.GetFileTree(GetCurrentDirPath());
 }
Example #14
0
		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);
 }