Exemplo n.º 1
0
        private void dirTree_ItemSelected(object sender, DirectoryTreePopup.ItemSelectedEventArgs e)
        {
            txtDirectory.Text = dirTree.Tree.SelectedPath;

            // Release reference
            dirTree = null;
        }
Exemplo n.º 2
0
        private void btnDirTree_Click(object sender, EventArgs e)
        {
            this.dirTree = new DirectoryTreePopup();
            this.dirTree.ThemeChanged(PluginMain.GetApplication().VisualTheme);

            // Display a DirectoryTreePopup
            if (Directory.Exists(txtDirectory.Text))
            {
                this.dirTree.Tree.SelectedPath = txtDirectory.Text;
            }

            // Define size and location
            this.dirTree.Location = txtDirectory.Location;

            // Show the directory tree
            Rectangle rect = new Rectangle(txtDirectory.Location, txtDirectory.Size);

            rect.Offset(this.Location);
            rect.Offset(4, txtDirectory.Height + 4);

            // Add event handlers for selecting folder
            this.dirTree.ItemSelected += new DirectoryTreePopup.ItemSelectedEventHandler(dirTree_ItemSelected);

            this.dirTree.Popup(rect);
        }
Exemplo n.º 3
0
		void isSaveInButton_Click( object sender, EventArgs e )
		{
			ZoneFiveSoftware.Common.Visuals.DirectoryTreePopup dtp = new DirectoryTreePopup();
			dtp.BackColor = Color.White;
			dtp.Tree.RowHotlightColor = System.Drawing.SystemColors.ControlLight;
			dtp.Tree.RowHotlightColorText = System.Drawing.SystemColors.ControlText;
			dtp.Location = splitContainer1.Panel1.PointToScreen( isSaveIn.Location );
            dtp.Tree.SelectedChanged += new EventHandler( dtpTree_SelectedChanged );
            dtp.Top += isSaveIn.Height;
			dtp.Width = isSaveIn.Width;
			dtp.Tree.SelectedPath = txtSaveIn.Text;
			dtp.ShowDialog();
			txtSaveIn.Text = dtp.Tree.SelectedPath;
		}