private void TSIRenderMouseMove(object sender, MouseEventArgs e) { if (this.MainBar.Items[MainBar.SelectedDockTab].GetType() == typeof(TSIDockContainer)) { TSIDockContainer SelectTSIDockContainer = (TSIDockContainer)this.MainBar.Items[MainBar.SelectedDockTab]; if (TreeTSI.SelectedNode != null) { if (TreeTSI.SelectedNode.Level == 1) { int ElementIndex = TreeTSI.SelectedNode.Index; int DDSIndex = TreeTSI.SelectedNode.Parent.Index; if (TSIclick) { if (e.X - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].X > 0 && e.Y - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Y > 0) { SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Width = e.X - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].X; SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Height = e.Y - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Y; } } SelectTSIDockContainer.DrawDDS(DDSIndex); SelectTSIDockContainer.DrawAera(DDSIndex, ElementIndex); } } } }
private void TreeTSI_NodeClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e) { if (e.Node.Level == 0) { addDDSToolStripMenuItem.Enabled = true; removeDDSToolStripMenuItem.Enabled = true; addElementToolStripMenuItem.Enabled = true; removeElementToolStripMenuItem.Enabled = false; copyTreeTSIMenuItem.Enabled = true; pasteTreeTSIMenuItem.Enabled = true; TSIDockContainer selectTSIDockContainer = (TSIDockContainer)MainBar.SelectedDockContainerItem; propertyGrid.SelectedObject = selectTSIDockContainer.tsi.listDDS[e.Node.Index]; try { selectTSIDockContainer.DrawDDS(e.Node.Index); } catch { AddLog(String.Format("Error , {0} can't be load", selectTSIDockContainer.tsi.listDDS[e.Node.Index].Path), LogType.MSG_ERROR); } } if (e.Node.Level == 1) { addDDSToolStripMenuItem.Enabled = false; removeDDSToolStripMenuItem.Enabled = false; addElementToolStripMenuItem.Enabled = true; removeElementToolStripMenuItem.Enabled = true; copyTreeTSIMenuItem.Enabled = true; pasteTreeTSIMenuItem.Enabled = true; TSIDockContainer selectTSIDockContainer = (TSIDockContainer)MainBar.SelectedDockContainerItem; propertyGrid.SelectedObject = selectTSIDockContainer.tsi.listDDS[e.Node.Parent.Index].ListDDS_element[e.Node.Index]; try { selectTSIDockContainer.DrawDDS(e.Node.Parent.Index); selectTSIDockContainer.DrawAera(e.Node.Parent.Index, e.Node.Index); } catch { AddLog(String.Format("Error , {0} can't be load", selectTSIDockContainer.tsi.listDDS[e.Node.Index].Path), LogType.MSG_ERROR); } } else { } }