Ejemplo n.º 1
0
        private int CalculateRootInsertionIndex(AssetTreeNode diskRootNode, AssetTreeNode selectedRootNode)
        {
            DiskTreeView diskTV = diskRootNode.TreeView as DiskTreeView;

            foreach (AssetTreeNode selNode in this.Nodes)
            {
                if (selNode.DiskNode != null)
                {
                    if (diskRootNode.Index < selNode.DiskNode.Index)
                    {
                        return(selNode.Index);
                    }
                }
            }

            return(-1);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AssetImportPlacer));
     this.imageList           = new System.Windows.Forms.ImageList(this.components);
     this.tbPath              = new System.Windows.Forms.TextBox();
     this.btnBrowse           = new System.Windows.Forms.Button();
     this.tvDisk              = new DiskTreeView();
     this.tvSelected          = new SelectedTreeView();
     this.tvAssets            = new AssetTreeView();
     this.panel               = new System.Windows.Forms.Panel();
     this.pnlAssetTreeView    = new System.Windows.Forms.Panel();
     this.lblTemplatesLabel   = new System.Windows.Forms.Label();
     this.cbClassTemplates    = new System.Windows.Forms.ComboBox();
     this.splitter2           = new System.Windows.Forms.Splitter();
     this.pnlSelectedTreeView = new System.Windows.Forms.Panel();
     this.splitter1           = new System.Windows.Forms.Splitter();
     this.pnlDiskTreeView     = new System.Windows.Forms.Panel();
     this.panel.SuspendLayout();
     this.pnlAssetTreeView.SuspendLayout();
     this.pnlSelectedTreeView.SuspendLayout();
     this.pnlDiskTreeView.SuspendLayout();
     this.SuspendLayout();
     //
     // imageList
     //
     this.imageList.ImageSize        = new System.Drawing.Size(16, 16);
     this.imageList.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
     this.imageList.TransparentColor = System.Drawing.Color.Transparent;
     //
     // tbPath
     //
     this.tbPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.tbPath.Location = new System.Drawing.Point(16, 8);
     this.tbPath.Name     = "tbPath";
     this.tbPath.Size     = new System.Drawing.Size(280, 20);
     this.tbPath.TabIndex = 3;
     this.tbPath.Text     = "";
     this.tbPath.KeyUp   += new System.Windows.Forms.KeyEventHandler(this.tbPath_KeyUp);
     //
     // btnBrowse
     //
     this.btnBrowse.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnBrowse.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.btnBrowse.Location = new System.Drawing.Point(301, 7);
     this.btnBrowse.Name     = "btnBrowse";
     this.btnBrowse.Size     = new System.Drawing.Size(24, 22);
     this.btnBrowse.TabIndex = 4;
     this.btnBrowse.Text     = "...";
     this.btnBrowse.Click   += new System.EventHandler(this.btnBrowse_Click);
     //
     // tvDisk
     //
     this.tvDisk.AllowDrop = true;
     this.tvDisk.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.tvDisk.AssetImportPlacer = null;
     this.tvDisk.AssetTreeView     = null;
     this.tvDisk.CheckBoxes        = true;
     this.tvDisk.CheckStyle        = CheckBoxTreeView.cbtvCheckStyle.Recursive;
     this.tvDisk.HideSelection     = false;
     this.tvDisk.ImageList         = this.imageList;
     this.tvDisk.IncludeRootDir    = false;
     this.tvDisk.Location          = new System.Drawing.Point(8, 40);
     this.tvDisk.Name               = "tvDisk";
     this.tvDisk.SelectedTreeView   = null;
     this.tvDisk.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     this.tvDisk.SelectionMode      = CodersLab.Windows.Controls.TreeViewSelectionMode.MultiSelect;
     this.tvDisk.ShowLines          = false;
     this.tvDisk.ShowProgressBar    = true;
     this.tvDisk.Size               = new System.Drawing.Size(320, 320);
     this.tvDisk.TabIndex           = 5;
     this.tvDisk.AfterCheck        += new System.Windows.Forms.TreeViewEventHandler(this.tvDisk_AfterCheck);
     this.tvDisk.AfterExpand       += new System.Windows.Forms.TreeViewEventHandler(this.tvDisk_AfterExpand);
     this.tvDisk.AfterCollapse     += new System.Windows.Forms.TreeViewEventHandler(this.tvDisk_AfterCollapse);
     this.tvDisk.MouseUp           += new System.Windows.Forms.MouseEventHandler(this.tvDisk_MouseUp);
     //
     // tvSelected
     //
     this.tvSelected.AllowDrop = true;
     this.tvSelected.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                        | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.tvSelected.AssetTreeView      = null;
     this.tvSelected.DiskTreeView       = null;
     this.tvSelected.ImageList          = this.imageList;
     this.tvSelected.Location           = new System.Drawing.Point(0, 40);
     this.tvSelected.Name               = "tvSelected";
     this.tvSelected.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     this.tvSelected.SelectionMode      = CodersLab.Windows.Controls.TreeViewSelectionMode.MultiSelect;
     this.tvSelected.Size               = new System.Drawing.Size(320, 320);
     this.tvSelected.TabIndex           = 6;
     this.tvSelected.AfterExpand       += new System.Windows.Forms.TreeViewEventHandler(this.tvSelected_AfterExpand);
     this.tvSelected.MouseUp           += new System.Windows.Forms.MouseEventHandler(this.tvSelected_MouseUp);
     this.tvSelected.AfterCollapse     += new System.Windows.Forms.TreeViewEventHandler(this.tvSelected_AfterCollapse);
     //
     // tvAssets
     //
     this.tvAssets.AllowDrop = true;
     this.tvAssets.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                      | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));
     this.tvAssets.DiskTreeView       = null;
     this.tvAssets.ImageList          = this.imageList;
     this.tvAssets.LabelEdit          = true;
     this.tvAssets.Location           = new System.Drawing.Point(0, 40);
     this.tvAssets.Name               = "tvAssets";
     this.tvAssets.RootName           = "Project Repository";
     this.tvAssets.SelectedTreeView   = null;
     this.tvAssets.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     this.tvAssets.SelectionMode      = CodersLab.Windows.Controls.TreeViewSelectionMode.MultiSelect;
     this.tvAssets.Size               = new System.Drawing.Size(344, 320);
     this.tvAssets.TabIndex           = 7;
     //
     // panel
     //
     this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Left)
                                                               | System.Windows.Forms.AnchorStyles.Right)));
     this.panel.Controls.Add(this.pnlAssetTreeView);
     this.panel.Controls.Add(this.splitter2);
     this.panel.Controls.Add(this.pnlSelectedTreeView);
     this.panel.Controls.Add(this.splitter1);
     this.panel.Controls.Add(this.pnlDiskTreeView);
     this.panel.Location = new System.Drawing.Point(8, 8);
     this.panel.Name     = "panel";
     this.panel.Size     = new System.Drawing.Size(1000, 368);
     this.panel.TabIndex = 8;
     //
     // pnlAssetTreeView
     //
     this.pnlAssetTreeView.Controls.Add(this.lblTemplatesLabel);
     this.pnlAssetTreeView.Controls.Add(this.cbClassTemplates);
     this.pnlAssetTreeView.Controls.Add(this.tvAssets);
     this.pnlAssetTreeView.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlAssetTreeView.Location = new System.Drawing.Point(651, 0);
     this.pnlAssetTreeView.Name     = "pnlAssetTreeView";
     this.pnlAssetTreeView.Size     = new System.Drawing.Size(349, 368);
     this.pnlAssetTreeView.TabIndex = 9;
     //
     // lblTemplatesLabel
     //
     this.lblTemplatesLabel.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblTemplatesLabel.Location  = new System.Drawing.Point(8, 8);
     this.lblTemplatesLabel.Name      = "lblTemplatesLabel";
     this.lblTemplatesLabel.Size      = new System.Drawing.Size(64, 16);
     this.lblTemplatesLabel.TabIndex  = 9;
     this.lblTemplatesLabel.Text      = "Templates";
     this.lblTemplatesLabel.TextAlign = System.Drawing.ContentAlignment.BottomRight;
     //
     // cbClassTemplates
     //
     this.cbClassTemplates.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.cbClassTemplates.Location              = new System.Drawing.Point(80, 8);
     this.cbClassTemplates.Name                  = "cbClassTemplates";
     this.cbClassTemplates.Size                  = new System.Drawing.Size(264, 21);
     this.cbClassTemplates.TabIndex              = 8;
     this.cbClassTemplates.SelectedIndexChanged += new System.EventHandler(this.cbClassTemplates_SelectedIndexChanged);
     //
     // splitter2
     //
     this.splitter2.Location = new System.Drawing.Point(648, 0);
     this.splitter2.Name     = "splitter2";
     this.splitter2.Size     = new System.Drawing.Size(3, 368);
     this.splitter2.TabIndex = 8;
     this.splitter2.TabStop  = false;
     //
     // pnlSelectedTreeView
     //
     this.pnlSelectedTreeView.Controls.Add(this.tvSelected);
     this.pnlSelectedTreeView.Dock     = System.Windows.Forms.DockStyle.Left;
     this.pnlSelectedTreeView.Location = new System.Drawing.Point(331, 0);
     this.pnlSelectedTreeView.Name     = "pnlSelectedTreeView";
     this.pnlSelectedTreeView.Size     = new System.Drawing.Size(317, 368);
     this.pnlSelectedTreeView.TabIndex = 7;
     //
     // splitter1
     //
     this.splitter1.Location = new System.Drawing.Point(328, 0);
     this.splitter1.Name     = "splitter1";
     this.splitter1.Size     = new System.Drawing.Size(3, 368);
     this.splitter1.TabIndex = 1;
     this.splitter1.TabStop  = false;
     //
     // pnlDiskTreeView
     //
     this.pnlDiskTreeView.Controls.Add(this.btnBrowse);
     this.pnlDiskTreeView.Controls.Add(this.tbPath);
     this.pnlDiskTreeView.Controls.Add(this.tvDisk);
     this.pnlDiskTreeView.Dock     = System.Windows.Forms.DockStyle.Left;
     this.pnlDiskTreeView.Location = new System.Drawing.Point(0, 0);
     this.pnlDiskTreeView.Name     = "pnlDiskTreeView";
     this.pnlDiskTreeView.Size     = new System.Drawing.Size(328, 368);
     this.pnlDiskTreeView.TabIndex = 0;
     //
     // AssetImportPlacer
     //
     this.Controls.Add(this.panel);
     this.Name = "AssetImportPlacer";
     this.Size = new System.Drawing.Size(1016, 384);
     this.panel.ResumeLayout(false);
     this.pnlAssetTreeView.ResumeLayout(false);
     this.pnlSelectedTreeView.ResumeLayout(false);
     this.pnlDiskTreeView.ResumeLayout(false);
     this.ResumeLayout(false);
 }