private void InitializeComponent() { this.components = new System.ComponentModel.Container(); navigateTree = NavigateTree.GetInstance(); radTreeView = navigateTree.GetRadTree(); ((System.ComponentModel.ISupportInitialize)(radTreeView)).BeginInit(); this.SuspendLayout(); // // UCNavigatorBar // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(navigateTree.GetRadTree()); this.Name = "UCNavigatorBar"; this.Size = new System.Drawing.Size(233, 634); ((System.ComponentModel.ISupportInitialize)(radTreeView)).EndInit(); this.ResumeLayout(false); }
protected virtual void OnFileAcquied(string FilePath) { NFileInfo fileInfo = new NFileInfo(); fileInfo.SetDate(DateTime.Now); fileInfo.Author = AccountSetting.GetInstance().AccountName; fileInfo.LocalPath = FilePath; fileInfo.FileName = FileHelper.GetFileName(FilePath); fileInfo.Operation = EOperType.eADD; NBatchInfo batchInfo = null; RadTreeNode batchNode; if (this._lastScanOpeType == ScanOpe.Add) { if (navigateTree.GetRadTree().Nodes.Count == 0) { string batchNo = BatchNoMaker.Cur.FromInputDialog(FilePath); if (string.IsNullOrEmpty(batchNo)) { return; } batchInfo = new NBatchInfo { BatchNO = batchNo }; batchNode = navigateTree.CreateBatchNode(batchInfo); } else if (navigateTree.GetRadTree().SelectedNode != null) { batchNode = navigateTree.GetRadTree().SelectedNode.GetBatchNode(); batchInfo = batchNode.Tag as NBatchInfo; } else { batchNode = navigateTree.GetRadTree().Nodes[navigateTree.GetRadTree().Nodes.Count - 1]; batchInfo = batchNode.Tag as NBatchInfo; } RadTreeNode fileNode = navigateTree.CreateFileNodeFromLocal(batchNode, fileInfo, batchInfo); batchNode.ExpandAll(); navigateTree.UpdateBatchNodeTitle(batchNode); Application.DoEvents(); } else if (this._lastScanOpeType == ScanOpe.ReplaceCurrent) { RadTreeNode selectedNode = navigateTree.SelectedNode.UpdateFileNode(fileInfo); //this.OnItemSelectChanged(this, new TEventArg<RadTreeNode>(selectedNode)); } else if (this._lastScanOpeType == ScanOpe.AddToCur) { //TODO AddToCur? /*RadTreeNode node = navigateTree.SelectedNode; * if (node.Tag is NFileInfo) * { * node = node.Parent; * }*/ batchNode = navigateTree.SelectedNode; batchInfo = batchNode.Tag as NBatchInfo; //NFileInfo info4 = new NFileInfo(); //info4.SetDate(DateTime.Now); //info4.LocalPath = FilePath; //info4.FileName = FileHelper.GetFileName(FilePath); //info4.Operation = EOperType.eADD; //RadTreeNode node5 = node.Nodes.Add(info4.DisplayName); //node.TextAlignment = ContentAlignment.MiddleCenter; //node5.SetImageIcon(info4.LocalPath, this._viewfileinfoicon); //node5.Tag = info4; //this.SetFileNodeDefualtProperty(node5); //node5.Selected = true; //node5.ToolTipText = info4.ToUITipString(); //node.ExpandAll(); RadTreeNode fileNode = navigateTree.CreateFileNodeFromLocal(batchNode, fileInfo, batchInfo); navigateTree.UpdateBatchNodeTitle(batchNode); Application.DoEvents(); } }